/* ============================================================================
   RAILBAN LIQUID GLASS DESIGN SYSTEM (DARK MODE · v8.7.0)
   True Apple-style dark liquid glass: optical refraction orbs, glossy
   curved-surface gradients, prismatic top-left specular bevels, saturate(190%)
   backdrop blur, unlocked #dashboard-app backdrop & nested-blur guards.
   ============================================================================ */

:root {
  --glass-bg: linear-gradient(
    150deg,
    rgba(255, 255, 255, 0.13) 0%,
    rgba(255, 255, 255, 0.04) 32%,
    rgba(16, 24, 42, 0.36) 66%,
    rgba(10, 15, 28, 0.48) 100%
  );
  --glass-bg-elevated: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.11) 0%,
    rgba(14, 20, 34, 0.62) 45%,
    rgba(9, 13, 24, 0.76) 100%
  );
  --glass-sub-bg: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.025) 100%
  );
  --glass-sub-bg-hover: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.13) 0%,
    rgba(255, 255, 255, 0.045) 100%
  );
  --glass-border: 1px solid rgba(255, 255, 255, 0.14);
  --glass-border-hover: rgba(0, 242, 254, 0.34);
  --glass-highlight: inset 0 1px 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.07),
    inset 0 0 28px rgba(255, 255, 255, 0.045);
  --glass-highlight-strong: inset 0 1px 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.08),
    inset 0 0 32px rgba(255, 255, 255, 0.05);
  --glass-shadow: 0 14px 42px rgba(0, 0, 0, 0.44);
  --glass-shadow-elevated: 0 24px 60px rgba(0, 0, 0, 0.56);
  --glass-blur: blur(22px) saturate(190%) brightness(1.08);
  --glass-sub-blur: blur(10px) saturate(150%) brightness(1.04);
  --glass-nav-blur: blur(26px) saturate(200%) brightness(1.10);
  --glass-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Unlock opaque dashboard veil so ambient orbs refract inside /music, /dashboard, /ai, /trackers, /soundboard */
#dashboard-app {
  background: rgba(5, 8, 16, 0.16) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ── 1. Luminous Ambient Refraction Orbs Layer ── */
.liquid-ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0, 242, 254, 0.11), transparent 65%),
    radial-gradient(ellipse 65% 45% at 85% 65%, rgba(125, 95, 255, 0.10), transparent 65%);
}

.liquid-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(95px);
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.liquid-orb--cyan {
  width: 44vw;
  height: 44vw;
  max-width: 640px;
  max-height: 640px;
  top: -12%;
  left: 8%;
  background: radial-gradient(circle, #00f2fe 0%, #0ea5e9 55%, transparent 75%);
  opacity: 0.26;
  animation: orbDriftA 28s ease-in-out infinite alternate;
}

.liquid-orb--violet {
  width: 48vw;
  height: 48vw;
  max-width: 700px;
  max-height: 700px;
  top: 24%;
  right: -8%;
  background: radial-gradient(circle, #8b5cf6 0%, #6366f1 55%, transparent 75%);
  opacity: 0.28;
  animation: orbDriftB 34s ease-in-out infinite alternate;
}

.liquid-orb--indigo {
  width: 40vw;
  height: 40vw;
  max-width: 580px;
  max-height: 580px;
  bottom: -14%;
  left: 30%;
  background: radial-gradient(circle, #ec4899 0%, #3b82f6 55%, transparent 75%);
  opacity: 0.20;
  animation: orbDriftC 30s ease-in-out infinite alternate;
}

@keyframes orbDriftA {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(4vw, 5vh, 0) scale(1.06); }
}

@keyframes orbDriftB {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-4vw, -4vh, 0) scale(1.05); }
}

@keyframes orbDriftC {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(3vw, -5vh, 0) scale(1.07); }
}

/* ── 2. Level 1 Liquid Glass Cards & Prismatic Top-Left Specular Rim ── */
.glass-card,
.card.glass,
.bento-item,
.stat-box,
.onboarding-step-card,
.perm-calc-container,
.simulator-wrapper,
.music-showcase-card,
.music-demo-teaser,
.cmd-cta-banner,
.cta-box,
.guild-card,
.music-server-card,
.music-studio-hero,
.now-playing-card,
.ai-station-console,
.ai-sidebar-card,
.commands-glass-panel,
.legal-card,
.docs-hero,
body.status-page .card {
  background: var(--glass-bg) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-top-color: rgba(255, 255, 255, 0.30) !important;
  border-left-color: rgba(255, 255, 255, 0.20) !important;
  box-shadow: var(--glass-highlight), var(--glass-shadow) !important;
  --text-muted: #b0bed2;
  transition: transform 0.28s var(--glass-ease), border-color 0.26s ease, box-shadow 0.28s var(--glass-ease), background 0.24s ease;
}

.glass-card:hover,
.guild-card:hover,
.music-server-card:hover,
.bento-item:hover,
.stat-box:hover,
.onboarding-step-card:hover,
.music-demo-teaser:hover {
  border-color: rgba(0, 242, 254, 0.34) !important;
  border-top-color: rgba(0, 242, 254, 0.62) !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.50), inset 0 0 32px rgba(0, 242, 254, 0.08), 0 18px 46px rgba(0, 0, 0, 0.48), 0 0 30px rgba(0, 242, 254, 0.18) !important;
}

/* ── 3. Level 2 Elevated Overlay Surfaces (Modals, Drawers, Popovers) ── */
.custom-modal-box,
.account-modal-box,
.equalizer-card,
.lyrics-drawer,
.music-autocomplete-dropdown,
.ai-copilot-window,
.rb-mini-player,
.welcome-portal-box,
.cookie-gate-card,
.cookie-banner {
  background: var(--glass-bg-elevated) !important;
  backdrop-filter: blur(26px) saturate(190%) brightness(1.06) !important;
  -webkit-backdrop-filter: blur(26px) saturate(190%) brightness(1.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-top-color: rgba(255, 255, 255, 0.32) !important;
  box-shadow: var(--glass-highlight-strong), var(--glass-shadow-elevated) !important;
  --text-muted: #b0bed2;
}

.equalizer-card .eq-curve-box,
.lyrics-drawer .lyrics-body {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* ── 4. Level 3 Sub-Cards & Dense Items (zero nested blur inside blurred containers) ── */
.volume-pro-panel,
.trk-stat-tile,
.gi-art-card,
.trk-canvas-box,
.faq-item,
.music-shortcuts-bar,
.gauge-item {
  background: var(--glass-sub-bg);
  backdrop-filter: var(--glass-sub-blur);
  -webkit-backdrop-filter: var(--glass-sub-blur);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-top-color: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.16), 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.24s var(--glass-ease), border-color 0.22s ease, background 0.22s ease, box-shadow 0.24s var(--glass-ease);
}

.trk-stat-tile:hover,
.gi-art-card:hover {
  border-color: rgba(0, 242, 254, 0.34);
  border-top-color: rgba(0, 242, 254, 0.55);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.26), 0 12px 28px rgba(0, 0, 0, 0.36);
}

.account-stat-card,
.ai-specs-grid .spec-item,
.queue-pro-row,
.autoplay-sug-row,
.cmd-card,
.sound-pad,
.trk-match-row,
.next-list-row,
.music-ac-item,
.account-setting-row,
.ai-station-msg-bubble {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.065) 0%, rgba(255, 255, 255, 0.025) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: transform 0.22s var(--glass-ease), border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s var(--glass-ease);
}

.cmd-card:hover,
.sound-pad:hover,
.next-list-row:hover,
.trk-match-row:hover {
  background: var(--glass-sub-bg-hover);
  border-color: rgba(0, 242, 254, 0.32);
  border-top-color: rgba(0, 242, 254, 0.52);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.22), 0 10px 26px rgba(0, 0, 0, 0.34);
}

/* Defensive anti-nesting guard: never double-blur inside glass containers */
.glass-card .glass-card,
.glass-card .volume-pro-panel,
.glass-card .trk-stat-tile,
.glass-card .gi-art-card,
.glass-card .trk-canvas-box,
.glass-card .faq-item,
.glass-card .music-shortcuts-bar,
.glass-card .now-playing-card,
.custom-modal-box .glass-card,
.account-modal-box .account-stat-card,
.equalizer-card .eq-curve-box,
.equalizer-card .glass-card,
.commands-glass-panel .cmd-card {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ── 5. Floating Liquid Frosted Navbar, Dropdowns & Mobile Drawer ── */
#main-nav,
nav:not(.sidebar):not(.dash-workspace-chips):not(.toc-bar):not(.nav-actions-group):not(.nf-nav),
.top-nav {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(14, 21, 36, 0.46) 100%) !important;
  backdrop-filter: var(--glass-nav-blur) !important;
  -webkit-backdrop-filter: var(--glass-nav-blur) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-top-color: rgba(255, 255, 255, 0.38) !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.42), inset 0 -1px 0 rgba(255, 255, 255, 0.09), 0 16px 44px rgba(0, 0, 0, 0.48) !important;
}

#main-nav.scrolled,
nav:not(.sidebar):not(.dash-workspace-chips).scrolled,
.top-nav.scrolled {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(11, 17, 30, 0.62) 100%) !important;
  border-top-color: rgba(255, 255, 255, 0.44) !important;
}

.nav-dropdown-menu,
.nav-dropdown-menu.mega-menu {
  background: linear-gradient(165deg, rgba(15, 21, 36, 0.94) 0%, rgba(10, 15, 27, 0.96) 52%, rgba(7, 10, 20, 0.98) 100%) !important;
  backdrop-filter: blur(28px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-top-color: rgba(255, 255, 255, 0.34) !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.28), inset 0 0 24px rgba(0, 242, 254, 0.04), 0 24px 64px rgba(0, 0, 0, 0.78), 0 0 24px rgba(0, 242, 254, 0.10) !important;
}

.mobile-nav-drawer {
  background: linear-gradient(165deg, rgba(14, 20, 34, 0.93) 0%, rgba(8, 12, 22, 0.97) 100%) !important;
  backdrop-filter: blur(26px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(26px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.24), 0 24px 60px rgba(0, 0, 0, 0.72) !important;
}

/* ── 6. Glossy Liquid Pills, Buttons, Inputs & Spring Microinteractions ── */
.btn-primary {
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.45), 0 8px 26px rgba(0, 242, 254, 0.30), 0 0 0 1px rgba(255, 255, 255, 0.14);
  transition: transform 0.24s var(--glass-ease), box-shadow 0.24s var(--glass-ease), filter 0.22s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.58), 0 12px 34px rgba(0, 242, 254, 0.42), 0 0 32px rgba(125, 95, 255, 0.28);
}

.btn-outline,
.btn-secondary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-top-color: rgba(255, 255, 255, 0.30);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.24), 0 6px 20px rgba(0, 0, 0, 0.24);
  transition: transform 0.24s var(--glass-ease), background 0.22s ease, border-color 0.22s ease, box-shadow 0.24s var(--glass-ease);
}

.btn-outline:hover,
.btn-secondary:hover {
  transform: translateY(-1.5px);
  border-color: rgba(0, 242, 254, 0.48);
  border-top-color: rgba(0, 242, 254, 0.72);
  background: linear-gradient(180deg, rgba(0, 242, 254, 0.18) 0%, rgba(0, 242, 254, 0.06) 100%);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.34), 0 0 24px rgba(0, 242, 254, 0.22);
}

.btn:active,
.btn-primary:active,
.btn-outline:active,
.btn-secondary:active {
  transform: scale(0.97) !important;
}

.modern-input,
.sb-search-wrap input,
.sb-server-select,
.trk-search-row input,
#music-search-input,
#music-guild-search,
.ai-station-textarea,
.cmd-search-input {
  background: linear-gradient(180deg, rgba(10, 15, 28, 0.56) 0%, rgba(6, 10, 20, 0.68) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.13) !important;
  border-bottom-color: rgba(255, 255, 255, 0.20) !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.24s var(--glass-ease);
}

.modern-input:focus,
.modern-input:focus-visible,
.sb-search-wrap input:focus,
.sb-server-select:focus,
.trk-search-row input:focus,
#music-search-input:focus,
#music-guild-search:focus,
.ai-station-textarea:focus,
.cmd-search-input:focus {
  background: rgba(12, 19, 36, 0.74) !important;
  border-color: rgba(0, 242, 254, 0.60) !important;
  box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.18), 0 0 26px rgba(0, 242, 254, 0.22) !important;
}

#unified-nav-links a,
.nav-links a {
  transition: transform 0.24s var(--glass-ease), background 0.22s ease, border-color 0.22s ease, color 0.22s ease, box-shadow 0.24s var(--glass-ease);
}

#unified-nav-links a:hover,
.nav-links a:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.05) 100%) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

#unified-nav-links a.active,
.nav-links a.active {
  background: linear-gradient(180deg, rgba(0, 242, 254, 0.24) 0%, rgba(0, 242, 254, 0.10) 100%) !important;
  border-color: rgba(0, 242, 254, 0.48) !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.36), 0 0 20px rgba(0, 242, 254, 0.24) !important;
}

.dash-nav-chip,
.music-filter-chip,
.filter-chip,
.sb-filter-chip,
.eq-preset-chip,
.crossfade-pill,
.cmd-pill-card,
.next-tab-btn,
.hero-live-badge,
.music-role-badge,
.music-pill-feature,
.trk-trust-pill {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-top-color: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 4px 16px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s var(--glass-ease), background 0.22s ease, border-color 0.22s ease, box-shadow 0.24s var(--glass-ease);
}

.music-controls .control-btn,
.vol-mute-btn,
.queue-row-btn,
.rb-mini-btn {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.035) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top-color: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition: transform 0.24s var(--glass-ease), background 0.22s ease, border-color 0.22s ease, box-shadow 0.24s var(--glass-ease);
}

.dash-nav-chip:hover,
.music-filter-chip:hover,
.filter-chip:hover,
.sb-filter-chip:hover,
.eq-preset-chip:hover,
.crossfade-pill:hover,
.cmd-pill-card:hover,
.next-tab-btn:hover,
.music-controls .control-btn:hover,
.vol-mute-btn:hover,
.queue-row-btn:hover,
.rb-mini-btn:hover {
  transform: translateY(-1.5px);
  border-color: rgba(0, 242, 254, 0.42);
  border-top-color: rgba(0, 242, 254, 0.68);
  background: linear-gradient(180deg, rgba(0, 242, 254, 0.16) 0%, rgba(255, 255, 255, 0.04) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 0 20px rgba(0, 242, 254, 0.20);
}

.dash-nav-chip.active,
.music-filter-chip.active,
.filter-chip.active,
.sb-filter-chip.active,
.eq-preset-chip.active,
.crossfade-pill.active,
.next-tab-btn.active {
  background: linear-gradient(180deg, rgba(0, 242, 254, 0.26) 0%, rgba(0, 242, 254, 0.10) 100%) !important;
  border-color: rgba(0, 242, 254, 0.56) !important;
  border-top-color: rgba(255, 255, 255, 0.55) !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.42), 0 0 24px rgba(0, 242, 254, 0.24) !important;
}

.dash-nav-chip:active,
.music-filter-chip:active,
.filter-chip:active,
.sb-filter-chip:active,
.eq-preset-chip:active,
.crossfade-pill:active,
.next-tab-btn:active,
.music-controls .control-btn:active,
.vol-mute-btn:active,
.queue-row-btn:active,
.rb-mini-btn:active {
  transform: scale(0.97) !important;
}

/* ── 7. Responsive Mobile Optimization, Ultra-Perf Mode & Fallback ── */
@media (max-width: 768px) {
  :root {
    --glass-blur: blur(12px) saturate(150%) brightness(1.05);
    --glass-nav-blur: blur(16px) saturate(165%) brightness(1.06);
  }
  .liquid-orb {
    filter: blur(70px);
    animation: none !important;
  }
  .liquid-orb--indigo {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .liquid-orb {
    animation: none !important;
  }
}

body.ultra-perf-mode .liquid-ambient-bg {
  display: none !important;
}

body.ultra-perf-mode .glass-card,
body.ultra-perf-mode .custom-modal-box,
body.ultra-perf-mode .account-modal-box,
body.ultra-perf-mode .equalizer-card,
body.ultra-perf-mode .lyrics-drawer,
body.ultra-perf-mode #main-nav,
body.ultra-perf-mode nav:not(.sidebar):not(.dash-workspace-chips) {
  background: rgba(12, 17, 28, 0.94) !important;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-card,
  .custom-modal-box,
  .account-modal-box,
  .equalizer-card,
  .lyrics-drawer,
  .music-autocomplete-dropdown,
  .ai-copilot-window,
  .rb-mini-player,
  #main-nav,
  nav:not(.sidebar):not(.dash-workspace-chips),
  .top-nav,
  .nav-dropdown-menu,
  .mobile-nav-drawer {
    background: rgba(12, 17, 28, 0.92) !important;
  }
}

/* ── 8. Account Modal & User Profile Suite (v8.8.0) ── */
.account-tab-btn:focus,
.account-tab-btn:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.account-tab-btn.active {
  color: var(--primary) !important;
  border-bottom: 2px solid var(--primary) !important;
  text-shadow: 0 0 14px color-mix(in srgb, var(--primary) 45%, transparent);
}

.account-modal-box .custom-modal-body {
  padding-bottom: 44px !important;
  scroll-padding-bottom: 28px;
}

.account-modal-box .custom-modal-footer {
  position: relative;
  z-index: 4;
}

.account-modal-box .custom-modal-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -28px;
  height: 28px;
  background: linear-gradient(to top, rgba(9, 13, 24, 0.92), transparent);
  pointer-events: none;
}

/* Clean Liquid Glass Radio Cards (Misaka AI Persona) */
.persona-radio-card {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  padding: 13px 15px !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-top-color: rgba(255, 255, 255, 0.22) !important;
  cursor: pointer;
  transition: transform 0.22s var(--glass-ease), border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s var(--glass-ease);
}

.persona-radio-card:hover {
  border-color: rgba(0, 242, 254, 0.35) !important;
  background: linear-gradient(180deg, rgba(0, 242, 254, 0.09) 0%, rgba(255, 255, 255, 0.025) 100%) !important;
}

.persona-radio-card:has(input:checked) {
  border-color: rgba(0, 242, 254, 0.55) !important;
  border-top-color: rgba(255, 255, 255, 0.45) !important;
  background: linear-gradient(180deg, rgba(0, 242, 254, 0.16) 0%, rgba(125, 95, 255, 0.08) 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 24px rgba(0, 242, 254, 0.12) !important;
}

.persona-radio-card input[type="radio"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  margin: 2px 0 0 0 !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.28) !important;
  position: relative;
  cursor: pointer;
  transition: all 0.2s var(--glass-ease);
}

.persona-radio-card input[type="radio"]:checked {
  border-color: var(--primary, #00f2fe) !important;
  background: rgba(0, 242, 254, 0.18) !important;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.45);
}

.persona-radio-card input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--primary, #00f2fe);
  box-shadow: 0 0 8px var(--primary, #00f2fe);
}

/* Custom Profile Header Banners */
.account-header-profile {
  position: relative;
  overflow: hidden;
  transition: background 0.35s ease;
}

.account-header-profile > * {
  position: relative;
  z-index: 2;
}

.account-header-profile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 10, 20, 0.22) 0%, rgba(8, 12, 24, 0.72) 100%);
  z-index: 1;
  pointer-events: none;
}

.acc-banner-academy-aurora {
  background: radial-gradient(circle at 18% 20%, rgba(0, 242, 254, 0.32), transparent 55%),
              radial-gradient(circle at 82% 28%, rgba(125, 95, 255, 0.34), transparent 55%),
              linear-gradient(135deg, rgba(12, 20, 38, 0.92), rgba(18, 22, 48, 0.92)) !important;
}

.acc-banner-cyber-grid {
  background-color: #080d1c !important;
  background-image:
    linear-gradient(rgba(0, 242, 254, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 242, 254, 0.16) 1px, transparent 1px),
    radial-gradient(circle at 75% 20%, rgba(168, 85, 247, 0.32), transparent 60%) !important;
  background-size: 24px 24px, 24px 24px, 100% 100% !important;
}

.acc-banner-railgun-sparks {
  background: radial-gradient(ellipse at 12% 85%, rgba(251, 191, 36, 0.28), transparent 48%),
              radial-gradient(ellipse at 85% 15%, rgba(0, 242, 254, 0.36), transparent 52%),
              linear-gradient(125deg, #070c1a 0%, #161036 52%, #0a1f33 100%) !important;
}

.acc-banner-liquid-prism {
  position: relative;
  overflow: hidden;
  background: #0a1022 !important;
}
.acc-banner-liquid-prism::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: linear-gradient(120deg, rgba(0, 242, 254, 0.30), rgba(168, 85, 247, 0.30), rgba(236, 72, 153, 0.28), rgba(59, 130, 246, 0.30));
  transform: translate3d(-12%, 0, 0);
  will-change: transform;
  animation: accBannerShiftGpu 14s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
@keyframes accBannerShiftGpu {
  0% { transform: translate3d(-12%, -4%, 0) scale(1.05); }
  100% { transform: translate3d(12%, 4%, 0) scale(1.12); }
}

.acc-banner-custom {
  background-size: cover !important;
  background-position: center !important;
}

.acc-banner-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  width: 100%;
}

.acc-banner-chip {
  position: relative;
  height: 46px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #f8fafc;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
  transition: transform 0.2s var(--glass-ease), border-color 0.2s ease, box-shadow 0.2s ease;
}

.acc-banner-chip:hover {
  transform: translateY(-1.5px);
  border-color: rgba(0, 242, 254, 0.45);
}

.acc-banner-chip.active {
  border-color: var(--primary, #00f2fe);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.28);
}

/* Personal Usage Stats Grid & Unlockable Badges */
.acc-usage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 10px;
  width: 100%;
}

.acc-usage-tile {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top-color: rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}

.acc-usage-tile-lbl {
  font-size: 0.72rem;
  color: var(--text-muted, #a6b4c8);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.acc-usage-tile-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: #f8fafc;
}

.acc-badges-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  width: 100%;
}

.acc-badge-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 11px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.065) 0%, rgba(255, 255, 255, 0.025) 100%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s var(--glass-ease), border-color 0.2s ease, box-shadow 0.2s ease;
}

.acc-badge-tile:hover:not(.locked) {
  transform: translateY(-1.5px);
  border-color: rgba(0, 242, 254, 0.42);
}

.acc-badge-tile.featured {
  border-color: var(--primary, #00f2fe);
  background: linear-gradient(180deg, rgba(0, 242, 254, 0.14) 0%, rgba(125, 95, 255, 0.08) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0 16px rgba(0, 242, 254, 0.16);
}

.acc-badge-tile.locked {
  opacity: 0.48;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.acc-badge-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  color: #f8fafc;
}

.acc-badge-tile-desc {
  font-size: 0.7rem;
  color: var(--text-muted, #a6b4c8);
  line-height: 1.35;
}

/* Gaming Accounts & Deck Editor & History & Sessions/Token */
.acc-gaming-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  width: 100%;
}

.acc-gaming-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.acc-deck-editor {
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.acc-history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.acc-token-box {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: rgba(8, 12, 24, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.acc-textarea {
  width: 100%;
  min-height: 74px;
  resize: vertical;
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(8, 12, 22, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
}

.acc-textarea:focus {
  border-color: var(--primary, #00f2fe);
  box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.14);
}

/* Global Streamer Privacy Mode Obfuscation */
body.streamer-mode .streamer-censored,
body.streamer-mode .account-guild-name,
body.streamer-mode .music-card-name,
body.streamer-mode .guild-card-name,
body.streamer-mode #music-guild-name,
body.streamer-mode #account-modal-id-val,
body.streamer-mode .acc-sensitive-val {
  filter: blur(6px);
  user-select: none;
  transition: filter 0.2s ease;
}

body.streamer-mode .acc-sensitive-val:hover {
  filter: blur(2px);
}

/* ============================================================================
   9. RAILBAN ELITE EVOLUTION SYSTEM (v9.0.0)
   Strict Tokens, Accent-Reactive Glass, GPU Skeletons, State Cards,
   Mobile Bottom Tab Bar, View Transitions, Live WS Pill, Theater Mode & Quick AI
   ============================================================================ */
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 9999px;
  --text-muted-aa: #a9b8ce;
  --ambient-orb-1: #00f2fe;
  --ambient-orb-2: #8b5cf6;
  --glass-border-hover: color-mix(in srgb, var(--primary, #00f2fe) 42%, transparent);
}

/* Accent-reactive ambient orbs & specular hover rims */
.liquid-orb--cyan {
  background: radial-gradient(circle, var(--ambient-orb-1, #00f2fe) 0%, color-mix(in srgb, var(--ambient-orb-1, #00f2fe) 55%, #0ea5e9) 55%, transparent 75%);
  transition: background 1.2s ease, opacity 0.8s ease;
}
.liquid-orb--violet {
  background: radial-gradient(circle, var(--ambient-orb-2, #8b5cf6) 0%, color-mix(in srgb, var(--ambient-orb-2, #8b5cf6) 55%, #6366f1) 55%, transparent 75%);
  transition: background 1.2s ease, opacity 0.8s ease;
}

.glass-card:hover,
.guild-card:hover,
.music-server-card:hover,
.bento-item:hover,
.stat-box:hover {
  border-color: color-mix(in srgb, var(--primary, #00f2fe) 36%, transparent) !important;
  border-top-color: color-mix(in srgb, var(--primary, #00f2fe) 64%, transparent) !important;
}

/* Structured GPU Shimmer Skeletons (compositor-only transform, zero layout repaint) */
.rb-skel-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.rb-skel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  width: 100%;
}
.rb-skel-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rb-skel-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rb-skel-line,
.rb-skel-avatar {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 8px;
}
.rb-skel-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
}
.rb-skel-line {
  height: 12px;
  width: 100%;
}
.rb-skel-line.sm { height: 9px; width: 58%; opacity: 0.75; }
.rb-skel-line.lg { height: 18px; width: 72%; }
.rb-skel-line::after,
.rb-skel-avatar::after,
.rb-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  animation: rbShimmer 1.35s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes rbShimmer {
  100% { transform: translateX(100%); }
}

/* Actionable Empty & Error State Cards */
.rb-state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 28px 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(10, 15, 28, 0.52) 100%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-top-color: rgba(255, 255, 255, 0.20);
  color: var(--text-muted-aa);
  width: 100%;
}
.rb-state-card.is-error {
  border-color: rgba(239, 68, 68, 0.34);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.10) 0%, rgba(12, 16, 28, 0.62) 100%);
}
.rb-state-card .rb-state-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--primary, #00f2fe);
  background: color-mix(in srgb, var(--primary, #00f2fe) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary, #00f2fe) 30%, transparent);
}
.rb-state-card.is-error .rb-state-icon {
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
}
.rb-state-card h4 {
  margin: 0;
  color: #f8fafc;
  font-size: 1rem;
  font-weight: 700;
}
.rb-state-card p {
  margin: 0;
  font-size: 0.85rem;
  max-width: 420px;
  line-height: 1.5;
}
.rb-state-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

/* Floating Slider Value Tooltip (EQ dB & Volume %) */
#rb-slider-tooltip {
  position: fixed;
  z-index: 100050;
  pointer-events: none;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #f8fafc;
  background: rgba(9, 14, 26, 0.94);
  border: 1px solid color-mix(in srgb, var(--primary, #00f2fe) 50%, transparent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 14px color-mix(in srgb, var(--primary, #00f2fe) 28%, transparent);
  transform: translate(-50%, -125%) scale(0.92);
  opacity: 0;
  transition: opacity 0.14s ease, transform 0.14s var(--glass-ease);
}
#rb-slider-tooltip.visible {
  opacity: 1;
  transform: translate(-50%, -135%) scale(1);
}

/* Pro Raycast / Linear Command Palette (Ctrl+K) */
#rb-cmd-palette-pro {
  position: fixed;
  inset: 0;
  z-index: 100040;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: min(12vh, 96px) 16px 24px;
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--glass-ease);
}
#rb-cmd-palette-pro.open {
  opacity: 1;
  pointer-events: auto;
}
.rb-cmdk-box {
  width: min(640px, 100%);
  max-height: min(74vh, 580px);
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(16, 23, 40, 0.94) 0%, rgba(8, 12, 24, 0.97) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-top-color: rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.28), 0 32px 84px rgba(0, 0, 0, 0.78), 0 0 40px color-mix(in srgb, var(--primary, #00f2fe) 15%, transparent);
  overflow: hidden;
  transform: translateY(-10px) scale(0.97);
  transition: transform 0.22s var(--glass-ease);
}
#rb-cmd-palette-pro.open .rb-cmdk-box {
  transform: translateY(0) scale(1);
}
.rb-cmdk-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.rb-cmdk-head i {
  color: var(--primary, #00f2fe);
  font-size: 1rem;
}
.rb-cmdk-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f8fafc;
  font-size: 0.98rem;
  font-weight: 500;
}
.rb-cmdk-input::placeholder {
  color: #8899b0;
}
.rb-cmdk-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rb-cmdk-group {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7c8ea6;
  padding: 8px 10px 4px;
}
.rb-cmdk-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #e2e8f0;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.14s var(--glass-ease);
}
.rb-cmdk-item:hover,
.rb-cmdk-item.active {
  background: color-mix(in srgb, var(--primary, #00f2fe) 14%, rgba(255, 255, 255, 0.04));
  border-color: color-mix(in srgb, var(--primary, #00f2fe) 42%, transparent);
  color: #ffffff;
}
.rb-cmdk-item-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.rb-cmdk-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.07);
  color: var(--primary, #00f2fe);
  font-size: 0.86rem;
  flex-shrink: 0;
  overflow: hidden;
}
.rb-cmdk-ico img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rb-cmdk-title {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rb-cmdk-sub {
  font-size: 0.74rem;
  color: #8fa1b9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rb-cmdk-kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2px 7px;
  border-radius: 6px;
  flex-shrink: 0;
}
.rb-cmdk-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  color: #7c8ea6;
  background: rgba(4, 7, 15, 0.55);
}

/* Side Panel ("Más" Drawer) polished for Desktop & Mobile */
.mobile-nav-drawer {
  width: min(350px, 88vw) !important;
  max-width: 360px !important;
}

/* Coarse Pointer Touch Targets >= 44px */
@media (pointer: coarse) {
  .queue-row-btn,
  .vol-mute-btn,
  .music-controls .control-btn,
  .dash-nav-chip,
  .music-filter-chip,
  .filter-chip,
  .eq-preset-chip,
  .crossfade-pill,
  .account-tab-btn,
  .next-tab-btn {
    min-height: 44px;
    min-width: 44px;
  }
  .dash-workspace-chips,
  .account-tabs-bar,
  .next-tabs-row {
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
}

/* Live WebSocket Connection Status Indicator Pill */
#rb-ws-pill {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 9990;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #cbd5e1;
  background: rgba(10, 15, 28, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
  pointer-events: none;
  opacity: 0.88;
  transition: opacity 0.25s ease, border-color 0.25s ease;
}
#rb-ws-pill .ws-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}
#rb-ws-pill.reconnecting .ws-dot { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
#rb-ws-pill.offline .ws-dot { background: #ef4444; box-shadow: 0 0 8px #ef4444; }
@media (max-width: 768px) {
  #rb-ws-pill { display: none; }
}

/* View Transitions API smooth page cross-fade */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 210ms;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Fullscreen Theater / Focus Mode for Hi-Fi Music Player */
#rb-theater-overlay {
  position: fixed;
  inset: 0;
  z-index: 100030;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--ambient-orb-1, #00f2fe) 20%, #050814), #04060e 72%);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--glass-ease);
  padding: 24px clamp(16px, 4vw, 48px);
  overflow: hidden;
}
#rb-theater-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.rb-theater-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.rb-theater-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1.15fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
}
@media (max-width: 860px) {
  .rb-theater-grid {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}
.rb-theater-art-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.rb-theater-halo {
  position: relative;
  width: min(320px, 66vw);
  height: min(320px, 66vw);
  border-radius: 28px;
  padding: 6px;
  background: linear-gradient(135deg, var(--ambient-orb-1, #00f2fe), var(--ambient-orb-2, #8b5cf6));
  box-shadow: 0 0 calc(26px + var(--bass-energy, 0) * 60px) color-mix(in srgb, var(--ambient-orb-1, #00f2fe) 45%, transparent), 0 28px 70px rgba(0, 0, 0, 0.7);
  transform: scale(calc(1 + var(--bass-energy, 0) * 0.045));
  transition: transform 90ms linear, box-shadow 110ms linear;
}
.rb-theater-halo img {
  width: 100%;
  height: 100%;
  border-radius: 23px;
  object-fit: cover;
  display: block;
}
.rb-theater-lyrics {
  height: min(62vh, 520px);
  overflow-y: auto;
  padding: 24px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.rb-lrc-line {
  font-size: 1.08rem;
  font-weight: 600;
  color: rgba(203, 213, 225, 0.48);
  line-height: 1.5;
  transition: color 0.22s ease, transform 0.22s var(--glass-ease), font-size 0.22s ease;
  cursor: pointer;
}
.rb-lrc-line.active {
  color: #ffffff;
  font-size: 1.24rem;
  font-weight: 800;
  text-shadow: 0 0 22px color-mix(in srgb, var(--primary, #00f2fe) 45%, transparent);
  transform: translateX(4px);
}

/* Quick Ask Misaka Contextual Chips & Code Copy Button */
.rb-ai-ctx-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
}
.rb-ai-ctx-chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--primary, #00f2fe) 34%, transparent);
  background: color-mix(in srgb, var(--primary, #00f2fe) 10%, transparent);
  color: #e2e8f0;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s var(--glass-ease);
}
.rb-ai-ctx-chip:hover {
  background: color-mix(in srgb, var(--primary, #00f2fe) 22%, transparent);
  transform: translateY(-1px);
}
.rb-code-copy-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 15, 28, 0.85);
  color: #e2e8f0;
  cursor: pointer;
}
.rb-code-copy-btn:hover {
  border-color: var(--primary, #00f2fe);
  color: var(--primary, #00f2fe);
}

/* Full Reduced Motion Accessibility Guard */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================================
   10. HD TEXTURES, RETINA OPTICS & TACTILE MOTION DESIGN (v9.1.0)
   - #1 Procedural SVG feTurbulence anti-banding optical micro-grain
   - #2 Crisp HiDPI/Retina image rendering
   - #3 Directional Specular Edge Lighting (mask-composite gradient rims)
   - #4 Magnetic Cursor Spotlight (--mx, --my)
   - #6 Silky 1.2s Music Ambient Color Sync (@property transitions)
   - #7 Spring Buttons, Primary Shimmer & Liquid Stretch Switches
   - #8 Physical Sliding Indicator Pill / Shared Luminous Underline
   - #9 Shimmer Progress Bars, Live Pulsing Scrubber & Spring Sliders
   - #10 Staggered Reveal Cascade & #11 Organic Modal Open/Close
   ============================================================================ */
@property --music-ambient-1 {
  syntax: '<color>';
  inherits: true;
  initial-value: #00f2fe;
}
@property --music-ambient-2 {
  syntax: '<color>';
  inherits: true;
  initial-value: #8b5cf6;
}

:root {
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-fluid: cubic-bezier(0.16, 1, 0.3, 1);
  --music-ambient-1: #00f2fe;
  --music-ambient-2: #8b5cf6;
  --glass-grain-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  transition: --music-ambient-1 1.2s cubic-bezier(0.22, 1, 0.36, 1),
              --music-ambient-2 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* #1 Ultra-Subtle Anti-Banding Film on Ambient Background Only (Zero Card Grain) */
.liquid-ambient-bg::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--glass-grain-url);
  background-size: 180px 180px;
  opacity: 0.015;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 1;
}

.glass-card,
.now-playing-card,
.ai-station-console,
.custom-modal-box,
.account-modal-box,
.bento-item,
.stat-box,
.music-server-card,
.guild-card {
  position: relative;
}

/* #2 Crisp HiDPI / Retina Rendering on Avatars, Logos & Badges */
.hero-logo,
.nav-brand img,
.account-big-avatar,
.account-guild-avatar,
.discord-avatar,
#music-artwork,
.rb-theater-halo img,
.trk-avatar-hd {
  image-rendering: -webkit-optimize-contrast;
  transform: translateZ(0);
}

/* #3 Directional Specular Edge Lighting (Optical Refraction Rim) */
.glass-card::after,
.now-playing-card::after,
.custom-modal-box::after,
.account-modal-box::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.40) 0%,
    color-mix(in srgb, var(--primary, #00f2fe) 34%, transparent) 28%,
    rgba(255, 255, 255, 0.04) 64%,
    rgba(125, 95, 255, 0.22) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.72;
  transition: opacity 0.28s var(--ease-fluid);
  z-index: 2;
}

.glass-card:hover::after,
.now-playing-card:hover::after {
  opacity: 1;
}

/* #4 Magnetic Cursor Spotlight (--mx, --my updated via rAF — pure clean light, zero grain) */
@media (hover: hover) and (pointer: fine) {
  .rb-spotlight-card {
    --mx: 50%;
    --my: 50%;
    --spot-op: 0;
  }
  .rb-spotlight-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
      340px circle at var(--mx) var(--my),
      color-mix(in srgb, var(--primary, #00f2fe) 15%, rgba(255, 255, 255, 0.07)),
      transparent 64%
    );
    opacity: var(--spot-op, 0);
    mix-blend-mode: screen;
    pointer-events: none;
    transition: opacity 0.32s var(--ease-fluid);
    z-index: 1;
  }
}

/* #6 Silky 1.2s Ambient Color Sync on Music Player & Orbs */
body.music-ambient-active .liquid-orb--cyan {
  background: radial-gradient(circle, var(--music-ambient-1) 0%, color-mix(in srgb, var(--music-ambient-1) 50%, #0ea5e9) 55%, transparent 75%);
  opacity: 0.30;
}
body.music-ambient-active .liquid-orb--violet {
  background: radial-gradient(circle, var(--music-ambient-2) 0%, color-mix(in srgb, var(--music-ambient-2) 50%, #6366f1) 55%, transparent 75%);
  opacity: 0.30;
}
body.music-ambient-active .now-playing-card {
  border-color: color-mix(in srgb, var(--music-ambient-1) 42%, rgba(255, 255, 255, 0.14)) !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.42),
    0 20px 56px rgba(0, 0, 0, 0.55),
    0 0 48px color-mix(in srgb, var(--music-ambient-1) 24%, transparent) !important;
}

/* #7 Tactile Spring Buttons, Hover Shimmer Sweep & Liquid-Stretch Switches */
.btn,
.btn-primary,
.btn-secondary,
.btn-outline,
.music-controls .control-btn,
.dash-nav-chip,
.music-filter-chip,
.filter-chip,
.eq-preset-chip,
.crossfade-pill {
  transition:
    transform 0.28s var(--ease-spring),
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.26s var(--ease-fluid),
    color 0.2s ease !important;
}

.btn:active,
.btn-primary:active,
.btn-secondary:active,
.btn-outline:active,
.music-controls .control-btn:active,
.dash-nav-chip:active,
.music-filter-chip:active,
.filter-chip:active,
.eq-preset-chip:active,
.crossfade-pill:active {
  transform: scale(0.96) !important;
  transition-duration: 90ms !important;
}

.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 22%, rgba(255, 255, 255, 0.34) 48%, transparent 74%);
  transform: translate3d(-135%, 0, 0) skewX(-22deg);
  transition: transform 0.65s var(--ease-fluid);
  pointer-events: none;
}
.btn-primary:hover::before {
  transform: translate3d(135%, 0, 0) skewX(-22deg);
}

/* Liquid-Stretch Toggle Switches */
.switch-slider {
  transition: background-color 0.26s var(--ease-fluid), border-color 0.24s ease, box-shadow 0.26s ease !important;
}
.switch-slider::before {
  transition: transform 0.34s var(--ease-spring), width 0.16s var(--ease-fluid) !important;
  transform-origin: center;
}
.switch-control:active .switch-slider::before {
  transform: scaleX(1.26);
}
.switch-control:active input:checked + .switch-slider::before {
  transform: translateX(19px) scaleX(1.26);
}
.switch-control input:checked + .switch-slider {
  box-shadow: 0 0 14px color-mix(in srgb, var(--primary, #00f2fe) 42%, transparent);
}

/* #8 Physical Sliding Indicator Pill / Shared Luminous Underline */
.rb-slide-host {
  position: relative !important;
}
.rb-slide-indicator {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  will-change: transform, width;
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s ease;
}
.rb-slide-indicator.mode-pill {
  border-radius: 9999px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary, #00f2fe) 24%, rgba(255,255,255,0.08)) 0%, color-mix(in srgb, var(--primary, #00f2fe) 10%, transparent) 100%);
  border: 1px solid color-mix(in srgb, var(--primary, #00f2fe) 48%, transparent);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.36), 0 0 20px color-mix(in srgb, var(--primary, #00f2fe) 24%, transparent);
}
.rb-slide-indicator.mode-underline {
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--primary, #00f2fe), #a855f7);
  box-shadow: 0 0 14px color-mix(in srgb, var(--primary, #00f2fe) 60%, transparent);
}
.rb-slide-host > *:not(.rb-slide-indicator) {
  position: relative;
  z-index: 1;
}

/* #9 Living Progress Bars (Shimmer Sweep) + Pulsing Music Timeline Knob + Spring Sliders */
.bar .fill,
#music-progress-fill,
#rb-mp-progress-fill,
.welcome-progress-fill,
.acc-xp-fill,
.trk-trust-fill {
  position: relative;
  overflow: hidden;
}
.bar .fill::after,
#music-progress-fill::after,
.acc-xp-fill::after,
.trk-trust-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.38) 50%, transparent 100%);
  transform: translate3d(-100%, 0, 0);
  animation: rbProgressShimmer 2.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
}
@keyframes rbProgressShimmer {
  0% { transform: translate3d(-100%, 0, 0); }
  100% { transform: translate3d(200%, 0, 0); }
}

#music-progress-knob,
.music-progress-knob {
  transition: transform 0.22s var(--ease-spring) !important;
}
body.music-ambient-active #music-progress-knob,
body.music-ambient-active .music-progress-knob {
  animation: rbKnobPulse 1.8s ease-in-out infinite;
}
@keyframes rbKnobPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.95; }
  50% { transform: translate(-50%, -50%) scale(1.28); opacity: 1; }
}

input[type="range"]::-webkit-slider-thumb {
  transition: transform 0.22s var(--ease-spring), box-shadow 0.22s ease !important;
}
input[type="range"]:hover::-webkit-slider-thumb {
  transform: scale(1.2);
}
input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(1.32);
}

/* #10 Staggered Reveal Cascade */
.rb-stagger-item {
  opacity: 0;
  transform: translate3d(0, 10px, 0) scale(0.985);
  filter: blur(4px);
  animation: rbStaggerIn 340ms var(--ease-fluid) forwards;
  animation-delay: calc(var(--stagger-i, 0) * 38ms);
  will-change: transform, opacity;
}
@keyframes rbStaggerIn {
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}
@media (max-width: 768px) {
  .rb-stagger-item {
    filter: none !important;
  }
}

/* #11 Organic Modal Open / Close Transitions */
.custom-modal-overlay.rb-modal-closing {
  opacity: 0 !important;
  transition: opacity 190ms cubic-bezier(0.4, 0, 1, 1) !important;
  pointer-events: none !important;
}
.custom-modal-overlay.rb-modal-closing .custom-modal-box,
.custom-modal-overlay.rb-modal-closing .account-modal-box,
.custom-modal-overlay.rb-modal-closing .equalizer-card {
  transform: translate3d(0, 12px, 0) scale(0.95) !important;
  opacity: 0 !important;
  transition: transform 190ms cubic-bezier(0.4, 0, 1, 1), opacity 190ms ease !important;
}

/* #12 Tabular Numerals for Zero-Jitter Rolling Counters */
#ping-value,
#cpu-value,
#ram-value,
#guilds-value,
#users-value,
#subbar-ping,
.cs2-trust-score-num,
.cs2-premier-plaque,
.acc-usage-tile-val,
.stat-number {
  font-variant-numeric: tabular-nums;
}

/* Strict Performance / Battery & Low-GPU Saver Shutoff (targets <2% GPU on weak PCs) */
body.ultra-perf-mode .liquid-ambient-bg,
body.ultra-perf-mode .liquid-orb,
body.ultra-perf-mode .liquid-ambient-bg::after,
body.ultra-perf-mode .glass-card::before,
body.ultra-perf-mode .glass-card::after,
body.ultra-perf-mode .now-playing-card::before,
body.ultra-perf-mode .now-playing-card::after,
body.ultra-perf-mode .rb-spotlight-card::before,
body.ultra-perf-mode .btn-primary::before,
body.ultra-perf-mode .bar .fill::after,
body.ultra-perf-mode #music-progress-fill::after,
body.ultra-perf-mode .acc-xp-fill::after,
body.ultra-perf-mode .trk-trust-fill::after,
body.ultra-perf-mode #three-lightning-canvas,
body.ultra-perf-mode #bg-canvas-2d {
  display: none !important;
  animation: none !important;
}
body.ultra-perf-mode *,
body.ultra-perf-mode *::before,
body.ultra-perf-mode *::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.ultra-perf-mode .glass-card,
body.ultra-perf-mode #main-nav,
body.ultra-perf-mode .mobile-nav-drawer,
body.ultra-perf-mode .custom-modal-box {
  background: rgba(11, 15, 28, 0.96) !important;
}
body.ultra-perf-mode .rb-stagger-item {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  animation: none !important;
}




body.rb-compact-ui .glass-card { padding: 14px 16px !important; }
body.rb-compact-ui .account-setting-row { padding: 10px 12px !important; }
html.rb-direct-page #landing-page { display: none !important; }

/* ── Categorías limpias dentro del panel lateral "Más" (#mobile-nav-drawer) ── */
.mobile-drawer-cat {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #67e8f9;
  opacity: 0.85;
  user-select: none;
}
.mobile-drawer-cat:first-child {
  padding-top: 2px;
}
.mobile-drawer-divider {
  height: 1px;
  margin: 8px 10px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(0, 242, 254, 0.14), transparent);
}
#mobile-drawer-links .mobile-drawer-link {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.mobile-drawer-link-left {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.mobile-drawer-link-left i {
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.mobile-drawer-badge {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  flex-shrink: 0;
}


/* ============================================================================
   10. MOBILE UX & PERFORMANCE ISOLATION LAYER (320px–768px · DESKTOP UNTOUCHED)
   ============================================================================ */
@media (max-width: 768px) {
  html, body {
    overflow-x: clip !important;
    overscroll-behavior-y: contain;
  }

  /* Evitar auto-zoom de iOS Safari en cualquier formulario */
  input, select, textarea {
    font-size: 16px !important;
  }

  /* Áreas táctiles mínimas de 44px en navegación, perfil y acciones */
  #mobile-drawer-links .mobile-drawer-link,
  .account-tab-btn,
  .btn-sm,
  .btn-xs {
    min-height: 44px;
  }

  /* Safe-area superior en navbar y drawer móvil */
  #main-nav {
    top: calc(10px + env(safe-area-inset-top, 0px)) !important;
  }
  .mobile-nav-drawer {
    padding-top: calc(16px + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Apilado limpio sin desbordamiento en Tiers, FAQ y Misaka AI */
  .rb-tiers-grid,
  .rb-donate-faq {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  #page-ai .ai-chat-main,
  #page-ai .ai-chat-panel {
    min-height: 62dvh !important;
  }

  /* Reducir blur pesado en GPUs móviles para 60 FPS en scroll */
  .glass-card,
  .rb-tier-card,
  .rb-compare-section,
  .ai-sidebar-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(11, 16, 30, 0.94) !important;
  }
}

/* Eliminar :hover pegajoso en pantallas táctiles y ofrecer feedback :active */
@media (hover: none) {
  .rb-tier-card:hover,
  .glass-card:hover,
  .btn:hover,
  .btn-primary:hover {
    transform: none !important;
  }
  .btn:active,
  .btn-primary:active,
  .btn-outline:active,
  .mobile-drawer-link:active {
    transform: scale(0.97) !important;
    opacity: 0.9;
  }
}

/* === ACCESIBILIDAD (WCAG AA), FOCUS-VISIBLE, REDUCED-MOTION, ALTO CONTRASTE & PERF === */
.rb-skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 1000001;
  background: #00f2fe;
  color: #050814;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 242, 254, 0.45);
  transition: top 0.16s ease;
}
.rb-skip-link:focus {
  left: 16px !important;
  top: 16px !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 2px solid var(--primary, #00f2fe) !important;
  outline-offset: 2px !important;
}

.btn:active,
.next-tab-btn:active,
.trk-recent-chip:active {
  transform: scale(0.97);
}

#commands,
#faq,
#stats {
  content-visibility: auto;
  contain-intrinsic-size: 620px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .glitch-title::before,
  .glitch-title::after,
  .logo-wrapper,
  .logo-glow,
  .float-item,
  .live-dot {
    animation: none !important;
  }
}

@media (prefers-contrast: more) {
  .glass-card,
  .trk-stat-tile,
  .gi-art-card,
  .custom-modal-box,
  #main-nav {
    background: rgba(6, 10, 22, 0.98) !important;
    border-color: rgba(255, 255, 255, 0.42) !important;
  }
  :root {
    --text-muted: #cbd5e1;
  }
}
