/* ===== 宇宙无敌表达训练系统 - Web版 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

button, input, select, textarea, .subtitle-scroll, .feedback-content, .modal-body {
  font-family: inherit;
}

.hidden { display: none !important; }

/* ===== 三列布局 ===== */
.layout {
  display: grid;
  grid-template-columns: 200px 1fr 280px;
  height: 100vh;
  height: 100dvh;
  gap: 0;
}

/* 左栏 */
.panel-left {
  padding: 60px 16px 16px;
  border-right: 1px solid #1a1a1a;
  overflow: hidden;
}

/* 右栏 */
.panel-right {
  padding: 60px 16px 16px;
  border-left: 1px solid #1a1a1a;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-title {
  font-size: 13px;
  color: #888;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #222;
}

.btn-sm {
  padding: 3px 8px;
  font-size: 11px;
  border: 1px solid #333;
  border-radius: 4px;
  background: #1a1a1a;
  color: #aaa;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-sm:hover {
  background: #333;
  color: #fff;
  border-color: #E5007E;
}

.subtitle-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px 0;
  flex-shrink: 0;
}

.subtitle-topbar-right {
  display: flex;
  gap: 4px;
}

.btn-paste-top {
  background: #1a1a1a;
  border-color: #444;
  color: #ccc;
  padding: 5px 12px;
  font-size: 12px;
}

.btn-paste-top:hover {
  border-color: #E5007E;
  color: #fff;
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 统计 */
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}
.stat-label { font-size: 13px; color: #666; }
.stat-value { font-size: 18px; font-weight: 600; font-family: "SF Mono", monospace; }
.stat-red { color: #ff6b6b; }
.stat-orange { color: #ffa94d; }
.stat-yellow { color: #ffd43b; }
.stat-green { color: #69db7c; }

/* 实时反馈 */
.feedback-content {
  flex: 1;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.6;
  color: #ccc;
}
.feedback-item {
  padding: 8px 0;
  border-bottom: 1px solid #1a1a1a;
  color: #ddd;
}
.feedback-item:last-child { border-bottom: none; }
.feedback-item.type-vague { color: #ffd43b; }
.feedback-item.type-filler { color: #888; font-size: 12px; }
.feedback-item.type-hedge { color: #ffa94d; }
.feedback-item.type-ai { color: #fff; }
.feedback-item.type-good { color: #69db7c; }

/* ===== 中间主区域 ===== */
.main-area {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* 顶栏 */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  flex-shrink: 0;
}
.app-title { font-size: 13px; color: #555; letter-spacing: 1px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.timer { font-size: 16px; font-family: "SF Mono", monospace; color: #555; }
.timer.active { color: #E5007E; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.5;} }
.btn-icon { background:none; border:none; font-size:18px; cursor:pointer; padding:4px; }

/* 字幕滚动区 */
.subtitle-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px 40px 20px;
  min-height: 0;
  border: 1.5px solid rgba(229, 0, 126, 0.3);
  border-radius: 12px;
  margin: 0 8px;
  animation: subtitleGlow 3s ease-in-out infinite;
}
@keyframes subtitleGlow {
  0%, 100% { border-color: rgba(229,0,126,0.2); box-shadow: inset 0 0 10px rgba(229,0,126,0.03); }
  50% { border-color: rgba(229,0,126,0.5); box-shadow: inset 0 0 15px rgba(229,0,126,0.06); }
}
.subtitle-container {
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.subtitle-line {
  font-size: 26px;
  font-weight: 300;
  line-height: 1.7;
  color: #fff;
  word-break: break-word;
}
.subtitle-line.old { color: #666; font-size: 22px; }
.subtitle-line.hint { color: #444; font-size: 20px; }
.subtitle-line.interim-line { color: #aaa; }

/* 高亮 */
.subtitle-line .filler { color: #ff6b6b; text-decoration: underline wavy; }
.subtitle-line .hedge { color: #ffa94d; }
.subtitle-line .vague { color: #ffd43b; border-bottom: 2px dashed #ffd43b; }

/* 底部按钮栏 */
.action-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  flex-shrink: 0;
}
.btn-main {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 14px; border: none; border-radius: 20px;
  font-size: 12px; font-weight: 500; cursor: pointer;
  transition: all 0.2s;
}
.btn-icon-inner { font-size: 13px; }
.btn-label { font-size: 12px; }

.btn-start { background: #E5007E; color: #fff; }
.btn-start:hover { background: #cc006e; transform: scale(1.02); }
.btn-pause { background: #ffa94d; color: #000; }
.btn-pause:hover { background: #e09540; }
.btn-resume { background: #E5007E; color: #fff; }
.btn-resume:hover { background: #cc006e; }
.btn-stop { background: #ff4444; color: #fff; }
.btn-stop:hover { background: #cc3333; }
.btn-report { background: #222; color: #fff; border: 1px solid #E5007E; }
.btn-report:hover { background: #333; }

/* ===== 少女icon ===== */
.girl-icon {
  position: fixed;
  bottom: 16px; right: 60px;
  opacity: 0.4;
  z-index: 50;
  pointer-events: none;
}

/* ===== 社交链接 ===== */
.social-links {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 100;
}
.social-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 1px solid #333;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.social-toggle:hover {
  border-color: #E5007E;
  background: #222;
}
.social-panel {
  position: absolute;
  bottom: 44px;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
}
.social-panel a {
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  transition: all 0.2s;
}
.social-panel a:hover {
  color: #E5007E;
  background: #1a1a1a;
}

/* ===== 水印 ===== */
.watermark {
  position: fixed;
  bottom: 8px;
  right: 16px;
  font-size: 10px;
  color: rgba(229, 0, 126, 0.3);
  cursor: pointer;
  z-index: 50;
  transition: color 0.2s;
}
.watermark:hover {
  color: rgba(229, 0, 126, 0.6);
}

/* ===== 弹窗 ===== */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-content {
  background: #111;
  border: 1px solid #E5007E;
  border-radius: 16px;
  width: 92%;
  max-width: 800px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
.modal-content.modal-sm {
  max-width: 480px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #222;
  flex-shrink: 0;
}
.modal-header h2 { font-size: 16px; font-weight: 600; }
.btn-close { background:none; border:none; color:#888; font-size:22px; cursor:pointer; }
.btn-close:hover { color:#fff; }
.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  font-size: 14px;
  line-height: 1.9;
  color: #ddd;
}
.modal-body h2 { color: #E5007E; margin-top: 20px; margin-bottom: 8px; font-size: 16px; }
.modal-body h3 { color: #fff; margin-top: 14px; font-size: 14px; }
.modal-body blockquote { border-left: 3px solid #E5007E; padding-left: 12px; color: #999; margin: 8px 0; }
.modal-body code { background: #1a1a1a; padding: 2px 6px; border-radius: 4px; color: #E5007E; font-size: 13px; }
.modal-body table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.modal-body th, .modal-body td { border: 1px solid #333; padding: 6px 10px; text-align: left; font-size: 13px; }
.modal-body th { background: #1a1a1a; color: #E5007E; }

/* ===== 设置表单 ===== */
.settings-group {
  margin-bottom: 16px;
}
.settings-label {
  display: block;
  font-size: 12px;
  color: #888;
  margin-bottom: 6px;
}
.settings-input, .settings-select, .settings-textarea {
  width: 100%;
  padding: 10px 12px;
  background: #0a0a0a;
  border: 1px solid #333;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.settings-input:focus, .settings-select:focus, .settings-textarea:focus {
  border-color: #E5007E;
}
.settings-select {
  appearance: none;
  cursor: pointer;
}
.settings-textarea {
  min-height: 80px;
  resize: vertical;
  line-height: 1.6;
}
.settings-actions {
  margin-top: 20px;
  text-align: right;
}

/* ===== 移动端底部Tab ===== */
.mobile-tabs {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: #111;
  border-top: 1px solid #222;
  z-index: 200;
}
.mobile-tab {
  flex: 1;
  background: none;
  border: none;
  font-size: 20px;
  color: #555;
  cursor: pointer;
  transition: color 0.2s;
}
.mobile-tab.active {
  color: #E5007E;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ===== 响应式：手机端 ===== */
@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
    height: calc(100dvh - 48px);
  }

  .panel-left, .panel-right {
    display: none;
    padding: 16px;
    border: none;
    height: calc(100dvh - 48px);
    overflow-y: auto;
  }

  .panel-left.mobile-active,
  .panel-right.mobile-active {
    display: flex;
    flex-direction: column;
  }

  .main-area {
    height: calc(100dvh - 48px);
  }

  .main-area.mobile-hidden {
    display: none;
  }

  .mobile-tabs {
    display: flex;
  }

  .topbar {
    padding: 12px 16px;
  }

  .app-title {
    font-size: 11px;
  }

  .subtitle-scroll {
    padding: 16px 20px;
    margin: 0 4px;
  }

  .subtitle-line {
    font-size: 20px;
  }

  .subtitle-line.old {
    font-size: 18px;
  }

  .subtitle-line.hint {
    font-size: 16px;
  }

  .girl-icon {
    display: none;
  }

  .social-links {
    left: 8px;
    bottom: 56px;
  }

  .watermark {
    bottom: 56px;
    right: 8px;
    font-size: 9px;
  }

  .modal-content {
    width: 96%;
    max-height: 92vh;
    border-radius: 12px;
  }
}

@media (max-width: 480px) {
  .subtitle-line {
    font-size: 18px;
  }
  .subtitle-line.old {
    font-size: 16px;
  }
  .action-bar {
    gap: 6px;
    padding: 8px 8px;
  }
  .btn-main {
    padding: 6px 10px;
    font-size: 11px;
  }
}
