* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #242836;
  --border: #2e3345;
  --text: #e4e6eb;
  --text2: #9ca3af;
  --accent: #3b82f6;
  --live: #ef4444;
  --green: #22c55e;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px;
}

#app {
  width: 100%;
  max-width: 480px;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 24px;
}

header h1 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--live);
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  animation: pulse 2s infinite;
}

.badge-live::before {
  content: '';
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  animation: blink 1.5s infinite;
}

.hidden { display: none !important; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Player */
#player {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  margin-bottom: 20px;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.btn-play {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-play:hover { background: #2563eb; transform: scale(1.05); }

.btn-seek {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-seek:hover { background: var(--border); }

.player-time {
  text-align: center;
  margin-bottom: 16px;
}

#time-current {
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--accent);
}

.btn-golive {
  display: block;
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: var(--live);
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
  transition: background 0.2s;
}

.btn-golive:hover { background: #dc2626; }

.volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vol-icon {
  font-size: 1.1rem;
  color: var(--text2);
}

#volume {
  flex: 1;
  accent-color: var(--accent);
  height: 4px;
}

/* Timeline */
#timeline {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.date-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  justify-content: center;
}

.btn-sm {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-sm:hover { background: var(--border); }

#date-picker {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.85rem;
  color-scheme: dark;
}

#hour-bar {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3px;
}

.hour-btn {
  padding: 6px 0;
  border-radius: 4px;
  border: none;
  background: var(--surface2);
  color: var(--text2);
  font-size: 0.7rem;
  cursor: default;
}

.hour-btn.has-data {
  background: var(--accent);
  color: white;
  cursor: pointer;
}

.hour-btn.has-data:hover {
  filter: brightness(1.2);
}

/* Status */
#status-bar {
  text-align: center;
  padding: 8px;
}

#status-text {
  color: var(--text2);
  font-size: 0.8rem;
}

/* Mobile */
@media (max-width: 480px) {
  body { padding: 20px 12px; }
  #hour-bar { grid-template-columns: repeat(8, 1fr); }
  .btn-play { width: 56px; height: 56px; font-size: 1.3rem; }
  .btn-seek { width: 42px; height: 42px; }
}
