/* ── Color palette extracted from The Raccoons thumbnails ── */
:root {
  --navy:        #1a2744;    /* deep night sky backgrounds */
  --navy-light:  #243454;    /* slightly lighter panels */
  --navy-dark:   #111c32;    /* darkest bg */
  --forest:      #2d6e4a;    /* evergreen forest greens */
  --forest-dark: #1e4a32;    /* darker pine */
  --orange:      #e85420;    /* logo red-orange */
  --orange-glow: #ff6b35;    /* hover/active glow */
  --gold:        #f5c518;    /* logo yellow outline / accents */
  --gold-dim:    #c89e10;    /* muted gold */
  --sky:         #7ab8d9;    /* light blue sky scenes */
  --tan:         #d4b97a;    /* warm earthy tan */
  --text:        #e8e0d4;    /* warm off-white text */
  --text-dim:    #9a9488;    /* muted text */
  --card-bg:     rgba(36, 52, 84, 0.6);
  --radius:      12px;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--navy-dark);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Subtle forest bg texture ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(45, 110, 74, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(232, 84, 32, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(26, 39, 68, 0.5) 0%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}

/* ── Header ── */
header {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
  border-bottom: 3px solid var(--forest);
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--forest), var(--gold), var(--orange), var(--gold), var(--forest));
}

.logo {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(2rem, 6vw, 3.5rem);
  background: linear-gradient(135deg, var(--orange) 0%, var(--gold) 50%, var(--orange-glow) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 2px 8px rgba(232, 84, 32, 0.4));
  letter-spacing: 1px;
}

.tagline {
  color: var(--sky);
  font-size: 0.95rem;
  margin-top: 0.4rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ── Season Nav ── */
#season-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: var(--navy);
  border-bottom: 1px solid rgba(122, 184, 217, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.season-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  border: 2px solid var(--forest);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.season-btn:hover {
  background: var(--forest-dark);
  border-color: var(--forest);
  color: var(--gold);
}

.season-btn.active {
  background: linear-gradient(135deg, var(--orange), var(--orange-glow));
  border-color: var(--orange);
  color: #fff;
  box-shadow: 0 2px 12px rgba(232, 84, 32, 0.35);
}

.extras-btn {
  border-color: var(--gold-dim);
  font-size: 0.8rem;
}

.extras-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.extras-btn.active {
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  border-color: var(--gold);
  color: var(--navy-dark);
}

/* ── Main ── */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* ── Player ── */
.player-wrapper {
  margin-bottom: 1.5rem;
}

.player-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(122, 184, 217, 0.1);
}

.player-container iframe,
.player-container #player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.now-playing {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--card-bg);
  border-radius: 0 0 var(--radius) var(--radius);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(122, 184, 217, 0.08);
  border-top: none;
}

#season-label {
  font-family: 'Fredoka One', cursive;
  font-size: 0.9rem;
  color: var(--gold);
  white-space: nowrap;
}

#episode-info {
  font-size: 0.85rem;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Playlist Info ── */
.playlist-info {
  margin-bottom: 2rem;
}

#playlist-title {
  font-family: 'Fredoka One', cursive;
  font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 0.3rem;
}

#playlist-desc {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ── Season Cards Grid ── */
.seasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.season-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(122, 184, 217, 0.08);
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}

.season-card:hover {
  transform: translateY(-3px);
  border-color: var(--forest);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--forest);
}

.season-card.active-card {
  border-color: var(--orange);
  box-shadow: 0 4px 16px rgba(232, 84, 32, 0.25);
}

.season-card-thumb {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  background: var(--navy);
}

.season-card-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.season-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 28, 50, 0.8) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

.season-card-overlay span {
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  color: var(--gold);
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.season-card-body {
  padding: 0.75rem 1rem;
}

.season-card-body p {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.play-badge {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-top: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Now-playing pulse ── */
.season-card.active-card .play-badge {
  background: var(--forest);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
  border-top: 1px solid rgba(122, 184, 217, 0.08);
  color: var(--text-dim);
  font-size: 0.78rem;
}

footer p + p {
  margin-top: 0.3rem;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  main { padding: 1rem; }

  #season-nav {
    gap: 0.35rem;
    padding: 0.75rem 0.75rem;
  }

  .season-btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }

  .seasons-grid {
    grid-template-columns: 1fr;
  }
}
