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

:root {
  --accent: #F5A623;
  --accent-glow: rgba(245, 166, 35, 0.4);
  --bg-dark-90: rgba(18, 11, 7, 0.9);
  --bg-dark-65: rgba(18, 11, 7, 0.65);
  --bg-dark-30: rgba(18, 11, 7, 0.3);
  --border-light: rgba(255, 255, 255, 0.08);
  --border-active: rgba(245, 166, 35, 0.4);
  --text-white: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.6);
  --text-dim: rgba(255, 255, 255, 0.35);
  --shadow-dark: rgba(0, 0, 0, 0.6);
}

html, body {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background-color: #0f0a06;
  color: var(--text-white);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Font Helper Classes */
.font-devanagari {
  font-family: 'Noto Sans Devanagari', sans-serif;
}

.font-inter {
  font-family: 'Inter', sans-serif;
}

/* Background Video and Scrim */
#bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
}

.video-scrim {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(15, 9, 5, 0.85) 0%,
    rgba(15, 9, 5, 0.65) 25%,
    rgba(15, 9, 5, 0) 50%,
    rgba(15, 9, 5, 0) 70%,
    rgba(15, 9, 5, 0.65) 85%,
    rgba(15, 9, 5, 0.95) 100%
  );
  pointer-events: none;
}

/* Grid overlay to match Rickshaw Wala retro look */
.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  background: 
    radial-gradient(circle, rgba(245, 166, 35, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(0, 0, 0, 0.12) 1px, transparent 1px);
  background-size: 4px 4px, 100% 3px;
}

/* Rain animation overlay */
.rain-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.rain-layer-1 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='240' viewBox='0 0 80 240'><line x1='40' y1='0' x2='38' y2='45' stroke='rgba(255,255,255,0.08)' stroke-width='1.2'/><line x1='10' y1='120' x2='9' y2='155' stroke='rgba(255,255,255,0.06)' stroke-width='1'/></svg>");
  animation: rainAnim1 0.7s linear infinite;
}

.rain-layer-2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='300' viewBox='0 0 120 300'><line x1='90' y1='20' x2='88' y2='75' stroke='rgba(255,255,255,0.06)' stroke-width='1.5'/><line x1='30' y1='180' x2='29' y2='225' stroke='rgba(255,255,255,0.04)' stroke-width='0.8'/></svg>");
  animation: rainAnim2 0.9s linear infinite;
}

@keyframes rainAnim1 {
  0% { background-position: 0px 0px; }
  100% { background-position: -30px 480px; }
}

@keyframes rainAnim2 {
  0% { background-position: 0px 0px; }
  100% { background-position: -20px 600px; }
}

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

/* Entry Overlay (Autoplay Blocker Bypass) */
#entry-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(30, 18, 10, 0.85) 0%, #0d0805 100%);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.8s;
}

#entry-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.entry-card {
  text-align: center;
  animation: fadeInEntry 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 2rem;
  max-width: 400px;
  width: 90%;
}

.entry-title {
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-white);
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  margin-bottom: 0.5rem;
}

.entry-subtitle {
  font-size: 0.9rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-weight: 500;
  margin-bottom: 3rem;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.start-btn {
  background: radial-gradient(circle at 30% 30%, #ffc062 0%, var(--accent) 100%);
  border: none;
  color: #1a0f08;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 0 0 rgba(245, 166, 35, 0.4), 
              0 15px 35px rgba(245, 166, 35, 0.3);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  animation: pulseButton 2s infinite;
  margin: 0 auto;
}

.start-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 0 0 15px rgba(245, 166, 35, 0), 
              0 20px 45px rgba(245, 166, 35, 0.5);
  animation: none;
}

.start-btn:active {
  transform: scale(0.96);
}

/* Animations */
@keyframes fadeInEntry {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseButton {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 166, 35, 0.5), 0 15px 35px rgba(245, 166, 35, 0.3);
  }
  70% {
    box-shadow: 0 0 0 18px rgba(245, 166, 35, 0), 0 15px 35px rgba(245, 166, 35, 0.3);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 166, 35, 0), 0 15px 35px rgba(245, 166, 35, 0.3);
  }
}

/* App Container Layout */
.app-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 5;
  box-sizing: border-box;
}

/* Top Bar Styling */
.top-bar {
  display: grid;
  grid-template-columns: 1.5fr auto 1.5fr;
  align-items: center;
  width: 100%;
  padding: 1.5rem 2rem;
  box-sizing: border-box;
}

.bar-item {
  color: var(--text-white);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  opacity: 0.85;
}

.time-display {
  justify-self: start;
  font-weight: 500;
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.4rem 0.8rem;
  border-radius: 9999px;
  border: 1px solid var(--border-light);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.served-counter {
  justify-self: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: rgba(245, 166, 35, 0.1);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--border-active);
  text-shadow: 0 0 8px rgba(245, 166, 35, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ambience-btn {
  justify-self: end;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-white);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ambience-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.ambience-btn.active {
  background: rgba(245, 166, 35, 0.2);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Centered Hero Block (Upper-Middle Third) */
.hero-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-grow: 1;
  margin-top: -60px; /* Slight offset upward for better visual centering */
  padding: 0 2rem;
  user-select: none;
}

.hero-title {
  font-size: clamp(2.8rem, 8.5vw, 6.2rem);
  font-weight: 900;
  color: var(--text-white);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9), 
                0 2px 4px rgba(0, 0, 0, 0.6);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.hero-subtitle {
  font-size: clamp(0.75rem, 2vw, 1.05rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* Player Bar and Queue Section */
.player-wrapper {
  position: relative;
  width: 90%;
  max-width: 920px;
  margin: 0 auto 1.5rem auto;
  z-index: 20;
}

/* Main Pill Player Bar */
.player-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--bg-dark-65);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  border-radius: 9999px;
  padding: 0.75rem 1.25rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  gap: 1.5rem;
  box-sizing: border-box;
}

/* Left: Song Info */
.track-info {
  display: flex;
  align-items: center;
  width: 25%;
  min-width: 180px;
  flex-shrink: 0;
}

.track-art {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background-color: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(245, 166, 35, 0.3);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3), 0 0 0 3px rgba(245, 166, 35, 0.08);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  animation: none;
}

.track-art.spinning {
  animation: vinyl-spin 4s linear infinite;
  border-color: rgba(245, 166, 35, 0.5);
  box-shadow: 0 4px 14px rgba(245, 166, 35, 0.15), 0 0 0 3px rgba(245, 166, 35, 0.12);
}

@keyframes vinyl-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.track-details {
  margin-left: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.track-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.15rem;
}

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

/* Center: Progress Bar Slider */
.progress-section {
  display: flex;
  align-items: center;
  flex-grow: 1;
}

.time-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  min-width: 32px;
  text-align: center;
  font-weight: 500;
}

.slider-container {
  position: relative;
  flex-grow: 1;
  display: flex;
  align-items: center;
  margin: 0 0.75rem;
  height: 14px; /* Expand click target height */
}

.slider-container input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
  outline: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

/* Safari track fill styling is custom via the progressBarFill div */
.progress-bar-fill {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 3px;
  background-color: var(--accent);
  border-radius: 99px;
  pointer-events: none;
  z-index: 1;
  width: 0%;
  box-shadow: 0 0 6px rgba(245, 166, 35, 0.4);
}

/* Custom Thumbs */
.slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 8px var(--accent);
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.45);
}

.slider-container input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 8px var(--accent);
}

.slider-container input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.45);
}

/* Right: Control Buttons */
.control-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
}

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

.control-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.control-btn:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.05);
}

.control-btn.active {
  color: var(--accent);
  filter: drop-shadow(0 0 4px var(--accent-glow));
}

.play-pause-btn {
  background: var(--text-white);
  color: #1a0f08 !important;
  width: 44px;
  height: 44px;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.play-pause-btn:hover {
  transform: scale(1.05);
  background: var(--accent);
  color: #1a0f08;
  box-shadow: 0 4px 20px var(--accent-glow);
}

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

.hidden {
  display: none !important;
}

/* Queue Drawer Slide-Up Panel */
.queue-panel {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 5%;
  right: 5%;
  background: var(--bg-dark-90);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.6);
  max-height: 45vh;
  display: flex;
  flex-direction: column;
  z-index: 15;
  transform: translateY(30px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.4s;
}

.queue-panel.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.queue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.queue-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
}

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

.close-btn:hover {
  color: var(--text-white);
}

.queue-list {
  overflow-y: auto;
  flex-grow: 1;
  margin-top: 0.5rem;
  padding-right: 0.25rem;
  /* Scrollbar styles for Firefox */
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

/* Custom Scrollbar styling for Webkit */
.queue-list::-webkit-scrollbar {
  width: 5px;
}

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

.queue-list::-webkit-scrollbar-thumb {
  background: rgba(245, 166, 35, 0.3);
  border-radius: 99px;
}

.queue-list::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Queue List Items */
.queue-item {
  display: flex;
  align-items: center;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 0.35rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.queue-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.queue-item.active {
  background: rgba(245, 166, 35, 0.08);
  border-color: rgba(245, 166, 35, 0.2);
}

.queue-item-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.queue-track-number {
  font-size: 0.75rem;
  color: var(--text-dim);
  width: 16px;
  text-align: right;
}

.queue-item.active .queue-track-number {
  color: var(--accent);
  font-weight: bold;
}

.queue-thumbnail {
  width: 48px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
  background: #1f140e;
  border: 1px solid rgba(255,255,255,0.05);
}

.queue-item-right {
  margin-left: 0.75rem;
  overflow: hidden;
  flex-grow: 1;
}

.queue-track-title {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.1rem;
}

.queue-item.active .queue-track-title {
  color: var(--accent);
  font-weight: 600;
}

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

/* Skeleton Loading Animation */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  color: transparent !important;
  border-radius: 4px;
}

.queue-track-title.skeleton {
  width: 70%;
  height: 0.8rem;
}

.queue-track-artist.skeleton {
  width: 40%;
  height: 0.68rem;
  margin-top: 0.25rem;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Footer & Keyboard Shortcuts Hints */
.app-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem 1.5rem 1rem;
}

.shortcuts-hints {
  display: flex;
  gap: 1.5rem;
  font-size: 0.68rem;
  color: var(--text-dim);
  user-select: none;
}

.shortcuts-hints span strong {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  margin-right: 0.25rem;
  font-weight: 600;
}

.footer-tagline {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-shadow: 0 2px 5px rgba(0,0,0,0.5);
  margin-bottom: 0.4rem;
  opacity: 0.95;
}

.footer-credit {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.credit-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  transition: opacity 0.2s ease;
}

.credit-link:hover {
  text-decoration: underline;
  opacity: 0.85;
}

/* Chai Meter (Retro electrical style box) - Positioned above player */
.chai-meter {
  display: flex;
  flex-direction: column;
  position: relative;
  margin: 0 auto 1.25rem auto;
  width: 260px;
  background: #140e0a;
  border: 4px solid #F5A623;
  border-radius: 12px;
  box-shadow: 
    0 15px 45px rgba(0, 0, 0, 0.85),
    inset 0 0 20px rgba(245, 166, 35, 0.15);
  padding: 1.2rem;
  z-index: 10;
  box-sizing: border-box;
  user-select: none;
}

.meter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px dashed rgba(245, 166, 35, 0.25);
  padding-bottom: 0.5rem;
  margin-bottom: 0.8rem;
}

.meter-brand {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 0.72rem;
  color: #F5A623;
  letter-spacing: 0.1em;
}

.meter-model {
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 4px;
  border-radius: 3px;
}

.meter-body {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.meter-display-group {
  display: flex;
  flex-direction: column;
}

.meter-display-group.primary .display-screen {
  font-size: 1.5rem;
  color: #00ff66;
  text-shadow: 0 0 10px rgba(0, 255, 102, 0.6);
  min-height: 42px;
}

.display-label {
  font-size: 0.58rem;
  font-weight: 700;
  color: #a1887f;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.display-screen {
  background: #090604;
  border: 1px solid rgba(245, 166, 35, 0.15);
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.display-screen.small {
  font-size: 0.92rem;
  color: #ffaa00;
  text-shadow: 0 0 8px rgba(255, 170, 0, 0.65);
  min-height: 30px;
  padding: 4px;
}

.display-screen.status-green {
  color: #00e5ff;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.65);
}

.meter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.meter-footer {
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.6rem;
  display: flex;
  justify-content: center;
}

.safety-label {
  font-size: 0.55rem;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Screws in corner of retro meter */
.screw {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #3a2e2b;
  border-radius: 50%;
  box-shadow: inset 1px 1px 2px rgba(255,255,255,0.1), 1px 1px 2px rgba(0,0,0,0.5);
}
.screw::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #110c0a;
  transform: translateY(-50%) rotate(45deg);
}

.screw.top-left { top: 8px; left: 8px; }
.screw.top-right { top: 8px; right: 8px; }
.screw.bottom-left { bottom: 8px; left: 8px; }
.screw.bottom-right { bottom: 8px; right: 8px; }


/* Central Slogan/Quote Board */
.quote-board {
  display: flex;
  align-items: center;
  background: rgba(26, 17, 12, 0.45);
  border: 1px solid rgba(245, 166, 35, 0.12);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  border-radius: 14px;
  padding: 0.8rem 2.6rem 0.8rem 1.4rem;
  position: relative;
  margin: 0 auto 1.25rem auto;
  max-width: 520px;
  width: 90%;
  text-align: left;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    inset 0 0 15px rgba(255, 255, 255, 0.02);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

/* Desktop: show above-player copy, hide hero copy */
.quote-board--mobile {
  display: none;
}
.quote-board--desktop {
  display: flex;
}

@media (max-width: 767px) {
  /* Mobile: show hero copy, hide above-player copy */
  .quote-board--mobile {
    display: flex;
    margin-top: 0.75rem;
  }
  .quote-board--desktop {
    display: none;
  }
}

.quote-board:hover {
  border-color: rgba(245, 166, 35, 0.25);
  box-shadow: 
    0 12px 35px rgba(0, 0, 0, 0.65),
    0 0 15px rgba(245, 166, 35, 0.05);
}

.quote-container {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow: hidden;
}

.quote-text {
  font-size: clamp(1.05rem, 3.5vw, 1.35rem);
  font-weight: 700;
  color: var(--text-white);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  line-height: 1.3;
  margin: 0;
  white-space: normal;
}

.quote-translation {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 3px;
  letter-spacing: 0.02em;
}

.refresh-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.refresh-btn svg {
  transition: transform 0.4s ease;
}

.refresh-btn:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
}

.refresh-btn:hover svg {
  transform: rotate(180deg);
}

.refresh-btn:active {
  transform: translateY(-50%) scale(0.9);
}

/* Responsive Media Queries (Mobile-first overrides) */

/* Desktop view (768px and up) */
@media (min-width: 768px) {
  .control-btn {
    width: 44px;
    height: 44px;
  }
}

/* Tablet & Mobile Layout Shifts (below 768px) */
@media (max-width: 767px) {
  .app-container {
    justify-content: space-between;
  }

  .top-bar {
    display: flex;
    justify-content: center;
    padding: 1rem 1.25rem 0.25rem 1.25rem;
  }

  .served-counter {
    font-size: 0.75rem;
    padding: 0.35rem 0.8rem;
    margin-top: 0;
  }

  .hero-block {
    margin-top: 0;
    flex-grow: 0;
    margin-bottom: auto;
  }

  /* Two-row layout inside player pill for mobile screen optimization */
  .player-wrapper {
    width: calc(100% - 1.5rem);
    margin-bottom: 1rem;
  }

  .player-bar {
    flex-direction: column;
    border-radius: 24px;
    padding: 1rem 1rem 0.75rem 1rem;
    gap: 0.75rem;
  }

  .track-info {
    width: 100%;
    min-width: unset;
  }

  .progress-section {
    width: 100%;
    order: -1; /* Place progress bar on top row */
    margin-bottom: 0.25rem;
  }

  .control-buttons {
    width: 100%;
    justify-content: space-between; /* Space out the 5 controls equally on mobile */
    gap: 0;
  }

  /* Minimum touch target overrides for mobile buttons */
  .control-btn {
    width: 44px;
    height: 44px;
  }

  .play-pause-btn {
    width: 48px;
    height: 48px;
  }

  .queue-panel {
    left: 0;
    right: 0;
    bottom: calc(100% + 8px);
    max-height: 42vh;
    border-radius: 16px;
    padding: 1rem;
  }

  .shortcuts-hints {
    display: none !important; /* Hide keyboard shortcut hints on mobile */
  }

  .app-footer {
    padding-bottom: 1.25rem;
    gap: 0;
  }
}

/* Extra small viewport overrides (e.g. down to 350px width) */
@media (max-width: 375px) {
  .player-bar {
    padding: 0.85rem 0.75rem 0.6rem 0.75rem;
  }
  
  .track-art {
    width: 38px;
    height: 38px;
  }

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

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