/* ============================================================
   MuPGA — Design System
   Dark Fantasy Luxury aesthetic
   Cinzel Decorative (display) + Cinzel (titles) + Roboto (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&family=Cinzel:wght@400;600;700&family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  /* ── Fondos (de negro puro hacia arriba) ── */
  --bg:            #09080f;   /* body — casi negro */
  --bg-mid:        #0e0c1b;   /* sidebar, zonas laterales */
  --bg-surface:    #131124;   /* cards y paneles */
  --bg-raised:     #1b1830;   /* hover / elementos elevados */

  /* ── Borde neutro (definido explícitamente) ── */
  --border:        rgba(255,255,255,0.07);

  /* ── Oro ── */
  --gold:          #c8a84b;
  --gold-light:    #f0d080;
  --gold-dim:      #6e5a20;
  --gold-glow:     rgba(200, 168, 75, 0.18);
  --gold-border:   rgba(200, 168, 75, 0.32);

  /* ── Violeta — más vibrante para que resalte sobre el negro ── */
  --purple:        #9147e8;
  --purple-light:  #b87fff;
  --purple-glow:   rgba(145, 71, 232, 0.28);
  --purple-border: rgba(145, 71, 232, 0.22);

  /* ── Cyan ── */
  --cyan:          #00c4ea;
  --cyan-glow:     rgba(0, 196, 234, 0.28);

  /* ── Texto — legible sobre el negro profundo ── */
  --text:          #e8e4f4;
  --text-dim:      #a099be;
  --text-bright:   #f5f2ff;

  --font-display:  'Cinzel Decorative', 'Cinzel', serif;
  --font-title:    'Cinzel', serif;
  --font-body:     'Roboto', sans-serif;

  --sidebar-w: 272px;
  --header-h:  68px;
  --radius:    8px;
  --radius-lg: 14px;

  --t:      0.2s ease;
  --t-slow: 0.4s ease;

  --gap-xs: 0.5rem;
  --gap-sm: 1rem;
  --gap-md: 1.5rem;
  --gap-lg: 2.5rem;
  --gap-xl: 4rem;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Noise texture — adds depth, keeps the design from feeling flat */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 300px;
}

img { max-width: 100%; display: block; }
a   { color: var(--gold); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--gold-light); }

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-title);
  color: var(--text-bright);
  line-height: 1.2;
}

.section-title {
  font-family: var(--font-title);
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: var(--gap-lg);
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--gold-border), transparent);
}

/* ── Page layout ───────────────────────────────────────────── */
.page-wrapper {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  grid-template-areas:
    "header  header"
    "main    sidebar"
    "footer  footer";
  min-height: 100vh;
}

/* ── Header ────────────────────────────────────────────────── */
.site-header {
  grid-area: header;
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg-mid) 96%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--purple-border);
  display: flex;
  align-items: center;
  padding: 0 var(--gap-lg);
  gap: var(--gap-lg);
}

/* Iridescent glow line under header */
.site-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    var(--purple) 20%,
    var(--gold) 50%,
    var(--purple) 80%,
    transparent);
  opacity: 0.55;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-decoration: none;
  text-shadow: 0 0 24px var(--gold-glow), 0 0 48px var(--gold-glow);
  transition: text-shadow var(--t-slow);
}

.site-logo:hover {
  color: var(--gold-light);
  text-shadow: 0 0 32px rgba(200,168,75,0.5), 0 0 64px rgba(200,168,75,0.3);
}

.site-logo span { color: var(--purple-light); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  margin-left: auto;
}

.nav-link {
  font-family: var(--font-title);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f0f0f0;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius);
  transition: color var(--t), background var(--t);
  position: relative;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1.5px;
  background: var(--gold);
  transition: width var(--t);
  border-radius: 1px;
}

.nav-link:hover,
.nav-link.active { color: #ffffff; background: rgba(200,168,75,0.07); }

.nav-link:hover::after,
.nav-link.active::after { width: 55%; }

.nav-cta {
  background: linear-gradient(135deg, var(--purple) 0%, #9d58e8 100%);
  color: #fff !important;
  padding: 0.5rem 1.25rem;
  box-shadow: 0 0 16px var(--purple-glow);
  font-weight: 500;
  margin-left: 0.5rem;
}

.nav-cta:hover {
  background: linear-gradient(135deg, #9d58e8 0%, var(--purple-light) 100%);
  color: #fff;
  box-shadow: 0 0 28px var(--purple-glow);
}

.nav-cta::after { display: none; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--gold);
  border-radius: 2px;
  transition: transform var(--t), opacity var(--t);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Main ──────────────────────────────────────────────────── */
.site-main { grid-area: main; min-width: 0; }

/* ── Sidebar ───────────────────────────────────────────────── */
.site-sidebar {
  grid-area: sidebar;
  background: var(--bg-mid);
  border-left: 1px solid var(--purple-border);
  padding: var(--gap-lg) var(--gap-md) var(--gap-xl);
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  /* Fix: padding-bottom es ignorado por algunos navegadores en flex overflow */
  /* El padding-bottom real lo da el ::after */
}

.site-sidebar::after {
  content: '';
  display: block;
  height: var(--gap-lg);
  flex-shrink: 0;
}

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

/* ── Widget ────────────────────────────────────────────────── */
.widget {
  background: var(--bg-surface);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius-lg);
  padding: var(--gap-md);
  position: relative;
  overflow: hidden;
}

.widget::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--gold) 60%, transparent);
}

.widget-title {
  font-family: var(--font-title);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: var(--gap-sm);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.online-count { text-align: center; padding: 0.5rem 0; }

.online-number {
  font-family: var(--font-display);
  font-size: 3.25rem;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1;
  text-shadow: 0 0 28px var(--cyan-glow), 0 0 56px rgba(0,180,216,0.15);
}

.online-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

.online-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--cyan);
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.75); }
}

.server-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.82rem;
}
.server-stat:last-child { border-bottom: none; }
.server-stat__label { color: var(--text-dim); }
.server-stat__value {
  font-family: var(--font-title);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--gold);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  text-align: center;
  margin-top: 0.25rem;
}

.countdown-unit {
  background: var(--bg-raised);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius);
  padding: 0.5rem 0.25rem;
}

.countdown-num {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--purple-light);
  display: block;
  line-height: 1;
}

.countdown-lbl {
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: block;
  margin-top: 0.2rem;
}

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  grid-area: footer;
  background: var(--bg-mid);
  border-top: 1px solid var(--purple-border);
  padding: var(--gap-md) var(--gap-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-sm);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--gold);
  opacity: 0.6;
}

.footer-links { display: flex; gap: var(--gap-sm); }
.footer-links a { color: var(--text-dim); font-size: 0.78rem; }
.footer-links a:hover { color: var(--gold); }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 540px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: var(--gap-xl) var(--gap-lg);
  /* Fallback CSS gradient if no hero image */
  background:
    radial-gradient(ellipse 70% 90% at 25% 60%, rgba(145,71,232,0.42) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 75% 25%, rgba(200,168,75,0.14) 0%, transparent 50%),
    linear-gradient(160deg, #06050c 0%, #0e0922 50%, #06050c 100%);
}

/* Grid pattern overlay — geometric depth */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(145,71,232,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(145,71,232,0.08) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 100% at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 100% at 50% 50%, black 30%, transparent 80%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.25) saturate(0.7);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 580px;
}

.hero-eyebrow {
  font-family: var(--font-title);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-eyebrow::before {
  content: '';
  width: 36px; height: 1px;
  background: var(--cyan);
  display: inline-block;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 0.95;
  margin-bottom: 1rem;
  background: linear-gradient(150deg, var(--gold-light) 0%, var(--gold) 45%, #9c7010 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 32px var(--gold-glow));
}

.hero-tagline {
  font-size: clamp(0.875rem, 1.5vw, 1.05rem);
  color: var(--text);
  line-height: 1.7;
  margin-bottom: var(--gap-lg);
  font-weight: 300;
}

.hero-actions { display: flex; gap: var(--gap-sm); flex-wrap: wrap; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-title);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--t);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, #a8850a 100%);
  color: #0d0b14;
  box-shadow: 0 0 20px var(--gold-glow), 0 4px 16px rgba(0,0,0,0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  color: #0d0b14;
  box-shadow: 0 0 32px rgba(200,168,75,0.4), 0 6px 24px rgba(0,0,0,0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--purple-border);
}

.btn-secondary:hover {
  border-color: rgba(124,63,196,0.6);
  color: var(--purple-light);
  background: var(--purple-glow);
  transform: translateY(-2px);
}

/* ── Sections ──────────────────────────────────────────────── */
.section { padding: var(--gap-xl) var(--gap-lg); }

.section--alt {
  background: var(--bg-mid);
  border-top: 1px solid var(--purple-border);
  border-bottom: 1px solid var(--purple-border);
}

/* ── Info cards ────────────────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--gap-md);
}

.info-card {
  background: var(--bg-surface);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius-lg);
  padding: var(--gap-md) var(--gap-sm);
  text-align: center;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
  position: relative;
  overflow: hidden;
}

.info-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--purple), transparent);
  transform: scaleX(0);
  transition: transform var(--t-slow);
}

.info-card:hover {
  border-color: rgba(124,63,196,0.5);
  box-shadow: 0 0 32px var(--purple-glow), 0 8px 32px rgba(0,0,0,0.3);
  transform: translateY(-3px);
}

.info-card:hover::after { transform: scaleX(1); }

.info-icon { font-size: 1.75rem; margin-bottom: 0.6rem; }

.info-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.info-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ── News cards ────────────────────────────────────────────── */
.card-grid {
  display: grid;
  gap: var(--gap-md);
}

.card-grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--bg-surface);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}

.card:hover {
  border-color: var(--gold-border);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 20px var(--gold-glow);
}

.card-image {
  width: 100%; height: 170px;
  object-fit: cover;
  filter: brightness(0.8) saturate(0.9);
  transition: filter var(--t);
}
.card:hover .card-image { filter: brightness(0.95) saturate(1); }

.card-body { padding: var(--gap-md); }

.card-meta {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}

.card-title {
  font-family: var(--font-title);
  font-size: 0.95rem;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.card-text {
  font-size: 0.84rem;
  color: var(--text-dim);
  margin-bottom: var(--gap-sm);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-link {
  font-family: var(--font-title);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap var(--t), color var(--t);
}

.card-link:hover { gap: 0.7rem; color: var(--gold-light); }
.card-link::after { content: '→'; }

/* ── Rankings ──────────────────────────────────────────────── */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  max-width: 680px;
}

.rank-item {
  display: grid;
  grid-template-columns: 2.25rem 3rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius);
  transition: border-color var(--t), background var(--t), transform var(--t);
  position: relative;
}

.rank-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
}

.rank-item:nth-child(1)::before { background: var(--gold); }
.rank-item:nth-child(2)::before { background: #9aa0a8; }
.rank-item:nth-child(3)::before { background: #cd7f32; }

.rank-item:hover {
  border-color: var(--gold-border);
  background: var(--bg-raised);
  transform: translateX(4px);
}

/* Entrada del jugador logueado */
.rank-item--me {
  border-color: var(--cyan);
  background: color-mix(in srgb, var(--cyan) 8%, var(--bg-card));
  box-shadow: 0 0 0 1px var(--cyan), inset 0 0 20px color-mix(in srgb, var(--cyan) 6%, transparent);
}
.rank-item--me:hover { border-color: var(--cyan); }
.rank-me-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cyan);
  background: color-mix(in srgb, var(--cyan) 15%, transparent);
  border: 1px solid var(--cyan);
  border-radius: 3px;
  padding: 1px 5px;
  vertical-align: middle;
  margin-left: 6px;
}

/* Separador "Tu posición" entre el top y la entrada del jugador */
.rank-separator {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-dim);
  padding: 0.75rem 0 0.5rem;
  letter-spacing: 0.05em;
  border-top: 1px dashed var(--border);
  margin-top: 0.5rem;
}

.rank-pos {
  font-family: var(--font-title);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-align: center;
  font-weight: 600;
}

.rank-item:nth-child(1) .rank-pos { color: var(--gold); }
.rank-item:nth-child(2) .rank-pos { color: #9aa0a8; }
.rank-item:nth-child(3) .rank-pos { color: #cd7f32; }

.rank-avatar {
  width: 40px; height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}

.rank-name {
  font-family: var(--font-title);
  font-size: 0.88rem;
  color: var(--text-bright);
  font-weight: 600;
}

.rank-class {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 0.1rem;
}

.rank-stat { text-align: right; }

.rank-stat__num {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--gold);
  display: block;
  line-height: 1;
}

.rank-stat__lbl {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ── Skeleton ──────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    var(--bg-surface) 0%,
    var(--bg-raised) 50%,
    var(--bg-surface) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: fadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.18s; }
.delay-3 { animation-delay: 0.28s; }
.delay-4 { animation-delay: 0.38s; }

/* ── Misc ──────────────────────────────────────────────────── */
.state-message {
  text-align: center;
  padding: var(--gap-xl);
  color: var(--text-dim);
  font-size: 0.875rem;
}

.center-action {
  text-align: center;
  margin-top: var(--gap-lg);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .page-wrapper {
    grid-template-columns: 1fr;
    grid-template-areas: "header" "main" "sidebar" "footer";
  }

  .site-sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    border-left: none;
    border-top: 1px solid var(--purple-border);
    padding: var(--gap-lg);
  }

  .card-grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --gap-lg: 1.5rem; --gap-xl: 2.5rem; }

  .site-header { padding: 0 var(--gap-md); }

  .site-nav {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(13,11,20,0.98);
    flex-direction: column;
    align-items: stretch;
    padding: var(--gap-sm) var(--gap-md) var(--gap-md);
    border-bottom: 1px solid var(--purple-border);
    gap: 0.25rem;
    z-index: 199;
  }

  .site-nav.open { display: flex; }
  .nav-link { width: 100%; text-align: center; padding: 0.75rem; }
  .nav-toggle { display: flex; }

  .card-grid--3 { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }

  .hero { min-height: 400px; padding: var(--gap-lg) var(--gap-md); }
  .section { padding: var(--gap-lg) var(--gap-md); }

  .site-footer { flex-direction: column; text-align: center; gap: 0.75rem; }

  .rank-item { grid-template-columns: 2rem 2.5rem 1fr auto; gap: 0.5rem; padding: 0.75rem; }
}

@media (max-width: 480px) {
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 3rem; }
}

/* ── Tabs ──────────────────────────────────────────────────── */
.tab-nav {
  display: flex;
  gap: 0.375rem;
  margin-bottom: var(--gap-lg);
  flex-wrap: wrap;
  border-bottom: 1px solid var(--purple-border);
  padding-bottom: 0;
}

.tab-btn {
  font-family: var(--font-title);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: none;
  border: none;
  padding: 0.625rem 1.125rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--t), border-color var(--t);
  border-radius: var(--radius) var(--radius) 0 0;
}

.tab-btn:hover { color: var(--text); background: rgba(255,255,255,0.03); }

.tab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  background: rgba(200,168,75,0.06);
}

/* ── Page hero (páginas internas) ──────────────────────────── */
.page-hero {
  padding: var(--gap-xl) var(--gap-lg) var(--gap-lg);
  background:
    radial-gradient(ellipse 80% 100% at 15% 50%, rgba(145,71,232,0.32) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 90% 20%, rgba(145,71,232,0.12) 0%, transparent 50%),
    var(--bg-mid);
  border-bottom: 1px solid var(--purple-border);
}

.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.4rem;
  filter: drop-shadow(0 0 20px var(--gold-glow));
}

.page-hero-sub {
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 300;
}

/* ── Server info page ──────────────────────────────────────── */
.info-section { margin-bottom: var(--gap-xl); }

.info-section-title {
  font-family: var(--font-title);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--purple-light);
  margin-bottom: var(--gap-md);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.info-section-title::before {
  content: '';
  width: 3px; height: 1rem;
  background: var(--purple-light);
  border-radius: 2px;
  display: inline-block;
}

.rates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--gap-sm);
}

.rate-card {
  background: var(--bg-surface);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius);
  padding: var(--gap-md) var(--gap-sm);
  text-align: center;
  transition: border-color var(--t);
}

.rate-card:hover { border-color: var(--gold-border); }

.rate-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  display: block;
  margin-bottom: 0.25rem;
}

.rate-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.cmd-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cmd-item {
  display: grid;
  grid-template-columns: minmax(160px, auto) 1fr;
  gap: var(--gap-md);
  align-items: baseline;
  padding: 0.625rem var(--gap-md);
  background: var(--bg-surface);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.cmd-name {
  font-family: 'Roboto Mono', 'Courier New', monospace;
  font-size: 0.82rem;
  color: var(--cyan);
  white-space: nowrap;
}

.cmd-desc { color: var(--text-dim); }

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--gap-sm);
}

.event-card {
  background: var(--bg-surface);
  border: 1px solid var(--purple-border);
  border-left: 3px solid var(--purple);
  border-radius: var(--radius);
  padding: var(--gap-sm) var(--gap-md);
  transition: border-color var(--t);
}

.event-card:hover { border-color: var(--purple-light); }

.event-name {
  font-family: var(--font-title);
  font-size: 0.82rem;
  color: var(--text-bright);
  margin-bottom: 0.2rem;
}

.event-schedule {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Rankings header (tabs + timestamp) */
.rankings-header { margin-bottom: var(--gap-md); }

.refresh-info {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
}

#refresh-ts { color: var(--gold); }

/* Info page — eyebrow label encima del título de sección */
.info-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--purple-light);
  margin-bottom: 0.4rem;
  opacity: 0.8;
}

/* Clave no-comando (para rates, resets, etc.) */
.info-key {
  font-size: 0.85rem;
  color: var(--text);
}

/* Loading state para rankings */
.rankings-loading {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

@media (max-width: 600px) {
  .cmd-item { grid-template-columns: 1fr; gap: 0.25rem; }
  .tab-btn  { font-size: 0.65rem; padding: 0.5rem 0.75rem; }
}

/* ── Alertas ────────────────────────────────────────────────── */
.alert {
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: var(--gap-md);
  display: none;
  align-items: flex-start;
  gap: 0.5rem;
  border: 1px solid transparent;
  animation: fadeUp 0.3s ease;
}

.alert.visible { display: flex; }

.alert--success {
  background: rgba(0, 180, 100, 0.1);
  border-color: rgba(0, 180, 100, 0.35);
  color: #4ade80;
}

.alert--error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.alert--info {
  background: var(--purple-glow);
  border-color: var(--purple-border);
  color: var(--purple-light);
}

/* ── Formularios ────────────────────────────────────────────── */
.form-page {
  min-height: calc(100vh - var(--header-h) - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gap-xl) var(--gap-md);
  background:
    radial-gradient(ellipse 60% 80% at 30% 50%, rgba(124,63,196,0.15) 0%, transparent 60%),
    var(--bg);
}

.form-card {
  background: var(--bg-mid);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius-lg);
  padding: var(--gap-xl) var(--gap-lg);
  width: 100%;
  max-width: 440px;
  position: relative;
  overflow: hidden;
}

.form-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--gold), transparent);
}

.form-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--gold);
  margin-bottom: 0.25rem;
  text-align: center;
  filter: drop-shadow(0 0 16px var(--gold-glow));
}

.form-subtitle {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: var(--gap-lg);
}

.form-group {
  margin-bottom: var(--gap-md);
}

.form-label {
  display: block;
  font-family: var(--font-title);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--text-bright);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color var(--t), box-shadow var(--t);
  outline: none;
}

.form-input:focus {
  border-color: var(--purple-light);
  box-shadow: 0 0 0 3px rgba(124, 63, 196, 0.15);
}

.form-input::placeholder { color: var(--text-dim); }

.form-input.error {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.field-error {
  font-size: 0.75rem;
  color: #f87171;
  margin-top: 0.3rem;
  display: none;
}

.field-error.visible { display: block; }

.form-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

.form-actions {
  margin-top: var(--gap-lg);
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}

.btn-full { width: 100%; justify-content: center; }

.form-link {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.form-link a { color: var(--gold); }
.form-link a:hover { color: var(--gold-light); }

/* Estado loading del botón */
.btn[data-loading="true"] {
  opacity: 0.6;
  pointer-events: none;
}

/* ── UserCP ─────────────────────────────────────────────────── */
.usercp-layout {
  padding: var(--gap-lg) var(--gap-lg) var(--gap-xl);
  display: flex;
  flex-direction: column;
  gap: var(--gap-lg);
}

.usercp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-md);
}

.account-card {
  background: var(--bg-surface);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius-lg);
  padding: var(--gap-md);
  position: relative;
  overflow: hidden;
}

.account-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.account-card__title {
  font-family: var(--font-title);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: var(--gap-sm);
}

.account-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.85rem;
  gap: var(--gap-sm);
}

.account-info-row:last-child { border-bottom: none; }
.account-info-row__label { color: var(--text-dim); white-space: nowrap; }
.account-info-row__value { color: var(--text-bright); text-align: right; font-weight: 500; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.65rem;
  font-family: var(--font-title);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

.badge--vip {
  background: linear-gradient(135deg, var(--gold), #a8780a);
  color: #0d0b14;
  font-weight: 700;
}

.badge--normal {
  background: var(--bg-raised);
  color: var(--text-dim);
  border: 1px solid var(--purple-border);
}

/* Personajes en el usercp */
.char-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.char-item {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  background: var(--bg-raised);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius);
  transition: border-color var(--t);
  flex-wrap: wrap;
}

.char-item:hover { border-color: var(--gold-border); }

/* ── Panel de Opciones de personaje ── */
.game-options-card { border-color: var(--cyan-glow); }
.game-options-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 0 0 1.25rem;
}
.game-options-selector {
  margin-bottom: 1.5rem;
}
.game-options-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.game-option-btn-group { display: flex; flex-direction: column; gap: 0.5rem; }
.game-option-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  text-align: left;
  padding: 0.875rem 1rem;
}
.game-option-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.game-option-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1; }
.game-option-text { flex: 1; min-width: 0; }
.game-option-btn strong { display: block; font-size: 0.85rem; margin-bottom: 2px; white-space: nowrap; }
.game-option-btn small  { display: block; font-size: 0.72rem; color: var(--text-dim); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.char-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.btn-sm {
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: calc(var(--radius) / 2);
}

.btn-danger {
  background: transparent;
  border-color: color-mix(in srgb, #e05757 40%, transparent);
  color: #e05757;
}
.btn-danger:hover:not(:disabled) {
  background: color-mix(in srgb, #e05757 15%, transparent);
  border-color: #e05757;
}

.char-avatar {
  width: 36px; height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.char-name {
  font-family: var(--font-title);
  font-size: 0.85rem;
  color: var(--text-bright);
}

.char-class {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.char-stats {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.char-stats span { color: var(--gold); font-weight: 600; }

/* Balance WCoin */
.balance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-sm);
}

.balance-item {
  text-align: center;
  background: var(--bg-raised);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius);
  padding: var(--gap-sm);
}

.balance-amount {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--gold);
  display: block;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.balance-label {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Formularios inline dentro del usercp */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}

/* ── Página de donaciones ────────────────────────────────────── */
.donate-hero {
  text-align: center;
  padding: var(--gap-xl) var(--gap-lg) var(--gap-lg);
  background:
    radial-gradient(ellipse 70% 100% at 50% 0%, rgba(200,168,75,0.1) 0%, transparent 60%),
    var(--bg-mid);
  border-bottom: 1px solid var(--gold-border);
}

.donate-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 20px var(--gold-glow));
}

.donate-hero-sub {
  color: var(--text-dim);
  font-size: 0.9rem;
  max-width: 500px;
  margin: 0 auto;
}

.donate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap-md);
}

.donate-card {
  background: var(--bg-surface);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius-lg);
  padding: var(--gap-lg) var(--gap-md);
  text-align: center;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}

.donate-card:hover {
  border-color: var(--gold-border);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 24px var(--gold-glow);
}

.donate-card--popular {
  border-color: var(--gold-border);
  box-shadow: 0 0 20px var(--gold-glow);
}

.donate-card--popular::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.donate-badge {
  position: absolute;
  top: 0.875rem;
  right: 0.875rem;
  font-size: 0.6rem;
  font-family: var(--font-title);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--gold);
  color: #0d0b14;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
}

.donate-name {
  font-family: var(--font-title);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.donate-wcoin {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold);
  font-weight: 700;
  line-height: 1;
}

.donate-wcoin-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: -0.25rem;
}

.donate-price {
  font-size: 1.1rem;
  color: var(--text-bright);
  font-weight: 500;
}

.donate-cta {
  margin-top: auto;
}

/* Aviso cuando no hay URL de pago configurada */
.donate-pending-notice {
  background: rgba(200,168,75,0.08);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius);
  padding: var(--gap-md);
  text-align: center;
  color: var(--gold);
  font-size: 0.875rem;
  margin-bottom: var(--gap-lg);
}

/* ── Perfil público de jugador ── */
.profile-layout {
  padding: var(--gap-lg) var(--gap-lg) var(--gap-xl);
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--gap-lg);
  align-items: start;
}

.profile-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: var(--gap-lg);
  position: relative;
  overflow: hidden;
}
.profile-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple) 0%, var(--gold) 100%);
  opacity: 0.5;
  border-radius: var(--radius) var(--radius) 0 0;
}

.profile-avatar-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.profile-avatar-img {
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: var(--radius);
  filter: drop-shadow(0 4px 16px var(--purple-glow));
  object-fit: cover;
}

.profile-status {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 12px;
  border-radius: 20px;
}
.profile-status--online  { color: var(--cyan);      background: color-mix(in srgb, var(--cyan) 12%, transparent);      border: 1px solid var(--cyan); }
.profile-status--offline { color: var(--text-dim);  background: color-mix(in srgb, var(--text-dim) 10%, transparent);  border: 1px solid var(--border); }

.profile-guild {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.profile-guild-label { font-size: 0.68rem; color: var(--text-dim); letter-spacing: 0.08em; text-transform: uppercase; }
.profile-guild-name  { font-family: var(--font-title); font-size: 0.95rem; color: var(--gold); }

.profile-pk-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid;
}

.profile-stats-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.profile-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 4px;
  transition: background var(--t);
}
.profile-stat-row:nth-child(odd)  { background: rgba(255,255,255,0.03); }
.profile-stat-row:nth-child(even) { background: transparent; }
.profile-stat-row:hover           { background: rgba(255,255,255,0.06); }
.profile-stat-label { color: var(--text-dim); font-size: 0.82rem; }
.profile-stat-value { font-weight: 700; color: #e8e2ff; font-family: var(--font-title); font-size: 0.85rem; letter-spacing: 0.02em; }

.profile-divider {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
}

.profile-section-title {
  font-family: var(--font-title);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

/* ── Página de Descargas ── */
.downloads-grid {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
  max-width: 860px;
  margin: 0 auto;
}

.download-card {
  display: grid;
  grid-template-columns: 4rem 1fr auto;
  gap: 1.25rem;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  transition: border-color var(--t), background var(--t);
}
.download-card:hover { border-color: var(--gold-border); background: var(--bg-raised); }

.download-card__icon {
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  background: var(--gold-glow);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius);
}

.download-card__title {
  font-family: var(--font-title);
  font-size: 1rem;
  color: var(--text-bright);
  margin-bottom: 0.35rem;
}

.download-card__desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.download-card__meta { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.download-meta-tag {
  font-size: 0.68rem;
  font-family: var(--font-title);
  letter-spacing: 0.06em;
  color: var(--gold-dim);
  background: var(--gold-glow);
  border: 1px solid var(--gold-border);
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
}

.download-card__action { flex-shrink: 0; }

@media (max-width: 600px) {
  .download-card { grid-template-columns: 1fr; text-align: center; }
  .download-card__icon { margin: 0 auto; }
  .download-card__meta { justify-content: center; }
}

/* ── Formulario Agregar Stats ── */
.addstats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.addstats-row { display: flex; flex-direction: column; gap: 0.3rem; }
.addstats-label { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.addstats-input { text-align: center; font-family: var(--font-title); }
.addstats-total {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.addstats-total strong { color: var(--gold); font-family: var(--font-title); }

/* Nombre clickeable en rankings */
.rank-name-link {
  color: inherit;
  text-decoration: none;
  transition: color var(--t);
}
.rank-name-link:hover { color: var(--gold); }

@media (max-width: 768px) {
  .profile-layout { grid-template-columns: 1fr; }
  .usercp-grid { grid-template-columns: 1fr; }
  .balance-grid { grid-template-columns: repeat(3, 1fr); }
  .form-card { padding: var(--gap-lg) var(--gap-md); }
}

/* ── Noticias ── */
.news-card {
  background: var(--bg-surface);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius);
  padding: var(--gap-md);
  margin-bottom: var(--gap-md);
  max-width: 860px;
}
.news-meta   { display:flex; gap:1rem; align-items:center; margin-bottom:.5rem; }
.news-category { font-size:.68rem; font-family:var(--font-title); letter-spacing:.1em; text-transform:uppercase; color:var(--gold); background:var(--gold-glow); border:1px solid var(--gold-border); padding:2px 8px; border-radius:20px; }
.news-date   { font-size:.78rem; color:var(--text-dim); }
.news-title  { font-family:var(--font-title); font-size:1.05rem; color:var(--text-bright); margin-bottom:.4rem; }
.news-summary{ font-size:.88rem; color:var(--text); margin-bottom:.5rem; }
.news-content{ font-size:.85rem; color:var(--text-dim); line-height:1.7; border-top:1px solid var(--border); padding-top:.75rem; margin-top:.5rem; }
