/* Replay Highlights — Spectator Styles */

.highlights-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
}

.highlights-header {
  text-align: center;
  margin-bottom: 24px;
}

.highlights-header h2 {
  font-size: 1.8em;
  margin: 0 0 4px;
}

.highlights-subtitle {
  color: #888;
  margin: 0 0 16px;
  font-style: italic;
}

.highlights-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.hl-select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #444;
  background: #1a1a2e;
  color: #e0e0e0;
  font-size: 0.9em;
}

.hl-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.2s;
}

.hl-btn-play {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.hl-btn-play:hover { opacity: 0.85; transform: scale(1.02); }
.hl-btn-active { background: linear-gradient(135deg, #e91e63, #ff5722); }

/* ── Category Chips ──────────────────────────────────────────── */

.hl-category-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}

.hl-chip {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #444;
  background: #1a1a2e;
  color: #aaa;
  font-size: 0.82em;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.hl-chip:hover { border-color: var(--chip-color, #667eea); color: #fff; }
.hl-chip-active {
  background: var(--chip-color, #667eea);
  color: #fff;
  border-color: var(--chip-color, #667eea);
}

/* ── Featured Highlight ──────────────────────────────────────── */

.hl-featured { margin-bottom: 24px; }

.hl-featured-placeholder {
  text-align: center;
  padding: 48px 20px;
  color: #666;
}

.hl-featured-emoji { font-size: 3em; display: block; margin-bottom: 12px; }

.hl-featured-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 2px solid var(--accent, #667eea);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  animation: hl-slideIn 0.4s ease;
}

@keyframes hl-slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hl-featured-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent, #667eea);
}

.hl-featured-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  background: var(--accent, #667eea);
  color: #fff;
  font-size: 0.8em;
  font-weight: 600;
  margin-bottom: 12px;
}

.hl-featured-headline {
  font-size: 1.4em;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
  line-height: 1.3;
}

.hl-featured-desc {
  color: #bbb;
  margin: 0 0 16px;
  line-height: 1.5;
}

.hl-featured-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.hl-drama-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  background: linear-gradient(90deg, #1a1a2e var(--drama, 0%), #e91e63 100%);
  color: #fff;
  font-size: 0.82em;
  font-weight: 600;
}

.hl-tick-badge, .hl-time-badge {
  padding: 4px 10px;
  border-radius: 8px;
  background: #2a2a4a;
  color: #aaa;
  font-size: 0.82em;
}

/* ── Score Bars ──────────────────────────────────────────────── */

.hl-scores { margin-top: 12px; }

.hl-score-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.hl-score-name {
  width: 80px;
  font-size: 0.85em;
  color: #ccc;
  text-align: right;
  flex-shrink: 0;
}

.hl-score-bar-bg {
  flex: 1;
  height: 12px;
  background: #2a2a4a;
  border-radius: 6px;
  overflow: hidden;
}

.hl-score-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
}

.hl-score-val {
  width: 60px;
  font-size: 0.82em;
  color: #aaa;
  text-align: right;
  flex-shrink: 0;
}

/* ── Navigation ──────────────────────────────────────────────── */

.hl-featured-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.hl-nav-btn {
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid #444;
  background: #2a2a4a;
  color: #ccc;
  cursor: pointer;
  transition: all 0.2s;
}

.hl-nav-btn:hover:not(:disabled) { background: #3a3a5a; color: #fff; }
.hl-nav-btn:disabled { opacity: 0.3; cursor: default; }

.hl-nav-counter {
  color: #888;
  font-size: 0.85em;
}

/* ── Timeline ────────────────────────────────────────────────── */

.hl-timeline {
  margin-bottom: 24px;
  padding: 0 8px;
}

.hl-timeline-track {
  position: relative;
  height: 30px;
  background: #1a1a2e;
  border-radius: 15px;
  overflow: visible;
}

.hl-timeline-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 1;
}

.hl-timeline-dot:hover {
  transform: translate(-50%, -50%) scale(1.5);
  z-index: 10;
  box-shadow: 0 0 12px currentColor;
}

.hl-timeline-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75em;
  color: #666;
  margin-top: 4px;
}

/* ── Card List ───────────────────────────────────────────────── */

.hl-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }

.hl-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #1a1a2e;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.hl-card:hover { border-color: var(--accent, #444); background: #22223a; }
.hl-card-active { border-color: var(--accent, #667eea); background: #22223a; }

.hl-card-drama { flex-shrink: 0; }

.hl-drama-ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: conic-gradient(#e91e63 var(--pct, 50%), #2a2a4a var(--pct, 50%));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78em;
  font-weight: 700;
  color: #fff;
}

.hl-drama-ring span {
  background: #1a1a2e;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hl-card-body { flex: 1; min-width: 0; }

.hl-card-category {
  font-size: 0.72em;
  color: var(--accent, #888);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.hl-card-headline {
  font-size: 0.92em;
  font-weight: 600;
  color: #e0e0e0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hl-card-meta {
  font-size: 0.72em;
  color: #666;
  margin-top: 2px;
}

.hl-share-btn {
  padding: 6px 10px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1em;
  opacity: 0.5;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.hl-share-btn:hover { opacity: 1; }

/* ── Stats Grid ──────────────────────────────────────────────── */

.hl-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.hl-stat-card {
  text-align: center;
  padding: 16px 12px;
  background: #1a1a2e;
  border-radius: 12px;
  border: 1px solid #2a2a4a;
}

.hl-stat-value {
  display: block;
  font-size: 1.6em;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.hl-stat-label {
  display: block;
  font-size: 0.75em;
  color: #888;
  margin-top: 4px;
}

/* ── Toast ────────────────────────────────────────────────────── */

.hl-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #333;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9em;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
  pointer-events: none;
}

.hl-toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }

.hl-empty {
  text-align: center;
  color: #666;
  padding: 32px;
  font-style: italic;
}

/* ── Dark Mode Overrides ─────────────────────────────────────── */

.light-mode .hl-select { background: #f5f5f5; border-color: #ddd; color: #333; }
.light-mode .hl-chip { background: #f0f0f0; border-color: #ddd; color: #555; }
.light-mode .hl-featured-card { background: linear-gradient(135deg, #f8f9fa, #e9ecef); border-color: var(--accent, #667eea); }
.light-mode .hl-featured-headline { color: #222; }
.light-mode .hl-featured-desc { color: #555; }
.light-mode .hl-tick-badge, .light-mode .hl-time-badge { background: #e9ecef; color: #555; }
.light-mode .hl-timeline-track { background: #e9ecef; }
.light-mode .hl-card { background: #f8f9fa; }
.light-mode .hl-card:hover, .light-mode .hl-card-active { background: #f0f0f0; }
.light-mode .hl-drama-ring span { background: #f8f9fa; }
.light-mode .hl-card-headline { color: #222; }
.light-mode .hl-score-bar-bg { background: #e9ecef; }
.light-mode .hl-stat-card { background: #f8f9fa; border-color: #e0e0e0; }
.light-mode .hl-stat-value { color: #222; }
.light-mode .hl-nav-btn { background: #e9ecef; border-color: #ddd; color: #555; }
.light-mode .hl-nav-btn:hover:not(:disabled) { background: #ddd; color: #222; }

/* ── Mobile ──────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .highlights-container { padding: 8px; }
  .highlights-header h2 { font-size: 1.4em; }
  .hl-featured-card { padding: 16px; }
  .hl-featured-headline { font-size: 1.1em; }
  .hl-category-chips { gap: 4px; }
  .hl-chip { padding: 4px 10px; font-size: 0.75em; }
  .hl-card { padding: 8px 12px; }
  .hl-card-headline { font-size: 0.85em; }
  .hl-stats-grid { grid-template-columns: repeat(3, 1fr); }
  .hl-score-name { width: 60px; font-size: 0.78em; }
  .hl-featured-meta { gap: 6px; }
}

@media (max-width: 480px) {
  .hl-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hl-featured-nav { gap: 8px; }
  .hl-nav-btn { padding: 4px 10px; font-size: 0.85em; }
}
