/* ===== 全局重置与变量 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --bg-dark: #0f0f0f;
  --bg-card: #1a1a2e;
  --bg-card-hover: #252542;
  --bg-input: #0a0a14;
  --text-primary: #ffffff;
  --text-secondary: #a0aec0;
  --text-muted: #6b7280;
  --border: #2d2d44;
  --border-light: #3f3f5e;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== 通用按钮组件 ===== */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--border-light); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }

.btn-success {
  background: linear-gradient(135deg, var(--success), #059669);
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.btn-success:hover { box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4); }

.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid transparent;
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--border);
}
.icon-btn.delete:hover {
  background: var(--danger);
  border-color: var(--danger);
}

/* ===== 表单组件 ===== */
.input, .textarea, .select {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0aec0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 7px;
  color: var(--text-secondary);
}

/* ===== 滑块 ===== */
input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ===== 开关 ===== */
.toggle-switch {
  position: relative;
  width: 46px;
  height: 26px;
  background: var(--border);
  border-radius: 13px;
  cursor: pointer;
  transition: background 0.25s;
  flex-shrink: 0;
}
.toggle-switch.active { background: var(--primary); }
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.toggle-switch.active::after { transform: translateX(20px); }

/* ===== 卡片 & 容器 ===== */
.card {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px;
}

/* ===== 页面控制 ===== */
.page { display: none; min-height: 100vh; }
.page.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 顶部导航栏 ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar h1 { font-size: 18px; font-weight: 600; letter-spacing: -0.3px; }

.back-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  font-family: inherit;
}
.back-btn:hover { background: var(--bg-card-hover); border-color: var(--border-light); }

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* ===== 台本列表页 ===== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}
.page-title { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; }
.page-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 6px;
}

.header-actions { display: flex; gap: 10px; align-items: center; }
.search-input { width: 220px; }

.scripts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.script-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.script-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transform: scaleX(0);
  transition: transform 0.3s;
}
.script-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow), var(--shadow-lg);
}
.script-card:hover::before { transform: scaleX(1); }

.script-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 70px;
}
.script-card-preview {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
  height: 62px;
}
.script-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.script-card-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s;
}
.script-card:hover .script-card-actions { opacity: 1; }

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 100px 20px;
  color: var(--text-secondary);
}
.empty-state-icon {
  font-size: 72px;
  margin-bottom: 20px;
  opacity: 0.6;
}
.empty-state-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.empty-state-desc {
  font-size: 14px;
  margin-bottom: 24px;
  color: var(--text-secondary);
}

/* ===== 模态框 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.active { display: flex; }

.modal {
  background: var(--bg-card);
  border-radius: 16px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-title { font-size: 18px; font-weight: 600; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}
.modal-close:hover { background: rgba(255, 255, 255, 0.1); color: var(--text-primary); }

.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ===== 模式选择 ===== */
.mode-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.mode-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 32px 24px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.mode-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}
.mode-card.selected {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: var(--shadow-glow);
}
.mode-card.selected::after {
  content: '✓';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

.mode-icon { font-size: 48px; margin-bottom: 16px; }
.mode-name { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.mode-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.mode-features {
  margin-top: 14px;
  text-align: left;
  font-size: 12px;
  color: var(--text-muted);
}
.mode-features div { padding: 3px 0; }
.mode-features div::before { content: '✓ '; color: var(--success); }

.start-section { text-align: center; }

/* ===== 普通版提词器 ===== */
.prompter-container {
  display: flex;
  height: calc(100vh - 60px);
  background: #000;
  position: relative;
}

/* 控制面板 */
.control-panel {
  width: 320px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 18px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.control-panel.hidden { display: none; }

.control-section {
  background: var(--bg-input);
  border-radius: 10px;
  padding: 16px;
  border: 1px solid var(--border);
}
.control-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.control-item { margin-bottom: 14px; }
.control-item:last-child { margin-bottom: 0; }
.control-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--text-secondary);
}
.control-value {
  color: var(--primary-light);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* 颜色选择 */
.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}
.color-picker {
  width: 42px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  background: none;
  padding: 2px;
  flex-shrink: 0;
}
.color-picker::-webkit-color-swatch-wrapper { padding: 0; }
.color-picker::-webkit-color-swatch { border: none; border-radius: 5px; }

.color-preset {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}
.color-preset-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.color-preset-btn:hover { transform: scale(1.1); }
.color-preset-btn.active { border-color: white; box-shadow: 0 0 0 2px var(--primary); }

/* 提词显示区 */
.prompter-display {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #000;
}
.prompter-text-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  overflow: hidden;
}
.prompter-text {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  font-size: 48px;
  line-height: 1.8;
  color: #ffffff;
  white-space: pre-wrap;
  word-wrap: break-word;
  text-align: center;
  font-weight: 500;
  transition: font-size 0.2s, color 0.2s, line-height 0.2s, width 0.2s;
}

/* 指示器线 */
.indicator-line {
  position: absolute;
  top: 30%;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(239, 68, 68, 0.4);
  pointer-events: none;
  z-index: 10;
}
.indicator-line::before,
.indicator-line::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}
.indicator-line::before { left: 24px; }
.indicator-line::after { right: 24px; }

/* 进度条 */
.progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  z-index: 15;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* 播放控制栏 */
.play-controls {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(26, 26, 46, 0.92);
  padding: 12px 24px;
  border-radius: 50px;
  backdrop-filter: blur(12px);
  z-index: 20;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.play-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
  flex-shrink: 0;
}
.play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5);
}
.play-btn:active { transform: scale(0.95); }

.ctrl-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

/* 镜像模式 */
.mirror-x { transform: translateX(-50%) scaleX(-1) !important; }
.mirror-y { transform: translateX(-50%) scaleY(-1) !important; }
.mirror-both { transform: translateX(-50%) scale(-1, -1) !important; }

/* ===== 专业版布局 ===== */
.pro-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  height: calc(100vh - 60px);
}

.pro-preview-area {
  background: #000;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pro-preview-header {
  padding: 12px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.pro-preview-title {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.pro-preview-title .dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.pro-preview-content {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.pro-preview-text-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  overflow: hidden;
}
.pro-preview-text {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  font-size: 28px;
  line-height: 1.8;
  color: #ffffff;
  white-space: pre-wrap;
  word-wrap: break-word;
  text-align: center;
  transition: font-size 0.2s, color 0.2s, line-height 0.2s, width 0.2s;
}

.pro-side-panel {
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pro-bottom-controls {
  padding: 16px 20px;
  background: rgba(26, 26, 46, 0.95);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

/* ===== 专业版提词屏窗口样式（内联在新窗口中） ===== */
/* 由 JS 动态生成 */

/* ===== Toast 提示 ===== */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  background: var(--bg-card);
  color: white;
  padding: 12px 24px;
  border-radius: 10px;
  border: 1px solid var(--border);
  z-index: 10000;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  max-width: 90vw;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}
.toast.success { border-color: var(--success); }
.toast.success::before { content: '✓ '; color: var(--success); font-weight: bold; }
.toast.error { border-color: var(--danger); }
.toast.error::before { content: '✕ '; color: var(--danger); font-weight: bold; }

/* ===== 倒计时 ===== */
.countdown-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  z-index: 50;
  pointer-events: none;
}
.countdown-overlay.active { display: flex; }
.countdown-number {
  font-size: 180px;
  font-weight: 800;
  color: white;
  text-shadow: 0 0 60px rgba(99, 102, 241, 0.6);
  animation: countdownPulse 1s ease-in-out;
  line-height: 1;
}
@keyframes countdownPulse {
  0% { transform: scale(1.5); opacity: 0; }
  30% { transform: scale(1); opacity: 1; }
  70% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0; }
}

/* 专业版提词屏内的倒计时（由提词屏页面内联样式处理） */

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
  transition: background 0.2s;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ===== 页脚 ===== */
.page-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-links {
  margin-bottom: 8px;
  font-size: 14px;
}
.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--primary-light); }
.footer-divider {
  color: var(--border);
  margin: 0 12px;
}
.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== 响应式 - 平板 ===== */
@media (max-width: 1024px) {
  .scripts-grid { grid-template-columns: repeat(2, 1fr); }
  .control-panel { width: 280px; padding: 14px; }
  .prompter-text { font-size: 36px; }
  .pro-layout { grid-template-columns: 1fr 280px; }
  .pro-side-panel { padding: 14px; }
}

/* ===== 响应式 - 手机 ===== */
@media (max-width: 768px) {
  .topbar { padding: 12px 16px; }
  .topbar h1 { font-size: 16px; }
  .topbar-logo-icon { width: 32px; height: 32px; font-size: 16px; }
  
  .container { padding: 18px 16px; }
  .page-title { font-size: 22px; }
  .page-header { flex-direction: column; align-items: stretch; }
  .header-actions { flex-direction: column; }
  .search-input { width: 100%; }
  
  .scripts-grid { grid-template-columns: 1fr; }
  .script-card-actions { opacity: 1; }
  
  .mode-selector { grid-template-columns: 1fr; gap: 14px; }
  .mode-card { padding: 24px 20px; }
  
  /* 普通版 - 手机端上下布局 */
  .prompter-container {
    flex-direction: column-reverse;
    height: calc(100vh - 56px);
  }
  .control-panel {
    width: 100%;
    max-height: 48vh;
    border-right: none;
    border-top: 1px solid var(--border);
    padding: 12px 14px;
    gap: 12px;
  }
  .control-section { padding: 12px 14px; }
  
  .prompter-text { font-size: 26px; width: 90% !important; }
  .indicator-line::before { left: 12px; }
  .indicator-line::after { right: 12px; }
  
  .play-controls {
    padding: 10px 18px;
    gap: 10px;
    bottom: 18px;
  }
  .play-btn { width: 48px; height: 48px; font-size: 18px; }
  .ctrl-btn { width: 36px; height: 36px; font-size: 14px; }
  
  /* 专业版 - 手机端上下布局 */
  .pro-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    height: calc(100vh - 56px);
  }
  .pro-side-panel {
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: 50vh;
    padding: 12px 14px;
  }
  
  .pro-preview-text { font-size: 22px; width: 90% !important; }
  
  .modal { border-radius: 12px; }
  .modal-header, .modal-body, .modal-footer { padding-left: 18px; padding-right: 18px; }
}

/* ===== 小屏优化 ===== */
@media (max-width: 480px) {
  .prompter-text { font-size: 22px; }
  .btn { padding: 9px 16px; font-size: 13px; }
  .btn-lg { padding: 12px 22px; font-size: 15px; }
}
