/* ══════════════════════════════════════════════════════════════════
   GURBANI RADIO — iOS Production-Level Premium Stylesheet
   Beige/Ivory Warm Claymorphism & Apple Music Aesthetic DNA
   ══════════════════════════════════════════════════════════════════ */

:root {
  /* Curated HSL Palette */
  --bg-primary:         #FAF8F5;
  --bg-secondary:       #F3EDE7;
  --bg-card:            #FFFFFF;
  --accent-gold:        #DCA54C;
  --accent-gold-rgb:    220, 165, 76;
  --accent-gold-dark:   #B98433;
  --accent-gold-light:  #F7EBD3;
  --text-prime:         #352E2A;
  --text-sec:           #7C726B;
  --text-light:         #A39992;
  
  /* Borders & Separation */
  --border-color:       rgba(220, 165, 76, 0.12);
  --separator:          rgba(53, 46, 42, 0.06);

  /* Precise iOS Shadows */
  --shadow-xs:          0 1px 3px rgba(53, 46, 42, 0.02);
  --shadow-sm:          0 4px 12px rgba(53, 46, 42, 0.03);
  --shadow-md:          0 12px 28px rgba(53, 46, 42, 0.06);
  --shadow-lg:          0 24px 48px rgba(53, 46, 42, 0.09);
  --shadow-play:        0 10px 24px rgba(220, 165, 76, 0.25);

  /* Border Radii */
  --radius-card:        24px;
  --radius-pill:        999px;
  --radius-btn:         16px;

  /* Easing curves */
  --spring:             cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-ios:           cubic-bezier(0.25, 1, 0.5, 1);

  /* Responsive Spacing Grid */
  --section-gap:        24px;
}

/* Dynamic Gap Adjustments for Screen Heights */
@media (max-height: 840px) {
  :root { --section-gap: 16px; }
}
@media (max-height: 765px) {
  :root { --section-gap: 12px; }
}
@media (max-height: 680px) {
  :root { --section-gap: 8px; }
}
@media (max-height: 600px) {
  :root { --section-gap: 6px; }
}

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

html, body {
  height: 100%;
  width: 100%;
  background: var(--bg-primary);
  color: var(--text-prime);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* Main Container Frame */
.app {
  display: flex;
  flex-direction: column;
  height: 100dvh; /* Use dynamic viewport height */
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  background: var(--bg-primary);
  box-sizing: border-box;
  padding: calc(env(safe-area-inset-top, 24px) + 6px) 20px calc(env(safe-area-inset-bottom, 12px) + 8px);
  overflow: hidden;
  box-shadow: 0 0 50px rgba(53, 46, 42, 0.05);
}

/* ─── TOP NAVIGATION BAR ─── */
.gr-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  margin-bottom: var(--section-gap);
  flex-shrink: 0;
}

.gr-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-prime);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--spring), background-color 0.25s, border-color 0.25s;
}
.gr-icon-btn:hover {
  background-color: var(--bg-secondary);
}
.gr-icon-btn:active {
  transform: scale(0.9);
  background-color: rgba(220, 165, 76, 0.08);
}
.gr-icon-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

.gr-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.gr-ik-onkar {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent-gold);
}
.gr-title-main {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-prime);
  letter-spacing: -0.2px;
}

/* ─── SEGMENTED CONTROL (STREAM TABS) ─── */
/* v10.9.0: CACHE BUST FIX - Gurbani Radio Tab Indicator Alignment */
/* ISSUE: Tab indicator was misaligned in production (positioned between tabs instead of behind active tab) */
/* ROOT CAUSE: Old CSS cached by Service Worker with wrong translateX calculation (percentage instead of calc()) */
/* FIX: Bumped SW cache version to v10.9.0 + CSS query param to v10.9.0 to force fresh fetch */
/* VERIFIED: Local build always had correct calc() formula - production was serving stale cached CSS */

/* v10.7.0: FIXED translateX calculation - uses calc() not percentage */
.gr-tabs {
  display: flex;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius-pill);
  margin-bottom: var(--section-gap);
  position: relative;
  height: 46px;
  border: 1px solid rgba(53, 46, 42, 0.02);
  flex-shrink: 0;
  overflow: hidden;
}

.gr-tabs-slider {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  /* Width for 3 tabs */
  width: calc((100% - 8px) / 3);
  background: var(--accent-gold);
  border-radius: var(--radius-pill);
  z-index: 1;
  box-shadow: 0 3px 8px rgba(var(--accent-gold-rgb), 0.25);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), width 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Fixed 3-tab positions - slider moves by tab width, not percentage */
.gr-tabs[data-active="0"] .gr-tabs-slider { transform: translateX(0); }
.gr-tabs[data-active="1"] .gr-tabs-slider { transform: translateX(calc((100% - 8px) / 3)); }
.gr-tabs[data-active="2"] .gr-tabs-slider { transform: translateX(calc(2 * (100% - 8px) / 3)); }
.gr-tabs[data-active="3"] .gr-tabs-slider { transform: translateX(calc(3 * (100% - 8px) / 3)); }
.gr-tabs[data-active="4"] .gr-tabs-slider { transform: translateX(calc(4 * (100% - 8px) / 3)); }

.gr-tab {
  flex: 1;
  border: none;
  background: transparent;
  height: 100%;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-sec);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  transition: color 0.25s ease;
  padding: 0 10px;
  min-width: 0;
  overflow: hidden;
}
.gr-tab.active {
  color: #FFFFFF;
}

.gr-tab-text-inner {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  transition: transform 0.25s ease;
}

/* Marquee animation for active long stream names */
@keyframes grTabMarquee {
  0% { transform: translate3d(0, 0, 0); }
  15% { transform: translate3d(0, 0, 0); }
  85% { transform: translate3d(calc(-100% + 80px), 0, 0); }
  100% { transform: translate3d(calc(-100% + 80px), 0, 0); }
}

.gr-tab.active.should-marquee .gr-tab-text-inner {
  animation: grTabMarquee 6s linear infinite alternate;
  text-overflow: clip;
  overflow: visible;
}



/* ─── ALBUM ARTWORK CARD ─── */
.gr-card-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: var(--section-gap);
  flex: 1;
  min-height: 0;
}

.gr-card {
  width: 100%;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 16px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(220,165,76,0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.3s var(--spring);
}

.gr-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--bg-secondary);
}

.gr-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.gr-badge-live {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #E24C4C;
  font-weight: 700;
  font-size: 10px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: var(--shadow-xs);
  letter-spacing: 0.5px;
}

.gr-live-dot {
  width: 6px;
  height: 6px;
  background: #E24C4C;
  border-radius: 50%;
  animation: liveDotPulse 1.5s ease-in-out infinite;
}
@keyframes liveDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(1.3); }
}

.gr-favorite-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: none;
  color: var(--text-sec);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: transform 0.25s var(--spring), color 0.2s, background-color 0.2s;
}
.gr-favorite-btn:active {
  transform: scale(0.9);
}
.gr-favorite-btn.favorited {
  color: #E24C4C;
  fill: #E24C4C;
}
.gr-favorite-btn svg {
  width: 18px;
  height: 18px;
}

/* ─── INFORMATION SECTION ─── */
.gr-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 2px;
}

.gr-info-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.gr-track-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-prime);
  letter-spacing: -0.4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* Music visualizer animation */
.gr-wave-icon {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 18px;
  height: 16px;
  flex-shrink: 0;
}
.gr-wave-icon .bar {
  width: 3px;
  height: 100%;
  background: var(--accent-gold);
  border-radius: var(--radius-pill);
  transform-origin: bottom;
  transform: scaleY(0.2);
  transition: transform 0.2s ease;
}
.gr-wave-icon.playing .bar-1 { animation: waveAnim 1.1s ease-in-out infinite alternate; }
.gr-wave-icon.playing .bar-2 { animation: waveAnim 0.8s ease-in-out infinite alternate-reverse; }
.gr-wave-icon.playing .bar-3 { animation: waveAnim 1.0s ease-in-out infinite alternate; }

@keyframes waveAnim {
  0%   { transform: scaleY(0.2); }
  100% { transform: scaleY(1); }
}

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

.gr-pill-location {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--accent-gold-light);
  color: var(--accent-gold-dark);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-top: 4px;
  align-self: flex-start;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.gr-pill-dot {
  width: 4px;
  height: 4px;
  background: var(--accent-gold-dark);
  border-radius: 50%;
}

/* ─── LISTENING STATUS BANNER ─── */
.gr-listening-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--section-gap);
  padding: 8px 14px;
  background: var(--bg-secondary);
  border-radius: 14px;
  border: 1px solid rgba(53,46,42,0.02);
  height: 36px;
  flex-shrink: 0;
}

.gr-listening-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sec);
}

.gr-listening-icon {
  width: 14px;
  height: 14px;
  color: var(--text-light);
}

.gr-listening-dot {
  width: 4px;
  height: 4px;
  background: #28A745;
  border-radius: 50%;
}

.gr-listening-live {
  color: #28A745;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.gr-listening-time-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sec);
  background: var(--bg-card);
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-xs);
  font-variant-numeric: tabular-nums;
}

/* ─── PLAYBACK CONTROL CENTER ─── */
.gr-controls-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: var(--section-gap);
  flex-shrink: 0;
}

.gr-timeline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gr-time-current, .gr-time-total {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sec);
  width: 36px;
  font-variant-numeric: tabular-nums;
}
.gr-time-total {
  text-align: right;
}

.gr-slider-container {
  flex: 1;
  height: 16px;
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.gr-slider-track {
  width: 100%;
  height: 4px;
  background: #E5DDD7;
  border-radius: var(--radius-pill);
  position: relative;
}

.gr-slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--accent-gold);
  width: 0%;
  border-radius: var(--radius-pill);
}

.gr-slider-handle {
  width: 12px;
  height: 12px;
  background: var(--accent-gold);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 4px rgba(53, 46, 42, 0.2);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.gr-slider-container:active .gr-slider-handle,
.gr-slider-container:hover .gr-slider-handle {
  transform: translate(-50%, -50%) scale(1.3);
}

.gr-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.gr-ctrl-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-sec);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s, color 0.2s, background-color 0.2s;
}
.gr-ctrl-btn:hover {
  background-color: rgba(53, 46, 42, 0.03);
  color: var(--text-prime);
}
.gr-ctrl-btn:active {
  transform: scale(0.9);
  background-color: rgba(53, 46, 42, 0.06);
}
.gr-ctrl-btn svg {
  width: 22px;
  height: 22px;
}

.gr-btn-skip-back, .gr-btn-skip-fwd {
  position: relative;
}
.gr-skip-num {
  position: absolute;
  font-size: 8px;
  font-weight: 800;
  color: var(--text-prime);
  top: 51%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.gr-play-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: none;
  background: var(--accent-gold);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-play);
  transition: transform 0.25s var(--spring), box-shadow 0.2s;
}
.gr-play-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 12px 28px rgba(var(--accent-gold-rgb), 0.35);
}
.gr-play-btn:active {
  transform: scale(0.94);
  box-shadow: 0 5px 12px rgba(var(--accent-gold-rgb), 0.2);
}
.gr-play-btn svg {
  width: 24px;
  height: 24px;
}
.gr-play-btn .play-icon {
  margin-left: 2px;
}

/* ─── BOTTOM UTILITY PANEL ─── */
.gr-utility-panel {
  display: flex;
  justify-content: space-between;
  padding: 10px 0 0;
  border-top: 1px solid var(--separator);
  margin-bottom: 0;
  flex-shrink: 0;
}

.gr-util-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-sec);
  flex: 1;
}

.gr-util-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(220,165,76,0.04);
  transition: transform 0.25s var(--spring), background-color 0.2s;
}
.gr-util-item:hover .gr-util-icon-circle {
  background-color: #EAE3DC;
}
.gr-util-item:active .gr-util-icon-circle {
  transform: scale(0.9);
  background-color: rgba(220, 165, 76, 0.1);
}

.gr-util-icon-circle svg {
  width: 18px;
  height: 18px;
  color: var(--text-sec);
}

.gr-util-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1px;
}

.gr-record-circle {
  position: relative;
}
.gr-record-dot {
  width: 12px;
  height: 12px;
  background: #E24C4C;
  border-radius: 50%;
  transition: border-radius 0.25s var(--spring), transform 0.25s var(--spring);
}

/* Active Recording Indicator State */
.gr-util-item.recording .gr-record-dot {
  border-radius: 3px;
  transform: scale(0.9);
  animation: recDotPulse 1.2s ease-in-out infinite alternate;
}
@keyframes recDotPulse {
  from { opacity: 1; transform: scale(0.9); }
  to { opacity: 0.2; transform: scale(0.7); }
}

.gr-util-item.recording {
  color: #E24C4C !important;
}
.gr-util-item.recording .gr-util-icon-circle {
  background: rgba(226, 76, 76, 0.1);
  border-color: rgba(226, 76, 76, 0.15);
}

/* ─── BOTTOM NAVIGATION TABBAR ─── */
.gr-bottom-nav {
  display: flex;
  background: var(--bg-card);
  margin: 0 -24px -12px;
  padding: 10px 24px max(env(safe-area-inset-bottom, 12px), 12px);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 20px rgba(53, 46, 42, 0.02);
  justify-content: space-between;
  z-index: 10;
  flex-shrink: 0;
}

.gr-nav-item {
  flex: 1;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s;
}
.gr-nav-item svg {
  width: 20px;
  height: 20px;
  transition: transform 0.15s;
}
.gr-nav-item:active svg {
  transform: scale(0.9);
}
.gr-nav-item span {
  font-size: 10px;
  font-weight: 600;
}

.gr-nav-item.active {
  color: var(--accent-gold);
}

/* ─── BOTTOM SHEET OVERLAYS ─── */
.gr-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.gr-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(53, 46, 42, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn 0.25s ease-out;
}

.gr-sheet {
  position: relative;
  background: var(--bg-primary);
  border-radius: 28px 28px 0 0;
  padding: 20px 24px max(env(safe-area-inset-bottom, 24px), 24px);
  box-shadow: 0 -10px 30px rgba(53, 46, 42, 0.1);
  animation: slideUp 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 1;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.gr-sheet-handle {
  width: 36px;
  height: 4px;
  background: #DDD4CD;
  border-radius: var(--radius-pill);
  margin: 0 auto 16px;
}

.gr-sheet-title {
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 16px;
  color: var(--text-prime);
  letter-spacing: -0.2px;
}

.gr-sheet-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gr-sheet-opt {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  border-radius: var(--radius-btn);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-prime);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  box-shadow: var(--shadow-xs);
}
.gr-sheet-opt:active {
  transform: scale(0.98);
}
.gr-sheet-opt.active {
  background: var(--accent-gold);
  color: #FFFFFF;
  border-color: var(--accent-gold);
}

/* ─── TOAST NOTIFICATIONS ─── */
.gr-toast {
  position: fixed;
  bottom: 92px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: rgba(53, 46, 42, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-ios), transform 0.3s var(--ease-ios);
  z-index: 999999;
}
.gr-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── RESPONSIVE & MOBILE POLISH ─── */
@media (max-height: 800px) {
  .gr-card {
    padding: 12px;
    gap: 10px;
  }
  .gr-card-media {
    aspect-ratio: 1.15; /* Compress card height slightly to avoid page overflow */
  }
  .gr-track-title {
    font-size: 20px;
  }
  .gr-track-artist {
    font-size: 14px;
  }
}
@media (max-height: 720px) {
  .gr-card {
    padding: 12px;
    gap: 8px;
  }
  .gr-card-media {
    aspect-ratio: 1.25;
  }
  .gr-play-btn {
    width: 60px;
    height: 60px;
  }
  .gr-ctrl-btn {
    width: 40px;
    height: 40px;
  }
}
@media (max-height: 640px) {
  .gr-card-media {
    aspect-ratio: 1.35;
  }
  .gr-track-title {
    font-size: 18px;
  }
  .gr-play-btn {
    width: 56px;
    height: 56px;
  }
}

/* ─── BEHIND LIVE JUMP BUTTON ─── */
.gr-btn-jump-live {
  background: #E24C4C;
  color: #FFFFFF;
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(226, 76, 76, 0.25);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  animation: grPulse 2s infinite;
}
.gr-btn-jump-live:active {
  transform: scale(0.95);
  box-shadow: 0 2px 5px rgba(226, 76, 76, 0.15);
}

@keyframes grPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(226, 76, 76, 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(226, 76, 76, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(226, 76, 76, 0);
  }
}

/* ─── LANDSCAPE & LOW-HEIGHT RESPONSIVE LAYOUT ─── */
@media (max-height: 580px) or (orientation: landscape) and (max-height: 640px) {
  .app {
    padding: calc(env(safe-area-inset-top, 24px) + 2px) 16px max(env(safe-area-inset-bottom, 8px), 8px);
    overflow-y: auto;
    height: 100vh;
    max-width: 100%;
    gap: 8px;
  }
  .gr-nav {
    height: 38px;
    margin-bottom: 4px;
  }
  .gr-title-main {
    font-size: 14px;
  }
  .gr-ik-onkar {
    font-size: 18px;
  }
  .gr-icon-btn {
    width: 36px;
    height: 36px;
  }
  .gr-icon-btn svg {
    width: 16px;
    height: 16px;
  }
  .gr-tabs {
    height: 36px;
    margin-bottom: 4px;
  }
  .gr-tab {
    font-size: 11px;
    gap: 4px;
  }
  .gr-tab-icon {
    width: 12px;
    height: 12px;
  }
  .gr-card-wrapper {
    margin-bottom: 4px;
    padding: 0;
  }
  .gr-card {
    padding: 10px;
    gap: 10px;
    flex-direction: row;
    align-items: center;
  }
  .gr-card-media {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
  }
  .gr-cover-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
  }
  .gr-badge-live {
    padding: 2px 6px;
    font-size: 8px;
    top: 6px;
    left: 6px;
  }
  .gr-favorite-btn {
    width: 28px;
    height: 28px;
    bottom: 6px;
    right: 6px;
  }
  .gr-favorite-btn svg {
    width: 14px;
    height: 14px;
  }
  .gr-info {
    text-align: left;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
  }
  .gr-track-title {
    font-size: 14px;
  }
  .gr-track-artist {
    font-size: 11px;
  }
  .gr-pill-location {
    padding: 2px 8px;
    font-size: 9px;
  }
  .gr-listening-banner {
    padding: 6px 12px;
    margin-bottom: 4px;
  }
  .gr-listening-status {
    font-size: 11px;
  }
  .gr-listening-time-badge {
    font-size: 11px;
  }
  .gr-controls-section {
    padding: 0;
  }
  .gr-timeline {
    margin-bottom: 4px;
  }
  .gr-time-current, .gr-time-total {
    font-size: 10px;
  }
  .gr-controls-row {
    gap: 12px;
  }
  .gr-play-btn {
    width: 50px;
    height: 50px;
  }
  .gr-play-btn svg {
    width: 18px;
    height: 18px;
  }
  .gr-ctrl-btn {
    width: 36px;
    height: 36px;
  }
  .gr-ctrl-btn svg {
    width: 16px;
    height: 16px;
  }
  .gr-utility-panel {
    margin-top: 4px;
    padding-top: 4px;
    gap: 8px;
  }
  .gr-util-icon-circle {
    width: 36px;
    height: 36px;
  }
  .gr-util-icon-circle svg {
    width: 16px;
    height: 16px;
  }
  .gr-util-label {
    font-size: 10px;
  }
}

[data-theme="dark"] {
  --bg-primary:         #0A0A0C;
  --bg-secondary:       #141417;
  --bg-card:            #141417;
  --text-prime:         #FFFFFF;
  --text-sec:           #A0A0A5;
  --text-light:         #7C7C82;
  --border-color:       rgba(255, 255, 255, 0.08);
  --separator:          rgba(255, 255, 255, 0.06);
  --shadow-xs:          0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-sm:          0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-md:          0 12px 28px rgba(0, 0, 0, 0.5);
  --shadow-lg:          0 24px 48px rgba(0, 0, 0, 0.6);
}

/* ─── SCREEN HEIGHT SCALING INSIGHTS ─── */
@media (max-height: 780px) {
  :root { --section-gap: 12px; }
  .gr-card { padding: 12px; gap: 8px; }
  .gr-card-media { max-height: 200px; }
  .gr-ctrl-btn { width: 40px; height: 40px; }
  .gr-play-btn { width: 56px; height: 56px; }
}

@media (max-height: 700px) {
  :root { --section-gap: 8px; }
  .gr-card { padding: 10px; gap: 6px; }
  .gr-card-media { max-height: 150px; }
  .gr-ctrl-btn { width: 36px; height: 36px; }
  .gr-play-btn { width: 48px; height: 48px; }
  .gr-utility-panel { padding-top: 4px; }
  .gr-util-icon-circle { width: 36px; height: 36px; }
}

@media (max-height: 640px) {
  :root { --section-gap: 6px; }
  .gr-card-media { max-height: 120px; }
  .gr-util-label { font-size: 9px; }
  .gr-util-icon-circle { width: 32px; height: 32px; }
}

