/* ==========================================================================
   झाड़ू TIME — Nostalgic Screensaver & Lo-Fi Music Player
   Design Philosophy: Crystal Frosted Transparent Glass, Grand Typography, Clean Breathing Layout
   ========================================================================== */

/* Google Fonts for Authentic Devanagari Display & Editorial Serif */
@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,700..900;1,6..96,700..900&family=Cinzel:wght@700;800;900&family=Mukta:wght@700;800;900&family=Noto+Serif+Devanagari:wght@700;800;900&family=Playfair+Display:ital,wght@0,700..900;1,700..900&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Rozha+One&family=Yatra+One&display=swap');

/* Optional Local Fonts */
@font-face {
  font-family: 'Menliat';
  src: url('../fonts/Menliat.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'HelloHome';
  src: url('../fonts/Hello Home.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-hindi: 'Rozha One', 'Noto Serif Devanagari', 'Mukta', 'Yatra One', serif;
  --font-english: 'Bodoni Moda', 'Playfair Display', 'Cinzel', serif;
  --font-ui: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  --color-white: #ffffff;
  --color-yellow: #f59e0b;
  --color-yellow-bright: #fbbf24;
  --color-yellow-light: #fef08a;
  --color-offwhite: #f5efe6;
  --color-muted: rgba(255, 255, 255, 0.78);
  --color-dim: rgba(255, 255, 255, 0.52);
  --color-accent-green: #4ade80;

  /* CRYSTAL FROSTED TRANSPARENT GLASS TOKENS */
  --glass-bg-banner: rgba(120, 42, 18, 0.42);
  --glass-border-banner: rgba(255, 220, 190, 0.3);
  --glass-bg-pill: rgba(255, 255, 255, 0.14);
  --glass-border-pill: rgba(255, 255, 255, 0.26);

  --glass-bg-player: rgba(26, 18, 14, 0.58);
  --glass-border-player: rgba(255, 255, 255, 0.28);
  --glass-shadow-player: 0 16px 44px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.28);

  --glass-bg-playlist: rgba(36, 24, 18, 0.82);
  --glass-border-playlist: rgba(255, 215, 175, 0.35);
  --glass-shadow-playlist: 0 24px 64px rgba(0, 0, 0, 0.65), 0 0 36px rgba(251, 191, 36, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.25);

  --glass-blur-sm: blur(14px);
  --glass-blur-md: blur(22px);
  --glass-blur-lg: blur(32px);

  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fade: 0.8s ease;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background-color: #100c0a;
  color: var(--color-white);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, a {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease, opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

button:active, a:active {
  transform: scale(0.94);
}

button:focus-visible, a:focus-visible {
  outline: 2px solid rgba(251, 191, 36, 0.7);
  outline-offset: 2px;
}

/* ==========================================================================
   BACKGROUND CONTAINER & DUAL-LAYER CROSSFADE
   ========================================================================== */
#background-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  background-color: #120e0b;
}

.bg-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, filter, transform;
  transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1), filter 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1.002);
  animation: subtleAmbientBreathe 12s ease-in-out infinite alternate;
}

@keyframes subtleAmbientBreathe {
  0% { filter: brightness(1) contrast(1.02); }
  50% { filter: brightness(1.03) contrast(1.04); }
  100% { filter: brightness(0.98) contrast(1.01); }
}

.bg-layer.active {
  opacity: 1;
  filter: blur(0px);
}

.bg-layer.blur-settle {
  animation: bgSettleIn 1.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.bg-layer.fading-out {
  opacity: 0;
  filter: blur(3px);
}

@keyframes bgSettleIn {
  0% {
    opacity: 0;
    filter: blur(6px);
    transform: scale(1.015);
  }
  50% {
    opacity: 0.85;
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    filter: blur(0px);
    transform: scale(1);
  }
}

/* AMBIENT CANVAS */
#ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* Atmospheric Vignette Overlay */
.vignette-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 40%,
    rgba(0, 0, 0, 0) 35%,
    rgba(16, 12, 10, 0.14) 75%,
    rgba(10, 8, 6, 0.38) 100%
  );
}

/* ==========================================================================
   APP CONTAINER & VIEWPORT LAYOUT
   ========================================================================== */
#app-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 100dvh;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 24px;
  overflow: hidden;
}

/* ==========================================================================
   TOP BAR (CLOCK, EXACT CENTER BANNER, TRANSLUCENT CONTROLS)
   ========================================================================== */
.top-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  z-index: 10;
  transition: opacity var(--transition-fade), transform var(--transition-fade);
}

/* Top Left Clock */
.top-left-clock {
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 12;
}

#clock-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-white);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}

/* Top Center: STRICTLY MATHEMATICALLY CENTERED BANNER (Translucent Frosted Glass) */
.top-center-group {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  max-width: 480px;
  z-index: 11;
  pointer-events: auto;
}

.warning-banner {
  background: var(--glass-bg-banner);
  border: 1px solid var(--glass-border-banner);
  backdrop-filter: var(--glass-blur-md);
  -webkit-backdrop-filter: var(--glass-blur-md);
  border-radius: 9999px;
  padding: 5px 20px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.banner-title {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.banner-sep {
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
}

.banner-subtitle {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.25;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.online-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--glass-bg-pill);
  border: 1px solid var(--glass-border-pill);
  backdrop-filter: var(--glass-blur-sm);
  -webkit-backdrop-filter: var(--glass-blur-sm);
  border-radius: 9999px;
  padding: 3px 12px;
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.online-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background-color: var(--color-accent-green);
  box-shadow: 0 0 8px var(--color-accent-green);
  animation: pulseDot 2.2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

/* Top Right Controls (Translucent Frosted Glass) */
.top-right-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  z-index: 12;
}

/* Sound Pill Slider */
.sound-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--glass-bg-pill);
  border: 1px solid var(--glass-border-pill);
  backdrop-filter: var(--glass-blur-md);
  -webkit-backdrop-filter: var(--glass-blur-md);
  border-radius: 9999px;
  padding: 5px 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sound-pill:hover {
  transform: translateY(-2px) scale(1.03);
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(251, 191, 36, 0.6);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 14px rgba(251, 191, 36, 0.3);
}

.sound-toggle-btn {
  width: 20px;
  height: 20px;
  color: var(--color-white);
  opacity: 0.95;
}

.volume-range {
  -webkit-appearance: none;
  appearance: none;
  width: 60px;
  height: 4px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 9999px;
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.volume-range:hover {
  background: rgba(255, 255, 255, 0.55);
}

.volume-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.volume-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Glass Buttons with Translucent Crystal Glass */
.glass-btn {
  height: 35px;
  padding: 0 13px;
  background: var(--glass-bg-pill);
  border: 1px solid var(--glass-border-pill);
  backdrop-filter: var(--glass-blur-md);
  -webkit-backdrop-filter: var(--glass-blur-md);
  border-radius: 9999px;
  color: var(--color-white);
  font-size: 12px;
  font-weight: 600;
  gap: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.glass-btn.icon-only {
  width: 35px;
  padding: 0;
}

.glass-btn:hover {
  transform: translateY(-2px) scale(1.05);
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(251, 191, 36, 0.65);
  color: #fbbf24;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 16px rgba(251, 191, 36, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.glass-btn.active {
  background: rgba(251, 191, 36, 0.32);
  border-color: rgba(251, 191, 36, 0.75);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 20px rgba(251, 191, 36, 0.45);
}

.btn-badge {
  position: relative;
}

.btn-badge::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

/* ==========================================================================
   CENTER HERO TITLE — झाड़ू TIME (GRAND, BOLD & FULLY VISIBLE)
   ========================================================================== */
.center-hero {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 5;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100vw;
  overflow: visible;
  transition: opacity var(--transition-fade), transform var(--transition-fade);
}

.hero-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3vw, 44px);
  white-space: nowrap;
  overflow: visible;
  line-height: 1.4;
}

/* "झाड़ू" in Rozha One — Grand Bold Scale, Radiant Golden Glow */
.hindi-word {
  font-family: var(--font-hindi);
  font-size: clamp(5rem, 11vw, 10rem);
  font-weight: 800;
  line-height: 1.35;
  display: inline-block;
  overflow: visible;
  padding-bottom: 0.18em;
  padding-top: 0.05em;
  letter-spacing: 0.02em;
  color: var(--color-yellow-bright);
  text-shadow: 0 8px 40px rgba(245, 158, 11, 0.75), 0 3px 12px rgba(0, 0, 0, 0.95);
}

/* "TIME" in Bodoni Moda Editorial Serif — Grand Crisp White Scale */
.english-word {
  font-family: var(--font-english);
  font-size: clamp(4.4rem, 10vw, 9.2rem);
  font-weight: 800;
  line-height: 1.2;
  display: inline-block;
  overflow: visible;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.9), 0 3px 12px rgba(0, 0, 0, 0.95);
}

.floating-notes {
  position: absolute;
  top: -24px;
  right: -36px;
  font-size: clamp(24px, 2.5vw, 36px);
  color: var(--color-yellow-light);
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.85));
  animation: floatNotes 3.5s ease-in-out infinite alternate;
}

@keyframes floatNotes {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(5deg); }
  100% { transform: translateY(-12px) rotate(-3deg); }
}

/* ==========================================================================
   FLOATING BOTTOM MUSIC PLAYER (FROSTED TRANSLUCENT GLASS)
   ========================================================================== */
.bottom-bar {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 30;
}

.player-capsule {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(580px, 92vw);
  background: var(--glass-bg-player);
  border: 1px solid var(--glass-border-player);
  backdrop-filter: var(--glass-blur-md);
  -webkit-backdrop-filter: var(--glass-blur-md);
  box-shadow: var(--glass-shadow-player);
  border-radius: 9999px;
  padding: 9px 16px 9px 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  z-index: 35;
  transition: opacity var(--transition-fade), transform var(--transition-fade), background-color 0.2s ease;
}

.player-capsule:hover {
  background: rgba(32, 22, 16, 0.68);
  border-color: rgba(255, 255, 255, 0.38);
}

/* Thumbnail Art */
.player-art-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  background: #1c1512;
  cursor: pointer;
}

.player-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.player-art-wrap.is-spinning .player-cover-img {
  animation: spinCover 20s linear infinite;
}

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

/* Center Info & Timeline */
.player-info-center {
  display: flex;
  flex-direction: column;
  gap: 2.5px;
  min-width: 0;
  cursor: pointer;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.track-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

/* Equalizer Bars */
.equalizer-icon {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 13px;
  flex-shrink: 0;
}

.eq-bar {
  width: 2px;
  background-color: var(--color-accent-green);
  border-radius: 1px;
  height: 4px;
  transition: height 0.2s ease;
}

.equalizer-icon.is-playing .bar-1 { animation: eqAnim1 0.8s infinite ease-in-out; }
.equalizer-icon.is-playing .bar-2 { animation: eqAnim2 0.95s infinite ease-in-out 0.15s; }
.equalizer-icon.is-playing .bar-3 { animation: eqAnim3 0.75s infinite ease-in-out 0.3s; }
.equalizer-icon.is-playing .bar-4 { animation: eqAnim1 0.85s infinite ease-in-out 0.2s; }

@keyframes eqAnim1 { 0%, 100% { height: 4px; } 50% { height: 12px; } }
@keyframes eqAnim2 { 0%, 100% { height: 11px; } 50% { height: 5px; } }
@keyframes eqAnim3 { 0%, 100% { height: 5px; } 50% { height: 13px; } }

.track-artist {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Timeline & Scrubber */
.timeline-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 1px;
}

.time-display {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--color-dim);
  letter-spacing: 0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.progress-bar {
  position: relative;
  flex: 1;
  height: 14px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.progress-track {
  width: 100%;
  height: 3.5px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  position: relative;
  overflow: hidden;
}

.progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #fbbf24 0%, #ffffff 100%);
  border-radius: 9999px;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.75);
  pointer-events: none;
}

.progress-bar:hover .progress-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.4);
}

/* Player Action Buttons */
.player-controls-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-btn {
  width: 30px;
  height: 30px;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.15s ease, transform 0.15s ease;
}

.control-btn:hover {
  color: #ffffff;
  transform: scale(1.1);
}

.play-pause-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  color: #161210;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.15s ease;
}

.play-pause-circle:hover {
  transform: scale(1.08);
  background: #ffffff;
}

.play-pause-circle:active {
  transform: scale(0.94);
}

/* ==========================================================================
   FLOATING PLAYLIST PANEL (SLIDES UP WITH 16PX AIR GAP)
   ========================================================================== */
.playlist-panel {
  position: fixed;
  bottom: 96px;
  left: 50%;
  right: auto;
  transform: translateX(-50%) translateY(26px) scale(0.94);
  transform-origin: bottom center;
  width: min(460px, 92vw);
  max-height: 275px;
  background: var(--glass-bg-playlist);
  border: 1px solid var(--glass-border-playlist);
  backdrop-filter: var(--glass-blur-lg);
  -webkit-backdrop-filter: var(--glass-blur-lg);
  box-shadow: var(--glass-shadow-playlist);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  z-index: 25;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.playlist-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

.playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.playlist-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.playlist-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: 0.01em;
}

.playlist-count {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-muted);
}

.playlist-close-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--color-white);
}

.playlist-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Track List */
.playlist-track-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 10px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overscroll-behavior: contain;
}

.playlist-track-list::-webkit-scrollbar {
  width: 5px;
}

.playlist-track-list::-webkit-scrollbar-track {
  background: transparent;
}

.playlist-track-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 9999px;
}

.playlist-track-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.45);
}

/* Playlist Row */
.playlist-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.playlist-row:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.playlist-row:active {
  background-color: rgba(255, 255, 255, 0.16);
}

.playlist-row.active {
  background-color: rgba(251, 191, 36, 0.22);
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.4);
}

.playlist-row .track-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-dim);
  width: 18px;
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.playlist-row.active .track-num {
  color: var(--color-yellow-bright);
}

.playlist-row .track-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5px;
  min-width: 0;
}

.playlist-row .track-name {
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-row.active .track-name {
  color: #ffffff;
  font-weight: 700;
}

.playlist-row .track-meta {
  font-size: 11px;
  color: var(--color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-equalizer {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
}

.row-equalizer.is-playing {
  display: inline-flex;
}

.row-equalizer .eq-bar {
  width: 2px;
  background: var(--color-accent-green);
}

.row-equalizer.is-playing .bar-1 { animation: eqAnim1 0.7s infinite ease-in-out; }
.row-equalizer.is-playing .bar-2 { animation: eqAnim2 0.85s infinite ease-in-out 0.1s; }
.row-equalizer.is-playing .bar-3 { animation: eqAnim3 0.65s infinite ease-in-out 0.2s; }

/* ==========================================================================
   WATERMARK / CREATOR CREDIT (Bottom Right)
   ========================================================================== */
.watermark-credit {
  position: fixed;
  bottom: 8px;
  right: 16px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.03em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
  z-index: 10;
  pointer-events: none;
  transition: opacity var(--transition-fade);
}

/* ==========================================================================
   TAP TO START OVERLAY (AUTOPLAY POLICY RECOVERY)
   ========================================================================== */
.start-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(10, 8, 6, 0.4);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  cursor: pointer;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.start-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.start-overlay-pill {
  background: rgba(40, 30, 24, 0.85);
  border: 1px solid rgba(255, 215, 175, 0.35);
  backdrop-filter: blur(20px);
  padding: 14px 28px;
  border-radius: 9999px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: pulseStart 2s infinite ease-in-out;
}

@keyframes pulseStart {
  0%, 100% { transform: scale(1); box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5); }
  50% { transform: scale(1.04); box-shadow: 0 16px 44px rgba(251, 191, 36, 0.35); }
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast-notification {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(26, 20, 16, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(16px);
  padding: 8px 20px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-white);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  z-index: 120;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   SCREENSAVER IDLE STATE (AUTO-HIDE CONTROLS)
   ========================================================================== */
body.is-idle .top-bar,
body.is-idle .watermark-credit {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

body.is-idle .player-capsule {
  opacity: 0.28;
  transform: translateX(-50%) translateY(6px);
}

body.is-idle .player-capsule:hover {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

body.is-idle .center-hero {
  opacity: 0.92;
}

/* ==========================================================================
   RESPONSIVE DESIGN & MOBILE POLISH (CLEAN NO-CROWDING BREATHING ROOM)
   ========================================================================== */

@media (max-width: 1024px) {
  #app-container {
    padding: 14px 18px;
  }
  .top-center-group {
    max-width: 440px;
  }
  .center-hero {
    top: 25%;
  }
  .hindi-word {
    font-size: clamp(4.4rem, 11vw, 8rem);
  }
  .english-word {
    font-size: clamp(4rem, 10vw, 7.4rem);
  }
  .playlist-panel {
    bottom: 96px;
    width: min(440px, 92vw);
  }
}

/* Mobile & Portrait Viewports — 100% Breathable, Zero Overflow */
@media (max-width: 768px) {
  #app-container {
    padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px)) 14px;
  }

  .top-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
  }

  /* Row 1: Left Clock & Right Action Icons */
  .top-left-clock {
    position: absolute;
    top: 12px;
    left: 14px;
  }

  #clock-text {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
  }

  .top-right-controls {
    position: absolute;
    top: 12px;
    right: 14px;
    gap: 5px;
  }

  .sound-pill {
    padding: 4px 6px;
  }

  .volume-range {
    display: none;
  }

  .glass-btn {
    height: 30px;
    padding: 0 8px;
    font-size: 11px;
  }

  .glass-btn.icon-only {
    width: 30px;
  }

  .glass-btn .btn-text {
    display: none; /* Icon-only on mobile to prevent crowding */
  }

  /* Row 2: Clean single line badge below with proper breathing space */
  .top-center-group {
    position: static;
    transform: none;
    margin-top: 36px;
    width: 100%;
    max-width: 310px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }

  .warning-banner {
    padding: 3.5px 12px;
    font-size: 11px;
    gap: 4px;
  }

  .banner-title {
    font-size: 11px;
  }

  .banner-sep {
    font-size: 9px;
  }

  .banner-subtitle {
    font-size: 10px;
  }

  .online-pill {
    padding: 2px 10px;
    font-size: 9.5px;
  }

  /* Center Title on Mobile — Big, Bold, Cleanly Elevated */
  .center-hero {
    top: 28%;
    transform: translate(-50%, -50%);
  }

  .hero-title {
    gap: 10px;
  }

  .hindi-word {
    font-size: clamp(3.6rem, 15vw, 5.2rem);
    padding-bottom: 0.14em;
  }

  .english-word {
    font-size: clamp(3.2rem, 13.5vw, 4.8rem);
  }

  .floating-notes {
    top: -14px;
    right: -20px;
    font-size: 18px;
  }

  .player-capsule {
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    width: min(350px, calc(100vw - 20px));
    padding: 7px 12px 7px 10px;
    gap: 10px;
  }

  .player-art-wrap {
    width: 38px;
    height: 38px;
  }

  .track-title {
    font-size: 12.5px;
  }

  .track-artist {
    font-size: 10.5px;
  }

  .time-display {
    font-size: 9.5px;
  }

  .play-pause-circle {
    width: 36px;
    height: 36px;
  }

  .control-btn {
    width: 26px;
    height: 26px;
  }

  .playlist-panel {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    width: calc(100vw - 18px);
    max-height: 48vh;
    border-radius: 18px;
  }

  .watermark-credit {
    bottom: 4px;
    right: 10px;
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-layer,
  .playlist-panel,
  .player-capsule,
  .warning-banner,
  .floating-notes,
  .online-dot {
    animation: none !important;
    transition: opacity 0.3s ease !important;
  }
}
