/* Wait @ Dent — minimal waiting-room player
   UI chrome mirrors the reference: floating glass mini-player over full-bleed art */

:root {
  --coral: #e07a5f;
  --coral-deep: #c45c42;
  --teal: #2a6f6f;
  --ink: #1a1a1a;
  --glass: rgba(28, 28, 30, 0.72);
  --glass-border: rgba(255, 255, 255, 0.12);
  --text: #f5f5f7;
  --text-dim: rgba(245, 245, 247, 0.65);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

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

html, body {
  height: 100%;
  overflow: hidden;
  font-family: Inter, "Noto Sans Devanagari", system-ui, -apple-system, sans-serif;
  background: #1a1410;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

a { color: inherit; text-decoration: none; }

/* ---------- Background ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.bg-slide {
  position: absolute;
  inset: -2%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.6s ease, transform 12s ease-out;
  will-change: opacity, transform;
}

.bg-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.bg-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, transparent 30%, rgba(0,0,0,0.25) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.35) 0%, transparent 22%, transparent 55%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: calc(14px + var(--safe-t)) 22px 10px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 8px rgba(0,0,0,0.35);
}

.clock {
  min-width: 64px;
  letter-spacing: 0.01em;
}

.online {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 12.5px;
  color: rgba(255,255,255,0.9);
}

.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34c759;
  box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.6);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(52, 199, 89, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); }
}

.top-links {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(0,0,0,0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.92);
  transition: background 0.15s ease, transform 0.15s ease;
}

.chip:hover {
  background: rgba(0,0,0,0.42);
  transform: translateY(-1px);
}

/* ---------- Center wordmark ---------- */
.stage {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  pointer-events: none;
  padding: 0 24px 80px;
}

.wordmark {
  text-align: center;
  color: #fff;
  text-shadow:
    0 2px 24px rgba(0,0,0,0.35),
    0 1px 2px rgba(0,0,0,0.4);
  animation: fadeUp 1.1s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wm-en {
  display: block;
  font-size: clamp(42px, 7.5vw, 84px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.wm-hi {
  display: block;
  margin-top: 6px;
  font-family: "Noto Sans Devanagari", Inter, sans-serif;
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.95;
}

.wm-sub {
  display: block;
  margin-top: 14px;
  font-size: clamp(12px, 1.4vw, 15px);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.78;
}

/* ---------- Hidden YT ---------- */
#yt-host {
  position: fixed;
  width: 1px;
  height: 1px;
  left: -9999px;
  top: 0;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Player shell ---------- */
.player-wrap {
  position: fixed;
  left: 50%;
  bottom: calc(28px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 30;
  width: min(560px, calc(100vw - 28px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.player {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  grid-template-areas:
    "art meta controls volume"
    "art scrub scrub scrub";
  gap: 6px 12px;
  align-items: center;
  padding: 10px 14px 10px 10px;
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 12px 40px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.08);
  color: var(--text);
  transition: border-radius 0.25s ease;
}

.player.is-expanded {
  border-radius: 22px;
}

.art {
  grid-area: art;
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.art-eq {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding-bottom: 8px;
  background: rgba(0,0,0,0.35);
}

.art-eq i {
  display: block;
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: #fff;
  animation: eq 0.9s ease-in-out infinite;
}

.art-eq i:nth-child(2) { animation-delay: 0.15s; height: 14px; }
.art-eq i:nth-child(3) { animation-delay: 0.3s; height: 10px; }

@keyframes eq {
  0%, 100% { transform: scaleY(0.45); }
  50%      { transform: scaleY(1); }
}

.meta {
  grid-area: meta;
  min-width: 0;
  padding-right: 4px;
}

.title {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.artist {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.controls {
  grid-area: controls;
  display: flex;
  align-items: center;
  gap: 2px;
}

.ctrl {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.92);
  transition: background 0.15s ease, transform 0.1s ease;
}

.ctrl:hover { background: rgba(255,255,255,0.1); }
.ctrl:active { transform: scale(0.92); }

.ctrl.play {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.14);
}

.ctrl.play:hover { background: rgba(255,255,255,0.22); }

.volume-btn {
  grid-area: volume;
}

.scrub {
  grid-area: scrub;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px 2px;
}

.time {
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  min-width: 32px;
}

.time:last-child { text-align: right; }

#seek {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  outline: none;
  cursor: pointer;
}

#seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.player:hover #seek::-webkit-slider-thumb,
#seek:focus::-webkit-slider-thumb {
  opacity: 1;
}

#seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.player:hover #seek::-moz-range-thumb,
#seek:focus::-moz-range-thumb {
  opacity: 1;
}

#seek::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: transparent;
}

/* filled portion via background gradient set in JS */
#seek.filled {
  background: linear-gradient(
    to right,
    #fff var(--progress, 0%),
    rgba(255,255,255,0.18) var(--progress, 0%)
  );
}

/* ---------- Playlist panel ---------- */
.playlist {
  border-radius: 18px;
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
  padding: 14px 10px 12px;
  max-height: min(42vh, 360px);
  display: flex;
  flex-direction: column;
  animation: sheetIn 0.28s ease both;
}

.playlist[hidden] { display: none; }

@keyframes sheetIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pl-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 8px 10px;
}

.pl-kicker {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.pl-title {
  margin-top: 2px;
  font-size: 15px;
  font-weight: 600;
}

.pl-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--text-dim);
  font-size: 13px;
}

.pl-close:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.pl-list {
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 4px;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.25) transparent;
}

.pl-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border-radius: 12px;
  color: var(--text);
  transition: background 0.12s ease;
}

.pl-item:hover { background: rgba(255,255,255,0.08); }

.pl-item.is-current {
  background: rgba(255,255,255,0.12);
}

.pl-num {
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.pl-item.is-current .pl-num {
  color: #7dffa3;
}

.pl-name {
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-sub {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.pl-year {
  font-size: 11px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.pl-note {
  margin-top: 8px;
  padding: 4px 10px 0;
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
}

/* ---------- Status line ---------- */
.status-msg {
  position: fixed;
  left: 50%;
  bottom: calc(108px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 28;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.01em;
  pointer-events: none;
}

.status-msg[hidden] { display: none; }

/* ---------- Tap to play ---------- */
.tap-to-play {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  background: rgba(20, 20, 22, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.16);
  color: #fff;
  font-size: 14px;
  font-weight: 550;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
  animation: fadeUp 0.5s ease both;
}

.tap-to-play span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 12px;
}

.tap-to-play[hidden] { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .top-links .chip span,
  .chip { font-size: 0; gap: 0; padding: 7px 9px; }
  .chip svg { width: 16px; height: 16px; }

  .player {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "art meta controls"
      "scrub scrub scrub";
    border-radius: 20px;
    padding: 10px 12px;
    gap: 8px 10px;
  }

  .volume-btn { display: none; }

  .wm-en { font-size: clamp(34px, 10vw, 48px); }
  .wm-hi { font-size: clamp(22px, 7vw, 32px); }

  .online { font-size: 11.5px; }
  .player-wrap { bottom: calc(18px + var(--safe-b)); }
}

@media (max-width: 380px) {
  .clock { display: none; }
}
