/* ===================== Palette (matches manual/assets/css/style.css exactly) ===================== */
:root {
  --bg: #0b0e14;
  --bg-alt: #0f1115;
  --card: #151a24;
  --card-alt: #181b22;
  --border: #232a38;
  --text: #f2f2f2;
  --muted: #8a93a6;
  --accent: #7c4dff;
  --accent-2: #00e5c7;
  --accent-gradient: linear-gradient(90deg, #7c4dff, #00e5c7);
}

html { background-color: var(--bg) !important; }
* { box-sizing: border-box; }
html, body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }
.center { display: flex; align-items: center; justify-content: center; min-height: 100vh; text-align: center; }
h1 { font-size: 2.4rem; margin-bottom: 4px; }
h2 { color: #fff;}
.muted { color: var(--muted); }
.channel-id {
  font-size: 4rem; font-weight: 700; letter-spacing: 0.3rem;
  background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 0;
}
.stats { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin: 28px 0; }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 28px; min-width: 160px;
  flex-grow: 1; flex-shrink: 1; flex-basis: 0%;
}
.stat-card .label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat-card .value { font-size: 1.6rem; font-weight: 700; margin-top: 4px; }
.btn {
  display: inline-block; padding: 14px 32px; border-radius: 999px; text-decoration: none;
  background: var(--accent-gradient); color: #fff; font-weight: 600; font-size: 1.1rem; border: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.badge { background: var(--card-alt); padding: 6px 14px; border-radius: 999px; font-size: 0.85rem; }
.badge.live { background: #1f4d3a; color: #4ade80; }

.settings-panel {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px 24px; max-width: 620px; margin-left: auto; margin-right: auto;
}
.settings-panel h3 { margin: 0 0 12px; font-size: 0.9rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.settings-panel label { display: block; font-size: .85rem; color: #cbd2de; margin-bottom: 8px; }
.settings-row { display: flex; gap: 10px; }
.settings-row input{
  flex: 1; padding: 10px 12px; border-radius: 8px; border: 1px solid #2c313c; background: var(--bg-alt); color: #fff; font-size: 1rem;
}
.settings-panel .btn { padding: 10px 22px; font-size: 1rem; }
.settings-panel .muted { font-size: .8rem; margin-top: 10px; }

/* ================= UIkit component overrides - same accent as the rest of the app,
   not UIkit's default blue ================= */
.uk-button-primary {
  background: var(--accent-gradient);
  border: none;
  color: #fff;
}
.uk-button-primary:hover { filter: brightness(1.08); color: #fff; }
.uk-button-default {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.uk-button-default:hover { border-color: var(--accent-2); color: var(--accent-2); }
.uk-alert-primary {
  background: var(--card);
  border: 1px solid var(--accent-2);
  color: var(--text);
}
.uk-alert {
  background: var(--card-alt);
  border: 1px solid var(--border);
  color: var(--text);
}
.uk-alert a, .uk-alert-primary a { color: var(--accent-2); }
[uk-icon] { color: var(--accent-2); vertical-align: middle; }

/* ================= Fullscreen TV player (home.php) ================= */
html, body.fullscreen-body { height: 100%; margin: 0; overflow: hidden; background: #000; }

.tv-shell { position: relative; width: 100vw; height: 100vh; background: #000; overflow: hidden; }

.video-layer { position: absolute; inset: 0; }
/* pointer-events: none blocks clicks on the embedded YouTube iframe so users can't trigger the
   pause/hover overlay, which leaks title, share button, and related-video chrome that no
   YouTube playerVar can suppress. This targets #player directly (not `#player iframe`) because
   YT.Player('player') REPLACES div#player with the iframe and copies the id onto it - there is
   no nested iframe to select. pointer-events is inherited, so this holds either way. */
#player { width: 100%; height: 100%; pointer-events: none; }

/* Shown once on load, above everything else (including .transition-overlay) - the whole point
   is to capture the page's first click, so unlike every other overlay here it's NOT
   pointer-events:none, and starts fully opaque/visible rather than faded in via a .visible
   class - there's nothing to wait on, it's the very first thing shown. */
.start-party-overlay {
  position: absolute; inset: 0; z-index: 30; background: rgba(0,0,0,.9);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.start-party-text {
  font-size: 3.4rem; font-weight: 700; letter-spacing: .02em; color: var(--text);
  text-align: center; padding: 0 6vw;
}

/* Covers the whole video the instant a song ends, until the next one starts playing - see the
   HTML comment above this element for why this exists (masking YouTube's own end-of-video
   related-videos grid, which can't be fully disabled via embed parameters anymore). */
.transition-overlay {
  position: absolute; inset: 0; z-index: 20; background: #000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.transition-overlay.visible { opacity: 1; }
.transition-content { text-align: center; color: rgba(255,255,255,.85); }
.transition-content [uk-icon] { color: var(--accent-2); margin-bottom: 14px; }
.transition-content div { font-size: 1.1rem; }

/* Top overlay: left = queue count + next song, right = users online */
.tv-top-overlay {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 3.2vh 3.5vw 4vh;
  background: linear-gradient(180deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.5) 65%, transparent 100%);
}
.tv-lane-left { min-width: 0; }
.tv-queue-count { font-size: 1.3rem; font-weight: 700; }
.tv-queue-count strong { color: var(--accent-2); }
.tv-next-title { font-size: 1.1rem; color: #cbd2de; margin-top: 4px; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-lane-right { flex: 0 0 auto; }

/* Reservation toast, top-right, fades after 5s */
.toast-notification {
  position: absolute; top: 3vh; right: 3.5vw; z-index: 10;
  background: rgba(21,26,36,.95); border: 1px solid var(--border); border-left: 4px solid var(--accent-2);
  border-radius: 10px; padding: 14px 18px; max-width: 340px; font-size: .95rem; line-height: 1.4;
  opacity: 0; transform: translateY(-10px); pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}
.toast-notification.visible { opacity: 1; transform: translateY(0); }

/* Bottom progress bar - full width, 10px */
.progress-bar-track {
  position: absolute; left: 0; right: 0; bottom: 0; height: 10px; z-index: 6;
  background: rgba(255,255,255,.12);
}
.progress-bar-fill {
  height: 100%; width: 0%; background: var(--accent-gradient);
  transition: width .5s linear;
}

/* "V" / Arrow-Up queue overlay - doesn't cover bottom 30% of the screen */
.queue-overlay {
  position: absolute; top: 14vh; left: 3.5vw; z-index: 8;
  width: 100%; max-width: 700px; max-height: 56vh;
  background: rgba(11,14,20,.7); border: 1px solid rgba(255,255,255,.12); border-radius: 14px;
  opacity: 0; pointer-events: none; transform: translateY(-8px);
  transition: opacity .35s ease, transform .35s ease;
  display: flex; flex-direction: column; overflow: hidden;
}
.queue-overlay.visible { opacity: 1; transform: translateY(0); }
.queue-overlay-header {
  padding: 14px 18px; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); border-bottom: 1px solid rgba(255,255,255,.1); flex: 0 0 auto;
}
.queue-overlay-list { overflow-y: auto; padding: 6px 10px; }
.queue-overlay-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; }
.queue-overlay-item img { width: 72px; border-radius: 6px; flex: 0 0 auto; }
.qo-index { width: 26px; flex: 0 0 auto; color: var(--muted); font-size: .9rem; }
.qo-info { min-width: 0; }
.qo-title { font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qo-meta { font-size: .8rem; color: #9aa3b2; margin-top: 2px; }

/* Join QR overlay - shown while the idle/welcome video is playing (personal channels only).
   Sits above the video layer but below transition-overlay, so a song transition still blacks
   this out along with everything else. */
.join-qr-overlay {
  position: absolute; inset: 0; z-index: 15;
  /* left-aligned, not centered - leaves room on the right for .top-songs-overlay below when
     both are visible at once (idle video, personal channel) */
  display: flex; align-items: center; justify-content: flex-start; padding-left: 5vw;
  opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
.join-qr-overlay.visible { opacity: 1; }
.join-qr-card {
  background: rgba(11,14,20,.78); border: 1px solid rgba(255,255,255,.12); border-top: 3px solid var(--accent-2);
  border-radius: 14px; padding: 28px 36px; display: flex; flex-direction: column; align-items: center; gap: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.03);
}
.join-qr-image { height: 35vh; width: 35vh; border-radius: 10px; background: #fff; padding: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.join-qr-caption { font-size: 1.2rem; font-weight: 700; letter-spacing: .03em; color: var(--text); text-align: center; }

/* Top Songs overlay - shown while the idle/welcome video is playing, any channel type. Sits on
   the right side of the screen (see .join-qr-overlay's justify-content:flex-start above) so the
   two never overlap when both happen to be visible together. */
.top-songs-overlay {
  position: absolute; inset: 0; z-index: 14;
  display: flex; align-items: center; justify-content: flex-end; padding-right: 4vw;
  opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
.top-songs-overlay.visible { opacity: 1; }
.top-songs-card {
  background: rgba(11,14,20,.78); border: 1px solid rgba(255,255,255,.12); border-top: 3px solid var(--accent-2);
  border-radius: 14px; padding: 18px 20px; width: 100%; max-width: 380px; max-height: 70vh;
  display: flex; flex-direction: column; gap: 10px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.03);
}
.top-songs-header {
  font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.1); flex: 0 0 auto;
}
.top-songs-list { overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }

.key-hint {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 6;
  font-size: .8rem; color: rgba(255,255,255,.35);
}

/* Matches the resolved .uk-button-default.uk-border-pill look (see rule above)
   used by the Skip/Fullscreen/Settings buttons, without borrowing the button
   classes themselves (avoids unwanted hover/cursor button semantics on a
   non-interactive label). */
.key-hint-right {
  position: absolute; bottom: 16px; right: 3.5vw; z-index: 6;
  display: inline-block; box-sizing: border-box;
  padding: 0 30px; line-height: 38px;
  background: transparent; border: 1px solid var(--border); color: var(--text);
  border-radius: 500px; font-size: 0.875rem;
}
