/* Sindarin — hoja de estilos · xtr4ng3 (github.com/xtr4ng3-oxlgr) */

:root {
  /* ---- Tema: negro / dorado / violeta-magenta ---- */
  --bg-0: #07060a;            /* fondo más oscuro */
  --bg-1: #0d0b12;            /* fondo base */
  --bg-2: #141020;            /* superficies / tarjetas */
  --bg-3: #1c1630;            /* hover de superficies */

  --gold: #d4a437;            /* dorado principal */
  --gold-bright: #f2c14e;     /* dorado brillante (glow) */
  --gold-dim: #8a6d1f;

  --accent: #b434e6;          /* magenta/violeta */
  --accent-bright: #d65bff;
  --accent-soft: #7b2fae;

  --text: #f4efe6;            /* texto principal */
  --text-dim: #b4a891;        /* texto secundario */
  --text-mute: #7a7059;       /* texto tenue */

  --danger: #e05a5a;
  --success: #6fd6a0;

  --border: rgba(212, 164, 55, 0.22);
  --border-soft: rgba(212, 164, 55, 0.12);

  --font-display: 'Cinzel', serif;   /* títulos */
  --font-body: 'Inter', system-ui, sans-serif; /* cuerpo */

  --radius: 14px;
  --radius-sm: 9px;

  --shadow-card: 0 6px 24px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 26px rgba(212, 164, 55, 0.35);
  --shadow-glaccent: 0 0 20px rgba(180, 52, 230, 0.35);

  --ease: cubic-bezier(0.33, 1, 0.68, 1);
  --speed-fast: 0.18s;
  --speed: 0.32s;

  --nav-h: 64px;
}

/* BASE / RESET */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(180, 52, 230, 0.14), transparent 60%),
    radial-gradient(1000px 500px at 0% 110%, rgba(212, 164, 55, 0.10), transparent 60%),
    var(--bg-0);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-bright); text-decoration: none; transition: color var(--speed-fast) var(--ease); }
a:hover { color: var(--text); }

code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--gold-bright);
  font-size: 0.88rem;
  display: inline-block;
}

/* FONDO GENERAL DEL SITIO (opcional) */
#site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
#site-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(7, 6, 10, var(--bg-overlay, 0.6));
}

h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; }

img { max-width: 100%; display: block; }

button { font-family: inherit; cursor: pointer; }

.container { width: min(1180px, 92vw); margin-inline: auto; }

.hidden { display: none !important; }

/* Títulos de sección */
.section-head { text-align: center; margin: 0 auto 44px; }
.section-head .eyebrow {
  display: inline-block;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent-bright);
  margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); color: var(--gold-bright); }
.section-head .sub { color: var(--text-dim); margin-top: 10px; font-size: 0.98rem; }

/* SCROLL ANIMATIONS (fade-in / slide-up) */
[data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
[data-animate="fade"] { transform: translateY(0); }
[data-animate="left"] { transform: translateX(-28px); }
[data-animate="right"] { transform: translateX(28px); }
[data-animate].in-view { opacity: 1; transform: none; }

/* retardo opcional en el grid (0-12, 150ms escalonado) */
[data-animate][data-delay="1"] { transition-delay: 0.12s; }
[data-animate][data-delay="2"] { transition-delay: 0.24s; }
[data-animate][data-delay="3"] { transition-delay: 0.36s; }
[data-animate][data-delay="4"] { transition-delay: 0.48s; }
[data-animate][data-delay="5"] { transition-delay: 0.60s; }

/* NAVBAR */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 900;
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg-1) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  transition: box-shadow var(--speed) var(--ease);
}
.navbar.scrolled { box-shadow: var(--shadow-card); }

.nav-inner {
  width: min(1180px, 94vw);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Logo: circular, escala con la altura del navbar */
.nav-logo {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.nav-logo img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--border);
  box-shadow: 0 0 12px rgba(212, 164, 55, 0.28);
}
.nav-logo .logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(212, 164, 55, 0.4));
  white-space: nowrap;
  text-align: center;
}

.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-links a.link {
  position: relative;
  padding: 9px 14px;
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.94rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  isolation: isolate;
  transition: color var(--speed) var(--ease), background var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease), text-shadow var(--speed) var(--ease);
}
/* efecto "congelado": capa de escarcha oscura que se asienta al pasar el mouse */
.nav-links a.link::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 140% at 30% 0%, rgba(210, 224, 236, 0.16), transparent 60%),
    linear-gradient(160deg, rgba(60, 70, 88, 0.55), rgba(18, 22, 32, 0.35));
  border: 1px solid rgba(197, 214, 228, 0.16);
  border-radius: inherit;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity var(--speed) var(--ease), transform var(--speed) var(--ease);
}
.nav-links a.link:hover {
  color: #e8f1f7;
  text-shadow: 0 0 9px rgba(190, 214, 232, 0.55);
}
.nav-links a.link:hover::before {
  opacity: 1;
  transform: scale(1);
  backdrop-filter: blur(3px);
}
.nav-links a.link.active { color: var(--gold-bright); }
.nav-links a.link.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 3px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  border-radius: 2px;
}

.nav-actions { display: flex; align-items: center; gap: 10px; }

.balance-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gold-bright);
}
.balance-chip .coins {
  width: 15px; height: 15px;
  background: radial-gradient(circle at 35% 30%, #ffe9a8, var(--gold) 60%, var(--gold-dim));
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(212, 164, 55, 0.6);
  display: inline-block;
}

.nav-toggle {
  display: none;
  background: none; border: none;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
}
.nav-toggle:hover { background: var(--bg-2); }

/* HERO */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--nav-h) + 40px) 0 60px;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg video, .hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 6, 10, 0.5), var(--bg-0) 82%),
    radial-gradient(700px 400px at 20% 30%, rgba(180, 52, 230, 0.25), transparent 60%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  text-align: center;
  margin-inline: auto;
  animation: heroIn 1s var(--ease) both;
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: none; }
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent-bright);
  padding: 7px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  margin-bottom: 22px;
}
.hero-content h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 900;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold) 55%, var(--gold-dim));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 18px rgba(212, 164, 55, 0.35));
  margin-bottom: 18px;
}
.hero-content .sub {
  color: var(--text-dim);
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 520px;
  margin: 0 auto 30px;
}
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* BUTTONS (componente reutilizable) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform var(--speed-fast) var(--ease), box-shadow var(--speed-fast) var(--ease),
              background var(--speed-fast) var(--ease), color var(--speed-fast) var(--ease);
}
.btn::after {
  content: "";
  position: absolute; top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s var(--ease);
}
.btn:hover::after { left: 130%; }
.btn:active { transform: scale(0.96); }

/* variantes */
.btn-gold {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #1a1204;
  border-color: color-mix(in srgb, var(--gold-bright) 50%, transparent);
  box-shadow: 0 4px 18px rgba(212, 164, 55, 0.35);
}
.btn-gold:hover { box-shadow: var(--shadow-glow); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--gold-bright); color: var(--gold-bright); box-shadow: var(--shadow-glow); transform: translateY(-2px); }

.btn-accent {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: #fff;
  border-color: color-mix(in srgb, var(--accent-bright) 50%, transparent);
  box-shadow: 0 4px 18px rgba(180, 52, 230, 0.35);
}
.btn-accent:hover { box-shadow: var(--shadow-glaccent); transform: translateY(-2px); }

.btn-dim {
  background: var(--bg-3);
  color: var(--text-dim);
  border-color: var(--border-soft);
}
.btn-dim:hover { color: var(--text); border-color: var(--border); }

.btn-lrg { padding: 15px 32px; font-size: 1.05rem; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* COUNTERS (estadísticas) */
.counters {
  padding: 0 0 70px;
  margin-top: -30px;
  position: relative; z-index: 2;
}
.counters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
}
.counter {
  text-align: center;
  padding: 26px 18px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border-soft);
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.counter:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: var(--border); }
.counter .num {
  font-family: var(--font-display);
  font-size: 2.1rem; font-weight: 800;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.counter .label { color: var(--text-dim); font-size: 0.85rem; margin-top: 6px; letter-spacing: 0.03em; }
.pulse-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); margin-right: 6px;
  box-shadow: 0 0 8px var(--success);
  animation: pulseDot 1.6s infinite;
}
@keyframes pulseDot { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: .5; transform: scale(0.7);} }

/* CARDS GENÉRICAS / NOTICIAS */
section.page-block { padding: 70px 0; }
.bg-alt { background: linear-gradient(180deg, var(--bg-1), transparent); }

.card {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card), var(--shadow-glow); border-color: var(--border); }

/* VÍDEO DESTACADO (YouTube embebido) */
.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* ratio 16:9 */
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.news-card .media { height: 170px; overflow: hidden; position: relative; background: radial-gradient(circle at 50% 40%, var(--bg-3), var(--bg-1)); }
.news-card .media img, .news-card .media video { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.news-card:hover .media img, .news-card:hover .media video { transform: scale(1.07); }
.news-card .media .play-hint {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--text);
  background: rgba(7, 6, 10, 0.28);
  opacity: 1; transition: opacity var(--speed) var(--ease);
  pointer-events: none;
}
.news-card:hover .media .play-hint { opacity: 0; }
.news-card .media .badge {
  position: absolute; top: 12px; left: 12px;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  padding: 4px 12px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: #fff;
}
.news-card .body { padding: 20px; }
.news-card h3 { font-size: 1.05rem; color: var(--text); margin-bottom: 8px; }
.news-card p { color: var(--text-dim); font-size: 0.9rem; }
.news-card .meta { display: flex; gap: 14px; color: var(--text-mute); font-size: 0.8rem; margin-top: 14px; }
.news-card:hover h3 { color: var(--gold-bright); }

/* FEATURES (grid con iconos) */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.feature {
  text-align: center; padding: 30px 20px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border-soft);
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.feature:hover { transform: translateY(-5px); border-color: var(--border); box-shadow: var(--shadow-card), var(--shadow-glaccent); }
.feature .icon {
  width: 58px; height: 58px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  border-radius: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 30%, var(--bg-3)), var(--bg-2));
  border: 1px solid var(--border-soft);
  color: var(--accent-bright);
  box-shadow: inset 0 0 12px rgba(180,52,230,0.15);
}
.feature h3 { font-size: 1rem; color: var(--gold-bright); margin-bottom: 8px; }
.feature p { color: var(--text-dim); font-size: 0.88rem; }

/* Realmlist — sello grabado en piedra */
.rune-seal {
  position: relative;
  isolation: isolate;
  max-width: 640px;
  margin: 0 auto 30px;
  padding: 46px 44px 40px;
  border-radius: 10px;
  text-align: center;
  background:
    /* grietas: líneas finas cruzadas a distintos ángulos */
    linear-gradient(96deg, transparent 38.5%, rgba(0,0,0,0.6) 39.2%, rgba(0,0,0,0.6) 39.5%, rgba(255,255,255,0.025) 39.7%, transparent 40.3%),
    linear-gradient(151deg, transparent 65%, rgba(0,0,0,0.5) 65.6%, transparent 66.2%),
    linear-gradient(58deg, transparent 20%, rgba(0,0,0,0.45) 20.5%, transparent 21.1%),
    linear-gradient(12deg, transparent 82%, rgba(0,0,0,0.4) 82.5%, rgba(255,255,255,0.02) 82.7%, transparent 83.3%),
    radial-gradient(140% 170% at 50% 0%, rgba(212, 164, 55, 0.08), transparent 60%),
    linear-gradient(155deg, #221c1a, #16120f 55%, #0f0c0a);
  border: 1px solid rgba(212, 164, 55, 0.32);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(212, 164, 55, 0.07),
    inset 0 2px 14px rgba(0, 0, 0, 0.65),
    0 16px 34px rgba(0, 0, 0, 0.5);
}
.rune-seal::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,0.014) 0px, rgba(255,255,255,0.014) 1px, transparent 1px, transparent 7px);
  pointer-events: none;
}
/* resplandor ambiental tipo antorcha cercana, titila suave */
.rune-seal::after {
  content: "";
  position: absolute;
  inset: -34px;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(55% 55% at 50% 42%, rgba(228, 160, 74, 0.32), rgba(180, 90, 30, 0.1) 55%, transparent 75%);
  filter: blur(20px);
  animation: emberFlicker 4.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes emberFlicker {
  0%, 100% { opacity: 0.5; }
  8%  { opacity: 0.68; }
  17% { opacity: 0.42; }
  29% { opacity: 0.62; }
  41% { opacity: 0.48; }
  53% { opacity: 0.7; }
  67% { opacity: 0.45; }
  81% { opacity: 0.58; }
  93% { opacity: 0.5; }
}
.rune-seal .eyebrow { color: var(--gold-bright); }
.rune-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--gold-bright);
  margin: 8px 0 12px;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.85), 0 -1px 0 rgba(255, 224, 160, 0.08);
}
.rune-hint { color: var(--text-dim); font-size: 0.9rem; margin: 0 auto 24px; max-width: 420px; }

.rune-corner {
  position: absolute;
  font-size: 1.3rem;
  color: var(--gold-dim);
  opacity: 0.6;
  text-shadow: 0 0 8px rgba(212, 164, 55, 0.45);
}
.rune-corner.tl { top: 14px; left: 16px; }
.rune-corner.tr { top: 14px; right: 16px; }
.rune-corner.bl { bottom: 14px; left: 16px; }
.rune-corner.br { bottom: 14px; right: 16px; }

.rune-inscription {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  padding: 17px 64px 17px 22px;
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.32));
  box-shadow: inset 0 2px 7px rgba(0, 0, 0, 0.7), inset 0 -1px 0 rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(212, 164, 55, 0.16);
  overflow-x: auto;
}
.rune-inscription code {
  background: none; border: none; padding: 0;
  color: var(--gold-bright);
  font-size: 1rem;
  text-shadow: 0 0 8px rgba(212, 164, 55, 0.32);
  white-space: nowrap;
}

.wax-seal {
  position: absolute;
  top: -22px; right: 22px;
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 28%, var(--gold-bright), var(--gold) 55%, var(--gold-dim));
  border: 2px solid rgba(0, 0, 0, 0.45);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 -3px 6px rgba(0, 0, 0, 0.3), inset 0 2px 3px rgba(255, 255, 255, 0.35);
  color: #2a1a05;
  font-size: 1.35rem;
  cursor: pointer;
  transform: rotate(-8deg);
  transition: transform var(--speed-fast) var(--ease), box-shadow var(--speed) var(--ease), background var(--speed) var(--ease);
}
.wax-seal:hover { transform: rotate(-3deg) scale(1.07); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65), var(--shadow-glow); }
.wax-seal:active, .wax-seal.stamped { transform: rotate(-3deg) scale(0.9); }
.wax-seal.stamped { background: radial-gradient(circle at 35% 28%, var(--success), #2f8f63); color: #072b19; }

@media (max-width: 640px) {
  .rune-seal { padding: 40px 22px 32px; }
  .wax-seal { top: -20px; right: 16px; width: 56px; height: 56px; }
}

/* PAGES (rutas) — transición entre secciones */
.page { display: none; }
.page.active { display: block; animation: pageIn var(--speed) var(--ease); }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.page-title { text-align: center; margin: calc(var(--nav-h) + 30px) 0 34px; }
.page-title h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--gold-bright); }
.page-title p { color: var(--text-dim); margin-top: 6px; }

/* FORO */
.search {
  flex: 1; min-width: 220px;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  transition: border-color var(--speed-fast), box-shadow var(--speed-fast);
}
.search:focus-within { border-color: var(--gold-bright); box-shadow: var(--shadow-glow); }
.search input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-family: inherit; font-size: 0.95rem;
}
.search input::placeholder { color: var(--text-mute); }

.topic { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 18px 20px; margin-bottom: 10px; }
.topic .title { color: var(--text); font-weight: 600; font-size: 0.98rem; }
.topic .title small { display: block; color: var(--text-mute); font-weight: 400; font-size: 0.78rem; margin-top: 4px; }
.topic .author { color: var(--text-dim); font-size: 0.85rem; text-align: right; }
.topic .last { color: var(--text-mute); font-size: 0.8rem; text-align: right; }

/* Foro — identidad propia, minimalista, distinta al resto del sitio.
   Redefine variables solo dentro de .forum-scope: los componentes
   genéricos (.btn, .card, .pill, encabezados) heredan la nueva paleta
   automáticamente sin duplicar reglas, y el resto del sitio no se toca. */
.forum-scope {
  --gold-bright: #7ee7d8;
  --gold: #35c9b3;
  --gold-dim: #1c6e62;
  --accent-bright: #7ee7d8;
  --accent: #35c9b3;
  --accent-soft: #1c6e62;
  --bg-0: #0a0d11;
  --bg-1: #0e1216;
  --bg-2: #131920;
  --bg-3: #171e26;
  --border: rgba(126, 231, 216, 0.22);
  --border-soft: rgba(126, 231, 216, 0.1);
  --text-dim: #9db0ac;
  --text-mute: #62726e;
  --font-display: 'Inter', system-ui, sans-serif;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow-card: 0 2px 14px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 18px rgba(126, 231, 216, 0.2);
  background: var(--bg-0);
  padding-bottom: 60px;
}
.forum-scope .btn-gold { color: #06231f; }
.forum-scope .card:hover { transform: none; box-shadow: var(--shadow-card); }

.forum-layout { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; padding-top: 10px; }
.forum-main { min-width: 0; }

/* composer estilo "compositor" plano, sin caja */
.composer-flat { display: flex; gap: 14px; padding: 10px 4px 22px; border-bottom: 1px solid var(--border-soft); }
.composer-body { flex: 1; min-width: 0; }
.composer-body textarea {
  width: 100%; resize: none; min-height: 46px;
  background: none; border: none; outline: none;
  color: var(--text); font-family: var(--font-body); font-size: 1rem; line-height: 1.4;
}
.composer-body textarea::placeholder { color: var(--text-mute); }
.composer-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--border-soft);
}
.composer-select {
  background: none; border: 1px solid var(--border-soft); border-radius: 999px;
  color: var(--text-dim); font-family: var(--font-body); font-size: 0.78rem; padding: 5px 12px;
}
.composer-locked { padding: 20px 4px; text-align: center; border-bottom: 1px solid var(--border-soft); }
.composer-locked p { color: var(--text-dim); margin-bottom: 12px; font-size: 0.92rem; }

/* tabs de categoría, subrayado minimalista (sin pills rellenos) */
.forum-tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--border-soft); margin-bottom: 4px; }
.forum-tab {
  padding: 12px 14px; background: none; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  color: var(--text-mute); font-family: var(--font-body); font-size: 0.85rem; font-weight: 500;
  transition: color var(--speed-fast) var(--ease), border-color var(--speed-fast) var(--ease);
}
.forum-tab:hover { color: var(--text); }
.forum-tab.active { color: var(--accent-bright); border-color: var(--accent-bright); }

/* feed: filas separadas por línea, sin tarjetas pesadas */
.feed { display: block; }
.post-row { display: flex; gap: 14px; padding: 18px 4px; border-bottom: 1px solid var(--border-soft); transition: background var(--speed-fast) var(--ease); }
.post-row:last-child { border-bottom: none; }
.post-row:hover { background: rgba(255, 255, 255, 0.014); }
.post-body { flex: 1; min-width: 0; }
.post-avatar {
  width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
  background: color-mix(in srgb, var(--class-color, var(--accent)) 20%, var(--bg-2));
  border: 1px solid color-mix(in srgb, var(--class-color, var(--accent)) 45%, transparent);
}
.post-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 0.86rem; }
.post-name { font-weight: 700; }
.post-badge {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.05em;
  color: var(--bg-0); background: var(--accent-bright);
  padding: 1px 7px; border-radius: 999px;
}
.post-class, .post-dot, .post-time { color: var(--text-mute); }
.post-pin { font-size: 1rem; opacity: 0.75; margin-left: auto; }
.post-owner-actions { display: flex; gap: 2px; margin-left: auto; }
.post-icon-btn {
  width: 26px; height: 26px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: 50%;
  color: var(--text-mute); font-size: 0.8rem;
  transition: all var(--speed-fast) var(--ease);
}
.post-icon-btn:hover { color: var(--text); background: var(--bg-2); }
.post-text { color: var(--text-dim); font-size: 0.94rem; line-height: 1.55; margin: 6px 0 10px; white-space: pre-wrap; }
.post-edited-tag { color: var(--text-mute); font-size: 0.76rem; font-style: italic; }

.post-edit { margin: 6px 0 10px; }
.post-edit-textarea {
  width: 100%; min-height: 70px; resize: vertical;
  background: var(--bg-1); border: 1px solid var(--accent-bright);
  border-radius: var(--radius-sm); padding: 10px 12px;
  color: var(--text); font-family: inherit; font-size: 0.94rem; outline: none;
  box-shadow: 0 0 0 3px rgba(126, 231, 216, 0.14);
}
.post-edit-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.post-actions { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.reaction-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px; background: none; border: none;
  border-radius: 999px; color: var(--text-mute); font-size: 0.8rem;
  transition: all var(--speed-fast) var(--ease);
}
.reaction-btn:hover { background: var(--bg-2); color: var(--text); }
.reaction-btn.active { color: var(--accent-bright); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.reaction-count { font-weight: 600; }

.post-comments { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-soft); display: grid; gap: 7px; }
.post-comment { font-size: 0.85rem; color: var(--text-dim); }
.post-comment b { color: var(--text); }
.post-comment .c-time { color: var(--text-mute); font-size: 0.74rem; margin-left: 6px; }
.comment-delete { background: none; border: none; color: var(--text-mute); font-size: 0.72rem; margin-left: 8px; cursor: pointer; }
.comment-delete:hover { color: var(--danger); }
.comment-input { display: flex; gap: 8px; margin-top: 4px; }
.comment-input input {
  flex: 1; background: var(--bg-2); border: 1px solid var(--border-soft);
  border-radius: 999px; padding: 8px 14px;
  color: var(--text); font-family: inherit; font-size: 0.86rem; outline: none;
}
.comment-input input:focus { border-color: var(--accent-bright); }

/* sidebar: listas planas separadas por línea, sin tarjetas pesadas */
.forum-sidebar { display: grid; gap: 22px; position: sticky; top: calc(var(--nav-h) + 24px); }
.sidebar-card { padding: 0; }
.sidebar-card:not(:first-child) { padding-top: 22px; border-top: 1px solid var(--border-soft); }
.sidebar-card h4 {
  color: var(--text); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.09em;
  font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 7px;
}
.online-list { display: grid; gap: 10px; }
.online-item { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; }
.online-icon {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; font-size: 0.7rem;
  background: color-mix(in srgb, var(--class-color, var(--accent)) 22%, var(--bg-2));
}
.online-name { font-weight: 600; }
.online-class { color: var(--text-mute); font-size: 0.72rem; margin-left: auto; }
.trend-list { display: flex; flex-wrap: wrap; gap: 7px; }
.trend-chip {
  font-size: 0.76rem; padding: 5px 11px; border-radius: 999px;
  background: none; border: 1px solid var(--border-soft); color: var(--text-dim);
  transition: all var(--speed-fast) var(--ease);
}
.trend-chip:hover { border-color: var(--accent-bright); color: var(--accent-bright); }
.sidebar-links { display: grid; gap: 8px; }

/* widget de stream en vivo (Twitch) */
.stream-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: #ff5c7a; margin-bottom: 10px;
}
.stream-label::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: #ff5c7a; box-shadow: 0 0 8px #ff5c7a;
  animation: pulseDot 1.6s infinite;
}
.stream-embed {
  position: relative; width: 100%; padding-top: 56.25%;
  border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border-soft); background: var(--bg-2);
}
.stream-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.stream-link { display: inline-block; margin-top: 10px; font-size: 0.8rem; color: var(--accent-bright); }
.stream-link:hover { color: var(--text); }
.stream-fallback {
  padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-soft);
  background: var(--bg-2); color: var(--text-dim); font-size: 0.82rem; line-height: 1.5;
}
.stream-fallback a { display: inline-block; margin-top: 6px; color: var(--accent-bright); font-weight: 600; }
.stream-fallback a:hover { color: var(--text); }

@media (max-width: 900px) {
  .forum-layout { grid-template-columns: 1fr; }
  .forum-sidebar { position: static; }
}

/* TIENDA */
.shop-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin: calc(var(--nav-h) + 30px) 0 24px; }
.shop-head h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--gold-bright); }

.pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pill {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  color: var(--text-dim);
  font-family: var(--font-display);
  font-weight: 600; font-size: 0.85rem;
  transition: all var(--speed-fast) var(--ease);
}
.pill:hover { color: var(--text); border-color: var(--border); }
.pill.active {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #1a1204;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.product { position: relative; }
.product .thumb { height: 150px; overflow: hidden; background: radial-gradient(circle at 50% 40%, var(--bg-3), var(--bg-1)); display: flex; align-items: center; justify-content: center; }
.product .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product .tag {
  position: absolute; top: 10px; right: 10px;
  background: color-mix(in srgb, var(--accent) 85%, transparent);
  color: #fff; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 6px;
}
.product .body { padding: 16px; }
.product .body h3 { font-size: 0.98rem; color: var(--text); }
.product .body .cat { color: var(--text-mute); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.product .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.product .price { font-family: var(--font-display); font-weight: 700; color: var(--gold-bright); }
.empty-msg { text-align: center; color: var(--text-dim); padding: 40px; }
.product .empty-msg { grid-column: 1 / -1; }

/* AUTH (login / registro) Y PERFIL */
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; max-width: 900px; margin-inline: auto; padding-bottom: 60px; }
.auth-card { padding: 30px; }
.auth-card h2 { font-size: 1.2rem; color: var(--gold-bright); margin-bottom: 6px; }
.auth-card .hint { color: var(--text-mute); font-size: 0.84rem; margin-bottom: 20px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.82rem; color: var(--text-dim); margin-bottom: 7px; letter-spacing: 0.03em; }
.field input {
  width: 100%; padding: 12px 14px;
  background: var(--bg-1); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); color: var(--text); font-family: inherit; font-size: 0.95rem;
  outline: none;
  transition: border-color var(--speed-fast), box-shadow var(--speed-fast);
}
.field input:focus { border-color: var(--gold-bright); box-shadow: 0 0 0 3px rgba(212,164,55,0.18); }
.field input.is-error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(224,90,90,0.18); }
.field input.is-valid { border-color: var(--success); box-shadow: 0 0 0 3px rgba(111,214,160,0.15); }
.field .msg { font-size: 0.78rem; margin-top: 6px; min-height: 1em; }
.field .msg.err { color: var(--danger); }
.field .msg.ok { color: var(--success); }

/* PERFIL */
.profile-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 26px; align-items: start; padding-bottom: 60px; }
.profile-card { text-align: center; padding: 30px 22px; }
.avatar {
  position: relative; width: 120px; height: 120px; margin: 0 auto 18px;
  border-radius: 50%; overflow: hidden;
  border: 3px solid var(--border);
  box-shadow: var(--shadow-glow);
  transition: border-color var(--speed-fast);
}
.avatar:hover { border-color: var(--gold-bright); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar .avatar-edit {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(7,6,10,0.6); color: #fff; font-size: 0.72rem; letter-spacing: 0.06em;
  opacity: 0; transition: opacity var(--speed-fast); cursor: pointer;
  font-weight: 600;
}
.avatar:hover .avatar-edit { opacity: 1; }
.avatar-edit input { display: none; }

.profile-card h2 { font-size: 1.15rem; color: var(--text); }
.profile-card .pname { color: var(--gold-bright); }
.profile-card .joined { color: var(--text-mute); font-size: 0.8rem; margin: 6px 0 18px; }
.profile-stat { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--border-soft); font-size: 0.86rem; color: var(--text-dim); }
.profile-stat b { color: var(--gold-bright); font-weight: 600; }

.chars-list { display: grid; gap: 12px; }
.char-row {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-2); border: 1px solid var(--border-soft);
  transition: border-color var(--speed-fast), box-shadow var(--speed-fast);
}
.char-row:hover { border-color: var(--border); box-shadow: var(--shadow-card); }
.char-icon { font-size: 1.9rem; width: 48px; text-align: center; }
.char-meta { flex: 1; }
.char-meta .cname { font-weight: 600; color: var(--text); }
.char-meta .cinfo { color: var(--text-mute); font-size: 0.8rem; }
.char-lvl {
  font-family: var(--font-display); font-weight: 800; color: var(--gold-bright);
  background: var(--bg-1); border: 1px solid var(--border-soft);
  padding: 6px 12px; border-radius: 999px; font-size: 0.9rem;
}

/* MODAL */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5,4,8,0.72);
  backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--speed) var(--ease);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  width: min(460px, 92vw);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  transform: translateY(24px) scale(0.96);
  transition: transform var(--speed) var(--ease);
  text-align: center;
}
.modal-overlay.open .modal { transform: none; }
.modal .m-icon { font-size: 2.4rem; margin-bottom: 12px; }
.modal h2 { font-size: 1.3rem; color: var(--gold-bright); margin-bottom: 8px; }
.modal p { color: var(--text-dim); font-size: 0.92rem; margin-bottom: 8px; }
.modal .m-cost { font-family: var(--font-display); font-weight: 700; color: var(--gold-bright); font-size: 1.3rem; margin: 10px 0 18px; }
.modal .m-actions { display: flex; gap: 12px; margin-top: 20px; }
.modal .m-actions .btn { flex: 1; }

/* close X */
.m-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; color: var(--text-mute);
  font-size: 1.5rem; line-height: 1;
  transition: color var(--speed-fast), transform var(--speed-fast);
}
.m-close:hover { color: var(--text); transform: rotate(90deg); }

/* toast */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px);
  z-index: 1200; padding: 14px 24px; border-radius: var(--radius-sm);
  background: var(--bg-3); border: 1px solid var(--border);
  box-shadow: var(--shadow-card); color: var(--text);
  font-size: 0.92rem; font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: opacity var(--speed) var(--ease), transform var(--speed) var(--ease);
  display: flex; align-items: center; gap: 10px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--success); }
.toast .bullet-magenta { color: var(--accent-bright); }

/* FOOTER */
.footer {
  margin-top: 40px;
  border-top: 1px solid var(--border-soft);
  background: linear-gradient(180deg, transparent, var(--bg-1));
  padding: 46px 0 26px;
  font-size: 0.86rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer h4 { color: var(--gold-bright); font-size: 0.9rem; margin-bottom: 14px; letter-spacing: 0.04em; }
.footer-brand p { color: var(--text-dim); max-width: 320px; margin-top: 12px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 9px; }
.footer ul a { color: var(--text-dim); }
.footer ul a:hover { color: var(--gold-bright); }
.socials { display: flex; gap: 12px; }
.socials a {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-2); border: 1px solid var(--border-soft);
  color: var(--text-dim); font-size: 1.1rem;
  transition: all var(--speed-fast) var(--ease);
}
.socials a:hover { color: var(--gold-bright); border-color: var(--gold-bright); box-shadow: var(--shadow-glow); transform: translateY(-3px); }
.footer-bottom {
  border-top: 1px solid var(--border-soft); padding-top: 20px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  color: var(--text-mute); font-size: 0.78rem;
}
.footer-bottom .legal a { color: var(--text-mute); margin-left: 14px; }
.footer-bottom .legal a:hover { color: var(--gold-bright); }
.footer-credit { text-align: center; margin-top: 14px; }
.footer-credit a { color: var(--text-mute); font-size: 0.76rem; letter-spacing: 0.02em; }
.footer-credit a:hover { color: var(--gold-bright); }

/* RESPONSIVE */
@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h); right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-1);
    border-left: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    width: min(78vw, 300px);
    padding: 16px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform var(--speed) var(--ease);
    box-shadow: var(--shadow-card);
  }
  .nav-links.open { transform: none; }
  .nav-links a.link { padding: 13px 14px; font-size: 1rem; }
  .nav-links a.link.active::after { display: none; }
  .nav-toggle { display: block; }
  .balance-chip { display: none; }  /* se oculta en móvil para no saturar */

  .auth-wrap, .profile-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .topic { grid-template-columns: 1fr; text-align: left; }
  .topic .author, .topic .last { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}