/* 核心样式 - 紧凑版本 */
#ybcp-scroll-master {
  width: 100%;
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  box-sizing: border-box;
}

/* 控制面板样式 - 紧凑 */
#ybcp-controls {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* 主行布局 */
.ybcp-main-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

/* 左侧控制区域 - 现在在左边 */
.ybcp-side-controls {
  flex: 1;
  min-width: 150px;
  max-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ybcp-main-controls {
  flex: 3;
  min-width: 0; /* 防止flex元素溢出 */
}

/* 输入组紧凑 */
.ybcp-input-group {
  margin-bottom: 12px;
}

#ybcp-controls label {
  font-size: 13px;
  color: #555;
  font-weight: 600;
  display: flex;
  justify-content: left;
  align-items: center;
  margin-bottom: 5px;
}

#ybcp-controls label span {
  font-weight: normal;
  color: #4a90e2;
  font-size: 12px;
}

#ybcp-text-input {
  width: 100%;
  min-height: 50px;
  max-height: 80px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  line-height: 1.4;
  resize: vertical;
  box-sizing: border-box;
  transition: border 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

#ybcp-text-input:focus {
  border-color: #4a90e2;
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
  outline: none;
}

/* 控制行紧凑 */
.ybcp-control-row {
  display: flex;
  gap: 15px;
  margin-top: 8px;
}

.ybcp-control-item {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 颜色控制紧凑 - 现在在左侧 */
.ybcp-color-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f0f2f5;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #e8eaed;
}

.ybcp-color-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ybcp-color-item label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
  margin: 0;
  white-space: nowrap;
}

.ybcp-color-item input[type="color"] {
  width: 40px;
  height: 32px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  padding: 2px;
  box-sizing: border-box;
  transition: all 0.2s;
  flex-shrink: 0;
}

.ybcp-color-item input[type="color"]:hover {
  border-color: #4a90e2;
  transform: scale(1.05);
}

/* 倾斜控制紧凑 - 现在在左侧 */
.ybcp-italic-control {
  background: #f0f2f5;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #e8eaed;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ybcp-checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 6px;
  user-select: none;
  font-size: 13px;
  color: #555;
  font-weight: 500;
  width: 100%;
  justify-content: center;
}

.ybcp-checkbox-label input[type="checkbox"] {
  display: none;
}

.ybcp-checkbox-custom {
  width: 18px;
  height: 18px;
  border: 2px solid #ccc;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  position: relative;
  background: white;
}

.ybcp-checkbox-custom:after {
  content: "✓";
  color: white;
  font-size: 12px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.2s;
}

.ybcp-checkbox-label input[type="checkbox"]:checked + .ybcp-checkbox-custom {
  background-color: #4a90e2;
  border-color: #4a90e2;
}

.ybcp-checkbox-label input[type="checkbox"]:checked + .ybcp-checkbox-custom:after {
  opacity: 1;
}

/* 文字大小控制紧凑 */
.ybcp-size-control {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.ybcp-size-btn {
  width: 32px;
  height: 28px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  flex-shrink: 0;
  padding: 0;
}

.ybcp-size-btn:hover {
  background-color: #f0f0f0;
  border-color: #4a90e2;
  color: #4a90e2;
}

/* 滑块样式紧凑 */
input[type="range"] {
  width: 100%;
  height: 5px;
  -webkit-appearance: none;
  background: linear-gradient(to right, #e0e0e0, #4a90e2 50%, #e0e0e2);
  border-radius: 2px;
  outline: none;
  margin: 6px 0 3px 0;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #4a90e2;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #4a90e2;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* 按钮样式 */
#ybcp-buttons {
  display: flex;
  border-top: 1px solid #e8eaed;
  padding-top: 15px;
  margin-top: 5px;
}

#ybcp-start-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #4a90e2, #357abd);
  color: white;
  box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
}

#ybcp-start-btn:hover {
  background: linear-gradient(135deg, #3a7bc8, #2c6aa8);
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(74, 144, 226, 0.4);
}

#ybcp-start-btn:active {
  transform: translateY(0);
}

#ybcp-start-btn:disabled {
  background: #95a5a6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 全屏滚动区域 */
#ybcp-scroll-container {
  display: none;
  background-color: #1a1a1a;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

/* 全屏样式 */
#ybcp-scroll-container:fullscreen {
  display: flex;
  background-color: #1a1a1a;
  width: 100vw;
  height: 100vh;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#ybcp-scroll-container:-webkit-full-screen {
  display: flex;
  background-color: #1a1a1a;
  width: 100vw;
  height: 100vh;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#ybcp-scroll-container:-moz-full-screen {
  display: flex;
  background-color: #1a1a1a;
  width: 100vw;
  height: 100vh;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#ybcp-scroll-container:-ms-fullscreen {
  display: flex;
  background-color: #1a1a1a;
  width: 100vw;
  height: 100vh;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* 滚动文字样式 */
#ybcp-scroll-text {
  white-space: nowrap;
  color: white;
  font-weight: 700;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.5s ease-out;
  transform-origin: center center;
  letter-spacing: 1px;
  line-height: 1.2;
  text-align: center;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 8vw;
  font-style: normal;
}

/* 响应式设计 - 更紧凑 */
@media (max-width: 900px) {
  .ybcp-main-row {
    flex-direction: column;
    gap: 12px;
  }
  
  .ybcp-side-controls {
    max-width: 100%;
    flex-direction: row;
    justify-content: space-between;
  }
  
  .ybcp-color-controls {
    flex: 2;
    flex-direction: row;
    align-items: center;
  }
  
  .ybcp-italic-control {
    flex: 1;
    min-width: 80px;
  }
}

@media (max-width: 768px) {
  #ybcp-controls {
    padding: 12px;
  }
  
  .ybcp-control-row {
    flex-direction: column;
    gap: 10px;
  }
  
  .ybcp-side-controls {
    flex-direction: row;
  }
  
  .ybcp-color-controls {
    flex-direction: row;
  }
  
  .ybcp-color-item {
    flex: 1;
  }
  
  .ybcp-color-item input[type="color"] {
    width: 35px;
    height: 30px;
  }
  
  #ybcp-text-input {
    min-height: 45px;
    font-size: 13px;
    padding: 8px 10px;
  }
  
  .ybcp-size-btn {
    width: 30px;
    height: 26px;
    font-size: 13px;
  }
  
  #ybcp-start-btn {
    padding: 9px 14px;
    font-size: 13px;
  }
  
  #ybcp-scroll-text {
    font-size: 10vw;
  }
}

@media (max-width: 480px) {
  .ybcp-main-row {
    gap: 10px;
  }
  
  .ybcp-side-controls {
    flex-direction: column;
  }
  
  .ybcp-color-controls {
    flex-wrap: wrap;
  }
  
  .ybcp-color-item {
    flex: none;
  }
  
  .ybcp-color-item input[type="color"] {
    width: 32px;
    height: 28px;
  }
  
  #ybcp-controls label {
    font-size: 12px;
  }
  
  .ybcp-checkbox-label {
    font-size: 12px;
  }
  
  .ybcp-checkbox-custom {
    width: 16px;
    height: 16px;
  }
}

/* 全屏状态下的滚动文字优化 */
@media (min-width: 1200px) {
  #ybcp-scroll-text {
    font-size: 7vw;
  }
}