/* ==========================================================================
   Design Tokens & Resets (davila7-ui-design-system inspired)
   ========================================================================== */
:root {
  /* Core Colors */
  --bg-dark: #0A0A0B;
  --bg-darker: #050505;
  --text-main: #F3F4F6;
  --text-muted: #9CA3AF;

  /* Neon Accents for that 'Subliem' glow */
  --accent-cyan: #00E5FF;
  --accent-magenta: #FF007F;
  --accent-glow: 0 0 20px rgba(0, 229, 255, 0.4);
  /* JS will override this dynamically */

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(24px);

  /* Typography (Fluid, wshobson-responsive-design inspired) */
  --font-display: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Fluid Spacing */
  --space-xs: clamp(0.25rem, 0.2rem + 0.25vw, 0.5rem);
  --space-sm: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
  --space-md: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  --space-lg: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem);
  --space-xl: clamp(2rem, 1.5rem + 2.5vw, 4rem);
}

/* Enable smooth transitions for CSS variable changes globally */
* {
  transition: --accent-cyan 1.5s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow: hidden;
  /* Prevent scrolling, app-like feel */
  overscroll-behavior-y: none;
  /* Disable bounce on iOS */
  touch-action: manipulation;
  /* Disable double-tap to zoom */
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Typography Classes
   ========================================================================== */
.brand-title {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: .95;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  white-space: nowrap;
  width: max-content;
}

.brand-subtitle {
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: var(--space-xs);
}

.neon-text {
  background: linear-gradient(135deg, var(--text-main) 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.2));
}

.text-muted {
  color: var(--text-muted);
}

.text-small {
  font-size: 0.85rem;
}

/* Fluid Type Calculations */
.fluid-h1 {
  font-size: clamp(3.5rem, 12vw, 5.5rem);
}

.fluid-p {
  font-size: clamp(0.9rem, 0.8rem + 0.45vw, 1.1rem);
}

/* ==========================================================================
   Main Layout Structure (CSS Grid)
   ========================================================================== */
.app-layout {
  display: grid;
  height: 100dvh;
  grid-template-columns: 1fr;
  /* Mobile first */
  grid-template-rows: 1fr;
  position: relative;
}

@media (min-width: 1024px) {
  .app-layout {
    grid-template-columns: 50% 50%;
  }
}

/* ==========================================================================
   Left Side (Explorer / Cover Flow)
   ========================================================================== */
.explorer-section {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Dark gradient fade into the right side image cleanly */
  background: linear-gradient(to right, var(--bg-darker) 40%, var(--bg-dark) 100%);
  padding: var(--space-xl);
  overflow: hidden;
  /* Prevent aura from bleeding to the right panel */
}

@media (max-width: 1370px) {
  .explorer-section {
    background: linear-gradient(to bottom, transparent 0%, var(--bg-darker) 40%);
    justify-content: flex-end;
    padding-bottom: 12vh;
    padding-left: var(--space-md);
    padding-right: var(--space-md);
    min-height: 100dvh;
    transition: padding-bottom 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: padding-bottom;
  }

  .focus-mode-active .explorer-section {
    padding-bottom: 15vh;
  }

  .explorer-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: var(--space-xs);
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease;
    will-change: transform, opacity;
  }

  .focus-mode-active .explorer-header {
    transform: translateY(20vh);
    opacity: 0.9;
  }

  .brand-title {
    width: 100%;
    white-space: normal;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .fluid-h1 {
    font-size: clamp(3.7rem, 10vw, 5rem) !important;
    line-height: 0.9;
  }

  .coverflow-wrapper {
    transform: translateY(-30px);
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease;
    will-change: transform, opacity;
  }

  .focus-mode-active .coverflow-wrapper {
    transform: translateY(120vh);
    opacity: 0;
    pointer-events: none;
  }
}

/* Tablet Landscape Refinement (1024px - 1200px) */
@media (min-width: 1024px) and (max-width: 1200px) {
  .explorer-section {
    background: linear-gradient(to right, var(--bg-darker) 40%, var(--bg-dark) 100%);
    justify-content: flex-end;
  }

  .coverflow-wrapper {
    height: 320px;
    margin: -10px 0;
  }

  .track-card {
    width: 180px;
    height: 180px;
  }
}

/* ==========================================================================
   Marketing & Conversion Elements
   ========================================================================== */
.platform-badges {
  display: flex;
  flex-direction: row;
  /* Force horizontal icons */
  gap: var(--space-md);
  margin-top: var(--space-md);
  justify-content: center;
  align-items: center;
  pointer-events: auto;
}

.platform-link {
  color: var(--text-muted);
  font-size: 1.5rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  backdrop-filter: blur(8px);
}

@media (hover: hover) {
  .platform-link:hover {
    color: var(--accent-cyan);
    transform: translateY(-5px) scale(1.1);
    background: rgba(0, 229, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
  }
}

.track-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  z-index: 10;
  background: rgba(0, 229, 255, 0.15);
  backdrop-filter: blur(12px);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.explorer-header {
  margin-bottom: var(--space-md);
  z-index: 20;
  pointer-events: none;
  /* Center horizontally (default for mobile) */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

@media (min-width: 1371px) {
  .explorer-header {
    align-items: flex-start;
    text-align: left;
    padding-top: var(--space-lg);
    /* Slightly reduced to lift everything */
    margin-bottom: var(--space-sm);
  }

  .explorer-header .platform-badges {
    justify-content: flex-start;
  }

  .explorer-section {
    justify-content: flex-start;
    padding-top: 10vh;
    /* Lift the entire content stack */
  }

  .coverflow-wrapper {
    margin: -40px 0;
    /* Restore grounded margin for desktop */
  }
}

/* Cover Flow 3D Container */
.coverflow-wrapper {
  perspective: 1000px;
  -webkit-perspective: 1000px;
  width: 100%;
  height: 380px;
  /* Increased to prevent clipping of 3D cards at top/bottom */
  margin: -30px 0 0 0;
  /* Final adjustment to -30px */
  /* Offset scale */
  display: flex;
  align-items: center;
  position: relative;
  z-index: 15;
  overflow: visible;
  /* Prevent iOS from clipping 3D overflow */
}

.coverflow {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  display: flex;
  justify-content: center;
  align-items: center;
  /* Allow clicks to pass through the container to the cards */
  pointer-events: none;
}

/* Card Aura Visualizer Background (Horizontal Ellipse) */
.card-aura {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 550px;
  /* Horizontal stretch */
  height: 320px;
  /* Base height */
  background: var(--accent-cyan);
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.15;
  z-index: 0;
  mix-blend-mode: screen;
  pointer-events: none;
  transition: background 1.5s ease, transform 0.1s ease, opacity 0.1s ease;
  will-change: transform, opacity, background;
}

/* Mobile specific aura flattening */
@media (max-width: 768px) {
  .card-aura {
    height: 140px;
    /* Even shallower */
    width: 280px;
    /* More compact width */
    filter: blur(50px);
    opacity: 0.04;
    /* Ultra-damped for a whisper-quiet glow */
  }
}

/* Individual track cards */
.track-card {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 12px;
  background-color: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-md);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease;
  -webkit-transition: -webkit-transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
  pointer-events: auto;
  /* Ensure cards are clickable */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;

  /* iOS Border-Radius Fix for 3D Transforms */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
  isolation: isolate;

  /* Staggered entrance defaults */
  opacity: 0;
  pointer-events: none;
  -webkit-backface-visibility: hidden;
  /* Fixes iOS Safari flickering during 3D transform */
  backface-visibility: hidden;
}

.track-card.ready {
  opacity: 1;
  pointer-events: auto;
}

/* Add a cool gradient to cards */
.track-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.8));
  z-index: 1;
}

/* We will inject a background image via JS for each card */
.track-card .card-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
  transition: transform 0.5s ease;
}

.track-card:hover .card-bg {
  transform: scale(1.05);
}

.track-card .glare {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.3s ease;
  mix-blend-mode: overlay;
  border-radius: inherit;
}

.track-card:hover .glare {
  opacity: 1;
}

.track-card.interacting {
  transition: transform 0.1s ease-out, opacity 0.5s ease;
}

.track-card .track-index {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.7);
  /* Improved visibility */
  z-index: 2;
}

.track-card .track-name {
  position: relative;
  z-index: 2;
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.2;
}

/* ==========================================================================
   Right Side (Image Slider Background)
   ========================================================================== */
.gallery-section {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
}

@media (min-width: 1024px) {
  .gallery-section {
    position: relative;
  }

  /* Gradual fade overlay to seamlessly blend the left and right sides without a harsh gap (only visible during YouTube playback as requested) */
  .gallery-section.youtube-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: -2px;
    /* Slight overlap to avoid rendering artifacts */
    bottom: 0;
    width: 25%;
    background: linear-gradient(to right, var(--bg-dark) 0%, transparent 100%);
    z-index: 20;
    /* Elevated above youtube & images to recreate the smooth seam */
    pointer-events: none;
  }
}

.image-slider {
  width: 100%;
  height: 100%;
  position: relative;
}

.slider-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.5s ease-in-out, transform 10s linear;
  transform: scale(1.05);
  /* Slight zoom for dramatic entry */
}

.slider-img.active {
  opacity: 0.6;
  /* Dimmed slightly so text is readable */
  transform: scale(1);
}

@media (min-width: 1024px) {
  .slider-img.active {
    opacity: 1;
  }
}

.youtube-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  /* Let clicks pass through if needed, but we don't need manual yt controls */
  transition: opacity 1s ease-in-out;
  z-index: 40;
  /* Immediately visible above the image slider */
  overflow: hidden;
}

.youtube-container.active {
  opacity: 1;
}

/* Force iframe to cover the container like object-fit: cover for a 16:9 ratio */
.youtube-container iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  /* 9/16 = 56.25% */
  min-height: 100vh;
  min-width: 177.77vh;
  /* 16/9 = 177.77% */
  transform: translate(-50%, -50%);
  pointer-events: none;
  /* Hide Youtube UI interaction */
}

.vignette-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle, transparent 40%, var(--bg-dark) 100%);
  pointer-events: none;
  z-index: 25;
}

.film-grain {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 800 800' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.4;
  /* Made much lighter and finer */
  pointer-events: none;
  z-index: 30;
  mix-blend-mode: overlay;
  /* Re-added blend mode to prevent graying out image */
}

.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 35;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  opacity: 0;
  animation: floatParticle linear forwards;
}

@keyframes floatParticle {
  0% {
    transform: translateY(0) scale(0.5);
    opacity: 0;
  }

  20% {
    opacity: 0.6;
  }

  80% {
    opacity: 0.4;
  }

  100% {
    transform: translateY(-150vh) scale(1.5);
    opacity: 0;
  }
}

/* ==========================================================================
   Player Bar (Bottom Fixed UI)
   ========================================================================== */
.player-bar {
  position: fixed;
  bottom: var(--space-md);
  left: var(--space-md);
  right: var(--space-md);
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: var(--space-sm) var(--space-md);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .player-bar {
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 24px 24px 0 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
    padding: var(--space-md) var(--space-md) calc(var(--space-md) + env(safe-area-inset-bottom, 0px));
  }
}

.layout-grid {
  display: grid;
  grid-template-columns: 250px 1fr 150px;
  align-items: center;
  gap: var(--space-lg);
  position: relative;
  /* Anchor for absolute positioning children */
}

@media (max-width: 1024px) {
  .layout-grid {
    grid-template-columns: 200px 1fr 100px;
    gap: var(--space-md);
  }
}

@media (max-width: 768px) {
  .layout-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: var(--space-sm);
  }
}

/* Track Info */
.track-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.track-artwork {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.track-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Equalizer Animation */
.equalizer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3px;
}

.equalizer.hidden {
  display: none;
}

.equalizer .bar {
  width: 4px;
  background-color: var(--accent-cyan);
  border-radius: 2px;
  animation: eq-bounce 1s infinite alternate ease-in-out;
}

.equalizer .bar:nth-child(1) {
  height: 10px;
  animation-delay: 0.1s;
}

.equalizer .bar:nth-child(2) {
  height: 20px;
  animation-delay: 0.3s;
}

.equalizer .bar:nth-child(3) {
  height: 15px;
  animation-delay: 0.2s;
}

@keyframes eq-bounce {
  0% {
    transform: scaleY(0.5);
  }

  100% {
    transform: scaleY(1.5);
  }
}

/* Player Controls */
.player-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.control-buttons {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  /* iOS rendering fix for square blocks */
  -webkit-tap-highlight-color: transparent;
  transform: translateZ(0);
  isolation: isolate;
}

.icon-btn:hover {
  color: var(--accent-cyan);
  transform: scale(1.1);
}

.play-btn {
  font-size: 2.5rem;
}

.neon-icon {
  border-radius: 50%;
  /* Ensures circular glow and background */
}


@keyframes infoPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 5px var(--accent-cyan);
  }

  100% {
    transform: scale(1.15);
    box-shadow: 0 0 15px var(--accent-cyan), 0 0 5px white;
  }
}

.progress-container {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  max-width: 500px;
}

.time-stamp {
  font-family: monospace;
  font-size: 0.8rem;
  min-width: 40px;
}

/* Custom Range Sliders */
.progress-bar-wrapper,
.volume-bar-wrapper {
  position: relative;
  flex-grow: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  cursor: pointer;
}

.scrub-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.progress-fill,
.volume-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--accent-cyan);
  border-radius: 3px;
  box-shadow: var(--accent-glow);
  transition: background-color 0.2s, box-shadow 0.2s;
  pointer-events: none;
}

.progress-bar-wrapper:hover .progress-fill {
  background: var(--accent-cyan);
  box-shadow: var(--accent-glow);
}

.hover-tooltip {
  position: absolute;
  top: -30px;
  left: 0;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: var(--text-main);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: monospace;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.progress-bar-wrapper:hover .hover-tooltip {
  opacity: 1;
}

.volume-bar-wrapper {
  width: 100px;
}

/* Tools */
.player-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-sm);
}

@media (max-width: 768px) {
  .player-tools {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 20;
  }

  #btnMute,
  .volume-bar-wrapper {
    display: none;
    /* Hide volume on mobile to save space, keep lyrics */
  }
}

/* ==========================================================================
   Lyrics & Info Text Formatting
   ========================================================================== */

.lyric-section {
  color: var(--accent-cyan);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs) !important;
  font-size: 0.9rem;
}

.lyric-instruction {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.95rem;
}

/* ==========================================================================
   Rolling Stone Review Panel
   ========================================================================== */
.review-badge {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  /* Fixed to match top for iOS symmetry */
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 14px 16px 10px 16px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  z-index: 50;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 1370px) {
  .review-badge {
    top: var(--space-md);
    right: var(--space-md);
    padding: 10px 12px 8px 12px;
  }

  .focus-mode-active .review-badge {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
  }
}

@media (hover: hover) {
  .review-badge:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.5);
  }
}

/* Ensure the logo renders in white */
.rs-logo {
  height: 24px;
  width: auto;
  filter: brightness(0) invert(1);
}

.badge-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.badge-title {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--text-main);
  line-height: 1;
}

/* Rolling Stone Red */
.badge-stars {
  color: #E22A26;
  font-size: 0.6rem;
  margin: 3px 0;
  display: flex;
  gap: 2px;
}

.badge-author {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1;
}

.review-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 11, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: clamp(var(--space-md), 5vw, var(--space-xl));
  /* Hidden by default, GSAP will manually animate its appearance */
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.close-review-btn {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  font-size: 2rem;
  z-index: 110;
}

.review-content {
  max-width: 680px;
  margin: 0 auto;
  height: 100%;
  overflow-y: auto;
  padding-right: var(--space-md);
  padding-bottom: 120px;
  /* Space for the bottom player */

  /* Custom Scrollbar */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.review-content::-webkit-scrollbar {
  width: 6px;
}

.review-content::-webkit-scrollbar-track {
  background: transparent;
}

.review-content::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.review-content::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

.rs-logo-large {
  height: 40px;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  filter: brightness(0) invert(1);
}

.review-stars-large {
  color: #E22A26;
  font-size: 1.2rem;
  margin-bottom: var(--space-lg);
  display: flex;
  gap: 4px;
}

.review-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: var(--space-lg);
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.review-body p {
  font-size: 1.2rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-md);
  font-weight: 300;
}

/* Mobile Typography Refinement */
@media (max-width: 768px) {

  .review-body p,
  .lyrics-text p,
  .review-body li {
    font-size: 1rem !important;
    /* Slightly smaller for mobile readability */
    line-height: 1.6;
  }

  .review-headline {
    font-size: 2.2rem !important;
  }

  .lyric-section {
    font-size: 0.8rem;
  }

  /* Ensure text doesn't hit the player bar */
  .review-content {
    padding-bottom: 180px !important;
  }
}

.review-body em {
  font-style: italic;
  color: var(--text-main);
  font-weight: 400;
}

.review-conclusion {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: #E22A26;
  /* Rolling stone red for the conclusion pop */
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm) !important;
}

.review-author {
  font-style: italic;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ==========================================================================
   Tablet Landscape Optimizations (iPad, iPad Air, iPad Pro)
   ========================================================================== */
@media (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape),
(min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {

  /* Titles stay large and impactful (updated for v4.7) */
  .fluid-h1 {
    font-size: clamp(3.2rem, 8vw, 5rem) !important;
    white-space: normal;
  }

  .fluid-p {
    font-size: clamp(0.9rem, 0.8rem + 0.45vw, 0.9rem);
  }

  /* Prevent Cover Flow from overlapping the player bar */
  .coverflow-wrapper {
    height: 320px;
    margin: -10px 0;
  }

  .track-card {
    width: 180px;
    height: 180px;
  }

  .track-card .track-index {
    font-size: 1.5rem;
  }

  .track-card .track-name {
    font-size: 1rem;
  }

  /* Keep the review text readable and prevent awkward hyphenation without breaking */
  .review-headline {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    hyphens: auto;
    -webkit-hyphens: auto;
  }

  .review-content {
    padding-bottom: 90px;
  }

  /* Player bar grid compact form */
  .layout-grid {
    grid-template-columns: 220px 1fr 120px;
    gap: var(--space-sm);
  }

  /* Free up vertical space by reducing padding */
  .explorer-section {
    padding: var(--space-md) var(--space-lg);
  }
}

/* ==========================================================================
   Loading Screen & Application Initialization
   ========================================================================== */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-dark);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: all;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}


/* Mobile hiding rule removed as it is now handled via mobile-first display:none */

/* ==========================================================================
   Preloader Recovery
   ========================================================================== */
.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  padding: 2rem;
}

.loader-army {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  letter-spacing: 0.4em;
  color: white;
  margin-bottom: 0.8rem;
  opacity: 0;
  transform: translateY(20px);
  text-align: center;
}

.loader-dreamers {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 12vw, 12rem);
  line-height: 1;
  display: flex;
  justify-content: center;
  gap: 0.05em;
  width: 100%;
}

.loader-dreamers .letter {
  display: inline-block;
  color: white;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: white;
  transition: -webkit-text-fill-color 0.4s ease;
  opacity: 0;
  transform: translateY(50px);
}

.loader-dreamers .letter.active-image {
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

/* ==========================================================================
   Mobile Focus Mode Toggle
   ========================================================================== */
.focus-toggle {
  position: fixed;
  bottom: calc(var(--player-height) + var(--space-md));
  right: var(--space-md);
  width: 44px;
  height: 44px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--accent-cyan);
  border-radius: 50%;
  color: var(--accent-cyan);
  display: none;
  /* Only visible on Track 8 mobile */
  align-items: center;
  justify-content: center;
  z-index: 1600;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(0, 225, 255, 0.2);
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.focus-toggle i {
  font-size: 1.5rem;
  transition: transform 0.5s ease;
}

.focus-mode-active .focus-toggle {
  background: var(--accent-cyan);
  color: var(--bg-dark);
}

.focus-mode-active .focus-toggle i {
  transform: rotate(180deg);
}

@media (max-width: 1370px) {
  body.yt-track-active .focus-toggle {
    display: flex;
  }
}