/* =========================================================
   OASSYSS — Premium Cyber-Obsidian Design System 2026
   Created by Senior UI/UX Designer & Frontend Engineer
   Inspired by: Vercel, Linear, Apple, Spotify, Arc Browser
   ========================================================= */

/* ============== DESIGN TOKENS ============== */
:root {
  /* Obsidian Space Theme Palette (2026 Core Colors) */
  --bg-base:        #0f0d22;
  --bg-elevated:    #241f4b;
  --bg-overlay:     #2b255a;
  --bg-card:        rgba(36, 31, 75, 0.85);
  --bg-hover:       rgba(255, 255, 255, 0.10);
  --bg-active:      rgba(255, 255, 255, 0.15);
  --bg-input:       #211c47;
  --header-bg:      rgba(15, 13, 34, 0.7);

  /* Glassmorphism settings */
  --glass-bg:       rgba(4, 5, 10, 0.75);
  --glass-border:   rgba(255, 255, 255, 0.07);
  --glass-blur:     blur(18px);

  /* Brand: Logo-Aligned Violet/Lavanda (OASSYSS sky palette) */
  --brand:          #a78bfa; /* Logo violet */
  --brand-deep:     #7c3aed; /* Deep violet */
  --brand-violet:   #818cf8; /* Soft indigo */
  --brand-light:    #e9d5ff; /* Lavender light */
  --brand-hover:    #c084fc;
  --brand-soft:     rgba(167, 139, 250, 0.08);
  --brand-glow:     rgba(167, 139, 250, 0.30);
  --brand-glow-sm:  rgba(167, 139, 250, 0.15);
  
  --violet:         #8b5cf6;
  --violet-light:   #c084fc;
  --violet-soft:    rgba(139, 92, 246, 0.10);
  --violet-glow:    rgba(139, 92, 246, 0.30);

  --pink:           #ec4899;
  --pink-light:     #f472b6;
  --pink-soft:      rgba(236, 72, 153, 0.08);
  --pink-glow:      rgba(236, 72, 153, 0.25);

  /* Premium Gold Theme */
  --gold:           #f59e0b; /* Warm Gold */
  --gold-light:     #fbbf24;
  --gold-dark:      #d97706;
  --gold-soft:      rgba(245, 158, 11, 0.08);
  --gold-glow:      rgba(245, 158, 11, 0.25);

  /* Borders (Sophisticated and bright) */
  --border-subtle:  rgba(167, 139, 250, 0.12);
  --border-default: rgba(167, 139, 250, 0.18);
  --border-strong:  rgba(167, 139, 250, 0.20);
  --border-focus:   #a78bfa;

  /* Typography Colors */
  --text-primary:   #f9fafb;
  --text-secondary: #d1d5db;
  --text-tertiary:  #9ca3af;
  --text-muted:     #6b7280;
  --text-disabled:  #4b5563;
  --text-inverse:   #020204;

  /* Semantic Alerts */
  --success:        #10b981;
  --success-soft:   rgba(16, 185, 129, 0.08);
  --warning:        #f59e0b;
  --warning-soft:   rgba(245, 158, 11, 0.08);
  --danger:         #f43f5e;
  --danger-soft:    rgba(244, 63, 94, 0.08);
  --info:           #3b82f6;
  --info-soft:      rgba(59, 130, 246, 0.08);

  /* User Role Badge Colors */
  --role-super-admin: #f43f5e;
  --role-admin:       #f59e0b;
  --role-editor:      #3b82f6;
  --role-moderator:   #10b981;
  --role-gold:        #f59e0b;
  --role-user:        #9ca3af;
  
  /* Legacy compat support */
  --color-text-muted:       var(--text-tertiary);
  --color-text:             var(--text-primary);
  --color-white:            var(--text-primary);
  --color-bg-soft:          var(--bg-overlay);
  --color-surface:          var(--bg-card);
  --color-surface-alt:      var(--bg-overlay);
  --color-border:           var(--border-subtle);
  --color-purple:           #8b5cf6;
  --color-purple-light:     #c084fc;
  --color-purple-glow-soft: rgba(139, 92, 246, 0.08);
  --color-accent-gold:      var(--gold);
  --color-accent-gold-light: var(--gold-light);
  --color-success:          var(--success);

  /* Spacing */
  --space-0:  0;
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-7:  32px;
  --space-8:  40px;
  --space-9:  48px;
  --space-10: 64px;
  --space-11: 80px;
  --space-12: 96px;

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-2xl: 36px;
  --radius-full: 9999px;

  /* Multi-layered Premium Shadows */
  --shadow-xs:      0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-sm:      0 2px 8px -1px rgba(0, 0, 0, 0.6), 0 1px 3px -1px rgba(0, 0, 0, 0.6);
  --shadow-md:      0 12px 20px -8px rgba(0, 0, 0, 0.7), 0 4px 10px -4px rgba(0, 0, 0, 0.7);
  --shadow-lg:      0 24px 38px -12px rgba(0, 0, 0, 0.8), 0 8px 16px -6px rgba(0, 0, 0, 0.8);
  --shadow-xl:      0 32px 50px -16px rgba(0, 0, 0, 0.9), 0 16px 28px -8px rgba(0, 0, 0, 0.9);
  --shadow-glow:    0 0 24px rgba(167, 139, 250, 0.20), 0 0 0 1px rgba(167, 139, 250, 0.12);
  --shadow-gold:    0 0 24px rgba(245, 158, 11, 0.25), 0 0 0 1px rgba(245, 158, 11, 0.18);
  --shadow-inset:   inset 0 1px 0 rgba(255, 255, 255, 0.05);

  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Sora', var(--font-sans);
  --font-mono: 'JetBrains Mono', monospace;

  /* Letter Spacing */
  --tracking-tighter: -0.03em;
  --tracking-tight:   -0.015em;
  --tracking-normal:  0;
  --tracking-wide:    0.025em;
  --tracking-wider:   0.05em;
  --tracking-widest:  0.1em;

  /* Font Sizes */
  --fs-xs:   12px;
  --fs-sm:   13px;
  --fs-base: 15px;
  --fs-md:   16px;
  --fs-lg:   18px;
  --fs-xl:   20px;
  --fs-2xl:  24px;
  --fs-3xl:  30px;
  --fs-4xl:  36px;
  --fs-5xl:  48px;
  --fs-6xl:  64px;

  /* Line Heights */
  --lh-tight:   1.2;
  --lh-snug:    1.35;
  --lh-base:    1.6;
  --lh-relaxed: 1.75;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --dur-fast: 200ms;
  --dur-base: 300ms;
  --dur-slow: 500ms;
  --dur-slower: 700ms;

  --container-max: 1280px;
  --header-h: 76px;
  --sidebar-w: 280px;
  --player-h: 96px;
}

/* ============== RESET & BASE ============== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: var(--bg-base);
}


body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  font-weight: 400;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  min-height: 100vh;
  position: relative;
  padding-bottom: var(--player-h);
}
  overflow-x: hidden;
}

body.no-player { padding-bottom: 0; }

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; outline: none; }
a { color: inherit; text-decoration: none; transition: color var(--dur-fast) var(--ease-out); }
ul, ol { list-style: none; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px var(--brand-glow-sm);
}

::selection {
  background: rgba(167, 139, 250, 0.30);
  color: #ffffff;
}

/* ============== SCROLLBAR ============== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-base);
}
::-webkit-scrollbar-thumb:hover { background: var(--brand); }
::-webkit-scrollbar-thumb { transition: background 0.2s ease; }

/* ============== AMBIENT ATMOSPHERE ============== */
.orb-1, .orb-2, .orb-3 {
  position: fixed;
  border-radius: var(--radius-full);
  /* Reducido de 120px a 60px: el blur escala cuadráticamente, corta el coste GPU a la mitad */
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
}
.orb-1 {
  top: -100px; left: -80px;
  /* Reducido de 700px a 500px */
  width: 500px; height: 500px;
  background: radial-gradient(circle, #a78bfa, #7c3aed 40%, transparent 70%);
  /* Ralentizado para reducir repaints de composición */
  animation: none;
  opacity: 0.18;
}
.orb-2 {
  bottom: -100px; right: -80px;
  /* Reducido de 550px a 400px */
  width: 400px; height: 400px;
  background: radial-gradient(circle, #c084fc, #818cf8 40%, transparent 70%);
  animation: none;
  opacity: 0.14;
}
.orb-3 {
  top: 40%; left: 60%;
  /* Reducido de 500px a 380px */
  width: 380px; height: 380px;
  background: radial-gradient(circle, #e9d5ff, #a78bfa 40%, transparent 70%);
  /* Eliminado rotate() del orb3: forzaba repaint adicional */
  animation: none;
  opacity: 0.10;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(60px, 50px); }
}
@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-60px, -60px); }
}
@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-50px, 40px); }
}

/* ============== TYPOGRAPHY ============== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}
h1 { font-size: clamp(2rem, 5vw, var(--fs-4xl)); }
h2 { font-size: clamp(1.6rem, 3.5vw, var(--fs-3xl)); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); }
h6 { font-size: var(--fs-base); }
p { line-height: var(--lh-relaxed); color: var(--text-secondary); }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 6px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  color: var(--brand-light);
}

.text-gradient {
  background: linear-gradient(135deg, var(--brand-light), var(--brand), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}
.text-gold { color: var(--gold-light); text-shadow: 0 0 10px rgba(245, 158, 11, 0.3); }
.text-muted { color: var(--text-tertiary); }
.text-dim { color: var(--text-secondary); }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* ============== LAYOUT ============== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
  position: relative;
  z-index: 2;
}
.section { padding: var(--space-10) 0; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-7 { margin-bottom: var(--space-7); }
.mb-8 { margin-bottom: var(--space-8); }

/* ============== HEADER (Glassmorphic) ============== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.site-header.scrolled {
  background: var(--glass-bg);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.site-header .container {
  display: flex;
  align-items: center;
  height: 100%;
  gap: var(--space-6);
}
.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  transition: transform var(--dur-base) var(--ease-spring);
  flex-shrink: 0;
}
.site-logo img {
  height: 48px;
  width: auto;
  display: block;
  transition: transform var(--dur-base) var(--ease-spring), filter var(--dur-base) var(--ease-out);
  filter: drop-shadow(0 0 8px var(--brand-glow-sm));
}
.site-logo:hover {
  transform: scale(1.03);
}
.site-logo:hover img {
  transform: rotate(5deg) scale(1.05);
  filter: drop-shadow(0 0 18px var(--brand-glow));
}
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: var(--space-4);
  flex: 0 1 auto;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
  position: relative;
}
.site-nav a:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}
.site-nav a.active {
  color: #ffffff !important;
  background: var(--bg-active);
}
html[data-theme="light"] .site-nav a {
  color: #000000 !important;
}
html[data-theme="light"] .site-nav a.active {
  color: #000000 !important;
  background: rgba(0, 0, 0, 0.08);
}
.site-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-violet));
  border-radius: var(--radius-full);
  animation: lineExtend var(--dur-base) var(--ease-out);
}

@keyframes lineExtend {
  from { left: 50%; right: 50%; }
  to { left: 16px; right: 16px; }
}

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-tertiary);
  font-size: var(--fs-sm);
  min-width: 220px;
  transition: all var(--dur-base) var(--ease-out);
  cursor: pointer;
}
.search-trigger:hover {
  background: rgba(167, 139, 250, 0.06);
  border-color: rgba(167, 139, 250, 0.25);
  color: var(--text-secondary);
  box-shadow: 0 0 16px rgba(167, 139, 250, 0.12);
}
.search-trigger kbd {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-default);
  border-radius: 4px;
  color: var(--text-tertiary);
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 10px 6px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: all var(--dur-base) var(--ease-out);
  cursor: pointer;
}
.user-menu-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-strong);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}
.user-avatar-header {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--brand), var(--pink));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.25);
}
.user-avatar-header img { width: 100%; height: 100%; object-fit: cover; }

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.menu-toggle:hover { background: var(--bg-hover); color: var(--text-primary); }

@media (max-width: 1350px) {
  .site-header .container { gap: var(--space-3); }
  .site-nav { margin-left: var(--space-2); }
  .site-nav a { padding: 6px 10px; font-size: var(--fs-xs); }
  .search-trigger { min-width: 140px; }
  .search-trigger .search-label, .search-trigger kbd { display: none; }
}

@media (max-width: 1080px) {
  .site-nav, .search-trigger { display: none; }
  .menu-toggle { display: flex; align-items: center; justify-content: center; }
  .site-header .container { gap: var(--space-3); }
  .site-logo span:not(.logo-mark) { display: none; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 0; right: 0;
  width: 300px;
  height: 100vh;
  background: var(--bg-overlay);
  border-left: 1px solid var(--border-default);
  transform: translateX(100%);
  transition: transform var(--dur-base) var(--ease-out);
  z-index: 200;
  padding: var(--space-6);
  overflow-y: auto;
  box-shadow: none;
}
.mobile-menu.open { transform: translateX(0); box-shadow: var(--shadow-xl); }
.mobile-menu-inner a {
  display: block;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.mobile-menu-inner a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: var(--glass-blur);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out);
  z-index: 199;
}
.mobile-menu-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* ============== BUTTONS ============== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-spring),
              background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
  /* will-change eliminado de .btn: cientos de botones = cientos de capas GPU
     El navegador optimiza transform en hover sin necesitar will-change */
  position: relative;
  overflow: hidden;
  user-select: none;
  text-decoration: none;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.btn-sm { padding: 8px 16px; font-size: var(--fs-xs); border-radius: var(--radius-sm); }
.btn-lg { padding: 16px 32px; font-size: var(--fs-md); border-radius: var(--radius-lg); }
.btn-block { display: flex; width: 100%; }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: var(--radius-md); }
.btn-icon.btn-sm { width: 34px; height: 34px; border-radius: var(--radius-sm); }

.btn-primary {
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  color: white;
  box-shadow: 0 4px 16px rgba(167, 139, 250, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.20);
  border-color: rgba(167, 139, 250, 0.20);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #c084fc, #8b5cf6);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(167, 139, 250, 0.40), 0 0 0 1px rgba(167, 139, 250, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-primary:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 3px 10px rgba(167, 139, 250, 0.20);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: var(--border-default);
  /* backdrop-filter eliminado en btn-secondary */
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.btn-secondary:active { transform: translateY(0) scale(0.97); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.btn-ghost:active { background: var(--bg-active); }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-outline:hover {
  background: rgba(167, 139, 250, 0.08);
  border-color: var(--brand);
  box-shadow: 0 0 18px rgba(167, 139, 250, 0.20);
}

.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 4px 16px var(--danger-soft);
  border-color: rgba(255, 255, 255, 0.05);
}
.btn-danger:hover {
  background: #ff5a79;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(244, 63, 94, 0.3);
}
.btn-danger:active { transform: translateY(0) scale(0.97); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--text-inverse);
  font-weight: 700;
  box-shadow: 0 4px 16px var(--gold-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.15);
}
.btn-gold:hover {
  background: linear-gradient(135deg, #fbbf24, #fbbf24);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
}
.btn-gold:active { transform: translateY(0) scale(0.97); }

.btn-shine { position: relative; overflow: hidden; }
.btn-shine::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s var(--ease-out);
}
.btn-shine:hover::before { left: 100%; }

/* ============== FORMS & INPUTS ============== */
.form-group { display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-6); }
.password-wrapper { position: relative; }
.password-wrapper .form-control { padding-right: 48px; }
.password-toggle {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  padding: 0 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--dur-fast) var(--ease-out);
}
.password-toggle:hover { color: var(--text-secondary); }
.password-toggle.visible { color: var(--brand-light); }
/* Labels de formulario: color adaptativo al tema (oscuro en claro, claro en oscuro) */
.form-label { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); letter-spacing: 0.005em; }
.form-label .required { color: var(--danger); }
.form-hint { font-size: var(--fs-xs); color: var(--text-tertiary); margin-top: 2px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; gap: var(--space-4); } }

/* Inputs: texto negro sobre fondo blanco SIEMPRE (legibilidad garantizada),
   con padding MUY generoso para que el texto NO quede pegado al borde. */
.form-control {
  display: block;
  width: 100%;
  padding: 12px 16px !important;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  color: #000000;
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 500;
  color-scheme: light;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.form-control::placeholder { color: #94a3b8; opacity: 1; font-weight: 400; }
.form-control:hover { border-color: #94a3b8; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06); }
.form-control:focus {
  outline: none;
  border-color: var(--brand);
  background: #ffffff;
  color: #000000;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.22), 0 1px 3px rgba(15, 23, 42, 0.08);
}
.form-control:disabled { opacity: 0.5; cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 120px; }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 44px;
}

input[type="checkbox"], input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
  cursor: pointer;
}
.form-check { display: flex; align-items: center; gap: var(--space-2); cursor: pointer; color: var(--text-secondary); }
.form-check:hover { color: var(--text-primary); }

/* ============== FILE INPUT ============== */
input[type="file"] {
  display: block;
  width: 100%;
  padding: 12px 16px !important;
  background: #ffffff;
  border: 1.5px dashed #9ca3af;
  border-radius: 10px;
  color: #000000;
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
input[type="file"]:hover { border-color: var(--brand); background: rgba(167, 139, 250, 0.04); }
input[type="file"]::file-selector-button {
  margin-right: var(--space-3);
  padding: 7px 16px;
  background: var(--brand);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
input[type="file"]::file-selector-button:hover {
  background: var(--brand-hover);
  color: #ffffff;
  border-color: transparent;
}

/* ============== PROFILE EDIT CARD ============== */
.profile-edit-card {
  position: relative;
  padding: var(--space-8) !important;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06), 0 1px 4px rgba(15, 23, 42, 0.04);
}
.profile-edit-form { margin-top: 0; }
.profile-avatar-block {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin-bottom: var(--space-2);
}
.profile-avatar-img {
  width: 96px !important;
  height: 96px !important;
  border-radius: 50% !important;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
}
.profile-divider {
  border: none;
  border-top: 1.5px solid var(--border-default);
  margin: var(--space-6) 0;
}
.profile-section-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-light);
  margin: var(--space-5) 0 var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1.5px solid var(--border-default);
}
.profile-section-title:first-of-type { margin-top: 0; }
@media (max-width: 520px) {
  .profile-edit-card { padding: var(--space-5) !important; }
  .profile-avatar-block { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
  .profile-avatar-img { width: 80px !important; height: 80px !important; }
}

/* ============== CARDS & CONTAINERS ============== */
.card {
  background: var(--bg-card);
  /* backdrop-filter eliminado: crea capas de composición extra en cada card */
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
  position: relative;
  overflow: visible;
  /* will-change eliminado de .card: decenas de cards = decenas de capas GPU permanentes */
}
.card-hover:hover {
  border-color: rgba(167, 139, 250, 0.25);
  transform: translateY(-6px) scale(1.006);
  box-shadow: var(--shadow-lg), 0 0 35px rgba(167, 139, 250, 0.12);
}
.card-image-wrap {
  display: block;
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg-overlay);
  overflow: hidden;
  border-radius: var(--radius-md);
}
.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}
.card-hover:hover .card-image { transform: scale(1.05); }

.card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  color: var(--text-muted);
  border-radius: var(--radius-md);
}
.card-image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
}
.card-badges { position: absolute; top: var(--space-3); left: var(--space-3); display: flex; gap: var(--space-2); flex-wrap: wrap; z-index: 2; }
.card-badges-right { position: absolute; top: var(--space-3); right: var(--space-3); display: flex; gap: var(--space-2); z-index: 2; }
.card-body { padding: var(--space-5) 0 0; }
.card-category {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--brand-hover);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-2);
}
.card-title {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: var(--lh-snug);
  margin-bottom: var(--space-2);
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-title a { color: inherit; }
.card-title a:hover { color: var(--brand-hover); }
.card-excerpt {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: var(--lh-base);
  margin-bottom: var(--space-4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
}
.card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.card-elevated { background: var(--bg-overlay); box-shadow: var(--shadow-md); }
.card-glass { background: var(--glass-bg); backdrop-filter: var(--glass-blur); border-color: var(--glass-border); }

.card-premium {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-7);
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}
.card-premium::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.4), transparent 40%, rgba(245, 158, 11, 0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.4;
  transition: opacity var(--dur-base) var(--ease-out);
  pointer-events: none;
}
.card-premium:hover::before { opacity: 0.85; }

/* ============== GRIDS ============== */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--space-6); }
@media (max-width: 600px) { .news-grid { grid-template-columns: 1fr; } }
.news-grid-2 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.news-grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-5); }
.news-grid-4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--space-5); }

/* ============== STYLE ISOLATION ============== */
/* contain: style → aísla la cascada CSS sin recortar el pintado.
   contain: paint se eliminó porque recorta el border-radius visible en los bordes exteriores */
.card, .podcast-card, .community-post, .stat-card, .feature-card, .plan-card {
  contain: style;
}
/* content-visibility: auto → el navegador omite el rendering de secciones fuera del viewport */
.section-block {
  content-visibility: auto;
  /* contain-intrinsic-size evita layout shift cuando el bloque se renderiza */
  contain-intrinsic-size: 0 400px;
}

/* ============== BADGES & CHIPS ============== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
  /* backdrop-filter eliminado en badges: innecesario a este tamaño */
}
.badge-brand { background: rgba(167, 139, 250, 0.12); color: var(--brand-light); border-color: rgba(167, 139, 250, 0.28); }
.badge-gold { position: relative; overflow: hidden; background: var(--gold-soft); color: var(--gold-light); border-color: rgba(245, 158, 11, 0.25); }

.badge-success { background: var(--success-soft); color: #34d399; border-color: rgba(16, 185, 129, 0.2); }
.badge-warning { background: var(--warning-soft); color: #fbbf24; border-color: rgba(245, 158, 11, 0.2); }
.badge-danger { background: var(--danger-soft); color: #fb7185; border-color: rgba(244, 63, 94, 0.25); }
.badge-info { background: var(--info-soft); color: #60a5fa; border-color: rgba(59, 130, 246, 0.2); }
.badge-muted { background: rgba(255, 255, 255, 0.03); color: var(--text-tertiary); border-color: var(--border-subtle); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all var(--dur-fast) var(--ease-out);
  cursor: pointer;
  /* backdrop-filter eliminado en chips */
}
.chip:hover {
  background: rgba(167, 139, 250, 0.10);
  border-color: rgba(167, 139, 250, 0.25);
  color: var(--text-primary);
  transform: translateY(-2px);
}
.chip.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: white;
  border-color: var(--brand);
  box-shadow: 0 4px 14px rgba(167, 139, 250, 0.40);
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  transition: all var(--dur-fast) var(--ease-out);
}
.tag-pill:hover { background: rgba(255, 255, 255, 0.08); color: var(--brand-light); border-color: var(--border-default); }

/* ============== ALERTS ============== */
.alert {
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-overlay);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  box-shadow: var(--shadow-sm);
}
.alert-success { background: var(--success-soft); color: #1a1a1a; border-color: rgba(16, 185, 129, 0.25); }
.alert-error { background: var(--danger-soft); color: #1a1a1a; border-color: rgba(244, 63, 94, 0.25); }
.alert-warning { background: var(--warning-soft); color: #fef3c7; border-color: rgba(245, 158, 11, 0.25); }
.alert-info { background: var(--info-soft); color: var(--text-secondary); border-color: rgba(59, 130, 246, 0.25); }
.alert-link { color: var(--brand); font-weight: 600; text-decoration: none; }
.alert-link:hover { color: var(--brand-hover); text-decoration: underline; }

/* ============== ROLE BADGES ============== */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: white;
}

/* ============== AVATARS ============== */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--brand), var(--pink));
  color: white;
  font-weight: 800;
  font-size: var(--fs-sm);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 32px; height: 32px; font-size: 11px; }
.avatar-lg { width: 60px; height: 60px; font-size: var(--fs-md); }
.avatar-xl { width: 84px; height: 84px; font-size: var(--fs-xl); }
.avatar-2xl { width: 128px; height: 128px; font-size: var(--fs-2xl); }

/* ============== TABLES ============== */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-elevated);
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--fs-sm);
}
table thead th {
  text-align: left;
  padding: var(--space-4) var(--space-5);
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
}
table tbody td {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: middle;
}
table tbody tr {
  transition: background var(--dur-fast) var(--ease-out);
}
table tbody tr:hover { background: var(--bg-hover); }
table tbody tr:last-child td { border-bottom: 0; }

/* ============== PAGINATION ============== */
.pagination { display: flex; align-items: center; justify-content: center; gap: var(--space-1); margin: var(--space-8) 0; }
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all var(--dur-fast) var(--ease-out);
}
.pagination a:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-strong);
  color: var(--text-primary);
  transform: translateY(-2px);
}
.pagination .active {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: white;
  border-color: var(--brand);
  box-shadow: 0 4px 14px rgba(167, 139, 250, 0.38);
}
.pagination .disabled { opacity: 0.35; cursor: not-allowed; }

/* ============== BREADCRUMB ============== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text-tertiary);
  margin-bottom: var(--space-6);
}
.breadcrumb a {
  color: var(--text-tertiary);
}
.breadcrumb a:hover { color: var(--brand-hover); }
.breadcrumb .sep { color: var(--text-muted); }
.article-breadcrumb { margin-bottom: var(--space-6); }

/* ============== EMPTY STATE ============== */
.empty-state {
  text-align: center;
  padding: var(--space-11) var(--space-5);
  color: var(--text-tertiary);
  background: var(--bg-overlay);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
}
.empty-state-icon {
  font-size: 68px;
  margin-bottom: var(--space-4);
  opacity: 0.45;
  filter: drop-shadow(0 0 15px var(--brand-glow-sm));
}
.empty-state h3 {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

/* ============== SKELETON SHIMMER ============== */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ============== TOOLTIPS ============== */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 6px 12px;
  background: var(--bg-overlay);
  color: var(--text-primary);
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  z-index: 1000;
}
[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============== HERO SECTION ============== */
.hero { padding: var(--space-8) 0 var(--space-6); }
.hero-card {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  background: var(--bg-overlay);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-xl);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
  aspect-ratio: 21/9;
  display: block;
}
@media (max-width: 768px) { .hero-card { aspect-ratio: 16/10; } }
.hero-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.7), 0 0 0 1.5px rgba(167, 139, 250, 0.30);
  border-color: rgba(167, 139, 250, 0.20);
}
.hero-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-8) var(--space-9);
  background: linear-gradient(180deg, transparent 35%, rgba(2, 2, 4, 0.95) 100%);
}
@media (max-width: 640px) { .hero-card-overlay { padding: var(--space-5); } }
.hero-card-overlay h1 { font-size: clamp(1.6rem, 4vw, var(--fs-4xl)); margin-bottom: var(--space-3); text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.hero-card-overlay p { color: var(--text-secondary); font-size: var(--fs-md); margin-bottom: var(--space-4); max-width: 800px; line-height: 1.5; }
.hero-card-overlay .meta { display: flex; gap: var(--space-3); align-items: center; font-size: var(--fs-sm); color: var(--text-tertiary); }
.hero-card-overlay .tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-violet));
  color: white;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 800;
  margin-bottom: var(--space-3);
  align-self: flex-start;
  box-shadow: var(--shadow-sm);
}

/* ============== HOME LAYOUT ============== */
.home-layout { display: grid; grid-template-columns: 1fr 340px; gap: var(--space-8); padding: var(--space-7) 0 var(--space-10); }
@media (max-width: 1024px) { .home-layout { grid-template-columns: 1fr; } }

/* ============== SECTION HEADERS ============== */
.section-block { margin-bottom: var(--space-10); }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-6); flex-wrap: wrap; gap: var(--space-3); }
.section-header h2 {
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-primary);
}
.section-header h2 .emoji-icon {
  /* Los emojis tienen su propio color — no aplicar clip de gradiente */
  -webkit-text-fill-color: initial;
  background: none;
  display: inline-block;
  font-style: normal;
}
.section-header h2 .title-text {
  background: linear-gradient(135deg, var(--text-primary) 50%, var(--brand-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  color: var(--text-tertiary);
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  transition: all var(--dur-fast) var(--ease-out);
  border: 1px solid var(--border-default);
}
.section-link:hover {
  color: var(--brand-light);
  background: var(--brand-soft);
  border-color: var(--border-strong);
  transform: translateX(3px);
}

/* ============== SIDEBAR WIDGETS ============== */
.home-sidebar { display: flex; flex-direction: column; gap: var(--space-6); }
.widget {
  background: var(--bg-card);
  /* backdrop-filter eliminado en widgets: sidebar siempre visible = siempre costoso */
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.widget:hover { border-color: rgba(255, 255, 255, 0.12); box-shadow: var(--shadow-md); }
.widget h3 { font-size: var(--fs-md); margin-bottom: var(--space-5); display: flex; align-items: center; gap: var(--space-2); }
.widget-list { display: flex; flex-direction: column; gap: var(--space-3); }

.widget-list-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: background var(--dur-fast) var(--ease-out);
}
.widget-list-item:hover { background: var(--bg-hover); }
.widget-list-item .thumb {
  width: 50px; height: 50px; border-radius: var(--radius-sm); object-fit: cover; background: var(--bg-overlay); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: var(--fs-lg); border: 1px solid var(--border-subtle);
}
.widget-list-item .title { font-size: var(--fs-sm); color: var(--text-primary); font-weight: 600; line-height: 1.35; margin-bottom: 3px; }
.widget-list-item .meta { font-size: var(--fs-xs); color: var(--text-tertiary); }

.widget-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--brand-light);
  font-weight: 800;
  font-size: var(--fs-xs);
  flex-shrink: 0;
}

.widget-podcast {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.widget-podcast:hover { background: var(--bg-hover); border-color: var(--border-default); }
.widget-podcast img { width: 64px; height: 64px; border-radius: var(--radius-md); object-fit: cover; }
.widget-podcast .podcast-title { font-weight: 700; font-size: var(--fs-sm); margin-bottom: 4px; line-height: 1.3; }
.widget-podcast .podcast-meta { font-size: var(--fs-xs); color: var(--text-tertiary); }

.widget-gold {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(167, 139, 250, 0.08));
  border-color: rgba(245, 158, 11, 0.25);
}
.widget-gold-icon { font-size: 36px; margin-bottom: var(--space-3); filter: drop-shadow(0 0 10px rgba(245,158,11,0.3)); }

/* ============== POLLS ============== */
.poll { padding: var(--space-6); background: var(--bg-overlay); border: 1px solid var(--border-default); border-radius: var(--radius-lg); margin-bottom: var(--space-4); }
.poll h4 { font-size: var(--fs-md); margin-bottom: var(--space-5); }
.poll-form { display: flex; flex-direction: column; gap: var(--space-2); }
.poll-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.poll-option:hover { background: var(--bg-hover); border-color: var(--border-default); }

/* ============== FILTERS ============== */
.filter-bar { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-6); }
.filter-pill {
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--dur-fast) var(--ease-out);
  cursor: pointer;
}
.filter-pill:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-default); }
.filter-pill.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-violet));
  color: white;
  border-color: var(--brand);
}

/* ============== ARTICLE DETAIL ============== */
.article-header { margin-bottom: var(--space-8); }
.article-meta { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; color: var(--text-tertiary); font-size: var(--fs-sm); }
.article-meta .author { display: flex; align-items: center; gap: var(--space-2); font-weight: 600; color: var(--text-secondary); }
.article-cover { margin: var(--space-8) 0; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-default); box-shadow: var(--shadow-lg); }
.article-cover img { width: 100%; height: auto; display: block; }
.article-body { max-width: 780px; margin: 0 auto; }

/* ============== REVIEW HERO & SCORES ============== */
.review-hero { display: grid; grid-template-columns: 300px 1fr; gap: var(--space-8); margin-bottom: var(--space-10); }
@media (max-width: 768px) { .review-hero { grid-template-columns: 1fr; } }
.game-cover { aspect-ratio: 3/4; border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-overlay); border: 1px solid var(--border-default); box-shadow: var(--shadow-md); }
.game-cover img { width: 100%; height: 100%; object-fit: cover; }

.score-display { display: flex; align-items: center; gap: var(--space-5); margin: var(--space-5) 0; }
.score-circle {
  display: flex; align-items: center; justify-content: center;
  width: 90px; height: 90px; border-radius: var(--radius-full);
  border: 4px solid;
  font-family: var(--font-display);
  font-size: var(--fs-3xl); font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.score-verdict { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 800; }

.review-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 56px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 800;
  color: white;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.review-score.score-9 { background: linear-gradient(135deg, #059669, #10b981); border-color: rgba(16, 185, 129, 0.3); }
.review-score.score-7 { background: linear-gradient(135deg, #2563eb, #3b82f6); border-color: rgba(59, 130, 246, 0.3); }
.review-score.score-5 { background: linear-gradient(135deg, #d97706, #f59e0b); border-color: rgba(245, 158, 11, 0.3); }
.review-score.score-low { background: linear-gradient(135deg, #dc2626, #ef4444); border-color: rgba(239, 68, 68, 0.3); }

.score-circle.score-9 { border-color: var(--success); color: var(--success); background: var(--success-soft); }
.score-circle.score-7 { border-color: var(--info); color: var(--info); background: var(--info-soft); }
.score-circle.score-5 { border-color: var(--warning); color: var(--warning); background: var(--warning-soft); }
.score-circle.score-low { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }

.review-pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); margin: var(--space-8) 0; }
@media (max-width: 768px) { .review-pros-cons { grid-template-columns: 1fr; } }
.review-pros, .review-cons { padding: var(--space-6); background: var(--bg-overlay); border: 1px solid var(--border-default); border-radius: var(--radius-lg); }
.review-pros h4 { color: var(--success); margin-bottom: var(--space-4); font-weight: 800; }
.review-cons h4 { color: var(--danger); margin-bottom: var(--space-4); font-weight: 800; }
.review-pros ul, .review-cons ul { display: flex; flex-direction: column; gap: var(--space-3); padding-left: 0; }
.review-pros li, .review-cons li { padding-left: var(--space-6); position: relative; color: var(--text-secondary); line-height: 1.5; }
.review-pros li::before { content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 800; }
.review-cons li::before { content: '✗'; position: absolute; left: 0; color: var(--danger); font-weight: 800; }

/* ============== FORUM ============== */
.forum-category { padding: var(--space-6); background: var(--bg-card); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); margin-bottom: var(--space-5); }
.forum-category h3 { margin-bottom: var(--space-4); }
.forum-subforum { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); transition: background var(--dur-fast) var(--ease-out); }
.forum-subforum:hover { background: var(--bg-hover); }
.forum-icon { width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--bg-overlay); display: flex; align-items: center; justify-content: center; font-size: var(--fs-lg); flex-shrink: 0; border: 1px solid var(--border-default); }

.topic-list { display: flex; flex-direction: column; gap: 1px; background: var(--border-default); border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border-default); }
.topic-item, .topic-row { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-6); background: var(--bg-overlay); transition: background var(--dur-fast) var(--ease-out); text-decoration: none; }
.topic-item:hover, .topic-row:hover { background: var(--bg-hover); }
.topic-body { flex: 1; min-width: 0; }
.topic-title { font-weight: 700; color: var(--text-primary); }
.topic-title a { color: var(--text-primary); }
.topic-title a:hover { color: var(--brand-hover); }
.topic-meta { display: flex; gap: var(--space-3); color: var(--text-tertiary); font-size: var(--fs-xs); margin-top: 5px; }
.topic-stats { text-align: right; color: var(--text-tertiary); font-size: var(--fs-xs); line-height: 1.4; flex-shrink: 0; min-width: 100px; }
.topic-stats strong { color: var(--brand-light); font-size: var(--fs-sm); }
.topic-pinned { background: rgba(168, 85, 247, 0.15); color: var(--brand-light); font-size: 10px; padding: 1px 6px; border-radius: var(--radius-sm); margin-right: var(--space-2); border: 1px solid rgba(168, 85, 247, 0.3); display: inline-block; vertical-align: middle; }

/* Videogame Detail Grid */
.game-detail-grid { display: grid; grid-template-columns: 200px 1fr; gap: var(--space-6); }
@media (max-width: 768px) {
  .game-detail-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .game-detail-grid > div:first-child {
    max-width: 200px;
    width: 100%;
  }
}

/* Games Catalog Grid */
.games-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 220px));
  gap: var(--space-5);
}
@media (max-width: 500px) {
  .games-catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: var(--space-3);
  }
}

/* ============== COMMUNITY ============== */
.community-post {
  background: var(--bg-card);
  /* backdrop-filter eliminado en community posts */
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.community-post:hover { border-color: rgba(255, 255, 255, 0.12); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.community-post-header { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.community-post-content { font-size: var(--fs-md); color: var(--text-secondary); line-height: var(--lh-relaxed); }
.community-post-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--border-subtle); }

.community-post-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--dur-fast) var(--ease-out);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
}
.community-post-action:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-default); }

/* ============== COMMENTS ============== */
.comments-section { margin-top: var(--space-12); padding-top: var(--space-8); border-top: 2px solid var(--border-default); }
.comments-section h3 { font-size: var(--fs-xl); margin-bottom: var(--space-8); }
.comments-count { color: var(--text-tertiary); font-weight: 500; font-size: var(--fs-md); }

.comment-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
  margin-bottom: var(--space-8);
  padding: var(--space-7);
  background: var(--bg-elevated);
  /* backdrop-filter eliminado en comment-form */
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.comment-list { display: flex; flex-direction: column; gap: var(--space-4); margin-top: var(--space-5); }
.comment {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--bg-elevated);
  /* backdrop-filter eliminado en comments */
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.comment:last-child { margin-bottom: 0; }
.comment:hover { background: var(--bg-overlay); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.comment-avatar { width: 44px; height: 44px; border-radius: var(--radius-full); flex-shrink: 0; object-fit: cover; }
.comment-body { flex: 1; min-width: 0; }
.comment-header { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); flex-wrap: wrap; }
.comment-username { font-weight: 700; color: var(--text-primary); }
.comment-username:hover { color: var(--brand-hover); }
.comment-time { font-size: var(--fs-xs); color: var(--text-tertiary); }
.comment-text { color: var(--text-secondary); line-height: var(--lh-base); word-wrap: break-word; }
.comment-actions { display: flex; gap: var(--space-2); margin-top: var(--space-4); }
.comment-action {
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
  transition: all var(--dur-fast) var(--ease-out);
  cursor: pointer;
}
.comment-action:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-default); }
.comment-action.active { color: var(--brand-light); background: var(--brand-soft); border-color: var(--brand); box-shadow: 0 0 10px var(--brand-glow-sm); }

/* ============== TABS ============== */
.tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--border-default); margin-bottom: var(--space-6); overflow-x: auto; }
.tab {
  padding: var(--space-4) var(--space-5);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-tertiary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--dur-fast) var(--ease-out);
  white-space: nowrap;
  cursor: pointer;
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--brand-hover); border-bottom-color: var(--brand); }

/* ============== DROPDOWNS & MODALS (Premium Glass) ============== */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  padding: var(--space-2);
  background: var(--bg-elevated);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top right;
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  z-index: 200;
}
.dropdown.open .dropdown-menu { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  transition: all var(--dur-fast) var(--ease-out);
  text-align: left;
}
.dropdown-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.dropdown-divider { height: 1px; background: var(--border-default); margin: var(--space-2) 0; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 2, 4, 0.85);
  backdrop-filter: var(--glass-blur);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out);
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  background: rgba(10, 11, 20, 0.9);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95) translateY(12px);
  transition: transform var(--dur-base) var(--ease-out);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-backdrop.open .modal { transform: scale(1) translateY(0); }
.modal-close {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  transition: all var(--dur-fast) var(--ease-out);
  cursor: pointer;
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ============== PROGRESS BAR ============== */
.progress {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-subtle);
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--pink));
  border-radius: var(--radius-full);
  transition: width var(--dur-base) var(--ease-out);
  position: relative;
}
.progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  background-size: 200% 100%;
  margin-bottom: var(--space-5);
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.community-post:hover { border-color: rgba(255, 255, 255, 0.12); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.community-post-header { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.community-post-content { font-size: var(--fs-md); color: var(--text-secondary); line-height: var(--lh-relaxed); }
.community-post-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--border-subtle); }

.community-post-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--dur-fast) var(--ease-out);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
}
.community-post-action:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-default); }

/* ============== COMMENTS ============== */
.comments-section { margin-top: var(--space-12); padding-top: var(--space-8); border-top: 2px solid var(--border-default); }
.comments-section h3 { font-size: var(--fs-xl); margin-bottom: var(--space-8); }
.comments-count { color: var(--text-tertiary); font-weight: 500; font-size: var(--fs-md); }

.comment-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
  margin-bottom: var(--space-8);
  padding: var(--space-7);
  background: var(--bg-elevated);
  /* backdrop-filter eliminado en comment-form */
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.comment-list { display: flex; flex-direction: column; gap: var(--space-4); }
.comment {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--bg-elevated);
  /* backdrop-filter eliminado en comments */
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.comment:hover { background: var(--bg-overlay); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.comment-avatar { width: 44px; height: 44px; border-radius: var(--radius-full); flex-shrink: 0; object-fit: cover; }
.comment-body { flex: 1; min-width: 0; }
.comment-header { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); flex-wrap: wrap; }
.comment-username { font-weight: 700; color: var(--text-primary); }
.comment-username:hover { color: var(--brand-hover); }
.comment-time { font-size: var(--fs-xs); color: var(--text-tertiary); }
.comment-text { color: var(--text-secondary); line-height: var(--lh-base); word-wrap: break-word; }
.comment-actions { display: flex; gap: var(--space-2); margin-top: var(--space-4); }
.comment-action {
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
  transition: all var(--dur-fast) var(--ease-out);
  cursor: pointer;
}
.comment-action:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-default); }
.comment-action.active { color: var(--brand-light); background: var(--brand-soft); border-color: var(--brand); box-shadow: 0 0 10px var(--brand-glow-sm); }

/* ============== TABS ============== */
.tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--border-default); margin-bottom: var(--space-6); overflow-x: auto; }
.tab {
  padding: var(--space-4) var(--space-5);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-tertiary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--dur-fast) var(--ease-out);
  white-space: nowrap;
  cursor: pointer;
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--brand-hover); border-bottom-color: var(--brand); }

/* ============== DROPDOWNS & MODALS (Premium Glass) ============== */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  padding: var(--space-2);
  background: var(--bg-elevated);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top right;
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  z-index: 200;
}
.dropdown.open .dropdown-menu { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  transition: all var(--dur-fast) var(--ease-out);
  text-align: left;
}
.dropdown-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.dropdown-divider { height: 1px; background: var(--border-default); margin: var(--space-2) 0; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 2, 4, 0.85);
  backdrop-filter: var(--glass-blur);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out);
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  background: rgba(10, 11, 20, 0.9);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95) translateY(12px);
  transition: transform var(--dur-base) var(--ease-out);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-backdrop.open .modal { transform: scale(1) translateY(0); }
.modal-close {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  transition: all var(--dur-fast) var(--ease-out);
  cursor: pointer;
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ============== PROGRESS BAR ============== */
.progress {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-subtle);
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--pink));
  border-radius: var(--radius-full);
  transition: width var(--dur-base) var(--ease-out);
  position: relative;
}
.progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

/* ============== PERSISTENT AUDIO PLAYER ============== */
.audio-player-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  right: auto;
  width: 840px;
  max-width: calc(100% - 32px);
  z-index: 90;
  height: var(--player-h);
  backdrop-filter: blur(16px);
  /* Barra clara/blanca premium para tema oscuro */
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  padding: 0 var(--space-3);
  gap: var(--space-3);
  transform: translate(-50%, calc(100% + 40px));
  visibility: hidden;
  pointer-events: none;
  transition: transform var(--dur-base) var(--ease-out), visibility var(--dur-base) var(--ease-out);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.audio-player-bar.visible { transform: translate(-50%, 0); visibility: visible; pointer-events: auto; }
/* Pestaña flotante para reabrir el reproductor */
.player-reopen-tab {
  position: fixed;
  bottom: 0;
  right: var(--space-7);
  z-index: 91;
  display: none; /* se muestra via JS */
  align-items: center;
  gap: var(--space-2);
  padding: 8px 18px 10px;
  background: rgba(6, 6, 12, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(167, 139, 250, 0.20);
  border-bottom: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  color: var(--text-secondary);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}
.player-reopen-tab:hover {
  background: rgba(14, 14, 30, 0.97);
  color: var(--brand-light);
  border-color: var(--brand);
  transform: translateY(-2px);
}
.player-cover {
  width: 60px; height: 60px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--bg-overlay);
  border: 1px solid var(--border-default);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.player-info { max-width: 150px; flex-shrink: 1; }
.player-info .player-title { font-size: var(--fs-sm); font-weight: 700; color: #1a0a3a; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-info .player-show { font-size: var(--fs-xs); color: #6d28d9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }

.player-controls { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
.player-btn {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: #3b1f6a;
  transition: all var(--dur-fast) var(--ease-out);
  background: transparent;
  cursor: pointer;
}
.player-btn:hover { color: #1a0a3a; background: rgba(109, 40, 217, 0.08); }
.player-btn.primary {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, #6d28d9, #7c3aed);
  color: white;
  box-shadow: 0 6px 20px rgba(109, 40, 217, 0.25);
}
.player-btn.primary:hover { transform: scale(1.05); box-shadow: 0 8px 24px rgba(109, 40, 217, 0.4); }
.player-btn.primary:active { transform: scale(0.94); }

.player-progress-area { flex: 1; min-width: 100px; display: flex; flex-direction: column; gap: var(--space-1); }
.player-progress-row { display: flex; align-items: center; gap: var(--space-3); }
.player-time { font-size: var(--fs-xs); color: #3b1f6a; font-variant-numeric: tabular-nums; min-width: 45px; font-weight: 500; }
.player-progress {
  flex: 1;
  height: 5px;
  background: rgba(109, 40, 217, 0.15);
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
  overflow: visible;
  transition: height var(--dur-fast) var(--ease-out);
}
.player-progress:hover { height: 7px; }
.player-progress-buffer { position: absolute; top: 0; left: 0; height: 100%; background: rgba(255, 255, 255, 0.08); border-radius: var(--radius-full); width: 0%; }
.player-progress-fill {
  position: relative;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-violet));
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 0.1s linear;
}
.player-progress-thumb {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: white;
  border-radius: var(--radius-full);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.player-progress:hover .player-progress-thumb { opacity: 1; }

.player-volume-area { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 1; width: 80px; }
.player-volume {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
}
.player-volume-fill {
  height: 100%;
  background: #3b1f6a;
  border-radius: var(--radius-full);
  width: 80%;
  transition: background var(--dur-fast) var(--ease-out);
}
.player-volume:hover .player-volume-fill { background: #6d28d9; }

#player-close { flex-shrink: 0; width: 36px; height: 36px; }
#player-close svg { width: 14px; height: 14px; }

@media (max-width: 820px) {
  .audio-player-bar { padding: 0 var(--space-4); gap: var(--space-3); }
  .player-volume-area { display: none; }
  .player-info { max-width: 140px; }
  .player-cover { width: 50px; height: 50px; }
}
@media (max-width: 480px) {
  .player-info { display: none; }
  .player-progress-area { padding-right: var(--space-3); }
}

/* ============== PODCAST CARDS ============== */
.podcast-card {
  display: flex;
  gap: var(--space-4);
  background: var(--bg-card);
  /* backdrop-filter eliminado en podcast-cards */
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
  /* will-change eliminado en podcast-cards (puede haber muchas en pantalla) */
}
.podcast-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), 0 0 24px var(--brand-glow-sm);
}
.podcast-card .cover {
  width: 96px; height: 96px;
  border-radius: var(--radius-md);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  background-color: var(--bg-overlay);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-default);
}
.podcast-card .cover .play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 2, 4, 0.65);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}
.podcast-card .cover:hover .play-overlay { opacity: 1; }
.podcast-card .cover .play-overlay .play-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--brand), var(--brand-violet));
  border: none;
  color: white;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--dur-base) var(--ease-spring), box-shadow var(--dur-base) var(--ease-out);
  padding: 0 0 0 2px;
  box-shadow: 0 4px 12px var(--brand-glow-sm);
}
.podcast-card .cover:hover .play-overlay .play-btn { transform: scale(1.08); }
.podcast-card .cover:hover .play-overlay .play-btn:active { transform: scale(0.93); }
.podcast-card .cover img.cover-img { width: 100%; height: 100%; object-fit: cover; }
.podcast-card .info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.podcast-card .info h3 { font-size: var(--fs-base); margin-bottom: 2px; line-height: 1.35; }
.podcast-card .duration { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-xs); color: var(--text-tertiary); margin-top: var(--space-2); font-weight: 500; }

@media (max-width: 480px) {
  .podcast-card { flex-direction: column; }
  .podcast-card .cover { width: 100%; height: 160px; }
}

/* ============== PROFILE PAGE ============== */
.profile-header {
  padding: var(--space-10) 0 var(--space-8);
  background: linear-gradient(180deg, var(--brand-soft), transparent);
  border-bottom: 1px solid var(--border-default);
}
.profile-header-inner { display: flex; gap: var(--space-6); align-items: center; }
@media (max-width: 600px) { .profile-header-inner { flex-direction: column; text-align: center; } }

.profile-avatar {
  width: 120px; height: 120px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--brand), var(--pink));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-5xl);
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 8px 30px var(--brand-glow);
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.1);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-info h1 { font-size: var(--fs-3xl); margin-bottom: 4px; letter-spacing: var(--tracking-tight); }
.username-handle { color: var(--brand-hover); font-size: var(--fs-md); font-weight: 600; font-family: var(--font-mono); }
.profile-badges { display: flex; gap: var(--space-2); flex-wrap: wrap; margin: var(--space-3) 0; }
.profile-bio { color: var(--text-secondary); margin: var(--space-3) 0; font-size: var(--fs-md); max-width: 600px; }
.profile-stats { display: flex; gap: var(--space-6); margin-top: var(--space-5); flex-wrap: wrap; }
.profile-stat strong { display: block; font-family: var(--font-display); font-size: var(--fs-2xl); color: var(--text-primary); font-weight: 800; }
.profile-stat span { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: var(--tracking-wider); font-weight: 600; }

/* ============== AUTHENTICATION ============== */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--space-6); position: relative; z-index: 2; }
.auth-card {
  width: 100%;
  max-width: 440px;
  padding: var(--space-9) var(--space-8);
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl), 0 0 50px var(--brand-glow-sm);
  text-align: center;
}
.auth-logo { display: flex; align-items: center; justify-content: center; gap: var(--space-3); margin-bottom: var(--space-6); }
.auth-logo img { height: 44px; width: auto; filter: drop-shadow(0 0 8px var(--brand-glow)); }
.auth-logo span { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 800; }
.auth-card h1 { font-size: var(--fs-2xl); margin-bottom: var(--space-2); }
.auth-subtitle { color: var(--text-tertiary); margin-bottom: var(--space-7); }
.auth-card form { text-align: left; }

/* ============== ERROR PAGES ============== */
.error-page { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--space-6); text-align: center; }
.error-code {
  font-family: var(--font-display);
  font-size: clamp(100px, 22vw, 220px);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--brand), var(--pink), var(--brand-violet));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-4);
  filter: drop-shadow(0 4px 20px var(--brand-glow));
}
.error-page h1 { font-size: var(--fs-2xl); margin-bottom: var(--space-3); }
.error-page p { color: var(--text-tertiary); margin-bottom: var(--space-6); }

/* ============== STATISTICS CARDS ============== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); margin-bottom: var(--space-8); }
.stat-card {
  position: relative;
  padding: var(--space-6);
  background: var(--bg-card);
  /* backdrop-filter eliminado en stat-cards */
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--dur-base) var(--ease-out);
}
.stat-card::before {
  content: ''; position: absolute; top: 0; right: 0; width: 140px; height: 140px;
  background: radial-gradient(circle, var(--brand-soft), transparent 70%);
  opacity: 0; transition: opacity var(--dur-base) var(--ease-out); pointer-events: none;
}
.stat-card:hover { border-color: rgba(255, 255, 255, 0.12); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card:hover::before { opacity: 1; }
.stat-label { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: var(--tracking-wider); font-weight: 800; margin-bottom: var(--space-2); }
.stat-value { font-family: var(--font-display); font-size: var(--fs-3xl); font-weight: 800; color: var(--text-primary); line-height: 1; margin-bottom: var(--space-2); }
.stat-trend { font-size: var(--fs-xs); color: var(--success); display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.stat-trend.down { color: var(--danger); }
.stat-card .icon {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md); background: var(--brand-soft); color: var(--brand-light);
  margin-bottom: var(--space-4); border: 1px solid var(--border-default);
}

/* ============== GOLD / PREMIUM PAGE ============== */
.gold-page { text-align: center; }

/* ============== PLATFORMS, GALLERY & MEDIA ============== */
.purchase-links { display: flex; flex-direction: column; gap: var(--space-3); }
.purchase-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 14px var(--space-4);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: all var(--dur-fast) var(--ease-out);
}
.purchase-link:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.video-embed {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-overlay);
  margin: var(--space-6) 0;
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-md);
}
.video-embed iframe, .video-embed video { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-4); margin: var(--space-6) 0; }
.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16/9;
  cursor: pointer;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
  border: 1px solid var(--border-default);
}
.gallery-item:hover { transform: scale(1.04); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

.platform-badges { display: flex; gap: var(--space-2); flex-wrap: wrap; margin: var(--space-3) 0; }
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: rgba(167, 139, 250, 0.04);
  border: 1px solid rgba(167, 139, 250, 0.15);
  border-radius: var(--radius-xs);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--brand-light);
}

/* ============== PROSE CONTENT STYLE ============== */
.prose {
  max-width: 780px;
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--text-secondary);
  /* Cuadro de texto del artículo */
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  margin: var(--space-6) 0 var(--space-10);
  box-shadow: var(--shadow-md);
}
.prose p, .article-body p { margin-bottom: var(--space-5); line-height: 1.8; color: var(--text-secondary); }
.prose strong, .article-body strong, .prose b, .article-body b { font-weight: 700; color: var(--text-primary); }
.prose em, .article-body em, .prose i, .article-body i { font-style: italic; }
.prose u, .article-body u { text-decoration: underline; text-underline-offset: 3px; }
.prose s, .article-body s, .prose strike, .article-body strike { text-decoration: line-through; opacity: 0.85; }
.prose h1, .article-body h1 { font-family: var(--font-display); font-size: var(--fs-3xl); font-weight: 800; color: var(--text-primary); margin-top: var(--space-8); margin-bottom: var(--space-4); border-bottom: 1px solid var(--border-subtle); padding-bottom: 8px; }
.prose h2, .article-body h2 { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 700; color: var(--text-primary); margin-top: var(--space-8); margin-bottom: var(--space-4); }
.prose h3, .article-body h3 { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 700; color: var(--text-primary); margin-top: var(--space-6); margin-bottom: var(--space-3); }
.prose h4, .article-body h4 { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; color: var(--text-primary); margin-top: var(--space-5); margin-bottom: var(--space-3); }
.prose h5, .article-body h5, .prose h6, .article-body h6 { font-size: var(--fs-md); font-weight: 600; color: var(--text-primary); margin-top: var(--space-4); margin-bottom: var(--space-2); }
.prose a, .article-body a {
  color: var(--brand-light);
  border-bottom: 1.5px solid var(--brand-glow);
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.prose a:hover, .article-body a:hover { color: var(--brand-hover); border-bottom-color: var(--brand); }
.prose ul, .article-body ul, .prose ol, .article-body ol { margin: var(--space-5) 0; padding-left: var(--space-6); }
.prose li, .article-body li { margin-bottom: var(--space-2); line-height: 1.7; }
.prose img, .article-body img { border-radius: var(--radius-md); margin: var(--space-6) 0; border: 1px solid var(--border-default); max-width: 100%; height: auto; display: block; }
.prose iframe, .article-body iframe { width: 100%; max-width: 100%; border-radius: var(--radius-md); margin: var(--space-6) 0; border: 1px solid var(--border-default); aspect-ratio: 16/9; }
.prose blockquote, .article-body blockquote {
  border-left: 4px solid var(--brand);
  padding: var(--space-3) var(--space-5);
  color: var(--text-tertiary);
  font-style: italic;
  margin: var(--space-6) 0;
  background: rgba(139, 92, 246, 0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.prose table, .article-body table { width: 100%; border-collapse: collapse; margin: var(--space-6) 0; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border-default); }
.prose th, .article-body th, .prose td, .article-body td { padding: 10px 14px; border: 1px solid var(--border-subtle); font-size: var(--fs-sm); }
.prose th, .article-body th { background: rgba(255, 255, 255, 0.05); font-weight: 600; color: var(--text-primary); text-align: left; }
.prose code, .article-body code { background: rgba(255, 255, 255, 0.08); color: #f472b6; padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 0.9em; }
.prose pre, .article-body pre { background: #06060a; border: 1px solid var(--border-default); padding: 16px; border-radius: var(--radius-md); overflow-x: auto; margin: var(--space-6) 0; color: #38bdf8; font-family: monospace; }
.prose sub, .article-body sub, .prose sup, .article-body sup { font-size: 0.75em; }
.prose sub, .article-body sub { vertical-align: sub; }
.prose sup, .article-body sup { vertical-align: super; }
.prose mark, .article-body mark { background: rgba(245,158,11,0.25); color: #fde68a; padding: 1px 5px; border-radius: 3px; }
.prose details, .article-body details { background: rgba(255,255,255,0.04); border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: 14px 18px; margin: var(--space-5) 0; cursor: pointer; }
.prose details summary, .article-body details summary { font-weight: 600; color: var(--brand-light); padding: 4px 0; cursor: pointer; outline: none; user-select: none; }
.prose details[open] summary, .article-body details[open] summary { margin-bottom: 10px; }
.prose details .spoiler-box, .article-body details .spoiler-box { margin: 0; border: none; padding: 0; background: none; }
.prose figure, .article-body figure { margin: var(--space-6) 0; }
.prose figure figcaption, .article-body figure figcaption { font-size: var(--fs-sm); color: var(--text-tertiary); margin-top: var(--space-2); text-align: center; font-style: italic; }
.prose video, .article-body video, .prose audio, .article-body audio { max-width: 100%; border-radius: var(--radius-md); margin: var(--space-5) 0; }
.prose ul.todo-list, .article-body ul.todo-list { list-style: none; padding-left: 0; }
.prose ul.todo-list li, .article-body ul.todo-list li { display: flex; align-items: flex-start; gap: var(--space-2); margin-bottom: var(--space-2); }
.prose ul.todo-list input[type="checkbox"], .article-body ul.todo-list input[type="checkbox"] { margin-top: 4px; pointer-events: none; }
.prose figure.media, .article-body figure.media { margin: var(--space-6) 0; }
.prose figure.media iframe, .article-body figure.media iframe { width: 100%; border-radius: var(--radius-md); aspect-ratio: 16/9; }
.prose .raw-html-embed, .article-body .raw-html-embed { margin: var(--space-6) 0; }
.prose hr.editor-separator, .article-body hr.editor-separator { border: none; height: 1px; background: linear-gradient(90deg, transparent, var(--border-default), transparent); margin: var(--space-8) 0; }
.callout-box { padding: 14px 18px; border-radius: var(--radius-md); margin: var(--space-6) 0; font-size: var(--fs-sm); }
.callout-info { background: rgba(59, 130, 246, 0.12); border-left: 4px solid #3b82f6; color: #93c5fd; }
.callout-warning { background: rgba(245, 158, 11, 0.12); border-left: 4px solid #f59e0b; color: #fde68a; }
.callout-success { background: rgba(16, 185, 129, 0.12); border-left: 4px solid #10b981; color: #a7f3d0; }
.callout-danger { background: rgba(244, 63, 94, 0.12); border-left: 4px solid #f43f5e; color: #fda4af; }
.spoiler-box { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: 12px 16px; margin: var(--space-6) 0; }
.btn-action { display: inline-block; background: var(--brand); color: #fff !important; padding: 10px 22px; border-radius: var(--radius-md); text-decoration: none !important; font-weight: 600; border: none !important; transition: background var(--dur-fast) var(--ease-out); }
.btn-action:hover { background: var(--brand-hover); }
.img-left { float: left; margin-right: var(--space-5); margin-bottom: var(--space-3); max-width: 50%; }
.img-right { float: right; margin-left: var(--space-5); margin-bottom: var(--space-3); max-width: 50%; }
.img-center { display: block; margin-left: auto !important; margin-right: auto !important; }
.img-full { width: 100%; }
.prose .img-left, .article-body .img-left,
.prose .img-right, .article-body .img-right { margin-top: var(--space-2); }
.prose .code-block-wrapper, .article-body .code-block-wrapper { margin: var(--space-6) 0; border-radius: var(--radius-md); overflow: hidden; }
.prose .code-block-header, .article-body .code-block-header {
    background: rgba(255,255,255,0.06);
    padding: 8px 16px;
    font-size: var(--fs-xs);
    color: var(--text-tertiary);
    font-family: monospace;
    border-bottom: 1px solid var(--border-subtle);
    display: flex; align-items: center; justify-content: space-between;
}

/* Keep the footer attached to the viewport on short pages */
.site-main {
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
}
/* ============== FOOTER ============== */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-default);
  padding: var(--space-10) 0 var(--space-7);
  margin-top: auto;
  position: relative;
  z-index: 2;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}
@media (max-width: 840px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { display: flex; flex-direction: column; gap: var(--space-4); }
.footer-brand img { height: 44px; width: auto; align-self: flex-start; filter: drop-shadow(0 0 8px var(--brand-glow)); }
.footer-brand p { font-size: var(--fs-sm); color: var(--text-tertiary); max-width: 300px; line-height: 1.5; }

.footer-col h4 {
  font-size: var(--fs-sm);
  font-weight: 800;
  color: var(--text-secondary);
  margin-bottom: var(--space-5);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}
.footer-col ul { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text-tertiary);
}
.footer-col a:hover { color: var(--brand-hover); }

.footer-social { display: flex; gap: var(--space-3); margin-top: var(--space-3); }
.footer-social a {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all var(--dur-fast) var(--ease-out);
}
.footer-social a:hover {
  background: rgba(167, 139, 250, 0.12);
  color: var(--brand-light);
  border-color: rgba(167, 139, 250, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px var(--brand-glow-sm);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-weight: 500;
}
@media (max-width: 600px) { .footer-bottom { flex-direction: column; gap: var(--space-3); align-items: flex-start; } }

/* ============== EFFECTS & ANIMATIONS ============== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes borderGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.fade-in { animation: fadeIn var(--dur-slow) var(--ease-out) both; }
.fade-in-1 { animation: fadeIn var(--dur-slow) var(--ease-out) both; animation-delay: 80ms; }
.fade-in-2 { animation: fadeIn var(--dur-slow) var(--ease-out) both; animation-delay: 160ms; }
.fade-in-3 { animation: fadeIn var(--dur-slow) var(--ease-out) both; animation-delay: 240ms; }
.fade-in-4 { animation: fadeIn var(--dur-slow) var(--ease-out) both; animation-delay: 320ms; }

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: var(--brand);
  border-radius: var(--radius-full);
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.card-glow { position: relative; }
.card-glow::after {
  content: ''; position: absolute; inset: -1px; border-radius: inherit;
  background: linear-gradient(60deg, var(--brand), var(--brand-violet), var(--pink), var(--brand));
  background-size: 300% 300%;
  animation: none;
  z-index: -1; opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}
.card-glow:hover::after { opacity: 1; }

/* ctaPulse: solo opacity y transform (compositorizable, sin repaint) */
@keyframes ctaPulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}
.btn-glow { animation: ctaPulse 3s ease-in-out infinite; }

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.float-anim { animation: floatY 4s ease-in-out infinite; }

@keyframes shimmerText {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.shimmer-text {
  background: linear-gradient(90deg, var(--text-primary) 0%, var(--text-tertiary) 25%, var(--brand-light) 50%, var(--text-tertiary) 75%, var(--text-primary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmerText 4.5s linear infinite;
}

@keyframes textGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.text-gradient-animated {
  background: linear-gradient(135deg, var(--brand-light), var(--pink), var(--brand), var(--brand-light));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: none;
}

.card-entrance {
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  animation: cardEntrance var(--dur-slower) var(--ease-out) forwards;
}
@keyframes cardEntrance {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.card-entrance-1 { animation-delay: 50ms; }
.card-entrance-2 { animation-delay: 100ms; }
.card-entrance-3 { animation-delay: 150ms; }
.card-entrance-4 { animation-delay: 200ms; }
.card-entrance-5 { animation-delay: 250ms; }
.card-entrance-6 { animation-delay: 300ms; }
.card-entrance-7 { animation-delay: 350ms; }
.card-entrance-8 { animation-delay: 400ms; }

.card-vibrant { position: relative; overflow: hidden; }
.card-vibrant::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--brand-soft), rgba(236, 72, 153, 0.03));
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
  pointer-events: none; border-radius: inherit;
}
.card-vibrant:hover::after { opacity: 1; }

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-glow-sm), var(--brand-glow), var(--brand-glow-sm), transparent);
  background-size: 200% 100%;
  animation: dividerGlow 4s ease-in-out infinite;
  margin: var(--space-10) 0;
}
@keyframes dividerGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.live-dot { width: 8px; height: 8px; display: inline-block; background: var(--success); border-radius: 50%; position: relative; }
.live-dot::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%; background: var(--success); opacity: 0.4;
  animation: pulsePulse 2s ease-in-out infinite;
}
@keyframes pulsePulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(2.2); opacity: 0; }
}

/* ============== SMOOTH IMAGE RENDERING ============== */
img { background: rgba(255,255,255,0.02); }

/* ============== UTILITIES ============== */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ============== RESPONSIVE FIXES ============== */
@media (max-width: 768px) {
  .home-layout { padding: var(--space-5) 0; gap: var(--space-5); }
  .hero-card-overlay { padding: var(--space-6) var(--space-5); }
  .section { padding: var(--space-8) 0; }
  .auth-card { padding: var(--space-7) var(--space-6); }
}

/* ============== PRINT MODES ============== */
@media print {
  .site-header, .site-footer, .mobile-menu, .dropdown-menu, .audio-player-bar { display: none !important; }
  body { background: white; color: black; padding-bottom: 0; }
}

/* ============== ACCESSIBILITY (REDUCED MOTION) ============== */
@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;
  }
}

/* ============== MICROINTERACTIONS ============== */
.btn, .player-btn, .pagination a, .chip, .filter-pill {
  position: relative !important;
  overflow: hidden !important;
}
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.20);
  transform: scale(0);
  animation: btnRipple 0.55s cubic-bezier(0.1, 0.8, 0.3, 1);
  pointer-events: none;
}
@keyframes btnRipple {
  to { transform: scale(4); opacity: 0; }
}

/* El glow de cursor solo en elementos donde es intencionalmente premium (no en todos los .card) */
.card-premium, .plan-card {
  --mouse-x: 0px;
  --mouse-y: 0px;
}
.card-premium::after, .plan-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(350px circle at var(--mouse-x) var(--mouse-y), rgba(167, 139, 250, 0.10), transparent 50%);
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
}
.card-premium:hover::after, .plan-card:hover::after {
  opacity: 1;
}


/* ============== READING PROGRESS BAR ============== */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-hover), var(--gold));
  z-index: 9999;
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.5);
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  pointer-events: none;
}

/* ============== GOLD BADGE SHIMMER ============== */
@keyframes goldShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.badge-gold::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.30) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: goldShimmer 2.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

/* ============== GOLD PAGE FEATURE CARDS ============== */
.feature-card {
  background: var(--bg-card);
  /* backdrop-filter eliminado en feature-cards */
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-7);
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
  position: relative;
  overflow: hidden;
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(167, 139, 250, 0.30);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(167, 139, 250, 0.15);
}
.feature-card .feature-icon {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.15), rgba(124, 58, 237, 0.10));
  border: 1px solid rgba(167, 139, 250, 0.20);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: var(--space-4);
  transition: transform var(--dur-base) var(--ease-spring), box-shadow var(--dur-base) var(--ease-out);
}
.feature-card:hover .feature-icon {
  transform: scale(1.15) rotate(-6deg);
  box-shadow: 0 0 24px rgba(167, 139, 250, 0.35);
}
.feature-card h3 {
  font-size: var(--fs-md);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

/* Gold Plan Cards */
.plan-card {
  background: var(--bg-card);
  /* backdrop-filter eliminado en plan-cards */
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.plan-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.plan-card.featured {
  border-color: rgba(245, 158, 11, 0.40);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.07), rgba(10, 11, 20, 0.7) 60%);
  box-shadow: 0 0 50px rgba(245, 158, 11, 0.14);
}
.plan-card.featured:hover {
  box-shadow: 0 16px 60px rgba(245, 158, 11, 0.25);
  border-color: rgba(245, 158, 11, 0.60);
}
.price-display {
  font-size: var(--fs-4xl);
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--text-primary);
  margin-bottom: var(--space-5);
  letter-spacing: -0.02em;
}
.ribbon {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--text-inverse);
  font-size: var(--fs-xs);
  font-weight: 800;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.40);
}
.premium-badge {
  display: inline-block;
  padding: 6px 18px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.15), rgba(245, 158, 11, 0.08));
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--brand-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

/* ============== ENHANCED GRADIENT TEXT ============== */
.text-gradient {
  background: linear-gradient(135deg, #a78bfa, #c084fc, #818cf8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}
.text-gradient-gold {
  background: linear-gradient(135deg, var(--gold-light), #fbbf24, #fcd34d);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

/* ============== SECTION SCROLL REVEAL ============== */
.reveal-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============== LIGHT THEME OVERRIDES ============== */
html {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
html[data-theme="light"] {
  /* Fondo general ligeramente más claro para mejor contraste con tarjetas */
  --bg-base:        #c5e0eb;
  --bg-elevated:    #ffffff;
  --bg-overlay:     #f5f6fc;
  --bg-card:        #ffffff;
  --bg-hover:       rgba(100, 60, 200, 0.04);
  --bg-active:      rgba(100, 60, 200, 0.08);
  --bg-input:       #f0f0f8;
  /* Textos con mayor contraste — morado oscuro en lugar de negro puro */
  --text-primary:   #1a0a3a;
  --text-secondary: #3b1f6a;
  --text-tertiary:  #6b4fa0;
  --text-muted:     #9b82c8;
  /* Bordes más visibles */
  --border-subtle:  rgba(41, 91, 117, 0.24);
  --border-default: rgba(41, 91, 117, 0.32);
  --border-strong:  rgba(100, 60, 200, 0.28);
  --border-focus:   #7c3aed;
  /* Marca y brand en modo claro */
  --brand:          #6d28d9;
  --brand-hover:    #5b21b6;
  --brand-light:    #4c1d95;
  --brand-soft:     rgba(109, 40, 217, 0.10);
  --brand-glow:     rgba(109, 40, 217, 0.20);
  --brand-glow-sm:  rgba(109, 40, 217, 0.10);
  /* Glassmorphism claro */
  --glass-bg:       rgba(255, 255, 255, 0.90);
  --glass-border:   rgba(41, 91, 117, 0.24);
  --glass-blur:     blur(16px);
  --header-bg:      #e7f2f6;
}
html[data-theme="light"] .site-header {
  background: var(--header-bg);
  backdrop-filter: none;
}
html[data-theme="light"] .site-header.scrolled {
  background: var(--header-bg);
  border-bottom-color: var(--glass-border);
  box-shadow: none;
}
  font-smoothing: auto;
}
/* Tarjetas de noticias / podcast en modo claro — mejor contraste */
html[data-theme="light"] .news-card,
html[data-theme="light"] .podcast-card,
html[data-theme="light"] .game-card,
html[data-theme="light"] .review-card {
  box-shadow: 0 2px 16px rgba(100, 60, 200, 0.08), 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid rgba(100, 60, 200, 0.12);
}
/* Etiquetas de categoría en modo claro */
html[data-theme="light"] .badge,
html[data-theme="light"] .filter-pill,
html[data-theme="light"] .news-category-badge {
  background: rgba(109, 40, 217, 0.10);
  color: #4c1d95;
  border-color: rgba(109, 40, 217, 0.20);
}
/* Cuadro de texto del artículo en modo claro — más oscuro que el fondo */
html[data-theme="light"] .prose {
  background: #ffffff;
  border-color: rgba(100, 60, 200, 0.18);
  box-shadow: 0 4px 24px rgba(100, 60, 200, 0.08), 0 1px 4px rgba(0,0,0,0.05);
}
/* Cajas de comentarios en modo claro */
html[data-theme="light"] .comment-form,
html[data-theme="light"] .comment {
  background: #ffffff;
  border-color: rgba(100, 60, 200, 0.18);
  box-shadow: 0 2px 12px rgba(100, 60, 200, 0.07), 0 1px 3px rgba(0,0,0,0.04);
}
html[data-theme="light"] .comment:hover {
  background: #f5f3ff;
  border-color: rgba(109, 40, 217, 0.30);
}
html[data-theme="light"] .comments-section {
  border-top-color: rgba(100, 60, 200, 0.20);
}

/* ============== THEME TOGGLE SWITCH ============== */
.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all var(--dur-fast) var(--ease-out);
  cursor: pointer;
  margin-left: var(--space-2);
}
.theme-toggle-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
  transform: scale(1.05);
}
.theme-toggle-btn .sun-icon { display: block; }
.theme-toggle-btn .moon-icon { display: none; }
html[data-theme="light"] .theme-toggle-btn .sun-icon { display: none; }
html[data-theme="light"] .theme-toggle-btn .moon-icon { display: block; }

/* Mobile Optimization Upgrades */
@media (max-width: 768px) {
  input, select, textarea, .form-control, .input {
    font-size: 16px !important; /* Prevents auto-zoom on mobile browsers */
  }
  .table-wrap, .table-scroll {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}
@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-4) !important; /* Maximizes usable screen width */
  }
}

/* ============== SURFACES: BORDER-ONLY EMPHASIS ============== */
:is(.card, .card-elevated, .card-premium, .widget, .forum-category,
    .community-post, .comment-form, .comment, .podcast-card, .stat-card,
    .feature-card, .plan-card, .prose, .auth-card, .gallery-item,
    .news-card, .game-card, .review-card) {
  box-shadow: none;
}
:is(.card-hover, .card-premium, .widget, .community-post, .comment,
    .podcast-card, .stat-card, .feature-card, .plan-card, .gallery-item):hover {
  box-shadow: none;
  border-color: var(--brand);
}
.form-control:focus,
.comment-action.active {
  box-shadow: none;
  border-color: var(--brand);
}
html[data-theme="light"] :is(.card, .card-elevated, .card-premium, .widget,
    .forum-category, .community-post, .comment-form, .comment, .podcast-card,
    .stat-card, .feature-card, .plan-card, .prose, .auth-card, .gallery-item,
    .news-card, .game-card, .review-card) {
  box-shadow: none;
}
/* Auth card contrast in light mode */
html[data-theme="light"] .auth-card,
html[data-theme="light"] .auth-card h1,
html[data-theme="light"] .auth-card .auth-logo span,
html[data-theme="light"] .auth-card .form-label,
html[data-theme="light"] .auth-card .alert {
  color: #111111;
}
html[data-theme="light"] .auth-card .auth-subtitle {
  color: #374151;
}
/* Review community ratings */
.review-ratings {
  padding: var(--space-6);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
}
.review-ratings > h2 {
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
}
.rating-status {
  min-height: 56px;
  margin-bottom: var(--space-5);
  padding: var(--space-4) var(--space-5);
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(96, 165, 250, 0.65);
  color: var(--text-primary);
  box-shadow: none;
}
.rating-status strong { color: #bfdbfe; }
.rating-status a { color: var(--brand-light); font-weight: 700; }
.rating-status a:hover { color: var(--text-primary); }
.review-rating-form {
  background: var(--bg-overlay);
  border-color: var(--border-strong);
}
.review-rating-form .form-group { margin-bottom: var(--space-5); }
.review-rating-form label { display: block; margin-bottom: var(--space-2); color: var(--text-primary); font-weight: 700; }
/* Layout and forum refinements */

.forum-subforum + .forum-subforum {
  border-top: 1px solid var(--border-subtle);
}
html[data-theme="light"] .filter-pill:hover {
  background: #d9eff8;
  border-color: #4f8da8;
  color: #102a38;
}
/* Consistent, complete borders for information surfaces */
:is(.card, .podcast-card, .widget, .forum-category, .community-post,
    .comment, .comment-form, .stat-card, .feature-card, .plan-card,
    .review-ratings, .prose) {
  border-color: var(--border-default);
}
/* Review editorial content */
.review-analysis {
  max-width: 900px;
  margin: 0 auto var(--space-10);
  padding: clamp(var(--space-6), 5vw, var(--space-9));
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
}
.review-analysis > h2 {
  margin: 0 0 var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: clamp(1.6rem, 3vw, var(--fs-3xl));
}
.review-analysis > h2:not(:first-child) { margin-top: var(--space-9); }
.review-analysis > p {
  max-width: 70ch;
  color: var(--text-secondary);
  font-size: var(--fs-md);
}
.review-analysis .review-pros-cons {
  gap: var(--space-4);
  margin: var(--space-7) 0;
}
.review-analysis :is(.pros-box, .cons-box) {
  min-height: 100%;
  padding: var(--space-6);
  background: var(--bg-overlay);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
}
.review-analysis .pros-box { border-left: 3px solid var(--success); }
.review-analysis .cons-box { border-left: 3px solid var(--danger); }
.review-analysis :is(.pros-box, .cons-box) h4 {
  margin-bottom: var(--space-4);
  font-size: var(--fs-lg);
}
.review-analysis .pros-box h4 { color: var(--success); }
.review-analysis .cons-box h4 { color: var(--danger); }
.review-analysis :is(.pros-box, .cons-box) ul { display: grid; gap: var(--space-3); }
.review-analysis :is(.pros-box, .cons-box) li {
  position: relative;
  padding-left: var(--space-5);
  color: var(--text-secondary);
  line-height: var(--lh-base);
}
.review-analysis .pros-box li::before,
.review-analysis .cons-box li::before {
  position: absolute;
  left: 0;
  font-weight: 800;
}
.review-analysis .pros-box li::before { content: '✓'; color: var(--success); }
.review-analysis .cons-box li::before { content: '×'; color: var(--danger); }
.review-analysis .tts-button { margin-top: var(--space-5); }
@media (max-width: 600px) {
  .review-analysis { padding: var(--space-5); border-radius: var(--radius-lg); }
  .review-analysis .review-pros-cons { grid-template-columns: 1fr; }
}
/* Keep the off-canvas menu from painting outside the viewport */
.mobile-menu:not(.open) {
  visibility: hidden;
  pointer-events: none;
}
.mobile-menu.open {
  visibility: visible;
  pointer-events: auto;
}

/* Reproductor de podcast en modo claro (barra oscura de alto contraste, letras blancas) */
html[data-theme="light"] .audio-player-bar {
  background: #2a2a35 !important;
  backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3) !important;
}
html[data-theme="light"] .player-cover { border-color: rgba(255, 255, 255, 0.15) !important; }
html[data-theme="light"] .player-title { color: #ffffff !important; }
html[data-theme="light"] .player-show { color: #a78bfa !important; }
html[data-theme="light"] .player-time { color: rgba(255, 255, 255, 0.7) !important; }
html[data-theme="light"] .player-btn {
  color: rgba(255, 255, 255, 0.8) !important;
  background: transparent !important;
  border-color: transparent !important;
}
html[data-theme="light"] .player-btn:hover { color: #ffffff !important; background: rgba(255, 255, 255, 0.06) !important; }
html[data-theme="light"] .player-btn.primary {
  background: white !important;
  color: #6d28d9 !important;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25) !important;
}
html[data-theme="light"] .player-progress {
  background: rgba(255, 255, 255, 0.08) !important;
}
html[data-theme="light"] .player-volume-fill {
  background: rgba(255, 255, 255, 0.75) !important;
}
html[data-theme="light"] .player-volume:hover .player-volume-fill {
  background: #ffffff !important;
}
html[data-theme="light"] .player-reopen-tab {
  background: rgba(6, 6, 12, 0.95) !important;
  color: rgba(255, 255, 255, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}
html[data-theme="light"] .player-reopen-tab:hover {
  background: rgba(14, 14, 30, 0.97) !important;
  color: #ffffff !important;
  border-color: var(--brand) !important;
}

/* Remove text halos from interface typography */
body, body * { text-shadow: none; }
