/* ── Google Fonts Import ── */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Yatra+One&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg-color: #0b131e;
  --card-bg: rgba(18, 26, 40, 0.75);
  --card-border: rgba(255, 255, 255, 0.12);
  --accent-orange: #ff4b2b;
  --accent-yellow: #f8b500;
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --font-heading: 'Yatra One', cursive;
  --font-body: 'Baloo 2', 'Inter', sans-serif;
  --glow-color: rgba(255, 75, 43, 0.4);
}

/* Atmosphere Theme Overrides */
body[data-theme="golden"] {
  --bg-color: #1a0f0a;
  --accent-orange: #ff6b35;
  --accent-yellow: #f7c59f;
  --glow-color: rgba(255, 107, 53, 0.5);
}

body[data-theme="night"] {
  --bg-color: #05080c;
  --accent-orange: #00d2ff;
  --accent-yellow: #3a7bd5;
  --glow-color: rgba(0, 210, 255, 0.4);
}

body[data-theme="rain"] {
  --bg-color: #09121d;
  --accent-orange: #00b4db;
  --accent-yellow: #0083b0;
  --glow-color: rgba(0, 180, 219, 0.4);
}

/* Hidden Off-Screen YouTube Player Host */
.yt-host {
  position: absolute;
  top: -9999px;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Reset & Global */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100%;
  background: transparent;
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
}

/* Dynamic Highway Background Container */
.bg-viewport {
  position: fixed;
  inset: 0;
  z-index: -10;
  background-color: #0b131e;
  overflow: hidden;
}

.bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 108vw;
  height: 60.75vw;
  min-height: 108vh;
  min-width: 192vh;
  transform: translate(-50%, -49%) scale(1.08);
  object-fit: cover;
  z-index: 1;
  filter: brightness(0.85) contrast(1.05);
  transition: opacity 0.35s ease;
}

.bg-video.is-switching {
  opacity: 0.2;
}

.bg-video-iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100vh;
  min-width: 177.77vh;
  transform: translate(-50%, -50%) scale(1.25);
  pointer-events: none;
  filter: brightness(0.8) contrast(1.05);
  z-index: 2;
  border: none;
}

.bg-day {
  background-image: linear-gradient(to bottom, rgba(11,19,30,0.4), rgba(11,19,30,0.85)), url('https://images.unsplash.com/photo-1506015391300-4802dc74de2e?auto=format&fit=crop&w=1920&q=80');
}

body[data-theme="golden"] .bg-viewport {
  background-image: linear-gradient(to bottom, rgba(26,15,10,0.3), rgba(26,15,10,0.85)), url('https://images.unsplash.com/photo-1519817650390-64a93db51149?auto=format&fit=crop&w=1920&q=80');
}

body[data-theme="night"] .bg-viewport {
  background-image: linear-gradient(to bottom, rgba(5,8,12,0.5), rgba(5,8,12,0.9)), url('https://images.unsplash.com/photo-1509114397022-ed747cca3f65?auto=format&fit=crop&w=1920&q=80');
}

body[data-theme="rain"] .bg-viewport {
  background-image: linear-gradient(to bottom, rgba(9,18,29,0.5), rgba(9,18,29,0.92)), url('https://images.unsplash.com/photo-1515694346937-94d85e41e6f0?auto=format&fit=crop&w=1920&q=80');
}

/* Rain Effect Overlay */
.rain-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0) 100%);
  background-size: 100% 20px;
  animation: rainAnim 0.3s linear infinite;
}

body[data-theme="rain"] .rain-overlay {
  display: block;
}

@keyframes rainAnim {
  0% { background-position: 0 0; }
  100% { background-position: 10px 100px; }
}

/* Layout Shell */
.app-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 0 1.25rem 3rem;
  max-width: 900px;
  margin: 0 auto;
}

.hero-screen {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0 1.5rem;
}

/* Top Bar — Indian Truck Overhead Sun-Visor Console */
.topbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.1rem;
  background: linear-gradient(180deg, rgba(20, 28, 42, 0.85) 0%, rgba(10, 15, 25, 0.95) 100%);
  backdrop-filter: blur(16px);
  border: 1.5px solid rgba(248, 181, 0, 0.35);
  border-radius: 40px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.15);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.clock-badge {
  font-family: 'Inter', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: #22c55e;
  text-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
  background: rgba(0, 0, 0, 0.5);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.presence-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #e2e8f0;
}

.presence-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: pulseDot 2s infinite;
}

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

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Theme Switcher Buttons */
.theme-select {
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.45);
  padding: 2px 4px;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,0.12);
  gap: 2px;
}

.theme-btn {
  background: transparent;
  border: none;
  font-size: 1.05rem;
  padding: 3px 6px;
  border-radius: 20px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-btn:hover {
  transform: scale(1.15);
}

.theme-btn.active {
  background: rgba(255,255,255,0.18);
  box-shadow: 0 0 8px rgba(255,255,255,0.2);
}

.theme-btn.current-theme {
  box-shadow: inset 0 0 0 1.5px #f8b500;
}

.theme-btn.auto-btn {
  font-family: var(--font-heading), 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #94a3b8;
  padding: 3px 7px;
  gap: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.theme-btn.auto-btn.active {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

.auto-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
  display: inline-block;
  animation: autoPulse 2s infinite ease-in-out;
}

@keyframes autoPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.25); }
}

/* Horn Button — Authentic Truck Air Horn Badge */
.horn-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, #ff4b2b, #ff416c);
  color: white;
  border: 1px solid #ff7b54;
  padding: 0.4rem 1rem;
  border-radius: 30px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--glow-color), inset 0 1px 0 rgba(255,255,255,0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.horn-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px var(--glow-color);
}

.horn-btn:active {
  transform: scale(0.95);
}

/* Branding Logo — Truck Art Painted Sign */
.logo-container {
  margin: 0.5rem 0 0.3rem;
  text-align: center;
}

.logo-main {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  line-height: 1.1;
  background: linear-gradient(to right, #ffffff, #f8b500, #ff4b2b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.9));
}

.logo-sub {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #f8b500;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* Shayari Bumper Sticker — Indian Truck Rear Plate Art */
.shayari-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  border: 1.5px solid #f8b500;
  padding: 0.3rem 1rem;
  border-radius: 12px;
  margin-bottom: 0.85rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.6);
  cursor: pointer;
  transition: transform 0.2s ease;
  position: relative;
}

.shayari-card:hover {
  transform: translateY(-2px);
}

.shayari-text {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: #fef08a;
  text-shadow: 0 2px 6px rgba(0,0,0,0.9);
  display: inline-block;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.shayari-next-btn {
  background: rgba(255,255,255,0.12);
  border: none;
  color: white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease;
}

.shayari-next-btn:hover {
  background: rgba(255,255,255,0.25);
}

/* Music Player Card (Transparent Dashboard Integrated Unit) */
.player-card {
  width: 100%;
  max-width: 320px;
  background: rgba(10, 15, 25, 0.35);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 0.9rem 1rem 0.85rem;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  left: 0;
  margin: 0 auto 0.5rem;
  overflow: hidden;
}

/* Align over the truck dashboard console on wide screens */
@media (min-width: 900px) {
  .player-card {
    left: -60%;
  }
}

/* Compact Vinyl Record Disc */
.disc-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 0.6rem;
}

.disc-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, #1a202c 0%, #0d1117 70%, #000000 100%);
  border: 4px solid rgba(255,255,255,0.12);
  box-shadow: 0 6px 20px rgba(0,0,0,0.7), inset 0 0 10px rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.5s ease;
}

.disc-cover {
  width: 78%;
  height: 78%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-yellow);
}

.disc-center-dot {
  position: absolute;
  width: 18px;
  height: 18px;
  background: #0b131e;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.8);
}

/* Spinning animation when playing */
.player-card.is-playing .disc-ring {
  animation: spinRecord 12s linear infinite;
}

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

/* Track Metadata */
.track-info {
  text-align: center;
  width: 100%;
  margin-bottom: 0.85rem;
}

.track-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.15rem;
}

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

/* Seek Bar */
.seek-container {
  width: 100%;
  margin-bottom: 0.85rem;
}

.seek-bar-track {
  position: relative;
  width: 100%;
  height: 5px;
  background: rgba(255,255,255,0.12);
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
}

.seek-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, var(--accent-yellow), var(--accent-orange));
  border-radius: 3px;
  transition: width 0.1s linear;
}

.time-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  font-family: 'Inter', monospace;
}

/* Player Controls */
.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
}

.ctrl-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ctrl-btn:hover {
  color: white;
  background: rgba(255,255,255,0.08);
}

.ctrl-btn.active {
  color: var(--accent-yellow);
}

.play-btn {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-orange), #ff416c);
  color: white;
  box-shadow: 0 6px 20px var(--glow-color);
}

.play-btn:hover {
  transform: scale(1.08);
  background: linear-gradient(135deg, #ff573d, #ff4d79);
  color: white;
}

/* Tracklist Drawer */
.playlist-drawer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 550px;
  max-height: 80vh;
  background: #0f172a;
  border: 1px solid var(--card-border);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.8);
  z-index: 100;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.playlist-drawer.is-open {
  transform: translateX(-50%) translateY(0);
}

.drawer-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--accent-yellow);
}

.close-drawer-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.drawer-search {
  padding: 0.75rem 1.5rem;
}

.search-input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 0.65rem 1rem;
  border-radius: 12px;
  color: white;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
}

.search-input:focus {
  border-color: var(--accent-orange);
}

.track-list {
  list-style: none;
  overflow-y: auto;
  padding: 0.5rem 1rem 1.5rem;
  flex: 1;
}

.track-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.track-item:hover {
  background: rgba(255,255,255,0.05);
}

.track-item.is-active {
  background: rgba(255, 75, 43, 0.15);
  border: 1px solid rgba(255, 75, 43, 0.3);
}

.track-item-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.track-item-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

.track-item-title {
  font-weight: 600;
  font-size: 1rem;
  color: white;
}

.track-item-artist {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Equalizer Bars Animation */
.eq-bars {
  display: none;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}

.track-item.is-active .eq-bars {
  display: flex;
}

.eq-bar {
  width: 3px;
  background: var(--accent-orange);
  border-radius: 2px;
  animation: eqBounce 1s ease-in-out infinite alternate;
}

.eq-bar:nth-child(1) { height: 60%; animation-delay: 0.1s; }
.eq-bar:nth-child(2) { height: 100%; animation-delay: 0.3s; }
.eq-bar:nth-child(3) { height: 40%; animation-delay: 0.2s; }

@keyframes eqBounce {
  0% { height: 20%; }
  100% { height: 100%; }
}

/* Static AEO & FAQ Content Section (Pushed below 100vh fold) */
.seo-guide-section {
  width: 100%;
  margin-top: 6rem;
  position: relative;
  z-index: 10;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(24px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.seo-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--accent-yellow);
  margin-bottom: 1rem;
}

.seo-lead {
  font-size: 1.05rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.seo-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 1.25rem;
  border-radius: 16px;
}

.seo-card h3 {
  font-size: 1.15rem;
  color: var(--accent-orange);
  margin-bottom: 0.5rem;
}

.seo-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.faq-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: white;
  margin-bottom: 1.25rem;
}

.faq-item {
  margin-bottom: 1.25rem;
}

.faq-item h4 {
  font-size: 1.1rem;
  color: var(--accent-yellow);
  margin-bottom: 0.3rem;
}

.faq-item p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Footer Credits */
.footer-credit {
  margin-top: 2.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

.footer-credit a {
  color: var(--accent-yellow);
  text-decoration: none;
  font-weight: 600;
}

/* Mobile Responsive Adjustments */
@media (max-width: 600px) {
  .app-shell {
    padding: 0 0.5rem 2rem;
    width: 100%;
    overflow-x: hidden;
  }

  .hero-screen {
    padding: 0.5rem 0 1rem;
    justify-content: space-between;
  }

  .topbar {
    padding: 0.35rem 0.6rem;
    border-radius: 30px;
    gap: 0.3rem;
  }

  .topbar-left {
    gap: 0.4rem;
  }

  .clock-badge {
    font-size: 0.78rem;
    padding: 2px 5px;
  }

  .presence-badge {
    font-size: 0.75rem;
  }

  .presence-badge span:not(.presence-dot):not(#listenerCount) {
    display: none;
  }

  .topbar-right {
    gap: 0.35rem;
  }

  .theme-select {
    padding: 2px;
  }

  .theme-btn {
    font-size: 0.85rem;
    padding: 2px 4px;
  }

  .horn-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .horn-btn span {
    font-size: 0.75rem;
  }

  .logo-container {
    margin: 0.3rem 0 0.2rem;
  }

  .logo-main {
    font-size: 1.75rem;
  }

  .logo-sub {
    font-size: 0.75rem;
    letter-spacing: 1px;
  }

  .shayari-card {
    padding: 0.25rem 0.75rem;
    margin-bottom: 0.5rem;
    max-width: 92vw;
  }

  .shayari-text {
    font-size: 0.85rem;
  }

  .player-card {
    width: 88vw;
    max-width: 275px;
    left: 0;
    margin: 0 auto 0.4rem;
    padding: 0.65rem 0.8rem 0.55rem;
    border-radius: 18px;
    align-self: center;
  }

  .disc-wrapper {
    width: 55px;
    height: 55px;
    margin-bottom: 0.35rem;
  }

  .disc-center-dot {
    width: 12px;
    height: 12px;
  }

  .track-info {
    margin-bottom: 0.4rem;
  }

  .track-title {
    font-size: 0.88rem;
    line-height: 1.2;
  }

  .track-artist {
    font-size: 0.74rem;
  }

  .seek-container {
    margin-bottom: 0.4rem;
    width: 100%;
  }

  .seek-bar-track {
    height: 3.5px;
  }

  .time-labels {
    font-size: 0.68rem;
    margin-top: 0.15rem;
  }

  .controls-row {
    padding: 0;
    gap: 0.35rem;
  }

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

  .ctrl-btn svg {
    width: 16px;
    height: 16px;
  }

  .play-btn {
    width: 38px;
    height: 38px;
  }

  .play-btn svg {
    width: 20px;
    height: 20px;
  }

  .bg-video {
    width: 100vw;
    height: 100vh;
    min-height: 100dvh;
    object-fit: cover;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.15);
  }

  .seo-guide-section {
    padding: 1.5rem 1rem;
    margin-top: 4rem;
  }
}
