/* Schedule — Streaming Platform Design */

.schedule-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.schedule-header {
  margin-bottom: 1.5rem;
}

.schedule-header h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.schedule-subtitle {
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.schedule-tz {
  font-size: 0.8rem;
  color: var(--color-text-dim);
  font-family: var(--font-mono);
}

.section-heading {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ═══════════════════════════════════════
   NOW PLAYING — Hero Card
   ═══════════════════════════════════════ */

.now-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 2.5rem;
  min-height: 200px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border: 1px solid var(--color-border);
}

.now-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.5s;
}

.now-hero-bg.has-bg {
  opacity: 0.3;
}

.now-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
}

.now-hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem 2.5rem;
}

.now-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 59, 48, 0.9);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: pulse-live 1.5s ease-in-out infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.now-hero-content h2 {
  font-size: 1.6rem;
  margin-bottom: 0.3rem;
  font-weight: 700;
}

.now-hero-meta {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.now-progress {
  height: 3px;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.now-progress-bar {
  height: 100%;
  background: var(--color-accent);
  border-radius: 2px;
  transition: width 1s linear;
}

.now-hero-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.now-remaining {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}

.now-hero.now-idle {
  background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
  min-height: 140px;
}

.now-hero.now-idle .now-hero-badge {
  background: rgba(255,255,255,0.1);
  color: var(--color-text-dim);
}

.now-hero.now-idle .pulse-dot {
  animation: none;
  background: var(--color-text-dim);
}

/* ═══════════════════════════════════════
   UP NEXT — Card List
   ═══════════════════════════════════════ */

.up-next-section {
  margin-bottom: 2.5rem;
}

.up-next-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.75rem;
}

.up-next-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.5rem;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}

.up-next-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-1px);
}

.up-next-thumb {
  width: 80px;
  min-width: 80px;
  aspect-ratio: 16/9;
  border-radius: 6px;
  background: #0a0a0a;
  overflow: hidden;
}

.up-next-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.up-next-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.up-next-info strong {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.up-next-meta {
  font-size: 0.75rem;
  color: var(--color-text-dim);
}

.up-next-time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-dim);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  padding: 3px 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
}

/* Status dots */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-available  { background: var(--color-accent); }
.dot-reserved   { background: #888; }
.dot-scheduled  { background: #4A90D9; }
.dot-airing     { background: #4CAF50; animation: pulse-live 1.5s ease-in-out infinite; }
.dot-completed  { background: #555; }

/* ═══════════════════════════════════════
   EPG GRID — Full Schedule
   ═══════════════════════════════════════ */

.epg-section {
  margin-bottom: 2rem;
}

.schedule-grid-wrapper {
  position: relative;
  overflow-x: auto;
  border-radius: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.schedule-time-ruler {
  display: grid;
  grid-template-columns: repeat(96, minmax(40px, 1fr));
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: var(--color-surface);
  z-index: 2;
}

.ruler-tick {
  padding: 0.5rem 0.25rem;
  font-size: 0;
  border-right: 1px solid rgba(255,255,255,0.04);
  min-height: 1.5rem;
}

.ruler-tick.ruler-hour {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--color-text-dim);
  font-variant-numeric: tabular-nums;
  border-right-color: rgba(255,255,255,0.12);
}

.schedule-grid {
  display: grid;
  gap: 4px;
  padding: 0.5rem;
  min-height: 80px;
  align-content: start;
}

.schedule-now-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-accent);
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 0 8px var(--color-accent), 0 0 20px rgba(254, 209, 17, 0.2);
}

/* ═══════════════════════════════════════
   SLOT CARDS (grid)
   ═══════════════════════════════════════ */

.slot-card {
  position: relative;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  cursor: pointer;
  overflow: hidden;
  border-left: 3px solid transparent;
}

.slot-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  background: rgba(255,255,255,0.07);
}

.slot-card.has-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--thumb);
  background-size: cover;
  background-position: center;
  opacity: 0.12;
  pointer-events: none;
}

.slot-card h3 {
  font-size: 0.85rem;
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.slot-time {
  font-size: 0.7rem;
  color: var(--color-text-dim);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.2rem;
  position: relative;
}

.slot-meta {
  font-size: 0.7rem;
  color: var(--color-text-dim);
  position: relative;
}

/* Status colors */
.slot-available { border-left-color: var(--color-accent); }
.slot-reserved  { border-left-color: #666; }
.slot-scheduled { border-left-color: #4A90D9; }
.slot-airing    { border-left-color: #4CAF50; background: rgba(76, 175, 80, 0.08); }
.slot-completed { border-left-color: #444; opacity: 0.5; }
.slot-card.prime { box-shadow: inset 0 0 0 1px rgba(254, 209, 17, 0.15); }

/* ═══════════════════════════════════════
   DETAIL PANEL
   ═══════════════════════════════════════ */

.slot-detail-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 380px;
  max-width: 90vw;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  padding: 0;
  box-shadow: -4px 0 30px rgba(0,0,0,0.6);
  z-index: 100;
  overflow-y: auto;
}

.slot-detail-thumb-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  background: #0a0a0a;
  overflow: hidden;
}

.slot-detail-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slot-detail-panel h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  padding: 1.25rem 1.5rem 0;
}

.slot-detail-panel p {
  font-size: 0.9rem;
  color: var(--color-text-dim);
  margin-bottom: 0.4rem;
  padding: 0 1.5rem;
}

.slot-detail-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.15s;
}

.slot-detail-close:hover {
  background: rgba(0,0,0,0.8);
}

#slot-detail-actions {
  margin-top: 1rem;
  padding: 0 1.5rem 1.5rem;
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */

@media (max-width: 600px) {
  .now-hero-content {
    padding: 1.25rem 1rem;
  }

  .now-hero-content h2 {
    font-size: 1.2rem;
  }

  .up-next-list {
    grid-template-columns: 1fr;
  }

  .up-next-thumb {
    width: 64px;
    min-width: 64px;
  }
}
