/* ==========================================
   提词器 — 设计系统与全部样式
   ========================================== */

/* ----- CSS 设计令牌 ----- */
:root {
  /* 暗色系 (Slate Palette) */
  --color-slate-50:  #f8fafc;
  --color-slate-100: #f1f5f9;
  --color-slate-300: #cbd5e1;
  --color-slate-400: #94a3b8;
  --color-slate-500: #64748b;
  --color-slate-600: #475569;
  --color-slate-700: #334155;
  --color-slate-800: #1e293b;
  --color-slate-900: #0f172a;
  --color-slate-950: #020617;

  /* 强调色 */
  --color-blue-400: #60a5fa;
  --color-blue-500: #3b82f6;
  --color-blue-600: #2563eb;
  --color-amber-400: #fbbf24;
  --color-amber-500: #f59e0b;
  --color-green-500: #22c55e;
  --color-red-400: #f87171;
  --color-red-500: #ef4444;

  /* 语义化变量 */
  --bg-app:              var(--color-slate-900);
  --bg-card:             var(--color-slate-800);
  --bg-input:            var(--color-slate-950);
  --bg-teleprompter:     var(--color-slate-950);
  --border-color:        var(--color-slate-700);
  --border-hover:        var(--color-slate-600);
  --text-primary:        var(--color-slate-50);
  --text-secondary:      var(--color-slate-400);
  --text-muted:          var(--color-slate-500);
  --accent:              var(--color-blue-500);
  --accent-hover:        var(--color-blue-600);
  --accent-soft:         rgba(59, 130, 246, 0.15);
  --reading-line: var(--color-amber-500);

  /* 字体 */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
               'Segoe UI', Roboto, 'Noto Sans SC', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas,
               'Courier New', monospace;

  /* 间距 */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* 阴影 */
  --shadow-sm:  0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md:  0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg:  0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow-blue:  0 0 20px rgba(59, 130, 246, 0.2);

  /* 过渡 */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----- 基础重置 ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: dark;
}

body {
  background: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ----- 设置页布局 ----- */
.setup-view {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--space-6) var(--space-4) var(--space-12);
}

.setup-container {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* ----- 头部 ----- */
.app-header {
  text-align: center;
  padding: var(--space-8) 0 var(--space-4);
}

.app-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--color-slate-50) 0%, var(--color-slate-300) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.app-subtitle {
  margin-top: var(--space-2);
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 400;
}

.app-intro {
  margin-top: var(--space-2);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ----- 页脚 ----- */
.site-footer {
  text-align: center;
  padding: var(--space-3) 0 var(--space-6);
}

.privacy-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.privacy-link:hover {
  color: var(--text-secondary);
  text-decoration: underline;
}

/* ----- 广告占位符 ----- */
.ad-placeholder {
  text-align: center;
  margin: var(--space-4) auto;
  max-width: 728px;
  min-height: 90px;
  overflow: hidden;
}

.ad-placeholder.setup-ad {
  margin-top: var(--space-6);
}

/* ----- 语言选择器 ----- */
.lang-selector {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-3) 0;
}

.lang-selector label {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.lang-selector label svg {
  opacity: 1;
}

.lang-selector select {
  padding: 7px 32px 7px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color var(--transition-fast);
  min-width: 180px;
}

.lang-selector select:hover {
  border-color: var(--border-hover);
}

.lang-selector select:focus-visible {
  border-color: var(--accent);
  outline: none;
  box-shadow: var(--shadow-glow-blue);
}

/* 移动端语言选择器：左对齐、全宽 */
@media (max-width: 480px) {
  .lang-selector {
    justify-content: flex-start;
  }

  .lang-selector select {
    flex: 1;
    min-width: 0;
  }
}

/* ----- 文字输入区 ----- */
.script-section {
  width: 100%;
}

/* 标记工具栏 */
.marker-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) 0;
}

.marker-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-right: var(--space-1);
}

.marker-btn {
  padding: 3px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}

.marker-btn:hover {
  border-color: var(--color-amber-500);
  color: var(--color-amber-400);
  background: rgba(245, 158, 11, 0.08);
}

.marker-btn:active {
  background: rgba(245, 158, 11, 0.15);
}

.marker-help {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--color-slate-400);
  line-height: 1.5;
}

.textarea-wrapper {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.textarea-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow-blue);
}

.script-textarea {
  display: block;
  width: 100%;
  min-height: 260px;
  padding: var(--space-5);
  background: var(--bg-input);
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.8;
  resize: vertical;
  outline: none;
}

.script-textarea::placeholder {
  color: var(--color-slate-600);
  line-height: 1.8;
}

.textarea-footer {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
}

.char-count,
.word-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.word-count {
  margin-left: auto;
}

.est-read-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: var(--space-3);
}

/* 字数进度条（浮动条内） */
.progress-indicator {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  min-width: 70px;
  text-align: center;
}

.progress-indicator.bar-mode {
  min-width: 100px;
  height: 4px;
  background: var(--color-slate-700);
  border-radius: var(--radius-full);
  overflow: hidden;
  text-indent: -9999px;
}

.progress-indicator.bar-mode::after {
  content: '';
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-full);
  width: var(--word-progress, 0%);
  transition: width 200ms linear;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-red-400);
}

/* ----- 控制面板 ----- */
.control-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-8);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.control-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.control-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.control-label label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.control-unit {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ----- 滑块组 ----- */
.slider-group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.slider-min,
.slider-max {
  font-size: 0.8rem;
  color: var(--text-muted);
  min-width: 28px;
  text-align: center;
}

/* 自定义滑块（WebKit） */
.slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-slate-700);
  outline: none;
  cursor: pointer;
}

.slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: var(--radius-full);
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent) var(--val, 50%),
    var(--color-slate-700) var(--val, 50%),
    var(--color-slate-700) 100%
  );
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--color-slate-50);
  margin-top: -7px;
  cursor: pointer;
  box-shadow: var(--shadow-glow-blue);
  transition: transform var(--transition-fast);
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* 自定义滑块（Firefox） */
.slider::-moz-range-track {
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-slate-700);
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--color-slate-50);
  cursor: pointer;
  box-shadow: var(--shadow-glow-blue);
}

/* ----- 速度预设按钮 ----- */
.speed-presets {
  display: flex;
  gap: var(--space-2);
  margin-top: 2px;
}

.preset-btn {
  padding: 4px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}

.preset-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.preset-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* ----- 按钮 ----- */
.control-actions {
  display: flex;
  gap: var(--space-3);
  padding-top: var(--space-2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-large {
  flex: 1;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 14px;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.btn-ghost:active {
  background: rgba(255, 255, 255, 0.08);
}

/* ----- 验证提示 ----- */
.validation-message {
  font-size: 0.9rem;
  color: var(--color-red-400);
  text-align: center;
  min-height: 0;
  overflow: hidden;
  transition: all var(--transition-fast);
  max-height: 0;
  opacity: 0;
}

.validation-message.visible {
  max-height: 40px;
  opacity: 1;
  padding: var(--space-2) 0 0;
}

/* ----- 快捷键提示 ----- */
.shortcut-hints {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-4) 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.hint-label {
  margin-right: var(--space-1);
}

.hint-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

kbd {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==============================================
   提词器显示页
   ============================================== */

/* 倒计时覆盖层 */
.countdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-teleprompter);
  pointer-events: none;
}

.countdown-number {
  font-size: clamp(6rem, 20vw, 15rem);
  font-weight: 700;
  line-height: 1;
  transition: color 300ms ease, transform 200ms ease;
  color: var(--accent);
}

.countdown-number.go {
  color: var(--color-green-500);
  transform: scale(1.1);
}

.teleprompter-view {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg-teleprompter);
}

.teleprompter-view.mirror {
  transform: scaleX(-1);
}

/* 视口 */
.teleprompter-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.15) 8%,
    rgba(0, 0, 0, 1) 18%,
    rgba(0, 0, 0, 1) 82%,
    rgba(0, 0, 0, 0.15) 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.15) 8%,
    rgba(0, 0, 0, 1) 18%,
    rgba(0, 0, 0, 1) 82%,
    rgba(0, 0, 0, 0.15) 92%,
    transparent 100%
  );
}

/* 滚动内容 */
.scroll-container {
  will-change: transform;
}

.top-spacer {
  height: 40vh;
}

.bottom-spacer {
  height: 50vh;
}

/* 内联结束提示（在 textContent 中渲染） */
.end-hint-display {
  text-align: center;
  color: var(--accent);
  font-weight: 600;
  margin-top: 2em;
  font-size: 1.1em;
}

.text-content {
  padding: 0 12vw;
}

.text-content p {
  color: var(--color-slate-50);
  line-height: 1.5;
  font-weight: 600;
  text-align: start;
  margin: 0;
}

/* RTL 语言（阿拉伯语等）增加行高提升可读性 */
.text-content p:dir(rtl) {
  line-height: 1.8;
}

/* 段落分隔符 */
.paragraph-divider {
  text-align: center;
  color: var(--color-amber-500);
  font-size: 60%;
  letter-spacing: 0.5em;
  margin: 0.8em 0;
  opacity: 0.7;
  user-select: none;
}

/* 倒计时行 */
.countdown-line {
  text-align: center;
  color: var(--color-amber-400) !important;
  font-size: 150% !important;
  font-weight: 700 !important;
  margin: 0.3em 0;
}

/* 播放完毕提示 */
.end-section {
  text-align: center;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-top: 35vh;
  box-sizing: border-box;
}

.end-message-text {
  color: var(--color-amber-400);
  font-size: 300%;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.end-message-hint {
  color: var(--text-secondary);
  font-size: 100%;
  font-weight: 400;
  margin: 0.8em 0 0;
}

/* 内文标记渲染样式 */
.cue-marker-emphasis {
  font-weight: 800;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  padding: 1px 5px;
  border-radius: 3px;
}

.cue-marker-emphasis::before {
  content: '\26A1 ';
  font-size: 85%;
}

.cue-marker-pause {
  color: #22d3ee;
  padding: 0 0.15em;
  letter-spacing: 0.1em;
}

.cue-marker-pause::before {
  content: '\23F8 ';
  font-size: 85%;
}

.cue-marker-fast {
  color: #4ade80;
}

.cue-marker-fast::before {
  content: '\25B6\25B6 ';
  font-size: 85%;
}

.cue-marker-slow {
  color: #fb7185;
}

.cue-marker-slow::before {
  content: '\25C0\25C0 ';
  font-size: 85%;
}

/* 阅读指示线 */
.reading-line {
  position: fixed;
  left: 5%;
  width: 90%;
  height: 2px;
  background: var(--reading-line);
  box-shadow:
    0 0 6px rgba(245, 158, 11, 0.7),
    0 0 18px rgba(245, 158, 11, 0.35),
    0 0 40px rgba(245, 158, 11, 0.15);
  pointer-events: none;
  z-index: 10;
}

/* 进度条 */
.progress-bar-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.04);
  z-index: 20;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
  transition: width 80ms linear;
}

/* 浮动控制条 */
.floating-controls {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 10px 18px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
  z-index: 30;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.floating-controls.visible {
  opacity: 1;
}

.btn-floating {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-floating:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.wpm-badge {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  min-width: 80px;
  text-align: center;
  user-select: none;
}

.elapsed-time {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  min-width: 44px;
  text-align: center;
}

/* ----- 全屏样式 ----- */
.teleprompter-view:fullscreen {
  background: #000;
  cursor: none;
}

.teleprompter-view:-webkit-full-screen {
  background: #000;
  cursor: none;
}

/* 全屏时浮动控制条始终可见 */
.teleprompter-view:fullscreen .floating-controls {
  opacity: 1;
}

.teleprompter-view:-webkit-full-screen .floating-controls {
  opacity: 1;
}

/* 全屏时鼠标移动恢复光标 */
.teleprompter-view:fullscreen.show-cursor {
  cursor: default;
}

.teleprompter-view:-webkit-full-screen.show-cursor {
  cursor: default;
}

/* ----- 通用工具类 ----- */
.hidden {
  display: none !important;
}

.icon-hidden {
  display: none !important;
}

/* ----- 响应式 ----- */
@media (max-width: 768px) {
  .setup-container {
    max-width: 100%;
    gap: var(--space-4);
  }

  .app-title {
    font-size: 2rem;
  }

  .control-panel {
    padding: var(--space-4) var(--space-5);
    gap: var(--space-4);
  }

  .control-actions {
    flex-wrap: wrap;
  }

  .btn-large {
    flex: 1 1 100%;
    min-width: 0;
  }

  .btn-ghost {
    flex: 1;
  }

  .text-content {
    padding: 0 6vw;
  }

  /* 移动端：阅读线默认更高，底部遮罩更宽松 */
  .teleprompter-viewport {
    -webkit-mask-image: linear-gradient(
      to bottom,
      transparent 0%,
      rgba(0, 0, 0, 0.15) 6%,
      rgba(0, 0, 0, 1) 14%,
      rgba(0, 0, 0, 1) 84%,
      rgba(0, 0, 0, 0.15) 92%,
      transparent 100%
    );
    mask-image: linear-gradient(
      to bottom,
      transparent 0%,
      rgba(0, 0, 0, 0.15) 6%,
      rgba(0, 0, 0, 1) 14%,
      rgba(0, 0, 0, 1) 84%,
      rgba(0, 0, 0, 0.15) 92%,
      transparent 100%
    );
  }

  .shortcut-hints {
    flex-direction: column;
    text-align: center;
  }

  .hint-items {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .setup-view {
    padding: var(--space-4) var(--space-3) var(--space-8);
  }

  .app-header {
    padding: var(--space-4) 0 var(--space-2);
  }

  .app-title {
    font-size: 1.6rem;
  }

  .app-subtitle {
    font-size: 0.85rem;
  }

  .script-textarea {
    min-height: 200px;
    font-size: 0.875rem;
  }

  .control-panel {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
  }

  .speed-presets {
    flex-wrap: wrap;
  }

  .preset-btn {
    padding: 4px 10px;
    font-size: 0.75rem;
  }

  .text-content {
    padding: 0 4vw;
  }

  .floating-controls {
    padding: 8px 10px;
    gap: var(--space-1);
  }

  .marker-toolbar {
    flex-wrap: wrap;
  }

  .marker-btn {
    padding: 4px 8px;
    font-size: 0.7rem;
  }

  .elapsed-time,
  .progress-indicator {
    font-size: 0.7rem;
    min-width: 36px;
  }
}
