/* ===================================================================
   KIDS DISCO — style.css
   =================================================================== */

:root {
  --bg:         #07071a;
  --bg2:        #0d0d28;
  --card-bg:    #111132;
  --card-border: rgba(255,255,255,0.07);
  --pink:       #ff2d78;
  --cyan:       #00e5ff;
  --yellow:     #ffd600;
  --purple:     #b24bff;
  --green:      #00e676;
  --text:       #f0f0ff;
  --text-muted: #8888bb;
  --radius:     16px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── HEADER ────────────────────────────────────────────────────── */

.site-header {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 1rem 2rem;
  background: linear-gradient(180deg, #0a0a2e 0%, var(--bg) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Sweeping spotlight beams */
.header-lights {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.beam {
  position: absolute;
  bottom: -10px;
  width: 3px;
  height: 260px;
  border-radius: 2px;
  transform-origin: bottom center;
  opacity: 0.55;
  animation: swing 5s ease-in-out infinite;
  filter: blur(4px);
}

.b1 { left: 15%; background: linear-gradient(to top, var(--pink), transparent);    animation-delay: 0s; }
.b2 { left: 35%; background: linear-gradient(to top, var(--cyan), transparent);    animation-delay: -1.25s; }
.b3 { left: 65%; background: linear-gradient(to top, var(--yellow), transparent);  animation-delay: -2.5s; }
.b4 { left: 85%; background: linear-gradient(to top, var(--purple), transparent);  animation-delay: -3.75s; }

@keyframes swing {
  0%, 100% { transform: rotate(-22deg); }
  50%       { transform: rotate(22deg); }
}

.header-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

/* ── DISCO BALL ─────────────────────────────────────────────────── */

.disco-ball {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  animation: spinBall 8s linear infinite;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,0.95) 3px, transparent 10px),
    radial-gradient(circle at 68% 22%, rgba(255,255,255,0.7) 2px,  transparent 7px),
    radial-gradient(circle at 50% 60%, rgba(255,255,255,0.4) 1px,  transparent 5px),
    conic-gradient(
      #b0b0b8 0deg,   #efefef 18deg,  #888898 36deg,  #d0d0e0 54deg,
      #a0a0b0 72deg,  #f0f0f8 90deg,  #787888 108deg, #c8c8d8 126deg,
      #b0b0b8 144deg, #efefef 162deg, #888898 180deg, #d0d0e0 198deg,
      #a0a0b0 216deg, #f0f0f8 234deg, #787888 252deg, #c8c8d8 270deg,
      #b0b0b8 288deg, #efefef 306deg, #888898 324deg, #d0d0e0 342deg,
      #b0b0b8 360deg
    );
  box-shadow:
    0 0 18px rgba(255, 45, 120, 0.55),
    0 0 36px rgba(0, 229, 255, 0.35),
    0 0 72px rgba(255, 214, 0, 0.2);
}

.disco-ball--right {
  animation-direction: reverse;
  box-shadow:
    0 0 18px rgba(178, 75, 255, 0.55),
    0 0 36px rgba(0, 230, 118, 0.35),
    0 0 72px rgba(0, 229, 255, 0.2);
}

@keyframes spinBall {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── HEADER TEXT ────────────────────────────────────────────────── */

.header-text { text-align: center; }

.header-text h1 {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  line-height: 1.1;
  background: linear-gradient(135deg, var(--pink) 0%, var(--yellow) 50%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
}

.tagline {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 0.3rem;
}

/* ── TABS ───────────────────────────────────────────────────────── */

.playlist-tabs {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.5rem 1rem 0;
  flex-wrap: wrap;
}

.tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border: 2px solid var(--card-border);
  border-radius: 50px;
  background: var(--card-bg);
  color: var(--text-muted);
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s ease;
}

.tab:hover {
  border-color: rgba(255,45,120,0.4);
  color: var(--text);
  transform: translateY(-2px);
}

.tab.active {
  background: linear-gradient(135deg, rgba(255,45,120,0.18), rgba(178,75,255,0.18));
  border-color: var(--pink);
  color: var(--text);
  box-shadow: 0 0 16px rgba(255,45,120,0.25);
}

.age-badge {
  background: rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 0.1rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
}

/* ── LAYOUT ─────────────────────────────────────────────────────── */

.content-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 1.5rem auto 0;
  padding: 0 1rem;
  align-items: start;
}

@media (max-width: 820px) {
  .content-layout {
    grid-template-columns: 1fr;
  }
  .disco-ball--right { display: none; }
  .disco-ball { width: 60px; height: 60px; }
}

/* ── PLAYER CARD ────────────────────────────────────────────────── */

.player-section { position: sticky; top: 1rem; }

.player-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: #000;
  overflow: hidden;
}

.video-wrapper > div { /* #yt-player */
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

/* YouTube puts an iframe inside #yt-player */
.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: none;
}

.player-info {
  padding: 1rem 1.2rem 0.5rem;
}

.now-playing-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--pink);
  margin-bottom: 0.25rem;
}

.track-title {
  font-family: 'Fredoka One', cursive;
  font-size: 1.25rem;
  line-height: 1.2;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* ── PROGRESS BAR ───────────────────────────────────────────────── */

.progress-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.2rem;
}

.time-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 32px;
}

.progress-track {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.progress-track:hover { height: 8px; }

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  border-radius: 6px;
  transition: width 0.4s linear;
  pointer-events: none;
}

/* ── CONTROLS ───────────────────────────────────────────────────── */

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.4rem 1.2rem;
}

.ctrl-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text);
  transition: all 0.18s ease;
}

.ctrl-btn:hover {
  background: rgba(255,45,120,0.2);
  border-color: var(--pink);
  transform: scale(1.1);
}

.ctrl-play {
  width: 58px;
  height: 58px;
  font-size: 1.25rem;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  border-color: transparent;
  box-shadow: 0 0 20px rgba(255,45,120,0.4);
}

.ctrl-play:hover {
  background: linear-gradient(135deg, #ff5599, #cc77ff);
  transform: scale(1.12);
  border-color: transparent;
}

/* ── VOLUME ─────────────────────────────────────────────────────── */

.volume-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1.2rem 1rem;
  font-size: 0.9rem;
}

.volume-row input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,0.12);
  outline: none;
  cursor: pointer;
}

.volume-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--pink);
  cursor: pointer;
}

/* ── PLAYLIST SECTION ───────────────────────────────────────────── */

.playlist-section { min-height: 400px; }

.playlist-panel { display: none; }
.playlist-panel.active { display: block; }

.panel-header { margin-bottom: 1rem; }

.panel-header h2 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.4rem;
  color: var(--text);
}

.panel-header p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ── TRACK LIST ─────────────────────────────────────────────────── */

.track-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.track-item {
  display: grid;
  grid-template-columns: 24px 56px 1fr 24px;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  background: rgba(255,255,255,0.02);
  user-select: none;
}

.track-item:hover {
  background: rgba(255,45,120,0.08);
  border-color: rgba(255,45,120,0.25);
  transform: translateX(3px);
}

.track-item:hover .play-icon { opacity: 1; }

.track-item.playing {
  background: rgba(255,45,120,0.13);
  border-color: var(--pink);
  box-shadow: 0 0 12px rgba(255,45,120,0.15);
}

.track-num {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Hide number, show equalizer bars on playing track */
.track-item.playing .track-num {
  display: none;
}

.track-item.playing::before {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Crect x='1' y='6' width='3' height='12' fill='%23ff2d78' rx='1'%3E%3Canimate attributeName='height' values='12;4;12' dur='0.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='y' values='6;14;6' dur='0.8s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='7' y='2' width='3' height='16' fill='%23ff2d78' rx='1'%3E%3Canimate attributeName='height' values='16;6;16' dur='0.6s' repeatCount='indefinite'/%3E%3Canimate attributeName='y' values='2;12;2' dur='0.6s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='13' y='9' width='3' height='9' fill='%23ff2d78' rx='1'%3E%3Canimate attributeName='height' values='9;3;9' dur='1s' repeatCount='indefinite'/%3E%3Canimate attributeName='y' values='9;15;9' dur='1s' repeatCount='indefinite'/%3E%3C/rect%3E%3C/svg%3E") center/contain no-repeat;
  flex-shrink: 0;
}

.track-thumb {
  width: 56px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
}

.track-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.track-name {
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.track-artist-name {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.play-icon {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.15s;
}

/* ── ABOUT SECTION ──────────────────────────────────────────────── */

.about-section {
  max-width: 1100px;
  margin: 3rem auto 0;
  padding: 2.5rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.about-section h2 {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-section p {
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: 0.75rem;
}

.about-section strong { color: var(--text); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,45,120,0.3);
}

.feature-icon {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.feature-card strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.feature-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── FAQ SECTION ────────────────────────────────────────────────── */

.faq-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.faq-section h2 {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--yellow), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.faq-item {
  border-left: 3px solid rgba(255, 45, 120, 0.35);
  padding: 0.8rem 0 0.8rem 1.2rem;
  margin-bottom: 0.5rem;
  transition: border-color 0.2s;
}

.faq-item:hover { border-left-color: var(--pink); }

.faq-item h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.faq-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 720px;
}

/* ── AD SLOTS ───────────────────────────────────────────────────── */

.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(255, 214, 0, 0.25);
  border-radius: var(--radius);
  background: rgba(255, 214, 0, 0.03);
  position: relative;
  overflow: hidden;
}

.ad-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 214, 0, 0.35);
  pointer-events: none;
  user-select: none;
}

/* Leaderboard — full width strip */
.ad-slot--leaderboard {
  width: 100%;
  max-width: 1100px;
  min-height: 90px;
  margin: 1.2rem auto;
  padding: 0 1rem;
}

/* Rectangle — sits below player in sidebar */
.ad-slot--rectangle {
  width: 100%;
  min-height: 250px;
  margin-top: 1rem;
}

/* When real AdSense code is dropped in, hide the placeholder label */
.ad-slot:has(ins) .ad-label { display: none; }
.ad-slot:has(ins) { border: none; background: none; padding: 0; }

/* ── FOOTER ─────────────────────────────────────────────────────── */

footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 2rem;
}

.footer-note {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  opacity: 0.6;
}
