/* ─────────────────────────────────────────────────────────────
   TRUCK WALA — HORN OK PLEASE
   Exact Highway Bangers Aesthetic Stylesheet
   ───────────────────────────────────────────────────────────── */

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

:root {
  --font-display: 'Yatra One', cursive, serif;
  --font-heading: 'Baloo 2', sans-serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --color-bg-dark: #0a0a0f;
  --color-text-main: #ffffff;
  --color-text-sub: rgba(255, 255, 255, 0.7);
  --color-accent-amber: #ffb703;
  
  --glass-bg: rgba(20, 20, 28, 0.65);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --backdrop-blur: blur(16px);
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-pill: 9999px;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.35s ease;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--color-bg-dark);
  color: var(--color-text-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

/* ── Fullscreen Background ──────────────────────────────────── */

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(circle at center, #1b0c20 0%, #060208 100%);
}

.bg__layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  opacity: 0;
  transition: opacity 0.8s ease;
  filter: brightness(0.9) contrast(1.05);
}

.bg__layer.is-active {
  opacity: 1;
}

.bg__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.1) 40%, rgba(0, 0, 0, 0.75) 100%);
  pointer-events: none;
}

/* ── App Layout ─────────────────────────────────────────────── */

.app-container {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
  height: 100dvh;
  padding: 1.25rem 2rem 1.75rem 2rem;
  max-width: 1440px;
  margin: 0 auto;
}

/* ── Top Bar ────────────────────────────────────────────────── */

.top-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
}

.clock-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.5px;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.top-right {
  display: flex;
  justify-content: flex-end;
}

.yt-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transition: all var(--transition-fast);
}

.yt-link-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

/* ── Hero Title Stage ───────────────────────────────────────── */

.hero-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto 0;
  text-align: center;
}

.brand-title {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 10vw, 8rem);
  color: #ffffff;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
  letter-spacing: 2px;
  line-height: 1;
}

/* ── Bottom Stage (Shayari & Horn Floating Above Player) ───── */

.bottom-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  margin-bottom: 0.75rem;
  width: 100%;
}

/* Horn Pill Button (Left Positioned) */
.horn-pill {
  position: absolute;
  left: 0;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 1rem 0.45rem 0.5rem;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-pill);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-fast);
  z-index: 15;
}

.horn-pill:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.horn-pill:active, .horn-pill.is-honking {
  transform: scale(0.96);
  background: rgba(255, 183, 3, 0.3);
  border-color: var(--color-accent-amber);
}

.horn-icon-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.horn-labels {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.1;
}

.horn-hi {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
}

.horn-en {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

/* Shayari Text (Clean Floating Center Text) */
.shayari-text {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: #ffffff;
  text-shadow: 
    0 2px 10px rgba(0, 0, 0, 0.9),
    0 0 20px rgba(0, 0, 0, 0.6);
  text-align: center;
  cursor: pointer;
  max-width: 800px;
  line-height: 1.3;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.shayari-text:hover {
  color: var(--color-accent-amber);
}

.shayari-text.is-swapping {
  opacity: 0;
  transform: translateY(6px);
}

/* ── Player Bar (Glassmorphic Floating Bottom Chrome) ───────── */

.player-bar {
  background: var(--glass-bg);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  padding: 0.5rem 1.25rem 0.5rem 0.75rem;
  box-shadow: var(--glass-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
  z-index: 30;
  max-width: 850px;
  margin: 0 auto;
  width: 100%;
}

.track-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 220px;
  max-width: 260px;
}

.disc-wrapper {
  position: relative;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.disc-art {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  animation: spinDisc 12s linear infinite;
  animation-play-state: paused;
}

.is-playing .disc-art {
  animation-play-state: running;
}

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

.track-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.track-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist {
  font-size: 0.75rem;
  color: var(--color-text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.05rem;
}

/* Center Controls */
.player-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.buttons-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ctrl-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.ctrl-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.ctrl-btn.is-on {
  color: var(--color-accent-amber);
}

.play-btn {
  width: 38px;
  height: 38px;
  background: #ffffff;
  color: #000000;
  border-radius: 50%;
}

.play-btn:hover {
  background: var(--color-accent-amber);
  color: #000000;
  transform: scale(1.05);
}

.seekbar-container {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
}

.time-str {
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  min-width: 30px;
  font-variant-numeric: tabular-nums;
}

.time-str.right {
  text-align: right;
}

.seek-track {
  position: relative;
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  cursor: pointer;
  touch-action: none;
}

.seek-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: #ffffff;
  border-radius: 2px;
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
}

.seek-knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
}

.seek-track:hover .seek-knob {
  opacity: 1;
}

/* ── Playlist Drawer Overlay ────────────────────────────────── */

.drawer {
  position: absolute;
  bottom: calc(100% + 0.75rem);
  right: 0;
  width: 360px;
  max-height: 420px;
  background: rgba(18, 18, 26, 0.95);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-fast);
  z-index: 100;
}

.drawer.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.drawer-header {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-accent-amber);
}

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

.track-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

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

.track-item.is-current {
  background: rgba(255, 183, 3, 0.15);
  border-left: 3px solid var(--color-accent-amber);
}

.track-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.t-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.t-artist {
  font-size: 0.72rem;
  color: var(--color-text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Offscreen 1px YouTube Container */
#yt-player-container {
  position: absolute;
  width: 1px;
  height: 1px;
  left: -9999px;
  top: -9999px;
  overflow: hidden;
  pointer-events: none;
}

/* Responsive Rules */
@media (max-width: 768px) {
  .app-container {
    padding: 1rem;
  }
  .bottom-stage {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }
  .horn-pill {
    position: static;
  }
  .player-bar {
    max-width: 100%;
    padding: 0.5rem 0.75rem;
  }
  .track-meta {
    min-width: 140px;
  }
  .drawer {
    width: 100%;
    right: 0;
  }
}

/* ── SEO Rich-Text Block (visible to crawlers, off-screen for users) ── */
.seo-text {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}

/* ── Builder Credit Badge (Bottom Right, mirrors horn pill) ──── */
.builder-credit {
  position: fixed;
  right: 1.25rem;
  bottom: 1.1rem;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
  z-index: 100;
  pointer-events: none;
}

.builder-label {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.builder-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.2px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}
