/* ===== BROKEN NEON FLICKER ===== */
@keyframes neon-pulse {
  0%          { opacity: 1;    color: #FF6500; }
  4%          { opacity: 0.15; color: #FF4500; }
  5%          { opacity: 1;    color: #FF7800; }
  8%          { opacity: 1; }
  9%          { opacity: 0.05; }
  10%         { opacity: 1;    color: #FF6500; }
  18%         { opacity: 0.7; }
  19%         { opacity: 1; }
  20%         { opacity: 0; }
  21%         { opacity: 1;    color: #FF8C00; }
  22%         { opacity: 0.4; }
  23%         { opacity: 1; }
  38%         { opacity: 1;    color: #FF5500; }
  40%         { opacity: 0.2; }
  41%         { opacity: 0.9; }
  42%         { opacity: 0.1; }
  43%         { opacity: 1;    color: #FF7000; }
  55%         { opacity: 1; }
  57%         { opacity: 0; }
  58%         { opacity: 1; }
  59%         { opacity: 0.3; }
  60%         { opacity: 1;    color: #FF6500; }
  70%         { opacity: 1; }
  72%         { opacity: 0.6; }
  73%         { opacity: 1; }
  74%         { opacity: 0; }
  75%         { opacity: 1; }
  76%         { opacity: 0.15; }
  77%         { opacity: 1;    color: #FF8500; }
  88%         { opacity: 1; }
  90%         { opacity: 0.4; }
  91%         { opacity: 0.9; }
  92%         { opacity: 0.05; }
  93%         { opacity: 1;    color: #FF6500; }
  100%        { opacity: 1;    color: #FF6500; }
}

/* ===== TOKENS ===== */
:root {
  --bg: #050505;
  --surface: #0e0e0e;
  --lava: #FF4500;
  --ember: #FF2400;
  --lava-dim: rgba(255,69,0,0.15);
  --border: rgba(255,69,0,0.12);
  --text: #f0ece6;
  --muted: rgba(240,236,230,0.45);
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Syne', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --ease-out-expo: cubic-bezier(0.16,1,0.3,1);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: #050505; }
body {
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { background: none; border: none; }
a, button, input, select, textarea, label, [role="button"] { cursor: pointer; }

/* ===== NOISE CANVAS ===== */
#noise-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0.035;
  z-index: 9999;
  mix-blend-mode: overlay;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

/* ===== CUSTOM CURSOR REMOVED ===== */
#cursor {
  display: none !important;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--lava); border-radius: 2px; }

/* ===== REVEAL ANIMATIONS ===== */
.reveal-up {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo);
}
.reveal-up.visible { opacity: 1; transform: translateY(0); }
.reveal-card {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}
.reveal-card.visible { opacity: 1; transform: translateY(0) scale(1); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.35s; }
.delay-4 { transition-delay: 0.5s; }
.delay-5 { transition-delay: 0.65s; }

/* ===== ACCENT ===== */
.accent { color: var(--lava); }

/* ===== NAV ===== */
#nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 900;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem 3rem;
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s, padding 0.4s;
}
#nav.scrolled {
  background: rgba(5,5,5,0.92);
  backdrop-filter: blur(16px);
  border-color: var(--border);
  padding: 1rem 3rem;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.08em;
  color: transparent;
  -webkit-text-stroke: 1.5px #FF6500;
  text-shadow:
    0 0 6px rgba(255,101,0,0.55),
    0 0 2px rgba(255,101,0,0.4);
  animation: neon-pulse 5s linear infinite;
}
.nav-links { display: flex; gap: 2.5rem; }
.nav-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-link:hover { color: var(--text); }
.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.6rem 1.4rem;
  border: 1px solid var(--lava);
  color: var(--lava);
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.nav-cta:hover {
  background: var(--lava);
  color: #000;
  box-shadow: 0 0 20px rgba(255,69,0,0.5);
}
.nav-right {
  display: flex; align-items: center; gap: 1.5rem;
}
.lang-switcher {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}
.lang-sep { color: var(--border); }
.lang-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  padding: 0.2rem 0.4rem;
  transition: color 0.2s;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active {
  color: var(--lava);
  border-bottom: 1px solid var(--lava);
}

/* ===== HERO ===== */
#hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10rem 3rem 6rem;
  border-bottom: 1px solid var(--border);
}
.hero-bg-text {
  position: absolute;
  right: -0.05em;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: clamp(14rem, 28vw, 28rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,69,0,0.07);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--lava);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 11vw, 11.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.hero-title .line { display: block; }
.drift-1 { animation: drift-1 6s ease-in-out infinite alternate; }
.drift-2 { animation: drift-2 7s ease-in-out infinite alternate-reverse; }
.drift-3 { animation: drift-3 8s ease-in-out infinite alternate; }
.drift-4 { animation: drift-4 5.5s ease-in-out infinite alternate-reverse; }
@keyframes drift-1 { 0% { translate: -10px 0; } 100% { translate: 15px 0; } }
@keyframes drift-2 { 0% { translate: -15px 0; } 100% { translate: 10px 0; } }
@keyframes drift-3 { 0% { translate: -12px 0; } 100% { translate: 18px 0; } }
@keyframes drift-4 { 0% { translate: -18px 0; } 100% { translate: 12px 0; } }
.hero-sub {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}
.hero-actions { display: flex; gap: 1.2rem; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 1rem 2.2rem;
  background: linear-gradient(to right, var(--ember) 50%, var(--lava) 50%);
  background-size: 200% 100%;
  background-position: 100% 0;
  color: #000;
  font-weight: 700;
  border: 1px solid var(--lava);
  position: relative;
  overflow: hidden;
  transition: background-position 0.35s var(--ease-out-expo), box-shadow 0.3s, transform 0.2s;
}
.btn-primary:hover { 
  box-shadow: 0 0 30px rgba(255,69,0,0.6); 
  transform: translateY(-1px); 
  background-position: 0 0;
}
.btn-primary span, .btn-primary { position: relative; z-index: 1; }

.btn-ghost {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 1rem 2.2rem;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: border-color 0.3s, color 0.3s, box-shadow 0.3s;
}
.btn-ghost:hover { border-color: var(--lava); color: var(--lava); box-shadow: 0 0 20px rgba(255,69,0,0.2); }
.btn-full { width: 100%; text-align: center; }

/* ===== HERO SCROLL INDICATOR ===== */
.hero-scroll-indicator {
  position: absolute;
  bottom: 2.5rem; left: 3rem;
  display: flex; align-items: center; gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
}
.scroll-line {
  width: 60px; height: 1px;
  background: linear-gradient(90deg, var(--lava), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%,100% { opacity: 0.4; transform: scaleX(1); }
  50% { opacity: 1; transform: scaleX(1.3); transform-origin: left; }
}

/* ===== HERO STATS ===== */
.hero-stats {
  position: absolute;
  bottom: 2.5rem; right: 3rem;
  display: flex; gap: 3rem;
}
.stat { display: flex; flex-direction: column; align-items: flex-end; }
.stat-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--lava);
  line-height: 1;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ===== MARQUEE ===== */
.marquee-wrap {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  background: rgba(5,5,5,0.6);
}
.marquee-dark { background: rgba(14,14,14,0.7); }
.marquee-track {
  display: flex;
  white-space: nowrap;
  animation: marquee 18s linear infinite;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.marquee-reverse { animation-direction: reverse; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ===== SECTION COMMONS ===== */
section { padding: 8rem 3rem; border-bottom: 1px solid var(--border); position: relative; z-index: 1; }
.section-header { margin-bottom: 5rem; }
.section-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--lava);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
}

/* ===== CATALOG TOOLBAR & FILTERS ===== */
.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}
.catalog-filters {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.catalog-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 300px;
}
#catalog-search {
  width: 100%;
  padding: 0.6rem 2.5rem 0.6rem 1rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  transition: all 0.3s var(--ease-out-expo);
  text-transform: uppercase;
}
#catalog-search::placeholder {
  color: var(--muted);
  opacity: 0.6;
}
#catalog-search:focus {
  outline: none;
  background: rgba(255,69,0,0.02);
  border-color: var(--lava);
  box-shadow: 0 0 15px rgba(255,69,0,0.25);
}
.catalog-search-wrap .search-icon {
  position: absolute;
  right: 1rem;
  width: 14px;
  height: 14px;
  stroke: var(--muted);
  stroke-width: 2;
  fill: none;
  pointer-events: none;
  transition: stroke 0.3s;
}
#catalog-search:focus + .search-icon {
  stroke: var(--lava);
}

/* ===== NO RESULTS FEEDBACK ===== */
.catalog-no-results {
  grid-column: 1 / -1;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  text-align: center;
  background: rgba(5,5,5,0.3);
  border: 1px dashed var(--border);
}
.catalog-no-results.visible {
  display: flex;
}
.catalog-no-results span {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.catalog-no-results p {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.6;
  text-transform: uppercase;
}

.catalog-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.25em;
  color: var(--lava);
  animation: pulse-loading 1.2s infinite alternate;
}
@keyframes pulse-loading {
  0% { opacity: 0.35; }
  100% { opacity: 1; }
}

@media (max-width: 768px) {
  .catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 1.2rem;
  }
  .catalog-search-wrap {
    max-width: 100%;
  }
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  padding: 0.5rem 1rem;
  transition: all 0.3s var(--ease-out-expo);
  cursor: pointer;
}
.filter-btn:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.1);
}
.filter-btn.active {
  color: var(--lava);
  border-color: var(--lava);
  box-shadow: inset 0 0 15px rgba(255,69,0,0.15);
}

/* ===== BEATS GRID ===== */
.beats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  background: var(--border);
  border: 1.5px solid var(--border);
}
.beat-card {
  background: rgba(5,5,5,0.7);
  overflow: hidden;
  transition: background 0.3s, box-shadow 0.1s;
  backdrop-filter: blur(4px);
}
.beat-card:hover { background: rgba(14,14,14,0.85); }
.beat-card:has(.playing) {
  box-shadow: 0 0 calc(var(--bass-glow, 0) * 40px) rgba(255, 69, 0, calc(var(--bass-glow, 0) * 0.45));
  z-index: 10;
  position: relative;
}
.beat-card-inner { 
  display: block; 
  position: relative; 
  aspect-ratio: 1/1; 
  width: 100%;
}

/* ===== CATALOG LOAD MORE ===== */
.catalog-load-more-wrap {
  display: none; /* Controlled dynamically by JS */
  justify-content: center;
  margin-top: 3.5rem;
}
.catalog-load-more-wrap.visible {
  display: flex;
}
.catalog-load-more-wrap button {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  padding: 1rem 2.5rem;
  border: 1px solid var(--lava);
  background: transparent;
  color: var(--lava);
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  box-shadow: 0 4px 15px rgba(255, 69, 0, 0.1);
  text-transform: uppercase;
}
.catalog-load-more-wrap button:hover {
  background: var(--lava);
  color: #000;
  box-shadow: 0 0 25px rgba(255, 69, 0, 0.5);
  transform: translateY(-2px);
}
.catalog-load-more-wrap button:active {
  transform: translateY(0);
}

.beat-art {
  position: absolute;
  inset: -1px;
  overflow: hidden;
}
.beat-art-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 60%,
    hsl(var(--hue), 90%, 28%) 0%,
    hsl(var(--hue), 70%, 10%) 50%,
    #050505 100%);
  transition: transform 0.6s var(--ease-out-expo);
}
.beat-card:hover .beat-art-bg { transform: scale(1.06); }

.beat-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(0.9);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,69,0,0.15);
  border: 1px solid rgba(255,69,0,0.4);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  color: var(--lava);
  transition: background 0.25s, box-shadow 0.25s, transform 0.3s, border-color 0.25s;
  z-index: 2;
}
.beat-play svg { width: 18px; height: 18px; fill: var(--lava); }
.beat-play:hover {
  background: rgba(255,69,0,0.3);
  box-shadow: 0 0 28px rgba(255,69,0,0.55);
  border-color: var(--lava);
  transform: translate(-50%,-50%) scale(1);
}
.beat-play.playing {
  background: var(--lava);
  box-shadow: 0 0 36px rgba(255,69,0,0.7);
}
.beat-play.playing svg { fill: #000; }

.beat-waveform {
  display: none !important;
}
.waveform-canvas { display: none !important; }

.beat-info {
  position: absolute;
  bottom: -1px; left: -1px; right: -1px;
  padding: 4rem 1.6rem 1.4rem;
  display: flex; flex-direction: column; gap: 0.8rem;
  background: linear-gradient(to top, rgba(5,5,5,0.9) 0%, rgba(5,5,5,0.4) 70%, transparent 100%);
  z-index: 3;
}
.beat-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  line-height: 1;
}

.beat-meta {
  display: flex; gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.beat-meta span::before { content: ''; }
.beat-price {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto;
}
.price {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--lava);
}
.btn-buy {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn-buy:hover { border-color: var(--lava); color: var(--lava); box-shadow: 0 0 12px rgba(255,69,0,0.3); }
.hidden { display: none !important; }

/* ===== LIKE BUTTON STYLES ===== */
.beat-like-btn {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 10;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s var(--ease-out-expo);
}
.beat-like-btn:hover {
  transform: scale(1.18);
}
.beat-like-btn:active {
  transform: scale(0.9);
}
.beat-like-btn svg {
  width: 22px;
  height: 22px;
  stroke: #FF6500;
  stroke-width: 2px;
  fill: none;
  transition: fill 0.3s ease, filter 0.3s ease;
}
.beat-like-btn.liked svg {
  fill: #FF6500;
  filter: drop-shadow(0 0 4px rgba(255, 101, 0, 0.6));
}

/* Player Like Button overrides */
.player-like-btn {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  z-index: 2 !important;
  margin-left: 0.8rem;
  flex-shrink: 0;
}
.player-like-btn svg {
  width: 20px !important;
  height: 20px !important;
}

/* ===== OAUTH LOGIN BUTTONS ===== */
.oauth-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.7rem 0.5rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  transition: all 0.25s var(--ease-out-expo);
  cursor: pointer;
}
.oauth-login-btn:hover {
  border-color: #FF6500;
  color: #FF6500;
  box-shadow: 0 0 15px rgba(255, 101, 0, 0.25);
  transform: translateY(-1px);
}
.oauth-login-btn:active {
  transform: translateY(0);
}


/* ===== PLAYER BAR ===== */
#player-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 800;
  background: rgba(8,8,8,0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 300px 1fr 300px;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 2.5rem;
  transform: translateY(100%);
  visibility: hidden;
  transition: transform 0.5s var(--ease-out-expo), visibility 0.5s var(--ease-out-expo);
}
#player-bar.active { transform: translateY(0); visibility: visible; }

.player-info { display: flex; align-items: center; gap: 1rem; }
.player-cover {
  width: 44px; height: 44px;
  background-color: var(--card-bg);
  background-size: cover;
  background-position: center;
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(0,0,0,0.5);
  transition: background 0.3s ease;
}
.player-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
#player-title {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  color: var(--text);
  line-height: 1;
  text-transform: uppercase;
}
#player-meta {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--lava);
}

.player-controls { display: flex; align-items: center; gap: 1.2rem; }
.player-controls button {
  color: var(--muted);
  font-size: 0.7rem;
  transition: color 0.2s;
}
@media (hover: hover) {
  .player-controls button:hover { color: var(--lava); }
}
#player-play-pause {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--lava) !important;
  display: flex; align-items: center; justify-content: center;
  background: transparent !important;
  transition: background 0.25s, box-shadow 0.25s !important;
}
#player-play-pause svg { width: 14px; height: 14px; fill: var(--lava); }
@media (hover: hover) {
  #player-play-pause:hover { background: var(--lava) !important; box-shadow: 0 0 20px rgba(255,69,0,0.5); }
  #player-play-pause:hover svg { fill: #000; }
}

.player-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
}
.player-progress-wrap { 
  display: flex; 
  flex-direction: column; 
  gap: 0.3rem; 
  width: 100%;
  max-width: 600px; 
}
.player-waveform-container {
  position: relative;
  width: 100%;
  height: 32px;
  display: flex;
  align-items: center;
  margin-bottom: 2px;
}
#player-waveform-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
#player-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  z-index: 2;
  cursor: pointer;
  margin: 0 !important;
  padding: 0 !important;
  -webkit-appearance: none;
  appearance: none;
  background: transparent !important;
}
#player-progress::-webkit-slider-runnable-track {
  background: transparent !important;
  border: none !important;
}
#player-progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px !important;
  height: 32px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: none !important;
}
#player-progress::-moz-range-track {
  background: transparent !important;
  border: none !important;
}
#player-progress::-moz-range-thumb {
  width: 16px !important;
  height: 32px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: none !important;
}
#player-progress:hover::-webkit-slider-thumb {
  transform: none !important;
}
#player-progress:hover::-moz-range-thumb {
  transform: none !important;
}
.player-time {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--muted);
}

.player-vol { display: flex; align-items: center; justify-content: flex-end; gap: 0.7rem; }
.player-vol svg { fill: var(--muted); flex-shrink: 0; }
#vol-slider, #sb-vol-slider, #sfx-vol-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  cursor: pointer;
}
#vol-slider { width: 80px; }
#sb-vol-slider { width: 50px; }
#sfx-vol-slider { width: 60px; }

#vol-slider::-webkit-slider-thumb, #sb-vol-slider::-webkit-slider-thumb, #sfx-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--lava);
  box-shadow: 0 0 6px rgba(255,69,0,0.6);
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}
.about-body {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.2rem;
}
.about-creds { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 1.2rem; }
.cred {
  display: flex; justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.cred-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
}
.cred-val {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text);
}

.about-img-wrap { position: relative; }
.about-img {
  aspect-ratio: 1/1;
  background-image: url('../img/baco-about.jpg');
  background-size: cover;
  background-position: center;
  filter: grayscale(100%) contrast(1.15) brightness(0.85);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.about-img::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255, 69, 0, 0.15);
  mix-blend-mode: multiply;
  pointer-events: none;
}
.about-img-border {
  position: absolute;
  top: 1rem; right: -1rem; bottom: -1rem; left: 1rem;
  border: 1px solid var(--border);
  pointer-events: none;
}

/* ===== SERVICES ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5px;
  background: var(--border);
  border: 1.5px solid var(--border);
}
.service-card {
  background: rgba(5,5,5,0.65);
  padding: 3rem;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
  backdrop-filter: blur(6px);
}
.service-card::before {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--lava), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out-expo);
}
.service-card:hover { background: rgba(14,14,14,0.85); }
.service-card:hover::before { transform: scaleX(1); }
.service-num {
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 1;
  color: rgba(255,69,0,0.08);
  position: absolute;
  top: 1.5rem; right: 2rem;
  user-select: none;
}
.service-title {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}
.service-desc {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.service-price {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--lava);
}

/* ===== CONTACT ===== */
#contact { position: relative; overflow: hidden; }
.contact-bg-text {
  position: absolute;
  right: -0.03em; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: clamp(10rem, 20vw, 20rem);
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,69,0,0.05);
  pointer-events: none;
  user-select: none;
}
.contact-content { position: relative; z-index: 1; max-width: 680px; }
.contact-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 9vw, 9rem);
  line-height: 0.9;
  margin: 1rem 0 1.5rem;
}
.contact-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 2.5rem; }

.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
}
.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: none;
  appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--lava);
  box-shadow: 0 0 16px rgba(255,69,0,0.15);
}
.form-group select option { background: var(--surface); }
::placeholder { color: rgba(240,236,230,0.2); }

/* ===== FOOTER ===== */
#footer {
  background: #000000 !important;
  padding: 3rem 2rem 2rem;
  border-top: 1px solid rgba(255, 69, 0, 0.2);
  position: relative;
}
#footer::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 69, 0, 0.3), transparent);
}
.footer-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2rem;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 3.2rem;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--lava);
  text-shadow: 0 0 10px rgba(255,69,0,0.4);
  line-height: 1;
}
.footer-socials { display: flex; gap: 1.5rem; }
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color 0.2s, transform 0.2s;
}
.social-link:hover { color: var(--lava); transform: translateY(-2px); }
.social-link svg { display: block; }
.footer-divider { height: 1px; background: rgba(255, 255, 255, 0.08); margin-bottom: 1.5rem; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'Space Grotesk', 'Space Mono', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: #ffffff;
  line-height: 1.6;
}
.footer-bottom span:first-child {
  max-width: 80%;
}
.footer-bottom .accent-orange {
  color: var(--lava);
  font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .beats-grid { grid-template-columns: repeat(2,1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-right { max-width: 420px; }
}
@media (max-width: 768px) {
  #nav { padding: 1.2rem 1.5rem; }
  .nav-links { display: none; }
  section { padding: 5rem 1.5rem; }
  #hero { padding: 7rem 1.5rem 5rem; }
  .hero-stats { position: static; margin-top: 3rem; }
  .hero-scroll-indicator { display: none; }
  .beats-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  #player-bar {
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    grid-template-rows: auto auto !important;
    grid-template-areas:
      "progress progress progress"
      "info controls volume" !important;
    gap: 0.8rem 1rem !important;
    padding: 0.6rem 1.2rem calc(0.8rem + env(safe-area-inset-bottom)) 1.2rem !important;
    height: calc(140px + env(safe-area-inset-bottom)) !important;
    overflow: hidden !important;
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, border-top-color 0.4s ease, transform 0.5s var(--ease-out-expo) !important;
  }

  .player-center {
    display: contents !important;
  }

  .player-progress-wrap {
    grid-area: progress !important;
    width: 100% !important;
    margin: 0 !important;
  }

  #player-progress {
    -webkit-appearance: none;
    appearance: none;
    width: 100% !important;
    height: 4px !important;
    padding: 12px 0 !important;
    box-sizing: content-box !important;
    background: rgba(255, 255, 255, 0.15);
    background-clip: content-box !important;
    border: none !important;
    outline: none !important;
  }

  #player-progress::-webkit-slider-thumb {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    background: var(--lava) !important;
    box-shadow: 0 0 10px rgba(255, 69, 0, 0.9) !important;
  }

  #player-progress::-moz-range-thumb {
    width: 18px !important;
    height: 18px !important;
    border: none !important;
    border-radius: 50% !important;
    background: var(--lava) !important;
    box-shadow: 0 0 10px rgba(255, 69, 0, 0.9) !important;
  }

  .player-info {
    display: flex !important;
    grid-area: info !important;
    align-items: center !important;
    gap: 0.8rem !important;
    transition: gap 0.4s cubic-bezier(0.16, 1, 0.3, 1), margin-bottom 0.4s ease !important;
  }

  .player-cover {
    width: 38px !important;
    height: 38px !important;
    border-radius: 4px !important;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), height 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-radius 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease !important;
  }

  #player-title {
    font-size: 0.95rem !important;
    max-width: 110px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    transition: font-size 0.4s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.4s ease, color 0.4s ease !important;
  }

  #player-meta {
    font-size: 0.58rem !important;
    max-width: 110px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    transition: font-size 0.4s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.4s ease, color 0.4s ease !important;
  }

  .player-controls {
    grid-area: controls !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1.2rem !important;
    margin: 0 auto !important;
    transition: gap 0.4s cubic-bezier(0.16, 1, 0.3, 1), margin 0.4s ease !important;
  }

  #player-play-pause {
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), height 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease !important;
  }

  #player-play-pause svg {
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), height 0.4s cubic-bezier(0.16, 1, 0.3, 1), fill 0.4s ease, stroke 0.4s ease !important;
  }

  .player-vol {
    grid-area: volume !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
  }

  .player-vol svg,
  .player-vol input[type="range"] {
    display: none !important;
  }

  #player-download-btn {
    margin-right: 0 !important;
    padding: 0.6rem !important;
  }
  .game-modal-layout { flex-direction: column; height: 90vh; overflow-y: auto; }
  .game-modal-inner { order: 1; }
  .game-modal-sidebar { width: 100%; flex: none; height: auto; order: 2; }
  .game-modal-leaderboard { width: 100%; flex: none; height: auto; order: 3; }
  .sidebar-beats { max-height: 250px; }
  .leaderboard-list { max-height: 250px; }
}

/* ===== PIXEL ART ===== */


/* ===== BASKETBALL GAME ===== */
/* Moved to nav bar */

#game-modal {
  position: fixed; inset: 0;
  z-index: 1100;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
#game-modal.open { opacity: 1; pointer-events: all; }

.game-modal-layout {
  position: relative;
  display: flex;
  gap: 1.5rem;
  max-width: min(1280px, 96vw);
  width: 100%;
}
.game-modal-inner {
  flex: 1;
  background: #080808;
  border: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.game-modal-leaderboard {
  position: relative;
  width: 280px;
  background: #080808;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.leaderboard-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 400px;
}
.leaderboard-item.user-rank {
  border: 1px solid var(--lava) !important;
  background: rgba(255, 69, 0, 0.12) !important;
  box-shadow: 0 0 10px rgba(255, 69, 0, 0.2);
  animation: pulseUserRank 2s infinite alternate;
}
@keyframes pulseUserRank {
  0% { box-shadow: 0 0 4px rgba(255, 69, 0, 0.2); }
  100% { box-shadow: 0 0 15px rgba(255, 69, 0, 0.45); }
}
.game-modal-sidebar {
  position: relative;
  z-index: 2;
  width: 280px;
  background: #080808;
  border: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.sidebar-beats {
  flex: 1;
  overflow-y: auto;
  padding: 0.8rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  max-height: 400px;
}
.sb-beat {
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
}
.sb-bg {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 65%;
  opacity: 0.2;
  mask-image: linear-gradient(to right, transparent, black 80%);
  -webkit-mask-image: linear-gradient(to right, transparent, black 80%);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s;
}
.sb-beat:hover .sb-bg {
  opacity: 0.45;
}
.sb-beat:hover {
  background: rgba(255,69,0,0.05);
  border-color: var(--border);
}
.sb-info {
  position: relative;
  z-index: 1;
  display: flex; flex-direction: column; gap: 0.3rem;
}
.sb-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: 0.05em;
  line-height: 1;
}
.sb-meta {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--muted);
}
.sb-play {
  position: relative;
  z-index: 1;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,69,0,0.15);
  border: 1px solid rgba(255,69,0,0.4);
  display: flex; align-items: center; justify-content: center;
  color: var(--lava);
  flex-shrink: 0;
  transition: background 0.2s;
}
.sb-beat.playing .sb-play {
  background: var(--lava);
}
.sb-beat.playing .sb-play svg { fill: #000; }
.sb-play svg { width: 12px; height: 12px; fill: var(--lava); }
.game-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid var(--border);
}
.game-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.1em;
  color: var(--lava);
}
#game-close {
  font-size: 1rem;
  color: var(--muted);
  transition: color 0.2s;
}
#game-close:hover { color: var(--lava); }

#game-canvas {
  display: block;
  width: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.game-controls-hint {
  padding: 0.6rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  border-top: 1px solid var(--border);
  text-align: center;
}
.game-rules-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  padding: 0.8rem 1.2rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--muted);
  line-height: 1.4;
  background: rgba(0,0,0,0.15);
}
.game-rules-divider-left {
  border-left: 1px solid var(--border);
  padding-left: 1.2rem;
}
@media (max-width: 768px) {
  .game-rules-info {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
  }
  .game-rules-divider-left {
    border-left: none;
    border-top: 1px dashed var(--border);
    padding-left: 0;
    padding-top: 0.8rem;
  }
}

/* ===== COOKIE BANNER ===== */
.cookie-banner {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  background: rgba(8,8,8,0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  padding: 1.5rem;
  width: 90%;
  max-width: 380px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  transition: transform 0.4s var(--ease-out-expo), opacity 0.4s ease;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.cookie-banner.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}
.cookie-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.6;
}
.cookie-actions {
  display: flex;
  gap: 0.8rem;
}
.btn-sm {
  padding: 0.6rem 1.2rem;
  font-size: 0.65rem;
  flex: 1;
  text-align: center;
}
/* ===== BEAT SELECTION PANEL ===== */
.bsp-container {
  position: fixed;
  top: 50%; right: 2rem;
  transform: translateY(-50%);
  width: 320px;
  height: 75vh;
  max-height: 800px;
  z-index: 850;
  perspective: 1200px;
  pointer-events: none;
}
.bsp-inner {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.45);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 69, 0, 0.15);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  box-shadow: 
    -10px 10px 40px rgba(0,0,0,0.8),
    inset 0 0 0 1px rgba(255,255,255,0.05);
  transition: transform 0.1s ease-out, box-shadow 0.3s;
  pointer-events: auto;
  overflow: hidden;
}
.bsp-inner::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,69,0,0.1) 0%, transparent 100%);
  opacity: 0.5; pointer-events: none;
}
.bsp-header {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.5rem;
}
.bsp-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: 0.1em;
}
.bsp-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--lava), transparent);
}
.bsp-list {
  flex: 1;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 0.8rem;
  padding-right: 0.5rem;
  position: relative; z-index: 1;
}
.bsp-list::-webkit-scrollbar { width: 2px; }
.bsp-list::-webkit-scrollbar-thumb { background: var(--lava); border-radius: 2px; }

.bsp-item {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 1rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.bsp-item:hover {
  background: rgba(255,69,0,0.08);
  border-color: rgba(255,69,0,0.2);
  transform: translateX(-4px);
}
.bsp-item.playing {
  background: rgba(255,69,0,0.15);
  border-color: var(--lava);
}
.bsp-item-info { display: flex; flex-direction: column; gap: 0.2rem; }
.bsp-item-title {
  font-family: var(--font-display); font-size: 1.1rem; color: var(--text); line-height: 1;
}
.bsp-item-meta {
  font-family: var(--font-mono); font-size: 0.6rem; color: var(--muted);
}
.bsp-item-wf {
  display: flex; align-items: center; gap: 2px; height: 16px; margin: 0 auto; opacity: 0.4; transition: opacity 0.3s;
}
.bsp-item-wf div {
  width: 3px; background: var(--text); border-radius: 2px;
}
.bsp-item.playing .bsp-item-wf { opacity: 1; }
.bsp-item.playing .bsp-item-wf div { background: var(--lava); animation: bsp-bounce 0.6s ease infinite alternate; }
.bsp-item.playing .bsp-item-wf div:nth-child(even) { animation-delay: 0.2s; }
.bsp-item-play {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0,0,0,0.5); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s, box-shadow 0.3s;
}
.bsp-item:hover .bsp-item-play { background: rgba(255,69,0,0.2); }
.bsp-item.playing .bsp-item-play { background: var(--lava); box-shadow: 0 0 15px rgba(255,69,0,0.5); }
.bsp-item-play svg { width: 12px; height: 12px; fill: var(--text); }
.bsp-item.playing .bsp-item-play svg { fill: #000; }

.bsp-now-playing {
  margin-top: 1.5rem;
  position: relative; z-index: 1;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,69,0,0.2);
  border-radius: 10px;
  padding: 1rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6), 0 0 calc(var(--bass-glow, 0) * 45px) rgba(255, 69, 0, calc(var(--bass-glow, 0) * 0.45));
  backdrop-filter: blur(10px);
  transition: box-shadow 0.1s;
}
.bsp-np-vinyl {
  width: 40px; height: 40px;
  border-radius: 50%;
  overflow: hidden;
  animation: bsp-spin 4s linear infinite;
  animation-play-state: paused;
}
.bsp-np-vinyl.spinning { animation-play-state: running; }
@keyframes bsp-spin { 100% { transform: rotate(360deg); } }

.bsp-np-info { flex: 1; display: flex; flex-direction: column; gap: 0.2rem; }
.bsp-np-title { font-family: var(--font-display); font-size: 1rem; color: var(--lava); line-height: 1; }
.bsp-np-meta { font-family: var(--font-mono); font-size: 0.6rem; color: var(--muted); }

.bsp-np-visualizer { display: flex; align-items: flex-end; gap: 2px; height: 20px; }
.bsp-bar { width: 4px; background: var(--lava); border-radius: 2px; height: 4px; transition: height 0.1s; }
.bsp-np-visualizer.active .bsp-bar { animation: bsp-bounce 0.8s ease infinite alternate; }
.bsp-np-visualizer.active .bsp-bar:nth-child(1) { animation-delay: 0.1s; }
.bsp-np-visualizer.active .bsp-bar:nth-child(2) { animation-delay: 0.3s; }
.bsp-np-visualizer.active .bsp-bar:nth-child(3) { animation-delay: 0.2s; }
.bsp-np-visualizer.active .bsp-bar:nth-child(4) { animation-delay: 0.4s; }
@keyframes bsp-bounce { 0% { height: 4px; } 100% { height: 20px; } }

@media (max-width: 1024px) {
  .bsp-container { display: none; }
}

/* ===== 3D HERO BEATS WIDGET ===== */
.h3d-widget {
  position: absolute;
  top: 50%; right: 10%;
  transform: translateY(-50%);
  width: 360px;
  perspective: 1200px;
  z-index: 100;
  pointer-events: none; /* Let background receive mouse if off-card */
}
.h3d-inner {
  background: rgba(12,12,12,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 40px 80px rgba(0,0,0,0.9), inset 0 0 0 1px rgba(255,69,0,0.15);
  transform-style: preserve-3d;
  will-change: transform;
  pointer-events: auto;
}
.h3d-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.h3d-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--lava);
  text-transform: uppercase;
  font-weight: bold;
}
.h3d-vol { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); }
.h3d-vol input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 50px; height: 3px;
  background: rgba(255,255,255,0.2);
  outline: none; border-radius: 2px;
}
.h3d-vol input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--lava);
  cursor: pointer;
  box-shadow: 0 0 5px rgba(255,69,0,0.5);
}
.h3d-cards {
  display: flex; flex-direction: column; gap: 0.8rem;
  margin-bottom: 1.5rem;
}
.h3d-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.6rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.h3d-card:hover {
  background: rgba(255,69,0,0.08);
  border-color: rgba(255,69,0,0.3);
  transform: translateX(6px);
}
.h3d-card.active {
  background: rgba(255,69,0,0.15);
  border-color: var(--lava);
}
.h3d-cover {
  width: 50px; height: 50px;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  background-color: #222;
  box-shadow: 0 4px 10px rgba(0,0,0,0.6);
}
.h3d-meta { flex: 1; min-width: 0; }
.h3d-beat-title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 0.2rem;
  letter-spacing: 0.05em;
}
.h3d-beat-genre {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
}
.h3d-player {
  display: flex; align-items: center; gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.h3d-play-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--lava);
  color: #000;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.h3d-play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(255,69,0,0.5);
}
.h3d-play-btn svg { width: 16px; height: 16px; }
.h3d-play-btn .hidden { display: none; }
.h3d-info { flex: 1; }
.h3d-now-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.h3d-progress {
  width: 100%; height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.h3d-progress-bar {
  height: 100%; width: 0%;
  background: var(--lava);
  transition: width 0.1s linear;
}

@media (max-width: 1024px) {
  .h3d-widget { display: none; }
}

/* ===== SIDEBAR DYNAMIC VINYL ===== */
#sidebar-vinyl {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, 
    #050505 0%, 
    #151515 30%, 
    #0a0a0a 31%, 
    #222 35%, 
    #000 40%, 
    #181818 45%, 
    #0a0a0a 46%, 
    #111 60%, 
    #000 70%, 
    #252525 80%, 
    #050505 100%
  );
  border: 1px solid #111;
  box-shadow: 0 4px 18px rgba(0,0,0,0.85), inset 0 0 10px rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  right: 0px;
  top: 150px;
  transform: scale(0) rotate(0deg);
  transform-origin: center;
  transition: right 0.6s cubic-bezier(0.19, 1, 0.22, 1), 
              top 0.6s cubic-bezier(0.19, 1, 0.22, 1), 
              transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
  pointer-events: none;
}
#sidebar-vinyl.active {
  transform: scale(1) rotate(0deg);
  right: -110px;
}
#sidebar-vinyl.active.playing {
  animation: vinyl-spin-animation 3.5s linear infinite;
}
@keyframes vinyl-spin-animation {
  from { transform: scale(1) rotate(0deg); }
  to { transform: scale(1) rotate(360deg); }
}
.vinyl-label-wrap {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 4px rgba(0,0,0,0.6);
  overflow: hidden;
  border: 1px solid #1a1a1a;
}
.vinyl-label {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  transition: background-image 0.3s ease;
}
.vinyl-center-hole {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #080808;
  border: 1px solid #333;
  box-shadow: inset 0 0 3px rgba(0,0,0,0.8);
}
.vinyl-groove-ring {
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 50%;
  pointer-events: none;
}
.vinyl-groove-ring-two {
  position: absolute;
  inset: 48px;
  border: 1px solid rgba(255,255,255,0.02);
  border-radius: 50%;
  pointer-events: none;
}

/* --- HOT SCORE CARD OVERLAY --- */
.hot-score-card {
  background: #090909;
  border: 3px solid var(--lava);
  box-shadow: 0 0 35px var(--lava);
  border-radius: 12px;
  padding: 1.5rem;
  width: 230px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  animation: popInScale 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  position: relative;
  overflow: hidden;
}

.hot-score-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 69, 0, 0.08), transparent);
  transform: rotate(45deg);
  animation: shineGlass 3s infinite linear;
  pointer-events: none;
}

@keyframes shineGlass {
  0% { transform: translate(-30%, -30%) rotate(45deg); }
  100% { transform: translate(30%, 30%) rotate(45deg); }
}

@keyframes popInScale {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.hot-score-banner {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.3rem;
  color: var(--lava);
  text-shadow: 0 0 10px rgba(255, 69, 0, 0.8);
  letter-spacing: 0.06em;
  margin: 0;
  animation: pulseNeonText 1.5s infinite alternate;
  line-height: 1;
}

@keyframes pulseNeonText {
  0% { text-shadow: 0 0 8px rgba(255, 69, 0, 0.6); }
  100% { text-shadow: 0 0 22px rgba(255, 69, 0, 1), 0 0 32px rgba(255, 69, 0, 0.6); }
}

.hot-score-photo-wrap {
  width: 140px;
  height: 140px;
  border: 2px solid var(--lava);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(255, 69, 0, 0.35);
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hot-score-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.hot-score-msg {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: #ffffff;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hot-score-btn {
  background: var(--lava);
  color: #000000;
  border: none;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.06em;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(255, 69, 0, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
  width: 100%;
  display: block;
}

.hot-score-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 18px var(--lava);
}

/* ── Mobile Menu Burger Button ─────────────────────────────── */
#mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  margin-left: 1.5rem;
}
#mobile-menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--text);
  transition: all 0.3s var(--ease-out-expo);
  transform-origin: left center;
}

/* ── Mobile Menu Overlay ────────────────────────────────────── */
#mobile-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(5, 5, 5, 0.98);
  backdrop-filter: blur(15px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 2rem;
}
#mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: all;
}
#mobile-menu-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.3s;
}
#mobile-menu-close:hover {
  color: var(--lava);
}
.mmo-header {
  position: absolute;
  top: 2rem;
  left: 2rem;
}
.mmo-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  color: var(--lava);
  text-shadow: 0 0 10px rgba(255, 69, 0, 0.3);
}
.mmo-links {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 3rem;
}
.mmo-link {
  font-family: var(--font-display);
  font-size: 2.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s, transform 0.3s;
}
.mmo-link:hover {
  color: var(--lava);
  transform: scale(1.05);
  text-shadow: 0 0 12px var(--lava);
}
.mmo-footer {
  width: 100%;
  display: flex;
  justify-content: center;
}
.mmo-cta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #000;
  background: var(--lava);
  padding: 1rem 2rem;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  box-shadow: 0 0 15px rgba(255,69,0,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.mmo-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px var(--lava);
}

/* ── Mobile Game Controls ──────────────────────────────────── */
#mobile-game-controls {
  display: none;
}

@media (max-width: 768px) {
  #mobile-menu-toggle {
    display: flex;
  }
  .nav-cta {
    display: none !important;
  }
  #mobile-game-controls {
    display: none !important;
  }
  #game-btn {
    display: none !important;
  }
}

/* ===== STUDIO TERMINAL ===== */
.main-terminal-fixed {
    background: rgba(13, 13, 13, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 90, 31, 0.15);
    width: 390px;
    height: 520px;
    display: flex; /* Her zaman flex, görünürlüğü class ile kontrol edeceğiz */
    flex-direction: column;
    position: fixed;
    bottom: 95px;
    right: 25px;
    z-index: 99999;
    border-radius: 0px !important; /* Köşeleri Sıfırla */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95);
    font-family: 'IBM Plex Mono', sans-serif;
    overflow: hidden;
    
    /* Pürüzsüz Açılış/Kapanış Animasyon Altyapısı */
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8) translateY(40px); /* Sağ alttaki butondan fırlama hissi */
    transform-origin: bottom right;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

/* Chat Açıkken Devreye Girecek Sınıf */
.main-terminal-fixed.chat-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1) translateY(0);
}

/* Player Açıkken Chat'i Yukarı Kaydır */
body.player-active .main-terminal-fixed {
    bottom: 175px !important; /* 95px + 80px player bar */
}

/* Chat Üst Barı */
.chat-header {
    background: rgba(20, 20, 20, 0.6);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 0px !important; /* Köşeleri Sıfırla */
}

.chat-agent-info { display: flex; align-items: center; gap: 12px; }

.chat-avatar-status {
    width: 36px;
    height: 36px;
    background: #1A1A1A url('../assets/BCHAT.png?v=2') no-repeat center;
    background-size: cover;
    border-radius: 50%;
    position: relative;
    border: 1px solid rgba(255, 90, 31, 0.3);
}

/* Yeşil Aktif Işığı */
.status-dot {
    width: 8px;
    height: 8px;
    background: #00FF66;
    border-radius: 50%;
    position: absolute;
    top: 1px; right: 1px;
    box-shadow: 0 0 6px #00FF66;
    border: 2px solid #0D0D0D;
}

.chat-meta { display: flex; flex-direction: column; }
.chat-agent-name { font-size: 12px; font-weight: bold; color: #FFF; letter-spacing: 1px; }
.chat-agent-sub { font-size: 10px; color: #888; margin-top: 2px; }
.chat-controls { color: #555; cursor: pointer; font-size: 14px; }

/* Sohbet Alanı Akışı */
.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Balon Sarmalayıcıları */
.chat-message-wrapper { display: flex; gap: 10px; max-width: 85%; }
.ai-wrapper { align-self: flex-start; }
.user-wrapper { align-self: flex-end; flex-direction: row-reverse; }

.chat-avatar-mini {
    width: 24px; height: 24px;
    background: #FF5A1F url('../assets/BCHAT.png?v=2') no-repeat center;
    background-size: cover;
    border-radius: 50%;
    flex-shrink: 0;
    opacity: 0.8;
}

/* Mesaj Balonları */
.chat-bubble {
    padding: 12px 16px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 0px !important; /* Köşeleri Sıfırla */
}

.ai-bubble {
    background: rgba(255, 255, 255, 0.05);
    color: #E0E0E0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.user-bubble {
    background: #FF5A1F; /* Marka rengin: Canlı Turuncu */
    color: #000;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 15px rgba(255, 90, 31, 0.2);
}

/* Input Giriş Alanı */
.chat-input-area {
    padding: 16px 20px;
    background: rgba(10, 10, 10, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    gap: 8px;
}

#terminal-input {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 90, 31, 0.2);
    padding: 12px 16px;
    border-radius: 0px !important;
    color: #FFF;
    font-size: 12px;
    outline: none;
    transition: all 0.2s ease;
}

#terminal-input:focus {
    border-color: rgba(255, 90, 31, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

#chat-send-btn {
    display: none;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #FF5A1F;
    border: none;
    color: #000;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
}

#chat-send-btn:hover {
    background: #ff7a47;
}

#chat-send-btn:active {
    transform: scale(0.93);
}

@media (max-width: 768px) {
    #chat-send-btn {
        display: flex;
    }
}

.chat-body::-webkit-scrollbar { width: 3px; }
.chat-body::-webkit-scrollbar-thumb { background: rgba(255, 90, 31, 0.2); }

/* Sağ Alttaki Yuvarlak Açma Butonu */
#chat-trigger-badge {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 56px;
    height: 56px;
    background: #0D0D0D;
    border: 1px solid rgba(255, 90, 31, 0.3);
    border-radius: 0px !important; /* Köşeleri Sıfırla */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99998;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    transition: all 0.25s ease;
}

/* Player Açıkken Butonu Yukarı Kaydır */
body.player-active #chat-trigger-badge {
    bottom: 140px !important; /* 25px + 70px */
}

#chat-trigger-badge:hover {
    transform: scale(1.08);
    border-color: #FF5A1F;
    box-shadow: 0 8px 30px rgba(255, 90, 31, 0.2);
}

/* Butonun Arkasındaki Hafif Nabız/Dalga Efekti */
.pulse-ring {
    border: 1px solid rgba(255, 90, 31, 0.4);
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    border-radius: 0px !important; /* Köşeleri Sıfırla */
    animation: badgePulse 2s infinite;
    pointer-events: none;
}

@keyframes badgePulse {
    0% { transform: scale(0.95); opacity: 1; border-radius: 0px !important; }
    50% { transform: scale(1.3); opacity: 0; border-radius: 0px !important; }
    100% { transform: scale(0.95); opacity: 0; border-radius: 0px !important; }
}

/* ===== CUSTOM BRUTALIST TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 99999999;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 320px;
  max-width: 450px;
  background: #0e0e0e;
  border: 1px solid #FF6500;
  border-left: 4px solid #FF6500;
  color: #f0ece6;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1rem 1.4rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 101, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.hide {
  transform: translateY(-20px);
  opacity: 0;
}

.toast-content {
  flex-grow: 1;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0 0.2rem;
}

.toast-close:hover {
  color: #FF6500;
}

/* Spinner & Button Loading Styles */
.toast-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 101, 0, 0.2);
  border-radius: 50%;
  border-top-color: #FF6500;
  animation: spin-toast 0.8s linear infinite;
  margin-right: 0.6rem;
  vertical-align: middle;
}

@keyframes spin-toast {
  to { transform: rotate(360deg); }
}

@keyframes pulse-download {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

.player-download-btn.loading svg {
  stroke: #FF6500 !important;
}

.player-download-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

/* ===== LIKED BEATS MODAL IMPROVEMENTS ===== */
.liked-beat-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 0.8rem;
  transition: all 0.25s var(--ease-out-expo);
}

.liked-beat-row:hover {
  background: rgba(255, 101, 0, 0.03);
  border-color: rgba(255, 101, 0, 0.2);
  transform: translateY(-1px);
}

.liked-beat-cover {
  width: 50px;
  height: 50px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.liked-beat-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.liked-beat-title {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.liked-beat-meta {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #888;
}

.liked-beat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.liked-beat-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ccc;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.liked-beat-btn:hover {
  border-color: #FF6500;
  color: #FF6500;
}

.liked-beat-btn.remove-btn:hover {
  border-color: #ff3333;
  color: #ff3333;
}

/* ===== FREE DOWNLOAD BUTTON & DISCLAIMER BOX ===== */
.btn-download-free {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  background: #0f0f0f;
  border: 1px solid var(--lava);
  color: var(--text);
  border-radius: 0;
  transition: all 0.25s var(--ease-out-expo);
  width: 100%;
  text-align: center;
  box-shadow: 0 0 0px transparent;
}
.btn-download-free:hover {
  background: var(--lava);
  color: #000;
  box-shadow: 0 0 15px rgba(255, 69, 0, 0.6);
}

.beat-disclaimer-box {
  position: absolute;
  inset: 0;
  background: #0b0b0b;
  border: 1px solid var(--lava);
  padding: 1.2rem;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  animation: slideUp 0.3s var(--ease-out-expo) forwards;
}

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

.disclaimer-agreement-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  margin-bottom: 0.6rem;
  text-align: left;
}

.disclaimer-checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.custom-checkbox {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: #000000;
  flex-shrink: 0;
  position: relative;
  display: inline-block;
  margin-top: 2px;
  box-sizing: border-box;
  transition: border-color 0.2s, background-color 0.2s;
}

.disclaimer-agreement-wrap:hover .custom-checkbox {
  border-color: var(--lava);
}

.disclaimer-checkbox:checked ~ .custom-checkbox {
  background-color: var(--lava);
  border-color: var(--lava);
}

.disclaimer-checkbox:checked ~ .custom-checkbox::after {
  content: 'X';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #000000;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
}

.checkbox-label-text.disclaimer-text {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  line-height: 1.4;
  color: #888;
  transition: color 0.2s;
}

.disclaimer-agreement-wrap:hover .checkbox-label-text.disclaimer-text {
  color: #b0b0b0;
}

.checkbox-label-text.disclaimer-text .highlight-lava {
  color: var(--lava);
  font-weight: bold;
}

.disclaimer-actions {
  display: flex;
  gap: 8px;
  margin-top: 0.8rem;
}

.btn-disclaimer-confirm {
  flex: 2;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.55rem 0.5rem;
  background: var(--lava);
  color: #000;
  border: 1px solid var(--lava);
  transition: all 0.25s ease;
  text-align: center;
}

.btn-disclaimer-confirm:disabled {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.15);
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none !important;
  transform: none !important;
}

.btn-disclaimer-confirm:not(:disabled) {
  animation: confirmGlowPulse 1.5s infinite alternate;
}

.btn-disclaimer-confirm:not(:disabled):hover {
  background: transparent;
  color: var(--lava);
}

@keyframes confirmGlowPulse {
  0% { box-shadow: 0 0 4px rgba(255, 69, 0, 0.3); }
  100% { box-shadow: 0 0 16px rgba(255, 69, 0, 0.7); }
}

.btn-disclaimer-close {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  padding: 0.55rem 0.5rem;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.25s ease;
  text-align: center;
}

.btn-disclaimer-close:hover {
  border-color: #fff;
  color: #fff;
}

/* Download Auth Modal Styles */
.download-auth-content {
  background: #0d0d0d !important;
  border: 1px solid #FF5A1F !important;
  box-shadow: 0 0 30px rgba(255, 90, 31, 0.2) !important;
  padding: 30px !important;
  width: 380px !important;
  max-width: 95%;
  border-radius: 0px !important;
  position: relative;
}

.download-auth-tabs {
  display: flex;
  border-bottom: 1px solid #222;
  margin-bottom: 15px;
  gap: 10px;
}

.dl-tab-btn {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #888;
  padding: 8px 0;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: bold;
  text-align: center;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.dl-tab-btn.active {
  border-bottom: 2px solid #FF5A1F;
  color: #fff;
}

.dl-auth-form input {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid #333;
  color: #fff;
  padding: 10px;
  box-sizing: border-box;
  font-family: inherit;
  border-radius: 0px !important;
  margin-top: 5px;
  transition: border-color 0.2s;
}

.dl-auth-form input:focus {
  border-color: #FF5A1F;
  outline: none;
}

.dl-auth-form label {
  font-size: 11px;
  color: #888;
  font-family: 'Space Mono', monospace;
}

/* ===== PLAYER DOWNLOAD BUTTON ===== */
.player-download-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  transition: all 0.25s var(--ease-out-expo);
}
@media (hover: hover) {
  .player-download-btn:hover {
    transform: scale(1.15);
  }
  .player-download-btn:hover svg {
    stroke: var(--lava) !important;
    filter: drop-shadow(0 0 4px rgba(255, 90, 31, 0.4));
  }
}
.player-download-btn:active {
  transform: scale(0.9);
}

#player-expand-btn {
  display: none;
}

/* ===== MOBILE BCHAT OVERRIDES ===== */
@media (max-width: 768px) {
  #chat-trigger-badge {
    bottom: calc(30px + env(safe-area-inset-bottom)) !important; /* Slightly higher for reachability and safe-area */
    right: 20px !important;
    width: 52px !important;
    height: 52px !important;
    z-index: 99998 !important;
  }

  body.player-active #chat-trigger-badge {
    bottom: calc(155px + env(safe-area-inset-bottom)) !important; /* Shifted higher above the player bar */
  }

  .main-terminal-fixed {
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    top: 0 !important;
    border: none !important;
    box-shadow: none !important;
    z-index: 999999 !important; /* Mobil menülerin ve oynatıcının üzerinde kalması için */
    transform: translateY(100%) !important;
    transform-origin: bottom center !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease !important;
  }

  .main-terminal-fixed.chat-active {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }

  body.player-active .main-terminal-fixed {
    bottom: 0 !important;
    top: 0 !important;
  }

  #close-chat-btn {
    font-size: 24px !important;
    padding: 10px !important;
    margin: -10px !important;
    display: inline-block !important;
  }

  /* Prevent page scroll when player is fullscreen */
  body.player-expanded {
    overflow: hidden !important;
  }

  /* Expand pull tab button */
  #player-expand-btn {
    display: flex !important;
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 16px;
    background: #0d0d0d;
    border: 1px solid rgba(255, 90, 31, 0.3);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
  }
  
  #player-expand-btn svg {
    transition: transform 0.3s ease;
  }

  /* When expanded, the player bar goes full screen */
  #player-bar.expanded {
    position: fixed !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    z-index: 999999 !important;
    background: linear-gradient(180deg, #161616 0%, #080808 100%) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 3rem 2rem 2.5rem 2rem !important;
    box-sizing: border-box !important;
    transform: translateY(0) !important;
    border-top-color: transparent !important;
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, border-top-color 0.4s ease, transform 0.5s var(--ease-out-expo) !important;
  }

  /* Expand button state changes when expanded */
  #player-bar.expanded #player-expand-btn {
    top: 2rem !important;
    left: 2rem !important;
    transform: none !important;
    border: none !important;
    background: transparent !important;
    width: auto !important;
    height: auto !important;
  }

  #player-bar.expanded #player-expand-btn svg {
    transform: rotate(180deg) !important; /* points down */
    width: 28px !important;
    height: 28px !important;
    color: #fff !important;
  }

  /* Center contents reset when expanded */
  #player-bar.expanded .player-center {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    flex-grow: 1 !important;
    justify-content: center !important;
  }

  /* Info block layout in expanded player */
  #player-bar.expanded .player-info {
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100% !important;
    margin-bottom: 2rem !important;
    gap: 1.5rem !important;
  }

  /* Large Album Cover Art */
  #player-bar.expanded .player-cover {
    width: 85vw !important;
    height: 85vw !important;
    max-width: 320px !important;
    max-height: 320px !important;
    margin: 0 auto !important;
    border-radius: 8px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(255, 90, 31, 0.2) !important;
  }

  #player-bar.expanded .player-text-wrap {
    width: 100% !important;
    padding: 0 0.5rem !important;
  }

  #player-bar.expanded #player-title {
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    color: #fff !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  #player-bar.expanded #player-meta {
    font-size: 0.9rem !important;
    color: var(--muted) !important;
    margin-top: 0.4rem !important;
    max-width: 100% !important;
    display: block !important;
  }

  /* Expanded like button and text row wrap overrides */
  #player-bar.expanded .player-text-row-wrap {
    width: 100% !important;
  }
  #player-bar.expanded .player-like-btn {
    margin-left: 1.5rem !important;
  }
  #player-bar.expanded .player-like-btn svg {
    width: 28px !important;
    height: 28px !important;
  }

  /* Progress bar in expanded player */
  #player-bar.expanded .player-progress-wrap {
    width: 100% !important;
    margin: 1rem 0 !important;
  }

  #player-bar.expanded .player-waveform-container {
    height: 48px !important;
  }

  #player-bar.expanded #player-progress::-webkit-slider-thumb {
    height: 48px !important;
  }

  #player-bar.expanded #player-progress::-moz-range-thumb {
    height: 48px !important;
  }

  #player-bar.expanded .player-time {
    display: flex !important;
    justify-content: space-between !important;
    margin-top: 0.6rem !important;
    font-size: 0.8rem !important;
    color: #888 !important;
  }

  /* Control buttons in expanded player */
  #player-bar.expanded .player-controls {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr auto auto auto 1fr !important;
    align-items: center !important;
    justify-items: center !important;
    margin: 1.5rem 0 !important;
    gap: 0 !important;
  }

  #player-bar.expanded #player-prev {
    grid-column: 2 !important;
    font-size: 1.6rem !important;
    color: #fff !important;
    padding: 0.5rem !important;
    margin-right: 1.5rem !important;
  }

  #player-bar.expanded #player-next {
    grid-column: 4 !important;
    font-size: 1.6rem !important;
    color: #fff !important;
    padding: 0.5rem !important;
    margin-left: 1.5rem !important;
  }

  #player-bar.expanded #player-loop-btn {
    grid-column: 5 !important;
    justify-self: center !important;
  }

  #player-bar.expanded #player-loop-btn svg {
    width: 18px !important;
    height: 18px !important;
  }

  /* Large circular play button like Spotify */
  #player-bar.expanded #player-play-pause {
    grid-column: 3 !important;
    width: 68px !important;
    height: 68px !important;
    background: var(--lava) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    box-shadow: 0 8px 25px rgba(255, 90, 31, 0.45) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  }

  #player-bar.expanded #player-play-pause:active {
    transform: scale(0.95) !important;
  }

  #player-bar.expanded #player-play-pause svg {
    width: 28px !important;
    height: 28px !important;
    fill: #000 !important; /* contrast on orange */
    stroke: #000 !important;
  }
  
  #player-bar.expanded #player-play-pause .icon-pause {
    fill: #000 !important;
  }

  /* Volume and download row at the bottom */
  #player-bar.expanded .player-vol {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 1.5rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding-top: 1.5rem !important;
  }

  #player-bar.expanded .player-vol svg {
    display: block !important;
    color: var(--muted) !important;
  }

  #player-bar.expanded .player-vol input[type="range"] {
    display: block !important;
    flex-grow: 1 !important;
    margin: 0 1rem !important;
    height: 4px !important;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.1) !important;
    outline: none !important;
  }

  #player-bar.expanded .player-vol input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    background: #fff !important;
  }

  #player-bar.expanded #player-download-btn {
    padding: 0.8rem !important;
  }

  #player-bar.expanded #player-download-btn svg {
    width: 24px !important;
    height: 24px !important;
  }
}

/* ==========================================
   BCHAT — WhatsApp-Style Sender Labels
   ========================================== */

.chat-bubble-container {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.chat-message-sender {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.42);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.ai-wrapper .chat-message-sender  { text-align: left; }
.user-wrapper .chat-message-sender { text-align: right; }

/* Anonymous silhouette avatar for user messages */
.chat-avatar-user {
    background-color: rgba(255, 255, 255, 0.10) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 58% !important;
}

/* ==========================================
   PLAYER — Loop Button
   ========================================== */

.player-loop-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--muted);
    transition: color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
@media (hover: hover) {
    .player-loop-btn:hover {
        color: var(--lava);
        transform: scale(1.12);
    }
}
.player-loop-btn.active {
    color: var(--lava) !important;
    filter: drop-shadow(0 0 6px rgba(255, 90, 31, 0.65));
}

/* Loop button badge that shows "A-B" hint on desktop when loop is active */
.player-loop-btn.active::after {
    display: none;
}

/* ===== BCHAT PLAY LINKS & HIGHLIGHT ===== */
.chat-play-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--lava);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    font-weight: bold;
    cursor: pointer;
    margin-left: 6px;
    transition: background 0.2s ease, transform 0.1s ease;
    vertical-align: middle;
}
.chat-play-link:hover {
    background: #ff7847;
    transform: translateY(-1px);
}
.chat-play-link:active {
    transform: translateY(0);
}
.chat-play-svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
}

@keyframes pulseHighlight {
    0% {
        box-shadow: 0 0 0 0px var(--lava);
        border: 2px solid var(--lava);
    }
    50% {
        box-shadow: 0 0 30px 10px rgba(255, 90, 31, 0.6);
        border: 2px solid var(--lava);
    }
    100% {
        box-shadow: 0 0 0 0px var(--lava);
        border: 2px solid var(--lava);
    }
}
.beat-card.chat-highlight {
    animation: pulseHighlight 1.2s ease-in-out infinite;
    z-index: 10;
    position: relative;
    background: rgba(30, 15, 10, 0.8) !important;
}
