/* ============================================================
   AhoraAjedrez Theme - main.css
   Diseño estilo YouTube: topbar + sidebar colapsable
   Paleta: blanco limpio, acentos ajedrez (negro/dorado)
   Preparado para integración lila (Lichess)
   ============================================================ */

/* ── TIPOGRAFÍAS ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;600&display=swap');

/* ── FIX BARRA ADMIN WORDPRESS ──────────────────────────────── */
.admin-bar #ahora-topbar { top: 32px; }
.admin-bar #ahora-sidebar { top: calc(32px + var(--topbar-h)); }
@media (max-width: 782px) {
  .admin-bar #ahora-topbar { top: 46px; }
  .admin-bar #ahora-sidebar { top: calc(46px + var(--topbar-h)); }
}
@media (max-width: 600px) {
  .admin-bar #ahora-topbar { top: 0; }
  .admin-bar #ahora-sidebar { top: var(--topbar-h); }
}

/* ── VARIABLES ─────────────────────────────────────────────── */
:root {
  /* Core */
  --bg:          #ffffff;
  --bg-secondary:#f9f9f9;
  --bg-hover:    #f2f2f2;
  --border:      #e5e5e5;
  --text:        #0f0f0f;
  --text-muted:  #606060;
  --text-light:  #909090;

  /* Ajedrez (acento principal) */
  --chess-black: #0f0f0f;
  --chess-gold:  #c9a227;
  --chess-gold-light: #f0d080;
  --accent:      #c9a227;
  --accent-hover:#b8911f;

  /* Lichess (lila - preparado para integración futura) */
  --lichess-bg:       #2b2b2b;
  --lichess-primary:  #b58863;
  --lichess-sidebar:  #1f1f1f;
  --lichess-accent:   #759900;
  --lichess-text:     #f0f0f0;
  --lichess-border:   #404040;

  /* Layout */
  --topbar-h:    56px;
  --sidebar-w:   240px;
  --sidebar-mini:72px;
  --radius:      8px;
  --radius-sm:   4px;
  --shadow:      0 1px 3px rgba(0,0,0,.12);
  --shadow-md:   0 4px 12px rgba(0,0,0,.15);

  /* Transiciones */
  --transition:  0.2s ease;
}

/* ── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* Títulos: Plus Jakarta Sans */
h1, h2, h3, h4, h5, h6,
.topbar-logo-text,
.sidebar-section-title,
.ahora-card-title,
.footer-col-title {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
}

/* Números: JetBrains Mono */
.ranking-tabla td:nth-child(1),  /* posición */
.ranking-tabla td:nth-child(5),  /* ELO */
.ahora-elo,
.topbar-btn-elo,
[class*="elo"],
[class*="rating"],
.chess-title {
  font-family: 'JetBrains Mono', monospace;
}

/* ── TOPBAR ─────────────────────────────────────────────────── */
#ahora-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
  z-index: 1000;
}

/* Botón hamburguesa */
.topbar-menu-btn {
  width: 40px; height: 40px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background var(--transition);
}
.topbar-menu-btn:hover { background: var(--bg-hover); }
.topbar-menu-btn span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

/* Logo */
.topbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
}
.topbar-logo-icon {
  width: 32px; height: 32px;
  background: var(--chess-black);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.topbar-logo-text {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
}
.topbar-logo-text { color: var(--chess-gold); }
.topbar-logo-text span { color: var(--text); }

/* Buscador central */
.topbar-search {
  flex: 1;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0;
}
.topbar-search input {
  flex: 1;
  height: 36px;
  padding: 0 14px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 18px 0 0 18px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.topbar-search input:focus {
  border-color: var(--chess-black);
  box-shadow: inset 0 0 0 1px var(--chess-black);
}
.topbar-search-btn {
  height: 36px;
  padding: 0 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 0 18px 18px 0;
  display: flex; align-items: center;
  color: var(--text-muted);
  transition: background var(--transition);
}
.topbar-search-btn:hover { background: var(--bg-hover); }

/* Acciones derecha */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.topbar-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  transition: background var(--transition);
}
.topbar-btn-ghost { color: var(--text); }
.topbar-btn-ghost:hover { background: var(--bg-hover); }
.topbar-btn-elo {
  background: var(--chess-black);
  color: var(--chess-gold);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.3px;
  border: 1px solid var(--chess-gold);
}
.topbar-btn-elo:hover { background: #222; }
.topbar-btn-primary {
  background: var(--chess-black);
  color: #fff;
}
.topbar-btn-primary:hover { background: #333; }
.topbar-btn-gold {
  background: var(--chess-gold);
  color: #fff;
}
.topbar-btn-gold:hover { background: var(--accent-hover); }
.topbar-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--chess-gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  cursor: pointer;
}

/* ── SIDEBAR ─────────────────────────────────────────────────── */
#ahora-sidebar {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 900;
  transition: width var(--transition), transform var(--transition);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
#ahora-sidebar::-webkit-scrollbar { width: 4px; }
#ahora-sidebar::-webkit-scrollbar-track { background: transparent; }
#ahora-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Estado colapsado */
body.sidebar-collapsed #ahora-sidebar { width: var(--sidebar-mini); }
body.sidebar-collapsed .sidebar-label,
body.sidebar-collapsed .sidebar-section-title,
body.sidebar-collapsed .sidebar-divider-label { opacity: 0; width: 0; overflow: hidden; }

/* Ítem de sidebar */
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 12px;
  height: 40px;
  border-radius: var(--radius);
  margin: 2px 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: background var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.sidebar-item:hover { background: var(--bg-hover); }
.sidebar-item.active { background: var(--bg-hover); font-weight: 700; }
.sidebar-icon {
  width: 24px; height: 24px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.sidebar-label { transition: opacity var(--transition); }

/* Sección de sidebar */
.sidebar-section {
  padding: 16px 0 8px;
}
.sidebar-section-title {
  padding: 0 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-light);
  margin-bottom: 4px;
  transition: opacity var(--transition);
}
.sidebar-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0;
}

/* Tooltip en modo colapsado */
body.sidebar-collapsed .sidebar-item {
  position: relative;
}
body.sidebar-collapsed .sidebar-item:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(var(--sidebar-mini) - 4px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.8);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1100;
}

/* ── LAYOUT PRINCIPAL ────────────────────────────────────────── */
#ahora-main {
  margin-top: var(--topbar-h);
  margin-left: var(--sidebar-w);
  min-height: calc(100vh - var(--topbar-h));
  transition: margin-left var(--transition);
  padding: 24px;
}
body.sidebar-collapsed #ahora-main {
  margin-left: var(--sidebar-mini);
}

/* ── CARDS GRID (estilo YouTube) ─────────────────────────────── */
.ahora-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.ahora-card {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.ahora-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.ahora-card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-secondary);
  overflow: hidden;
  position: relative;
}
.ahora-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ahora-card-body { padding: 12px 4px; }
.ahora-card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ahora-card-meta { font-size: 12px; color: var(--text-muted); }

/* ── CHIPS / FILTROS ─────────────────────────────────────────── */
.ahora-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  margin-bottom: 20px;
}
.ahora-chips::-webkit-scrollbar { display: none; }
.ahora-chip {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  background: var(--bg-secondary);
  color: var(--text);
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--transition);
  border: 1px solid var(--border);
}
.ahora-chip:hover { background: var(--bg-hover); }
.ahora-chip.active {
  background: var(--chess-black);
  color: #fff;
  border-color: var(--chess-black);
}

/* ── BADGES / TÍTULOS DE AJEDREZ ─────────────────────────────── */
.chess-title {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.chess-title.gm { background: #ffd700; color: #000; }
.chess-title.im { background: #c0c0c0; color: #000; }
.chess-title.fm { background: #cd7f32; color: #fff; }
.chess-title.wgm { background: #ff80ab; color: #fff; }
.chess-title.cm, .chess-title.wim { background: var(--bg-secondary); color: var(--text); border: 1px solid var(--border); }

/* ── TABLAS DE RANKING ───────────────────────────────────────── */
.ranking-tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ranking-tabla th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ranking-tabla td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.ranking-tabla tr:hover td { background: var(--bg-secondary); }
.ranking-tabla tr:last-child td { border-bottom: none; }

/* ── CHESSBOARD FIX (crítico, siempre incluir) ───────────────── */
#et-board img {
  display: inline-block !important;
  max-width: none !important;
}
.chessboard-63f28 {
  box-sizing: content-box !important;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
#ahora-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  margin-top: 48px;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto 24px;
}
.footer-col-title {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  font-size: 13px;
}
.footer-col a {
  display: block;
  padding: 3px 0;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  text-align: center;
  font-size: 12px;
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --sidebar-w: 200px; }
}

@media (max-width: 768px) {
  /* En móvil la sidebar es un drawer que se superpone */
  #ahora-sidebar {
    width: var(--sidebar-w) !important;
    transform: translateX(-100%);
    box-shadow: var(--shadow-md);
  }
  body.sidebar-open #ahora-sidebar {
    transform: translateX(0);
    z-index: 950;
  }
  #ahora-main {
    margin-left: 0 !important;
    padding: 12px 4px;
  }
  /* Overlay al abrir sidebar en móvil */
  #ahora-overlay {
    display: none;
    position: fixed;
    top: 0; bottom: 0;
    left: var(--sidebar-w);
    right: 0;
    background: rgba(0,0,0,.4);
    z-index: 899;
  }
  body.sidebar-open #ahora-overlay { display: block; }

  /* Buscador compacto en móvil */
  .topbar-search { display: none; }
  body.search-open .topbar-search {
    display: flex;
    position: fixed;
    top: var(--topbar-h);
    left: 0; right: 0;
    background: var(--bg);
    padding: 8px 16px;
    border-bottom: 1px solid var(--border);
    z-index: 999;
    max-width: 100%;
  }
  .topbar-logo-text { display: none; }

  .ahora-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
}

@media (max-width: 480px) {
  .ahora-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  #ahora-topbar { padding: 0 10px; gap: 10px; }
}

/* ── UTILIDADES ──────────────────────────────────────────────── */
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--chess-gold); }
.fw-bold { font-weight: 700; }

/* ══════════════════════════════════════════════════════════════
   FIX CHESSBOARD - tablero negro / piezas invisibles
   CRÍTICO: siempre debe estar presente
   ══════════════════════════════════════════════════════════════ */

/* Fix principal del tablero */
#et-board img,
.chessboard-63f28 img,
[class*="chessboard"] img {
  display: inline-block !important;
  max-width: none !important;
  width: auto !important;
  height: auto !important;
}
.chessboard-63f28,
[class*="chessboard-"] {
  box-sizing: content-box !important;
}

/* El tablero no debe heredar max-width del tema */
.chessboard-63f28 {
  font-size: 0 !important; /* elimina gap entre inline-block */
}

/* Contenedor del tablero: evitar que el tema lo aplaste */
#board,
#board1,
#board-container,
.board-container,
[id^="board"] {
  line-height: 0 !important;
  font-size: 0 !important;
}
[id^="board"] img,
#board img,
#board1 img {
  display: inline-block !important;
  max-width: none !important;
}

/* Fix para chessboard.js v0.3 y v1.x */
.square-55d63 {
  box-sizing: content-box !important;
}
.square-55d63 img {
  display: inline-block !important;
  max-width: none !important;
  width: 100% !important;
  height: 100% !important;
}/* Fix chessboard sj-board (single-jugador) */
#sj-board img {
  display: inline-block !important;
  max-width: none !important;
  width: auto !important;
  height: auto !important;
  box-shadow: none !important;
}
#sj-board .square-55d63 img {
  width: 100% !important;
  height: 100% !important;
}
/* Chessground board theme — tablero clásico madera */
cg-board {
    background-color: #b58863 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Crect width='8' height='8' fill='%23f0d9b5'/%3E%3Crect x='8' width='8' height='8' fill='%23b58863'/%3E%3Crect y='8' width='8' height='8' fill='%23b58863'/%3E%3Crect x='8' y='8' width='8' height='8' fill='%23f0d9b5'/%3E%3C/svg%3E") !important;
    background-size: 25% 25% !important;
    background-repeat: repeat !important;
}
/* ══ Snapshot / Countdown (compartido: front-page + single-miembro) ══ */
.hm-countdown-bar {
    display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
    padding: 12px 16px; margin-bottom: 16px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.hm-countdown-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .07em; color: var(--text-muted); white-space: nowrap;
}
.hm-countdown-timer {
    font-family: var(--font-mono); font-size: 22px; font-weight: 500;
    color: var(--text-primary); letter-spacing: .02em; line-height: 1;
}
.hm-countdown-sub { font-size: 11px; color: var(--text-muted); flex: 1; }
.hm-snap-self {
    display: flex; align-items: center; flex-wrap: wrap;
    padding: 10px 16px; margin-bottom: 4px;
    background: rgba(200,146,42,.06); border: 1px solid var(--accent-dark);
    border-radius: var(--radius-md);
}
.hm-snap-self-item { display: flex; flex-direction: column; padding: 4px 16px 4px 0; }
.hm-snap-self-lbl {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .07em; color: var(--text-muted);
}
.hm-snap-self-val {
    font-family: var(--font-mono); font-size: 18px; font-weight: 500;
    color: var(--text-primary); line-height: 1.2;
}
.hm-snap-self-sep {
    width: 1px; height: 32px; background: var(--border); margin: 0 16px 0 0; flex-shrink: 0;
}
.hm-snap-updated { color: var(--accent); font-weight: 600; }
.hm-snap-row-me {
    background: rgba(200,146,42,.07) !important;
    border-left: 2px solid var(--accent);
}
.hm-members-bar {
    display: flex; align-items: center;
    padding: 14px 18px; margin-bottom: 18px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); flex-wrap: wrap; gap: 12px;
}
.hm-members-countdown {
    display: flex; flex-direction: column; gap: 2px;
    padding-right: 20px; border-right: 1px solid var(--border); flex-shrink: 0;
}
.hm-members-stats { display: flex; align-items: center; flex: 1; flex-wrap: wrap; }
.hm-btn-progreso {
    display: inline-flex; align-items: center;
    padding: 8px 16px; background: var(--accent); color: #111;
    border-radius: var(--radius-md); font-size: 13px; font-weight: 700;
    text-decoration: none; white-space: nowrap; flex-shrink: 0;
    margin-left: auto; transition: opacity .12s;
}
.hm-btn-progreso:hover { opacity: .85; text-decoration: none; color: #111; }
.hm-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.hm-fide-table { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.hm-fide-row {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px;
    border-radius: var(--radius-md); text-decoration: none; color: var(--text-primary);
    transition: background .1s;
}
.hm-fide-row:hover { background: var(--bg-hover); text-decoration: none; color: var(--text-primary); }
.hm-fide-pos { font-size: 12px; color: var(--text-muted); width: 20px; flex-shrink: 0; font-family: var(--font-mono); }
.hm-fide-name { flex: 1; font-size: 13px; font-weight: 500; }
.hm-fide-elo { font-size: 13px; font-weight: 700; font-family: var(--font-mono); }
.hm-fide-link { font-size: 12px; color: var(--accent); text-decoration: none; display: inline-block; margin-bottom: 20px; }
.hm-fide-link:hover { text-decoration: underline; }
@media (max-width: 700px) {
    .hm-members-bar { flex-direction: column; align-items: flex-start; }
    .hm-members-countdown { border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 10px; width: 100%; }
    .hm-btn-progreso { margin-left: 0; width: 100%; justify-content: center; }
    .hm-two-col { grid-template-columns: 1fr; }
}
/* ============================================================
   AhoraAjedrez — Design System v1.0
   ============================================================ */
:root {
  --bg-card:        #1c1c1f;
  --bg-card-hover:  rgba(201,162,39,.05);
  --border-card:    rgba(255,255,255,.06);
  --border-accent:  rgba(201,162,39,.35);
  --text-primary:   #ededed;
  --text-secondary: #b4b4bc;
  --text-muted:     #717171;
  --accent-dark:    rgba(201,162,39,.2);
  --font-mono:      'JetBrains Mono', monospace;
  --font-sans:      'DM Sans', system-ui, sans-serif;
  --radius-md:      8px;
  --radius-lg:      12px;
  --transition-fast: 150ms ease;
}
.aa-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  overflow: hidden;
}
.aa-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
a.aa-card, .aa-card--link { cursor: pointer; text-decoration: none; display: block; }
a.aa-card:hover { text-decoration: none; }
.aa-card.is-active, .aa-card.is-selected {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  box-shadow: 0 14px 28px rgba(0,0,0,.25), 0 10px 10px rgba(0,0,0,.22);
  color: var(--text-primary);
}
.aa-card.is-disabled { opacity: 0.35; pointer-events: none; }
.aa-card--featured { border-color: var(--border-accent); background: rgba(201,162,39,.04); }
.aa-card--featured:hover { background: rgba(201,162,39,.1); border-color: rgba(201,162,39,.6); }
.aa-card__icon { color: var(--accent); opacity: .8; margin-bottom: 8px; display: flex; align-items: center; }
.aa-card__icon svg { width: 20px; height: 20px; color: currentColor; }
.aa-card__title { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.aa-card__desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; flex: 1; }
.aa-card__link { font-size: 12px; color: var(--accent); text-decoration: none; margin-top: 12px; display: inline-flex; align-items: center; gap: 4px; transition: gap var(--transition-fast), color var(--transition-fast); }
.aa-card__link:hover { color: #f0d080; gap: 8px; text-decoration: none; }
.aa-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 900px) { .aa-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }
@media (max-width: 540px) { .aa-grid { grid-template-columns: 1fr; gap: 6px; } }
.aa-panel { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: var(--radius-lg); padding: 20px 24px; color: var(--text-secondary); transition: border-color var(--transition-fast); }
.aa-panel:hover { border-color: rgba(255,255,255,.12); }
.aa-panel__header { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border-card); }
.aa-panel__title { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.aa-panel__title--accent { color: var(--accent); }
.aa-panel__body { display: flex; flex-direction: column; gap: 12px; }
.aa-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 18px; border-radius: var(--radius-md); font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid var(--border-card); background: var(--bg-card); color: var(--text-secondary); text-decoration: none; transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast); white-space: nowrap; }
.aa-btn:hover { background: var(--bg-card-hover); border-color: var(--border-accent); color: var(--text-primary); text-decoration: none; }
.aa-btn:active, .aa-btn.is-active { box-shadow: 0 0 0 2px var(--accent); border-color: var(--accent); color: var(--text-primary); }
.aa-btn.is-disabled, .aa-btn:disabled { opacity: 0.35; pointer-events: none; }
.aa-btn--primary { background: var(--accent); border-color: var(--accent); color: #111; }
.aa-btn--primary:hover { background: #b8911f; border-color: #b8911f; color: #111; }
.aa-btn--ghost { background: transparent; border-color: rgba(255,255,255,.12); color: var(--text-secondary); }
.aa-btn--ghost:hover { background: var(--bg-card-hover); border-color: var(--border-accent); color: var(--text-primary); }
.aa-btn--sm { padding: 5px 12px; font-size: 12px; }
.aa-btn--lg { padding: 12px 28px; font-size: 15px; }
.aa-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius-md); text-decoration: none; color: var(--text-primary); transition: background var(--transition-fast); }
.aa-row:hover { background: rgba(255,255,255,.05); text-decoration: none; color: var(--text-primary); }
.aa-row.is-me { background: rgba(201,162,39,.05); border-left: 2px solid var(--accent); }
.aa-row__pos { font-size: 12px; color: var(--text-muted); width: 20px; flex-shrink: 0; font-family: var(--font-mono); }
.aa-row__name { flex: 1; font-size: 13px; font-weight: 500; }
.aa-row__val { font-size: 13px; font-weight: 700; font-family: var(--font-mono); }
.aa-stat { display: flex; flex-direction: column; gap: 2px; }
.aa-stat__val { font-size: 22px; font-weight: 700; font-family: var(--font-mono); color: var(--text-primary); line-height: 1.1; }
.aa-stat__lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); }
.aa-stat__val--accent { color: var(--accent); }
.aa-badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--bg-card); border: 1px solid var(--border-card); color: var(--text-muted); }
.aa-badge--accent { background: rgba(201,162,39,.05); border-color: rgba(201,162,39,.3); color: var(--accent); }
.aa-badge--live { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.3); color: #f87171; }
.aa-section-label { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; }
.is-selected { border-color: var(--accent) !important; }
.is-disabled { opacity: 0.35 !important; pointer-events: none !important; }
.sn-module { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: var(--radius-lg); padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast); color: var(--text-secondary); }
.sn-module:hover { background: var(--bg-card-hover); border-color: var(--border-accent); color: var(--text-primary); transform: translateY(-1px); }
.hm-launch-btn { transition: background var(--transition-fast), border-color var(--transition-fast) !important; }
.hm-launch-btn:hover { background: var(--bg-card-hover) !important; border-color: var(--border-accent) !important; }

/* ══ Efecto hover sweep (estilo Lila lobby) ═══════════════════ */
@keyframes card-sweep {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.sn-module::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.2s ease;
  background-size: 200% 100%;
  background-repeat: no-repeat;
  background-image: linear-gradient(90deg, transparent, rgba(201,162,39,.05), transparent);
  pointer-events: none;
  z-index: 0;
}
.sn-module:hover::before {
  opacity: 1;
  animation: card-sweep 1.2s cubic-bezier(0.2, 0.6, 0.95, 0.7) infinite;
}
.sn-module > * { position: relative; z-index: 1; }
