@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Orbitron:wght@400;600;700;900&family=Share+Tech+Mono&display=swap');

/* ══════════════════════════════════════
   SISTEMA DE DISEÑO GLOBAL — Variables
   ══════════════════════════════════════ */
:root {
  /* — Fondos — */
  --bg-void:        #01020a;
  --bg-deep:        #030610;
  --bg-space:       #060c1e;
  --bg-card:        #0a1128;
  --bg-card-2:      #0d1530;
  --bg-card-hover:  #111c3a;
  --bg-sidebar:     #060a1c;
  --bg-glass:       rgba(10,17,40,0.92);

  /* — Colores neón — */
  --neon-cyan:      #00f5ff;
  --neon-violet:    #7c3aed;
  --neon-purple:    #a855f7;
  --neon-lilac:     #c084fc;
  --neon-electric:  #6366f1;
  --neon-sky:       #38bdf8;
  --neon-gold:      #fbbf24;
  --neon-green:     #00ff88;
  --neon-pink:      #f472b6;

  /* — Bordes — */
  --border:         rgba(124,58,237,0.22);
  --border-cyan:    rgba(0,245,255,0.2);
  --border-glow:    rgba(0,245,255,0.5);
  --border-purple:  rgba(168,85,247,0.4);

  /* — Texto (mejorado para contraste) — */
  --text-primary:   #eef2ff;
  --text-secondary: #c4cfe8;
  --text-muted:     #7888b0;
  --text-accent:    #c4b5fd;

  /* — Layout — */
  --header-h:       62px;
  --sidebar-w:      272px;

  /* — Tipografía — */
  --font-display:   'Orbitron', monospace;
  --font-body:      'Rajdhani', sans-serif;
  --font-mono:      'Share Tech Mono', monospace;

  /* — Radios — */
  --r-sm: 6px; --r-md: 12px; --r-lg: 18px; --r-xl: 24px;

  /* — Sombras y glows — */
  --glow-cyan:    0 0 20px rgba(0,245,255,0.35), 0 0 60px rgba(0,245,255,0.1);
  --glow-purple:  0 0 20px rgba(168,85,247,0.4), 0 0 60px rgba(168,85,247,0.12);
  --glow-violet:  0 0 15px rgba(124,58,237,0.45);
  --shadow-card:  0 8px 32px rgba(0,0,0,0.7), 0 2px 8px rgba(0,0,0,0.5);
  --shadow-deep:  0 20px 60px rgba(0,0,0,0.8), 0 4px 16px rgba(0,0,0,0.6);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-void);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: .02em;
}

a {
  color: var(--neon-cyan);
  text-decoration: none;
  transition: color .2s;
}

a:hover {
  color: var(--neon-lilac);
}

/* ══════════════════════════════════════
   SCROLLBAR GLOBAL
   ══════════════════════════════════════ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--neon-violet), var(--neon-electric));
  border-radius: 4px;
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--neon-violet) var(--bg-void);
}

/* ══════════════════════════════════════
   STARFIELD
   ══════════════════════════════════════ */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ══════════════════════════════════════
   HEADER — WIKI LAYOUT (con sidebar)
   ══════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  background: rgba(3,6,16,.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(124,58,237,.18), 0 4px 24px rgba(0,0,0,.5);
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--neon-violet) 20%,
    var(--neon-cyan) 50%,
    var(--neon-purple) 80%,
    transparent 100%
  );
  opacity: .7;
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(0,245,255,.5));
}

.logo-fallback {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: linear-gradient(135deg, rgba(124,58,237,.3), rgba(0,245,255,.3));
  border-radius: 8px;
  border: 1px solid var(--border-purple);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.logo-accent {
  color: var(--neon-cyan);
  text-shadow: 0 0 12px rgba(0,245,255,.7);
}

/* Search */
.header-center {
  flex: 1;
  max-width: 440px;
  margin: 0 auto;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 14px;
  transition: all .25s;
  position: relative;
}

.search-wrap:focus-within {
  border-color: rgba(0,245,255,.45);
  background: rgba(0,245,255,.05);
  box-shadow: 0 0 0 2px rgba(0,245,255,.1), var(--glow-cyan);
}

.search-icon { color: var(--text-muted); font-size: 16px; flex-shrink: 0; }

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: .02em;
}

.search-input::placeholder { color: var(--text-muted); }

kbd {
  background: rgba(255,255,255,.07);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

/* Header right */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.social-nav { display: flex; gap: 6px; }

.social-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: .05em;
  transition: all .2s;
  border: 1px solid transparent;
}

.social-btn.discord  { background: rgba(88,101,242,.18); color: #7289da; border-color: rgba(88,101,242,.28); }
.social-btn.tiktok   { background: rgba(255,0,80,.14);   color: #ff2d55; border-color: rgba(255,0,80,.25); }
.social-btn.youtube  { background: rgba(255,0,0,.14);    color: #ff4444; border-color: rgba(255,0,0,.22); }

.social-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.3);
  box-shadow: 0 4px 14px rgba(0,0,0,.5);
  color: inherit;
}

.header-banner {
  background: linear-gradient(90deg, rgba(124,58,237,.22), rgba(0,245,255,.16));
  border: 1px solid rgba(124,58,237,.38);
  border-radius: var(--r-sm);
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--neon-lilac);
  white-space: nowrap;
  letter-spacing: .05em;
  transition: all .2s;
}

.header-banner:hover {
  background: rgba(124,58,237,.28);
  color: var(--neon-lilac);
  box-shadow: var(--glow-purple);
}

/* Sidebar toggle (hamburguesa — siempre disponible en móvil) */
.sidebar-toggle {
  display: none;
  background: rgba(124,58,237,.18);
  border: 1px solid var(--border-purple);
  color: var(--neon-lilac);
  font-size: 18px;
  border-radius: var(--r-sm);
  padding: 6px 12px;
  cursor: pointer;
  transition: all .2s;
  line-height: 1;
  align-items: center;
  justify-content: center;
}

.sidebar-toggle:hover {
  background: rgba(124,58,237,.32);
  box-shadow: var(--glow-violet);
}

/* ══════════════════════════════════════
   HEADER — FLAT NAV LAYOUT (normas, etc.)
   ══════════════════════════════════════ */
.site-header.flat-nav {
  gap: 0;
  justify-content: space-between;
}

.site-header.flat-nav .logo-link { margin-right: auto; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.main-nav a {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 11px;
  border-radius: var(--r-sm);
  transition: all .2s;
  white-space: nowrap;
}

.main-nav a:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,.06);
}

.main-nav a.active {
  color: var(--neon-cyan);
  background: rgba(0,245,255,.09);
  border: 1px solid rgba(0,245,255,.28);
  box-shadow: 0 0 12px rgba(0,245,255,.18);
}

.main-nav a:not(.active) { border: 1px solid transparent; }

/* Hamburguesa flat nav */
.nav-hamburger {
  display: none;
  background: rgba(124,58,237,.18);
  border: 1px solid var(--border-purple);
  color: var(--neon-lilac);
  font-size: 18px;
  border-radius: var(--r-sm);
  padding: 6px 12px;
  cursor: pointer;
  line-height: 1;
  margin-left: 8px;
  align-items: center;
  justify-content: center;
}

/* Mobile nav drawer */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: var(--header-h);
  right: 0;
  width: 240px;
  background: var(--bg-card-2);
  border-left: 1px solid var(--border-purple);
  border-bottom: 1px solid var(--border);
  height: calc(100vh - var(--header-h));
  z-index: 250;
  padding: 16px;
  flex-direction: column;
  gap: 4px;
  box-shadow: -8px 0 32px rgba(0,0,0,.7);
}

.mobile-nav-drawer.open { display: flex; }

.mobile-nav-drawer a {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  transition: all .2s;
  border-left: 2px solid transparent;
}

.mobile-nav-drawer a:hover {
  color: var(--neon-cyan);
  background: rgba(0,245,255,.06);
  border-left-color: var(--neon-cyan);
}

.mobile-nav-drawer a.active {
  color: var(--neon-cyan);
  background: rgba(0,245,255,.09);
  border-left-color: var(--neon-cyan);
}

/* ══════════════════════════════════════
   LAYOUT (wiki con sidebar)
   ══════════════════════════════════════ */
.layout {
  display: flex;
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════
   SIDEBAR — FIX COMPLETO (sin hueco negro)
   ══════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: var(--header-h);
  /* FIX: altura exacta + background extendido al 100% */
  height: calc(100vh - var(--header-h));
  min-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg-sidebar);
  /* FIX: background-attachment + pseudo-element evitan el hueco inferior */
  background-attachment: local;
  border-right: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  /* FIX: asegura que el fondo llene aunque el contenido sea corto */
  display: flex;
  flex-direction: column;
}

.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb {
  background: var(--border-purple);
  border-radius: 3px;
}

/* FIX hueco negro: pseudo-element que llena el fondo hasta el fondo */
.sidebar::after {
  content: '';
  display: block;
  flex: 1;
  min-height: 0;
  background: var(--bg-sidebar);
}

.sidebar-inner {
  padding: 20px 0 100px;
  flex: 1;
}

/* Secciones del nav */
.nav-section { margin-bottom: 4px; }

.nav-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--neon-violet);
  padding: 14px 20px 6px;
  font-family: var(--font-display);
  text-transform: uppercase;
  opacity: .85;
}

.nav-list { list-style: none; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all .15s;
  border-left: 2px solid transparent;
  position: relative;
  letter-spacing: .02em;
  cursor: pointer;
}

.nav-item:hover {
  color: var(--neon-cyan);
  background: rgba(0,245,255,.06);
  border-left-color: var(--neon-cyan);
}

.nav-item.active {
  color: var(--neon-cyan);
  background: rgba(0,245,255,.09);
  border-left-color: var(--neon-cyan);
}

.nav-item.external { justify-content: space-between; }
.ext-icon { font-size: 10px; color: var(--text-muted); margin-left: auto; }

/* Grupos colapsables */
.nav-group { border-top: 1px solid rgba(255,255,255,.04); }

.nav-group-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 20px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
  letter-spacing: .02em;
  cursor: pointer;
  transition: all .15s;
  text-align: left;
}

.nav-group-header:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,.03);
}

.nav-group-header.active-group { color: var(--neon-lilac); }

.chevron {
  margin-left: auto;
  font-size: 9px;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  color: var(--text-muted);
}

.nav-group-header[aria-expanded="true"] .chevron { transform: rotate(90deg); }

.nav-sublist {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s cubic-bezier(.4,0,.2,1);
  background: rgba(0,0,0,.3);
}

.nav-sublist.open { max-height: 600px; }
.nav-sublist .nav-item { padding-left: 40px; font-size: 13px; }

/* Decoración inferior del sidebar */
.sidebar-deco {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 14px;
  padding: 12px 16px 16px;
  background: linear-gradient(to top, var(--bg-sidebar) 60%, transparent);
  /* FIX: no genera hueco porque está dentro del flujo normal */
  margin-top: auto;
  z-index: 2;
}

.pixel-char {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  animation: floatPixel 4s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(168,85,247,.6));
  flex-shrink: 0;
}

.pixel-char.delay-1 { animation-delay: 1.5s; }
.pixel-char.delay-2 { animation-delay: 3s; }

@keyframes floatPixel {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-9px); }
}

/* ══════════════════════════════════════
   SIDEBAR OVERLAY & TOGGLE
   ══════════════════════════════════════ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(3px);
}

.sidebar-overlay.active { display: block; }

/* ══════════════════════════════════════
   FLAT PAGE LAYOUT (sin sidebar)
   ══════════════════════════════════════ */
.flat-layout {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - var(--header-h));
  margin-top: var(--header-h);
  padding: 56px 80px 100px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

/* Page badge */
.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--neon-violet);
  text-transform: uppercase;
  margin-bottom: 18px;
  opacity: .85;
}

/* Page title grande */
.page-title-big {
  font-family: var(--font-body);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: -.01em;
}

.page-title-big .accent {
  color: var(--neon-cyan);
  text-shadow: 0 0 24px rgba(0,245,255,.5);
}

.page-subtitle-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 48px;
  font-weight: 400;
  letter-spacing: .01em;
}

/* ── Lista de normas ── */
.rules-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.rule-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: rgba(10,17,40,.8);
  border: 1px solid rgba(124,58,237,.2);
  border-radius: var(--r-md);
  padding: 20px 28px;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  position: relative;
  overflow: hidden;
  animation: fadeSlideUp .5s both;
}

.rule-card:nth-child(1)  { animation-delay: .05s; }
.rule-card:nth-child(2)  { animation-delay: .10s; }
.rule-card:nth-child(3)  { animation-delay: .15s; }
.rule-card:nth-child(4)  { animation-delay: .20s; }
.rule-card:nth-child(5)  { animation-delay: .25s; }
.rule-card:nth-child(6)  { animation-delay: .30s; }
.rule-card:nth-child(7)  { animation-delay: .35s; }
.rule-card:nth-child(8)  { animation-delay: .40s; }
.rule-card:nth-child(9)  { animation-delay: .45s; }
.rule-card:nth-child(10) { animation-delay: .50s; }

.rule-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--neon-violet), var(--neon-electric));
  opacity: 0;
  transition: opacity .3s;
}

.rule-card:hover {
  background: rgba(13,21,48,.95);
  border-color: rgba(124,58,237,.4);
  transform: translateX(4px);
  box-shadow: var(--shadow-card);
}

.rule-card:hover::before { opacity: 1; }

.rule-num {
  font-family: var(--font-mono);
  font-size: .95rem;
  font-weight: 700;
  color: var(--neon-cyan);
  flex-shrink: 0;
  min-width: 38px;
  letter-spacing: .05em;
  text-shadow: 0 0 10px rgba(0,245,255,.45);
}

.rule-sep {
  width: 1px;
  height: 22px;
  background: rgba(124,58,237,.35);
  flex-shrink: 0;
}

/* MEJORA CONTRASTE: texto de normas más legible */
.rule-text {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 500;
  flex: 1;
}

.rule-text strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* ── Pixel Art Decorations ── */
.pixel-deco {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  image-rendering: pixelated;
}

.pixel-deco.deco-left       { bottom: 40px; left: 24px; animation: floatPixel 5s ease-in-out infinite; }
.pixel-deco.deco-right      { top: 45%; right: 20px; transform: translateY(-50%); animation: floatPixel 4s ease-in-out infinite 1s; }
.pixel-deco.deco-right-bottom { bottom: 50px; right: 20px; animation: floatPixel 4.5s ease-in-out infinite 2.2s; }

/* ══════════════════════════════════════
   MAIN CONTENT (wiki layout)
   ══════════════════════════════════════ */
.main-content {
  flex: 1;
  padding: 44px 52px;
  max-width: 980px;
  min-width: 0;
}

/* ══════════════════════════════════════
   HERO
   ══════════════════════════════════════ */
.hero {
  position: relative;
  border-radius: var(--r-xl);
  padding: 64px 52px;
  margin-bottom: 44px;
  overflow: hidden;
  background: linear-gradient(135deg,
    rgba(124,58,237,.1) 0%,
    rgba(10,17,40,.97) 40%,
    rgba(0,245,255,.07) 100%
  );
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,.05);
  animation: fadeSlideUp .6s cubic-bezier(.4,0,.2,1) both;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px; left: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(124,58,237,.14) 0%, transparent 65%);
  pointer-events: none;
  animation: heroGlow 6s ease-in-out infinite alternate;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -80px; right: -60px;
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(0,245,255,.09) 0%, transparent 65%);
  pointer-events: none;
}

@keyframes heroGlow {
  0%   { opacity: .6; transform: scale(1); }
  100% { opacity: 1;  transform: scale(1.15); }
}

.hero-content { position: relative; z-index: 1; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.accent {
  color: var(--neon-cyan);
  text-shadow: 0 0 20px rgba(0,245,255,.6), 0 0 60px rgba(0,245,255,.2);
}

/* MEJORA CONTRASTE: subtítulo hero más legible */
.hero-subtitle {
  font-size: 1.12rem;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.8;
  margin-bottom: 32px;
  font-weight: 500;
}

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Botones */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--neon-violet), var(--neon-electric));
  color: #fff;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 12px;
  padding: 11px 28px;
  border-radius: var(--r-sm);
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all .25s;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(124,58,237,.45);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124,58,237,.6), var(--glow-violet);
  color: #fff;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--neon-cyan);
  border: 1px solid rgba(0,245,255,.38);
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 12px;
  padding: 11px 28px;
  border-radius: var(--r-sm);
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all .25s;
}

.btn-secondary:hover {
  background: rgba(0,245,255,.09);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  transform: translateY(-2px);
  box-shadow: var(--glow-cyan);
}

.hero-pixel-deco {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  opacity: .9;
  z-index: 1;
}

/* ══════════════════════════════════════
   CONTENT BOX
   ══════════════════════════════════════ */
.content-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 36px 40px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  animation: fadeSlideUp .6s .1s cubic-bezier(.4,0,.2,1) both;
}

.content-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,58,237,.55), transparent);
}

/* MEJORA CONTRASTE: texto content-box */
.content-box p {
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 18px;
  font-size: 1rem;
  font-weight: 500;
}

.content-box p:last-child { margin-bottom: 0; }
.content-box strong { color: var(--text-primary); font-weight: 700; }
.content-box em { color: var(--neon-sky); font-style: italic; }

.highlight-line {
  font-size: 1.05rem;
  color: var(--text-primary) !important;
  border-left: 3px solid var(--neon-violet);
  padding: 10px 14px 10px 18px;
  margin-top: 22px !important;
  background: rgba(124,58,237,.08);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

/* ══════════════════════════════════════
   SECTION TITLE
   ══════════════════════════════════════ */
.section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 28px;
  letter-spacing: 1px;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--neon-violet), transparent 60%);
}

/* ══════════════════════════════════════
   FAQ GRID
   ══════════════════════════════════════ */
.faq-section {
  margin-bottom: 36px;
  animation: fadeSlideUp .6s .2s cubic-bezier(.4,0,.2,1) both;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 16px;
}

.faq-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px;
  display: block;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  color: var(--text-secondary);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.faq-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-violet), var(--neon-cyan));
  opacity: 0;
  transition: opacity .3s;
}

.faq-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(124,58,237,.5);
  transform: translateY(-4px);
  color: var(--text-secondary);
  box-shadow: var(--shadow-card), 0 0 30px rgba(124,58,237,.14);
}

.faq-card:hover::before { opacity: 1; }

.faq-card-icon { margin-bottom: 14px; display: block; }

.faq-card h3 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 9px;
  line-height: 1.45;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* MEJORA CONTRASTE: descripción faq */
.faq-card p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ══════════════════════════════════════
   SERVER IP
   ══════════════════════════════════════ */
.server-ip-section { animation: fadeSlideUp .6s .3s cubic-bezier(.4,0,.2,1) both; }

.ip-cards { display: flex; gap: 16px; flex-wrap: wrap; }

.ip-card {
  flex: 1;
  min-width: 230px;
  background: linear-gradient(135deg, rgba(0,245,255,.05), rgba(124,58,237,.07));
  border: 1px solid rgba(0,245,255,.22);
  border-radius: var(--r-md);
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: all .25s;
  position: relative;
  overflow: hidden;
}

.ip-card:hover {
  border-color: rgba(0,245,255,.45);
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

.ip-label { font-size: 12px; color: var(--text-muted); font-weight: 600; letter-spacing: .05em; }

.ip-code {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--neon-cyan);
  cursor: pointer;
  transition: all .2s;
  display: block;
  text-shadow: 0 0 10px rgba(0,245,255,.45);
  letter-spacing: .05em;
}

.ip-code:hover {
  color: var(--neon-green);
  text-shadow: 0 0 14px rgba(0,255,136,.55);
}

.copy-hint { font-size: 11px; color: var(--text-muted); letter-spacing: .03em; }

/* ══════════════════════════════════════
   PAGE CONTENT (páginas internas)
   ══════════════════════════════════════ */
.page-header { margin-bottom: 36px; }

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.breadcrumb {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: .03em;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--neon-cyan); }
.breadcrumb span { color: var(--neon-lilac); }

.page-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 40px 44px;
  line-height: 1.85;
  box-shadow: var(--shadow-card);
  position: relative;
  animation: fadeSlideUp .5s cubic-bezier(.4,0,.2,1) both;
}

.page-content::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,245,255,.32), transparent);
}

.page-content h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--neon-cyan);
  margin: 36px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(0,245,255,.32);
}

.page-content h2:first-child { margin-top: 0; }

.page-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--neon-lilac);
  margin: 24px 0 12px;
  letter-spacing: .05em;
}

/* MEJORA CONTRASTE: texto principal de páginas */
.page-content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.85;
}

.page-content ul,
.page-content ol {
  color: var(--text-secondary);
  padding-left: 22px;
  margin-bottom: 16px;
  font-weight: 500;
}

.page-content li {
  margin-bottom: 8px;
  padding-left: 4px;
  line-height: 1.75;
}

.page-content li::marker { color: var(--neon-violet); }
.page-content strong { color: var(--text-primary); font-weight: 700; }
.page-content a { color: var(--neon-sky); }
.page-content a:hover { color: var(--neon-cyan); }

/* Código inline */
code {
  background: rgba(0,245,255,.08);
  border: 1px solid rgba(0,245,255,.2);
  color: var(--neon-cyan);
  padding: 2px 9px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: .88em;
  letter-spacing: .03em;
}

/* Bloque de código */
.page-content pre {
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(124,58,237,.28);
  border-radius: var(--r-md);
  padding: 22px;
  overflow-x: auto;
  margin: 20px 0;
  position: relative;
}

.page-content pre::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--neon-violet), var(--neon-cyan), transparent);
}

.page-content pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: .9rem;
  color: #a5f3fc;
  line-height: 1.7;
}

/* Cajas de info */
.tip-box, .warn-box, .info-box {
  border-radius: var(--r-md);
  padding: 16px 20px 16px 24px;
  margin: 22px 0;
  font-size: 14px;
  line-height: 1.8;
  position: relative;
  overflow: hidden;
  font-weight: 500;
}

.tip-box::after, .warn-box::after, .info-box::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
}

.tip-box  { background: rgba(0,255,136,.07);  border: 1px solid rgba(0,255,136,.22);  color: #86efac; }
.tip-box::after  { background: var(--neon-green); }
.tip-box::before  { content: '✅  '; }

.warn-box { background: rgba(251,191,36,.07); border: 1px solid rgba(251,191,36,.24); color: #fde68a; }
.warn-box::after { background: var(--neon-gold); }
.warn-box::before { content: '⚠️  '; }

.info-box { background: rgba(0,245,255,.06);  border: 1px solid rgba(0,245,255,.22);  color: #7dd3fc; }
.info-box::after { background: var(--neon-cyan); }
.info-box::before { content: 'ℹ️  '; }

/* ══════════════════════════════════════
   SEARCH DROPDOWN
   ══════════════════════════════════════ */
.search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0; right: 0;
  background: var(--bg-card-2);
  border: 1px solid var(--border-purple);
  border-radius: var(--r-md);
  list-style: none;
  overflow: hidden;
  z-index: 300;
  box-shadow: 0 20px 50px rgba(0,0,0,.8), var(--glow-purple);
  backdrop-filter: blur(20px);
}

.search-dropdown li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all .15s;
}

.search-dropdown li a:hover {
  background: rgba(0,245,255,.07);
  color: var(--neon-cyan);
}

/* ══════════════════════════════════════
   FOOTER
   ══════════════════════════════════════ */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  background: linear-gradient(0deg, var(--bg-void), var(--bg-sidebar));
  padding: 36px 52px;
}

/* FIX: footer con sidebar no necesita margin-left en desktop;
   se usa en .has-sidebar para no quedar debajo del sidebar */
.site-footer.has-sidebar {
  margin-left: var(--sidebar-w);
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    var(--neon-violet),
    var(--neon-cyan),
    var(--neon-violet),
    transparent
  );
  opacity: .45;
}

.footer-inner {
  max-width: 960px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

.footer-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.footer-links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color .15s;
  letter-spacing: .03em;
}

.footer-links a:hover { color: var(--neon-cyan); }

.footer-copy {
  width: 100%;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  letter-spacing: .03em;
}

/* ══════════════════════════════════════
   ANIMACIONES GLOBALES
   ══════════════════════════════════════ */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(0,245,255,.2); }
  50%       { box-shadow: 0 0 24px rgba(0,245,255,.5); }
}

/* ══════════════════════════════════════
   RESPONSIVE — 1100px
   ══════════════════════════════════════ */
@media (max-width: 1100px) {
  .flat-layout { padding: 44px 52px 80px; }
}

/* ══════════════════════════════════════
   RESPONSIVE — 1024px
   ══════════════════════════════════════ */
@media (max-width: 1024px) {
  .main-content { padding: 36px 36px; }
  .site-footer  { padding: 28px 36px; }
  .main-nav a   { font-size: 10px; padding: 5px 8px; letter-spacing: 1px; }
}

/* ══════════════════════════════════════
   RESPONSIVE — 900px (sidebar se convierte en drawer)
   ══════════════════════════════════════ */
@media (max-width: 900px) {
  /* Sidebar wiki: fuera de pantalla por defecto */
  .sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    height: calc(100vh - var(--header-h));
    z-index: 150;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    box-shadow: 4px 0 40px rgba(0,0,0,.8);
  }

  .sidebar.open { transform: translateX(0); }

  /* Botón hamburguesa visible */
  .sidebar-toggle { display: flex; }

  /* Footer sin indent cuando el sidebar es drawer */
  .site-footer.has-sidebar { margin-left: 0; padding: 24px 24px; }

  .main-content { padding: 28px 24px; max-width: 100%; }
  .hero { padding: 44px 28px; }
  .hero-pixel-deco { display: none; }
  .social-btn span { display: none; }
  .social-btn { padding: 6px 10px; }
  .header-banner { display: none; }
  .content-box { padding: 24px 24px; }
  .page-content { padding: 28px 24px; }

  /* Flat nav */
  .flat-layout { padding: 32px 28px 80px; }
  .main-nav { display: none; }
  .nav-hamburger { display: flex; align-items: center; justify-content: center; }
  .pixel-deco { display: none; }
}

/* ══════════════════════════════════════
   RESPONSIVE — 640px
   ══════════════════════════════════════ */
@media (max-width: 640px) {
  .header-center { display: none; }
  .hero-title { font-size: 1.55rem; }
  .faq-grid { grid-template-columns: 1fr; }
  .ip-cards { flex-direction: column; }
  .hero { padding: 36px 22px; }
  .hero-cta { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; text-align: center; justify-content: center; }
  .flat-layout { padding: 28px 20px 60px; }
  .page-title-big { font-size: 2rem; }
  .rule-card { padding: 16px 18px; gap: 14px; }
  .site-footer { padding: 20px 20px; }
  .footer-links { gap: 16px; }
}

/* ══════════════════════════════════════
   RESPONSIVE — 380px
   ══════════════════════════════════════ */
@media (max-width: 380px) {
  .logo-text { font-size: 1rem; }
  .site-header { padding: 0 14px; gap: 10px; }
  .main-content { padding: 20px 16px; }
  .flat-layout { padding: 20px 16px 60px; }
}

/* Touch targets mínimos */
@media (hover: none) and (pointer: coarse) {
  .nav-item,
  .faq-card,
  .btn-primary,
  .btn-secondary,
  .social-btn,
  .rule-card {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* ══════════════════════════════════════
   UTILIDADES EXTRA
   ══════════════════════════════════════ */

/* Badge de estado */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  padding: 3px 10px;
  border-radius: 100px;
  font-family: var(--font-mono);
}

.status-badge.online {
  background: rgba(0,255,136,.1);
  border: 1px solid rgba(0,255,136,.3);
  color: var(--neon-green);
}

.status-badge.online::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--neon-green);
  border-radius: 50%;
  animation: pulseGlow 2s infinite;
}

/* Divider decorativo */
.neon-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-violet), var(--neon-cyan), transparent);
  opacity: .35;
  margin: 32px 0;
}

/* Tag chip */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 2px 10px;
  border-radius: 100px;
  background: rgba(124,58,237,.15);
  border: 1px solid rgba(124,58,237,.3);
  color: var(--neon-lilac);
  font-family: var(--font-mono);
}
