/* ==========================================================================
   Ganesh Chaturthi — Reference-Matched Layout
   Matches: reference1.png (ट्रक ड्राइवर MUSIC style)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Yatra+One&family=Rozha+One&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --font-deva-title: 'Yatra One', 'Rozha One', cursive, serif;
  --font-deva-body: 'Rozha One', serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html,
body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  font-family: var(--font-sans);
  background: #000;
  user-select: none;
}

/* ── Particles Canvas ── */
#particles-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 100;
}

/* ── App Viewport ── */
.app-viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 10px 14px 8px;

  /* Hero background — clean, optimised for portrait image */
  background-image: url('Gemini_Generated_Image_oir212oir212oir2.png');
  background-size: cover;
  /* Mobile: show upper half of portrait image (sky + top of procession) */
  background-position: center 20%;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Subtle dark vignette at bottom — behind player area */
.app-viewport::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48%;
  background: linear-gradient(to bottom,
      transparent 0%,
      rgba(0, 0, 0, 0.38) 45%,
      rgba(0, 0, 0, 0.65) 100%);
  pointer-events: none;
  z-index: 1;
}

/* All direct children above overlay */
.status-bar,
.hero-content,
.quote-strip,
.compact-player,
.site-footer {
  position: relative;
  z-index: 10;
}

/* ==========================================================================
   1. Top Status Bar
   Reference: dark pill | left: clock | sep | green dot + count | right: btn + icon
   ========================================================================== */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 7px 16px 7px 18px;
  margin-bottom: 0;
  max-width: 520px;
  align-self: center;
  width: 100%;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.clock-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.3px;
}

.sep-line {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
}

.status-dot-green {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
  flex-shrink: 0;
}

.devotee-num {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.status-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Flower Shower Button — kept exactly as per user request */
.flower-btn {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
  white-space: nowrap;
}

.flower-btn:hover,
.flower-btn.active {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.55);
}

/* Small circular icon on right of status bar — like the play circle in reference */
.status-icon-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* ==========================================================================
   2. Hero Content — title sits in upper-center, biased up
   ========================================================================== */
.hero-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Biased toward top 40% so procession crowd is visible below title */
  justify-content: flex-start;
  padding-top: 14%;
  text-align: center;
  padding-left: 20px;
  padding-right: 20px;
}

.hero-title {
  font-family: var(--font-deva-title);
  font-size: clamp(3rem, 11vw, 6rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: 1px;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.85),
    0 4px 24px rgba(0, 0, 0, 0.7);
  margin-bottom: 8px;
}

/* Subtitle — "M U S I C" wide-spaced small caps, matches reference */
.hero-subtitle {
  font-family: var(--font-sans);
  font-size: clamp(0.6rem, 1.8vw, 0.78rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 0.28em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  text-transform: uppercase;
}

/* ==========================================================================
   3. Quote Strip — plain floating Devanagari, reduced opacity like reference
   ========================================================================== */
.quote-strip {
  text-align: center;
  padding: 0 20px 4px;
  min-height: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  /* Shift quote strip upward */
  transform: translateY(-200px);
}

.quote-wrapper {
  position: relative;
  min-height: 26px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 460px;
  margin: 0 auto;
}

.quote-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quote-slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Reduced opacity like reference — subtle, not bold */
.quote-text {
  font-family: var(--font-deva-body);
  font-size: clamp(0.82rem, 2.5vw, 0.96rem);
  color: rgba(255, 255, 255, 0.68);
  font-weight: 400;
  font-style: normal;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
  letter-spacing: 0.15px;
  line-height: 1.3;
  white-space: nowrap;
}

.quote-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 3px;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background: rgba(255, 255, 255, 0.75);
  width: 12px;
  border-radius: 4px;
}

/* ==========================================================================
   4. Music Player — wide glassmorphism pill, shifted up, more transparent
   ========================================================================== */
.compact-player {
  padding: 0 0 4px;
  width: 100%;
  max-width: 520px;
  align-self: center;
  /* Lift player and quote upward */
  transform: translateY(-150px);
  margin-bottom: -20px;
}

.player-pill {
  /* More transparent, exactly like reference */
  background: transparent;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 11px 14px 9px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

/* Main row: album | info | controls */
.player-main-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

/* Album Art Circle — matches reference: circular, clear border ring */
.album-art {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  /* Exact border ring as seen in reference */
  border: 2px solid rgba(255, 255, 255, 0.55);
  outline: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.album-art.playing {
  animation: spin 6s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

.track-info {
  flex-grow: 1;
  overflow: hidden;
}

.track-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  margin-bottom: 2px;
}

.track-subtitle {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Controls — three circular buttons like reference */
.ctrl-group {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.ctrl-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.72rem;
  transition: var(--transition);
  flex-shrink: 0;
}

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

/* Play button — larger white circle, matches reference center button */
.ctrl-btn.btn-play {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  border-color: transparent;
  font-size: 0.85rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.ctrl-btn.btn-play:hover {
  background: #fff;
}

/* Progress Bar Row */
.progress-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.time-label {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--font-sans);
  min-width: 28px;
  flex-shrink: 0;
}

.progress-container {
  flex-grow: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 3px;
  transition: width 0.2s linear;
}

/* Hidden volume slider (still functional for JS) */
.volume-slider-hidden {
  position: absolute;
  top: -9999px;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

#yt-player-hidden {
  position: absolute;
  top: -9999px;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   5. Footer — "made with ❤️ by Harshit" style from reference
   ========================================================================== */
.site-footer {
  text-align: center;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
  padding: 4px 0 2px;
  font-family: var(--font-sans);
  font-weight: 400;
  letter-spacing: 0.3px;
}

.heart {
  font-size: 0.75rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: var(--transition);
}

.site-footer a:hover {
  color: #fff;
}

.insta-icon {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 480px) {
  .app-viewport {
    padding: 8px 10px 6px;
  }

  .status-bar {
    padding: 6px 12px;
  }

  .clock-text {
    font-size: 0.78rem;
  }

  .devotee-num {
    font-size: 0.8rem;
  }

  .hero-title {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  .hero-subtitle {
    font-size: 0.58rem;
    letter-spacing: 0.22em;
  }

  .player-pill {
    padding: 10px 12px 8px;
    border-radius: 18px;
  }

  .album-art {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  .track-title {
    font-size: 0.82rem;
  }

  .ctrl-btn {
    width: 27px;
    height: 27px;
  }

  .ctrl-btn.btn-play {
    width: 34px;
    height: 34px;
  }
}

@media (max-height: 700px) {
  .hero-title {
    font-size: clamp(1.8rem, 6vw, 2.6rem);
  }

  .quote-strip {
    min-height: 30px;
    padding-bottom: 4px;
  }

  .player-pill {
    padding: 9px 12px 7px;
  }

  .album-art {
    width: 44px;
    height: 44px;
  }
}

@media (min-width: 768px) {

  .status-bar,
  .compact-player {
    max-width: 480px;
  }

  .hero-title {
    font-size: clamp(2.4rem, 4.2vw, 3.6rem);
  }

  /* Desktop: Use high-res widescreen landscape image */
  .app-viewport {
    background-image: url('Gemini_Generated_Image_oir212oir212oir2.png');
    background-position: center center;
  }

  .hero-content {
    padding-top: 2%;
  }
}