/* 1. 基础全局设定 */
body {
  background-color: #121212;
  color: #eeeeee;
  margin: 0;
  padding: 20px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior-y: contain;
}

.container {
  max-width: 600px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  color: #4caf50;
  margin-bottom: 5px;
}

/* 2. 按钮系统 (修复版式关键) */
.studio-btn,
.share-btn,
.watch-btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.studio-btn {
  padding: 18px;
  background: #ff9800;
  color: #000;
  margin-bottom: 12px;
  box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.share-btn {
  padding: 18px;
  background: linear-gradient(45deg, #4caf50, #2e7d32);
  color: #fff;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.watch-btn {
  width: auto;
  padding: 4px 10px;
  background: #ff9800;
  color: #000;
  font-size: 10px;
  border-radius: 4px;
  margin-left: 10px;
}

/* 3. 报告板块布局 (修复不齐问题) */
.report-section {
  background: #1e1e1e;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #333;
}

.report-section h4 {
  margin-top: 0;
  color: #4caf50;
  border-bottom: 1px solid #333;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

/* 4. Tempo 专用的网格布局 */
.tempo-grid {
  display: flex;
  justify-content: space-around;
  text-align: center;
  margin-bottom: 10px;
}
.tempo-grid small {
  color: #888;
  font-size: 0.7rem;
}
.tempo-grid .big-val {
  font-size: 1.8rem;
  color: #4caf50;
  font-weight: 800;
}
.tempo-grid .val {
  font-size: 1.2rem;
  color: #eee;
}

/* 5. P4/P7 专用的行布局 */
.data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.val-group {
  text-align: right;
}
.green {
  color: #4caf50;
  font-size: 1.2rem;
  font-weight: bold;
  display: block;
}
.blue {
  color: #2196f3;
  font-size: 0.75rem;
  font-weight: bold;
}
.pga-ref {
  text-align: center;
  color: #2196f3;
  font-size: 0.75rem;
  margin-top: 8px;
  font-weight: bold;
}

/* 6. Visual Cue (被忽略的长文本样式) */
.visual-cue {
  background: rgba(255, 255, 255, 0.05);
  padding: 12px;
  border-radius: 8px;
  border-left: 4px solid #4caf50;
  font-style: italic;
  font-size: 0.9rem;
  color: #ccc;
  line-height: 1.5;
  margin-top: 10px;
}

/* 7. 诊断板块 */
.diagnosis-box {
  border-left: 6px solid #ff9800;
}
.scientific-reason {
  color: #aaa;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px;
  border-radius: 6px;
  margin-top: 10px;
  line-height: 1.5;
}

/* 8. 视频扫描与进度条 (找回丢失的动效) */
.upload-label {
  display: block;
  padding: 30px;
  border: 2px dashed #4caf50;
  border-radius: 12px;
  text-align: center;
  color: #4caf50;
  cursor: pointer;
}

#scanBar {
  position: absolute;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, transparent, #4caf50, transparent);
  box-shadow: 0 0 15px #4caf50;
  z-index: 10;
  animation: scanning 2s infinite linear;
}
@keyframes scanning {
  0% {
    top: 0;
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

.ai-progress-container {
  width: 100%;
  height: 6px;
  background: #333;
  border-radius: 3px;
  margin-top: 15px;
  overflow: hidden;
  display: none;
}
.ai-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #8bc34a);
  box-shadow: 0 0 10px #4caf50;
  transition: width 0.5s ease;
}

/* 9. 分析室模态框样式 (专家工具) */
#compareModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 9999;
  flex-direction: column;
}
.modal-header {
  background: #1a1a1a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid #333;
}
.close-btn {
  background: #ff4444;
  color: white;
  border: none;
  padding: 6px 15px;
  border-radius: 6px;
  font-weight: bold;
}

.compare-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 10px;
  overflow-y: auto;
}
.video-box {
  position: relative;
  flex: 1;
  min-height: 250px;
  background: #000;
  border: 1px solid #333;
  border-radius: 8px;
  overflow: hidden;
}
.video-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.drawing-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  touch-action: none;
}
.tool-btn {
  background: transparent;
  border: none;
  color: #aaa;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 4px;
}
.tool-btn.active {
  background: #4caf50;
  color: #000;
  font-weight: bold;
}

/* 10. 历史记录 */
#historyContainer {
  background: #1a1a1a;
  padding: 20px;
  border-radius: 12px;
  margin-top: 30px;
}
.drill-list {
  padding-left: 0;
  list-style: none;
}
.drill-list li {
  background: rgba(76, 175, 80, 0.1);
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 响应式 PC */
@media (min-width: 768px) {
  .compare-content {
    flex-direction: row;
  }
}

.manual-control {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px;
  z-index: 20;
  box-sizing: border-box;
}
.step-controls {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
}
.step-btn {
  background: #333;
  color: #4caf50;
  border: 1px solid #4caf50;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
}
