/* ============================================================
   NivelUno.lat – styles.css
   Premium dark gaming theme with neon accents & animations
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --color-bg:         #080810;
  --color-bg-panel:   #0f0f1a;
  --color-bg-card:    #12121e;
  --color-bg-dark:    #0a0a14;
  --color-border:     #1e1e30;

  --color-cyan:       #00e5ff;
  --color-magenta:    #ff2ecb;
  --color-lime:       #aaff00;
  --color-purple:     #8b5cf6;
  --color-orange:     #ff6b2b;
  --color-accent:     var(--color-cyan);

  --color-text:       #c8c8d8;
  --color-text-muted: #6e6e88;
  --color-heading:    #ffffff;

  --font-display:     'Rajdhani', system-ui, sans-serif;
  --font-body:        'Inter', system-ui, sans-serif;

  --radius-sm:        8px;
  --radius-md:        12px;
  --radius-lg:        18px;
  --radius-xl:        24px;

  --shadow-card:      0 8px 32px rgba(0,0,0,0.6);
  --shadow-glow:      0 0 40px rgba(0,229,255,0.08);
  --glow-cyan:        0 0 20px rgba(0,229,255,0.3);
  --glow-magenta:     0 0 20px rgba(255,46,203,0.3);
  --glow-purple:      0 0 20px rgba(139,92,246,0.3);

  --header-h:         68px;
  --container-max:    1200px;
}

/* --- Keyframes --- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes pulse-glow {
  0%, 100% { opacity: .6; }
  50% { opacity: 1; }
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes gradient-text {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes scanner {
  0% { transform: translateY(-100%); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(100%); opacity: 0; }
}
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Apply animations --- */
.article-main section {
  animation: fade-in-up .8s cubic-bezier(.2, .8, .2, 1) both;
}
.article-main section:nth-child(even) {
  background: rgba(255,255,255,.02);
  padding: 2rem;
  border-radius: var(--radius-md);
  margin-left: -2rem;
  margin-right: -2rem;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 5px;
  border: 2px solid var(--color-bg);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-cyan);
}

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

/* Subtle grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color .2s, text-shadow .2s;
}
a:hover { color: #fff; text-shadow: var(--glow-cyan); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-heading);
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 700;
  background: linear-gradient(90deg, #fff, var(--color-cyan), var(--color-magenta), #fff);
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-text 8s linear infinite;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: .75rem;
  letter-spacing: -0.01em;
}
h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: .5rem; }

p { margin-bottom: 1rem; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: .4rem; }

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
  position: relative;
  z-index: 1;
}

.accent { color: var(--color-cyan); }

.section { padding: 4rem 0; }
.section-dark { background: var(--color-bg-dark); padding: 4rem 0; }
.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-cyan), var(--color-magenta));
  border-radius: 2px;
  margin: .75rem auto 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .65rem 1.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .25s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: linear-gradient(135deg, var(--color-cyan), #00b4cc);
  color: #000;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(0,229,255,.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #33edff, var(--color-cyan));
  color: #000;
  box-shadow: 0 6px 25px rgba(0,229,255,.4);
  transform: translateY(-2px);
  text-shadow: none;
}
.btn-outline {
  background: rgba(255,255,255,.04);
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-outline:hover {
  border-color: var(--color-cyan);
  color: var(--color-cyan);
  background: rgba(0,229,255,.06);
}
.btn-lg { padding: .85rem 2.4rem; font-size: 1.15rem; }
.btn-glow {
  background: linear-gradient(135deg, var(--color-cyan), var(--color-purple));
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(0,229,255,.3), 0 4px 20px rgba(139,92,246,.2);
}
.btn-glow:hover {
  box-shadow: 0 6px 30px rgba(0,229,255,.45), 0 6px 30px rgba(139,92,246,.35);
  transform: translateY(-2px);
  color: #fff;
  text-shadow: none;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(8,8,16,.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(0,229,255,.1);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 100%;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon { font-size: 1.6rem; filter: drop-shadow(0 0 6px rgba(0,229,255,.4)); }
.logo-text {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  text-shadow: none;
  letter-spacing: -.02em;
}
.logo:hover .logo-text { text-shadow: 0 0 12px rgba(0,229,255,.5); }

/* Main Nav */
.main-nav { flex: 1; }
.main-nav ul {
  display: flex;
  gap: .25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.main-nav a {
  display: block;
  padding: .45rem .85rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: .9rem;
  font-weight: 500;
  transition: all .2s;
  white-space: nowrap;
  position: relative;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--color-cyan);
  background: rgba(0,229,255,.08);
  text-shadow: none;
}
.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--color-cyan);
  border-radius: 1px;
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-left: auto;
}

/* Search */
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
#search-input {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  padding: .45rem 2.4rem .45rem 1rem;
  color: var(--color-text);
  font-size: .875rem;
  width: 200px;
  transition: all .3s ease;
  outline: none;
}
#search-input:focus {
  border-color: var(--color-cyan);
  box-shadow: 0 0 0 3px rgba(0,229,255,.12), var(--glow-cyan);
  width: 280px;
  background: rgba(0,229,255,.03);
}
#search-input::placeholder { color: var(--color-text-muted); }
.search-icon {
  position: absolute;
  right: .75rem;
  font-size: .85rem;
  pointer-events: none;
  opacity: .6;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   AD SLOTS
   ============================================================ */
.ad-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: .5rem 0;
  background: var(--color-bg-dark);
}
.ad-header { border-bottom: 1px solid var(--color-border); }
.ad-incontent { margin: 2rem 0; }
.ad-placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255,255,255,.02);
  border: 1px dashed rgba(255,255,255,.08);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: .75rem;
  font-family: var(--font-body);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 6rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Ambient glow orbs */
.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0,229,255,.12) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  animation: pulse-glow 6s ease-in-out infinite;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139,92,246,.1) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  animation: pulse-glow 8s ease-in-out infinite 2s;
  pointer-events: none;
}

.hero h1 {
  margin-bottom: 1.25rem;
  animation: fade-in-up .6s ease-out;
  position: relative;
  z-index: 1;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 1rem;
  animation: fade-in-up .6s ease-out .1s both;
  position: relative;
  z-index: 1;
}

/* Badge pills in hero */
.hero-badges {
  display: flex;
  gap: .6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  animation: fade-in-up .6s ease-out .2s both;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .85rem;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
  font-family: var(--font-display);
  border: 1px solid;
}
.hero-badge--fire {
  background: rgba(255,107,43,.1);
  border-color: rgba(255,107,43,.3);
  color: var(--color-orange);
}
.hero-badge--new {
  background: rgba(170,255,0,.08);
  border-color: rgba(170,255,0,.25);
  color: var(--color-lime);
}
.hero-badge--star {
  background: rgba(139,92,246,.1);
  border-color: rgba(139,92,246,.3);
  color: var(--color-purple);
}

.hero-cta {
  animation: fade-in-up .6s ease-out .3s both;
  position: relative;
  z-index: 1;
}

/* Stats bar */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  animation: fade-in-up .6s ease-out .4s both;
  position: relative;
  z-index: 1;
}
.stat {
  text-align: center;
}
.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-cyan);
  line-height: 1.1;
}
.stat-label {
  font-size: .8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ============================================================
   TICKER / NEWS BAR
   ============================================================ */
.ticker-bar {
  background: linear-gradient(90deg, rgba(0,229,255,.06), rgba(139,92,246,.06), rgba(255,46,203,.06));
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
  padding: .55rem 0;
  position: relative;
  z-index: 1;
}
.ticker-inner {
  display: flex;
  animation: ticker-scroll 30s linear infinite;
  width: max-content;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: 0 2rem;
  font-size: .82rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  font-weight: 500;
}
.ticker-item .ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-cyan);
  flex-shrink: 0;
}
.ticker-item strong {
  color: var(--color-heading);
}

/* ============================================================
   SEARCH RESULTS
   ============================================================ */
.search-results { padding: 2rem 0; }
.search-results h2 { margin-bottom: 1.5rem; }

/* ============================================================
   CARDS GRID
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

.card {
  background: rgba(15, 15, 26, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .35s cubic-bezier(.4,0,.2,1);
  position: relative;
}
.scanner-effect {
  position: relative;
  overflow: hidden;
}
.scanner-effect::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-cyan);
  box-shadow: 0 0 10px var(--color-cyan);
  animation: scanner 3s linear infinite;
  z-index: 5;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-cyan), var(--color-purple), var(--color-magenta));
  opacity: 0;
  transition: opacity .35s;
  z-index: 2;
}
.card:hover {
  transform: translateY(-10px) rotate(1deg);
  box-shadow: var(--shadow-card), 0 0 40px rgba(0,229,255,.2);
  border-color: rgba(0,229,255,.4);
}
.card:hover::before { opacity: 1; }

.card-img {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--color-bg-panel);
  transition: transform .3s ease;
}
.card:hover .card-img {
  transform: scale(1.03);
}
.card-img--photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,8,16,.02) 20%, rgba(8,8,16,.42) 100%);
  z-index: 1;
  pointer-events: none;
}
.game-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
  transition: transform .55s cubic-bezier(.4,0,.2,1), filter .35s ease;
}
.card:hover .game-card-image {
  transform: scale(1.07);
  filter: saturate(1.12) contrast(1.04);
}
/* Decorative grid on card img */
.card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 2;
}
.card-emoji {
  font-size: 4rem;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.4));
  transition: transform .4s cubic-bezier(.4,0,.2,1);
  position: relative;
  z-index: 3;
}
.card:hover .card-emoji {
  transform: scale(1.15) rotate(-3deg);
}

.article-banner {
  position: relative;
  height: clamp(220px, 35vw, 360px);
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin: 0 0 2rem;
  box-shadow: var(--shadow-card), var(--shadow-glow);
}
.article-banner.scanner-effect::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-cyan);
  box-shadow: 0 0 10px var(--color-cyan);
  animation: scanner 3s linear infinite;
  z-index: 5;
}
.article-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,8,16,0) 35%, rgba(8,8,16,.5) 100%);
  pointer-events: none;
}
.article-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.article-banner-caption {
  position: absolute;
  z-index: 1;
  left: 1rem;
  bottom: .75rem;
  color: rgba(255,255,255,.72);
  font-size: .72rem;
  margin: 0;
}

.card-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-cyan);
  background: rgba(0,229,255,.08);
  border: 1px solid rgba(0,229,255,.15);
  border-radius: 6px;
  padding: .2rem .6rem;
  margin-bottom: .7rem;
  width: fit-content;
}
.card-tag--magenta {
  color: var(--color-magenta);
  background: rgba(255,46,203,.08);
  border-color: rgba(255,46,203,.15);
}
.card-tag--purple {
  color: var(--color-purple);
  background: rgba(139,92,246,.08);
  border-color: rgba(139,92,246,.15);
}
.card-tag--lime {
  color: var(--color-lime);
  background: rgba(170,255,0,.08);
  border-color: rgba(170,255,0,.15);
}
.card-title {
  font-size: 1.1rem;
  margin-bottom: .5rem;
  color: var(--color-heading);
  transition: color .2s;
}
.card:hover .card-title { color: var(--color-cyan); }
.card-excerpt {
  font-size: .875rem;
  color: var(--color-text-muted);
  flex: 1;
  margin-bottom: .75rem;
  line-height: 1.6;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-meta-pills {
  display: flex;
  gap: .4rem;
}
.card-meta-pill {
  font-size: .7rem;
  color: var(--color-text-muted);
  background: rgba(255,255,255,.04);
  border-radius: 4px;
  padding: .15rem .45rem;
}
.card-cta {
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-cyan);
  transition: all .2s;
}
.card:hover .card-cta {
  letter-spacing: .04em;
}

/* ============================================================
   FEATURES SECTION
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.feature-card {
  background: rgba(255,255,255,.02);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all .3s ease;
}
.feature-card:hover {
  border-color: rgba(0,229,255,.2);
  background: rgba(0,229,255,.03);
  transform: translateY(-4px);
}
.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: .5rem;
}
.feature-card p {
  font-size: .875rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.6;
}

/* ============================================================
   CATEGORIES
   ============================================================ */
.categories-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
}
.category-pill {
  padding: .55rem 1.4rem;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  color: var(--color-text-muted);
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .25s ease;
}
.category-pill:hover,
.category-pill.active {
  background: rgba(0,229,255,.08);
  border-color: rgba(0,229,255,.4);
  color: var(--color-cyan);
  box-shadow: 0 0 15px rgba(0,229,255,.12);
}

/* ============================================================
   ARTICLE LAYOUT
   ============================================================ */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  align-items: start;
}

.article-main { min-width: 0; }

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}
.breadcrumbs a {
  color: var(--color-text-muted);
  transition: color .2s;
}
.breadcrumbs a:hover { color: var(--color-cyan); text-shadow: none; }
.breadcrumbs .sep { opacity: .4; }

.article-header { margin-bottom: 2rem; }
.article-header h1 { margin: .5rem 0 .4rem; }
.article-meta {
  color: var(--color-text-muted);
  font-size: .875rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.article-meta-item {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}

/* Table of Contents */
.toc {
  background: rgba(0,229,255,.03);
  border: 1px solid rgba(0,229,255,.12);
  border-left: 3px solid var(--color-cyan);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.5rem;
}
.toc h2 {
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--color-cyan);
  margin-bottom: .75rem;
}
.toc ol { padding-left: 1.25rem; margin: 0; }
.toc li { margin-bottom: .35rem; }
.toc a { color: var(--color-text); font-size: .9rem; }
.toc a:hover { color: var(--color-cyan); text-shadow: none; }

/* Article sections */
.article-main section { margin-bottom: 2.5rem; }
.article-main h2 {
  padding-top: .5rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: .5rem;
  margin-bottom: 1rem;
}
.article-main h3 { color: var(--color-cyan); margin-top: 1.25rem; }
.article-main ul, .article-main ol { margin-bottom: 1rem; }
.article-main strong { color: var(--color-heading); }

/* Callout boxes */
.callout {
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid var(--color-cyan);
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.05) 0%, rgba(8, 8, 16, 0.8) 100%);
  display: flex;
  gap: 1rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.callout-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  line-height: 1.6;
  filter: drop-shadow(0 0 5px var(--color-cyan));
}
.callout-body { flex: 1; }
.callout-body p:last-child { margin-bottom: 0; }
.callout--tip {
  border-left-color: var(--color-cyan);
}
.callout--warning {
  border-left-color: var(--color-orange);
}
.callout--code {
  border-left-color: var(--color-lime);
}

/* Tier list tables */
.tier-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.tier-table th {
  background: linear-gradient(90deg, rgba(0,229,255,.15), rgba(139,92,246,.15));
  backdrop-filter: blur(5px);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 1rem;
  text-align: left;
  border-bottom: 2px solid var(--color-cyan);
}
.tier-table td {
  padding: 1rem;
  font-size: .95rem;
  border-bottom: 1px solid rgba(255,255,255,.05);
  background: var(--color-bg-card);
  color: var(--color-text);
  transition: all 0.2s;
}
.tier-table tr:hover td {
  background: rgba(0,229,255,.05);
  color: #fff;
}
.tier-table tr td:first-child {
  font-weight: 700;
  color: var(--color-cyan);
}
.tier-label {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  padding: .25rem .7rem;
  border-radius: 4px;
  text-transform: uppercase;
}
.tier-s { background: rgba(255,215,0,.15); color: #ffd700; }
.tier-a { background: rgba(255,107,43,.15); color: var(--color-orange); }
.tier-b { background: rgba(0,229,255,.12); color: var(--color-cyan); }
.tier-c { background: rgba(139,92,246,.12); color: var(--color-purple); }

/* Palabras clave destacadas */
.kw-dinero {
  font-weight: 700;
  color: #00e676;
  text-shadow: 0 0 8px rgba(0,230,118,0.4);
}
.kw-fragmentos {
  font-weight: 700;
  color: #ce93d8;
  text-shadow: 0 0 8px rgba(206,147,216,0.4);
}
.kw-exp {
  font-weight: 700;
  color: #ffd740;
  text-shadow: 0 0 8px rgba(255,215,64,0.45);
}

/* Clickable tier labels (sea links) */
.tier-label-clickable {
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 6px;
  transition: all 0.25s ease;
}
.tier-label-clickable:hover {
  background: rgba(0,229,255,0.15);
  box-shadow: 0 0 20px rgba(0,229,255,0.4), inset 0 0 10px rgba(0,229,255,0.1);
  transform: scale(1.05);
}
.tier-label-clickable:hover .tier-label {
  color: #fff;
  text-shadow: 0 0 8px rgba(0,229,255,0.8);
}

/* Sidebar */
.article-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1.25rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.ad-sidebar {
  padding: 0;
  background: transparent;
  justify-content: flex-start;
}
.sidebar-widget {
  background: rgba(15, 15, 26, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.sidebar-widget h3 {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--color-text-muted);
  margin-bottom: .75rem;
}
.sidebar-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-links li {
  margin-bottom: .5rem;
  padding-left: .75rem;
  border-left: 2px solid var(--color-border);
  transition: border-color .2s;
}
.sidebar-links li:hover {
  border-left-color: var(--color-cyan);
}
.sidebar-links a { font-size: .9rem; color: var(--color-text); }
.sidebar-links a:hover { color: var(--color-cyan); text-shadow: none; }

/* ============================================================
   PROSE PAGES (About, Privacy)
   ============================================================ */
.prose-page {
  max-width: 760px;
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}
.prose-page h1 { margin-bottom: 1.5rem; }
.prose-page h2 {
  margin-top: 2rem;
  padding-top: .5rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: .4rem;
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(15,15,26,.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(0,229,255,.1);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: 0 -8px 32px rgba(0,0,0,.5);
}
.cookie-banner p { margin: 0; font-size: .85rem; color: var(--color-text-muted); flex: 1; min-width: 200px; }
.cookie-banner a { color: var(--color-cyan); }
.cookie-actions { display: flex; gap: .75rem; flex-shrink: 0; }
.cookie-banner.hidden { display: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-bg-dark);
  border-top: 1px solid var(--color-border);
  margin-top: 2rem;
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-cyan), var(--color-purple), var(--color-magenta), transparent);
  opacity: .4;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding: 3.5rem 1.25rem 2.5rem;
}
.footer-brand .logo-text { font-size: 1.4rem; }
.footer-brand p {
  margin-top: .5rem;
  font-size: .875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}
.footer-nav h4 {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--color-text-muted);
  margin-bottom: .75rem;
}
.footer-nav ul { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin-bottom: .4rem; }
.footer-nav a { color: var(--color-text-muted); font-size: .875rem; }
.footer-nav a:hover { color: var(--color-cyan); text-shadow: none; }
.footer-bottom {
  padding: 1.25rem;
  border-top: 1px solid var(--color-border);
  text-align: center;
}
.footer-bottom p { margin: 0; font-size: .78rem; color: var(--color-text-muted); }

/* ============================================================
   RESPONSIVE – 768px (Tablet)
   ============================================================ */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(15,15,26,.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem;
    z-index: 99;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: .25rem; }
  .main-nav a { padding: .7rem 1rem; }
  .main-nav a.active::after { display: none; }

  #search-input { width: 140px; }
  #search-input:focus { width: 180px; }

  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; order: -1; }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .hero { padding: 4rem 0 3rem; }
  .hero-stats { gap: 1.5rem; flex-wrap: wrap; }
  .stat-number { font-size: 1.6rem; }

  .features-grid { grid-template-columns: 1fr; }

  .cards-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   RESPONSIVE – 480px (Small mobile)
   ============================================================ */
@media (max-width: 480px) {
  #search-input { display: none; }
  .search-icon { display: none; }

  .hero { padding: 3rem 0 2rem; }
  .hero-badges { gap: .4rem; }
  .hero-badge { font-size: .72rem; padding: .25rem .65rem; }
  .hero-stats { gap: 1rem; }

  .footer-inner { grid-template-columns: 1fr; }

  .cookie-banner { flex-direction: column; align-items: flex-start; }
  .cookie-actions { width: 100%; }
}

/* --- Copy to Clipboard --- */
.code-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.05);
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
}
.copy-btn {
  background: var(--color-cyan);
  color: #000;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  transition: all 0.2s;
}
.copy-btn:hover { background: #33edff; }

/* --- Redeem Steps --- */
.redeem-steps {
  background: rgba(0,229,255,.05);
  border: 1px solid rgba(0,229,255,.15);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 1.5rem;
}
.updated-badge {
  display: inline-block;
  background: var(--color-lime);
  color: #000;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

/* ============================================================
   MEJORAS 2026-10 (Nivel Uno)
   ============================================================ */

/* --- Huecos de anuncio: ocultos hasta que haya anuncios reales.
       Cuando pongas un <ins class="adsbygoogle"> dentro de .ad-slot
       (en lugar del .ad-placeholder) se mostrará automáticamente. --- */
.ad-placeholder { display: none !important; }
.ad-slot:has(> .ad-placeholder:only-child) { display: none !important; }

/* --- Buscador desplegable --- */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(380px, 92vw);
  max-height: 70vh;
  overflow-y: auto;
  background: var(--color-bg-panel);
  border: 1px solid rgba(0,229,255,.18);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 50px rgba(0,0,0,.6), var(--shadow-glow);
  padding: .4rem;
  z-index: 200;
  animation: nu-drop .18s ease-out;
}
.search-hit {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .7rem;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  text-decoration: none;
}
.search-hit:hover, .search-hit.is-active {
  background: rgba(0,229,255,.08);
  color: var(--color-heading);
}
.search-hit-emoji { font-size: 1.25rem; width: 1.6rem; text-align: center; flex-shrink: 0; }
.search-hit-text { display: flex; flex-direction: column; min-width: 0; }
.search-hit-text strong { font-size: .9rem; font-weight: 600; color: var(--color-heading); }
.search-hit-text small { font-size: .75rem; color: var(--color-text-muted); }
.search-empty { padding: .8rem; margin: 0; font-size: .85rem; color: var(--color-text-muted); }
@keyframes nu-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* --- Directorio de guías (portada) --- */
.directory-intro { text-align: center; max-width: 640px; margin: -1.5rem auto 2rem; color: var(--color-text-muted); }
.dir-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 2rem;
}
.dir-tab {
  font: 600 .875rem var(--font-body);
  color: var(--color-text);
  background: rgba(255,255,255,.03);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: .5rem 1rem;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
}
.dir-tab:hover { border-color: rgba(0,229,255,.35); color: var(--color-heading); }
.dir-tab.active {
  background: rgba(0,229,255,.12);
  border-color: var(--color-cyan);
  color: var(--color-cyan);
  box-shadow: var(--glow-cyan);
}
.dir-panels { display: grid; gap: 1.5rem; }
.dir-panel {
  background: rgba(15,15,26,.6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.dir-panel.is-hidden { display: none; }
.dir-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  margin-bottom: 1rem;
}
.dir-panel-head h3 { margin: 0; font-size: 1.25rem; }
.dir-panel-head a { font-size: .85rem; font-weight: 600; }
.dir-count { font-size: .8rem; color: var(--color-text-muted); }
.island-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: .6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.island-chip {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .65rem .85rem;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  transition: border-color .2s, background .2s, transform .2s, color .2s;
}
.island-chip:hover {
  border-color: rgba(0,229,255,.4);
  background: rgba(0,229,255,.06);
  color: var(--color-heading);
  transform: translateY(-2px);
}
.island-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.island-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.island-chip .lvl {
  font-size: .72rem;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.island-chip:hover .lvl { color: var(--color-cyan); }
.island-num {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: rgba(0,229,255,.08);
  color: var(--color-cyan);
  font: 700 .7rem var(--font-display);
  flex-shrink: 0;
}

/* --- Ruta de progresión (portada) --- */
.sea-route {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  position: relative;
}
.sea-card {
  position: relative;
  display: block;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(0,229,255,.07), rgba(139,92,246,.05) 60%, transparent);
  border: 1px solid rgba(0,229,255,.15);
  color: var(--color-text);
  text-decoration: none;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.sea-card:hover { transform: translateY(-4px); border-color: rgba(0,229,255,.45); box-shadow: var(--glow-cyan); color: var(--color-text); }
.sea-card .sea-emoji { font-size: 2rem; display: block; margin-bottom: .5rem; }
.sea-card h3 { margin: 0 0 .25rem; font-size: 1.3rem; }
.sea-card .sea-lvl { font: 700 .8rem var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--color-cyan); }
.sea-card p { margin: .6rem 0 0; font-size: .9rem; color: var(--color-text-muted); }
.sea-card:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.6rem; height: 1.6rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--color-bg);
  border: 1px solid rgba(0,229,255,.3);
  color: var(--color-cyan);
  font-size: .8rem;
  z-index: 2;
}

/* --- Cómo trabajamos --- */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; counter-reset: step; }
.step-card {
  position: relative;
  padding: 1.5rem 1.25rem 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.02);
  border: 1px solid var(--color-border);
}
.step-card::before {
  counter-increment: step;
  content: '0' counter(step);
  display: block;
  font: 700 1.6rem var(--font-display);
  background: linear-gradient(90deg, var(--color-cyan), var(--color-magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: .4rem;
}
.step-card h3 { font-size: 1.05rem; margin: 0 0 .4rem; }
.step-card p { font-size: .9rem; margin: 0; color: var(--color-text-muted); }

/* --- Navegación entre guías (al final de cada guía) --- */
.guide-nav {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}
.guide-nav h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.guide-nav-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
.guide-nav-link {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.025);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  text-decoration: none;
  transition: border-color .2s, transform .2s, background .2s;
}
.guide-nav-link:hover { border-color: rgba(0,229,255,.4); background: rgba(0,229,255,.05); transform: translateY(-2px); color: var(--color-text); }
.guide-nav-link small { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--color-text-muted); }
.guide-nav-link strong { color: var(--color-heading); font-size: 1rem; }
.guide-nav-link span { font-size: .8rem; color: var(--color-cyan); }
.guide-nav-link--next { text-align: right; grid-column: 2; }
.guide-nav-more { display: flex; flex-wrap: wrap; gap: .5rem; }
.guide-nav-more a {
  font-size: .82rem;
  padding: .35rem .75rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  text-decoration: none;
}
.guide-nav-more a:hover { border-color: var(--color-cyan); color: var(--color-cyan); }

/* --- Barra de progreso de lectura y volver arriba --- */
.read-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-cyan), var(--color-purple), var(--color-magenta));
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 1000;
  box-shadow: 0 0 10px rgba(0,229,255,.6);
}
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(0,229,255,.35);
  background: rgba(15,15,26,.9);
  color: var(--color-cyan);
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .25s, transform .25s, box-shadow .25s;
  z-index: 900;
}
.back-to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.back-to-top:hover { box-shadow: var(--glow-cyan); }

/* --- TOC: sección actual --- */
.toc a.is-current { color: var(--color-cyan); font-weight: 600; }

/* --- Copiar: estado --- */
.copy-btn.copied { background: var(--color-lime); }

/* --- Aparición al hacer scroll (solo si JS activo y sin reduced-motion) --- */
.js-reveal :is(.card, .feature-card, .dir-panel, .island-chip, .callout, .table-wrapper, .widget, .sea-card, .step-card) {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s cubic-bezier(.2,.8,.2,1), transform .55s cubic-bezier(.2,.8,.2,1);
}
.js-reveal :is(.card, .feature-card, .dir-panel, .island-chip, .callout, .table-wrapper, .widget, .sea-card, .step-card).is-visible {
  opacity: 1;
  transform: none;
}

/* --- Accesibilidad: foco visible --- */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

@media (max-width: 768px) {
  .sea-route { grid-template-columns: 1fr; }
  .sea-card:not(:last-child)::after { content: '↓'; right: 50%; top: auto; bottom: -.85rem; transform: translateX(50%); }
  .guide-nav-pair { grid-template-columns: 1fr; }
  .guide-nav-link--next { grid-column: auto; }
  .island-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .island-grid { grid-template-columns: 1fr; }
  .dir-panel { padding: 1.1rem; }
}

/* --- Tablas responsivas (la clase existía en el HTML pero no en el CSS) --- */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0 1.5rem;
  border-radius: var(--radius-sm);
}
.table-wrapper > table { margin: 0; min-width: 100%; }
@media (max-width: 768px) {
  .article-main section:nth-child(even) { margin-left: 0; margin-right: 0; padding: 1.25rem 1rem; }
  .table-wrapper > table { min-width: 520px; }
  .table-wrapper > table th, .table-wrapper > table td { white-space: normal; }
}

/* --- Anclas: que la cabecera fija no tape el título --- */
[id] { scroll-margin-top: calc(var(--header-h) + 1.25rem); }
html { scroll-behavior: smooth; }

/* ============================================================
   MEJORAS 2026-10 · v2 (temas por juego, infografías, portada)
   ============================================================ */

/* --- Temas por juego --- */
body { --theme: var(--color-cyan); --theme-2: var(--color-purple); --theme-rgb: 0,229,255; }
body.theme-bf { --theme: #00e5ff; --theme-2: #ff6b2b; --theme-rgb: 0,229,255; }
body.theme-am { --theme: #ff5fd7; --theme-2: #ffb86b; --theme-rgb: 255,95,215; }
body.theme-rh { --theme: #b6ff3b; --theme-2: #ffd700; --theme-rgb: 182,255,59; }

.article-main h1 {
  background: linear-gradient(90deg, #fff, var(--theme), var(--theme-2), #fff);
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.article-header { position: relative; isolation: isolate; }
.article-header::before {
  content: '';
  position: absolute;
  inset: -5rem -3rem auto -3rem;
  height: 340px;
  background:
    radial-gradient(ellipse 45% 42% at 22% 50%, rgba(var(--theme-rgb), .16), transparent 100%),
    radial-gradient(ellipse 32% 38% at 80% 45%, color-mix(in srgb, var(--theme-2) 12%, transparent), transparent 100%);
  z-index: -1;
  pointer-events: none;
}
.article-main .card-tag {
  color: var(--theme);
  border-color: rgba(var(--theme-rgb), .35);
  background: rgba(var(--theme-rgb), .08);
}
.toc {
  background: linear-gradient(135deg, rgba(var(--theme-rgb), .06), rgba(255,255,255,.01));
  border-color: rgba(var(--theme-rgb), .18);
  border-left-color: var(--theme);
}
.toc h2 { color: var(--theme); }
.toc a:hover, .toc a.is-current { color: var(--theme); }
.toc ol li::marker { color: var(--theme); font-weight: 700; }
.article-main h3 { color: var(--theme); }

.article-main section > h2 { position: relative; padding-left: 1rem; }
.article-main section > h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: .7rem;
  bottom: .85rem;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--theme), var(--theme-2));
  box-shadow: 0 0 12px rgba(var(--theme-rgb), .55);
}

.tier-table th {
  background: linear-gradient(90deg, rgba(var(--theme-rgb), .16), color-mix(in srgb, var(--theme-2) 14%, transparent));
  border-bottom-color: var(--theme);
}
.tier-table tbody tr td { transition: background .2s; }
.tier-table tbody tr:hover td { background: rgba(var(--theme-rgb), .06); }
.tier-table tbody tr:nth-child(even) td { background-color: rgba(255,255,255,.015); }
.tier-table tbody tr:nth-child(even):hover td { background: rgba(var(--theme-rgb), .06); }

.callout { position: relative; overflow: hidden; }
.callout--tip { border-left-color: var(--theme); background: linear-gradient(90deg, rgba(var(--theme-rgb), .07) 0%, rgba(8,8,16,.8) 100%); }
.callout .callout-icon { display: inline-block; transition: transform .3s; }
.callout:hover .callout-icon { transform: scale(1.2) rotate(-8deg); }

.read-progress { background: linear-gradient(90deg, var(--theme), var(--theme-2)); box-shadow: 0 0 10px rgba(var(--theme-rgb), .6); }
.back-to-top { color: var(--theme); border-color: rgba(var(--theme-rgb), .4); }
.guide-nav-link:hover { border-color: rgba(var(--theme-rgb), .5); background: rgba(var(--theme-rgb), .06); }
.guide-nav-link span { color: var(--theme); }
.guide-nav-more a:hover { border-color: var(--theme); color: var(--theme); }
.widget-list a:hover { color: var(--theme); }

/* --- Infografías --- */
.infographic {
  margin: 1.5rem 0 2rem;
  padding: 1.25rem 1.25rem .9rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(var(--theme-rgb), .05), rgba(255,255,255,.01) 60%);
  border: 1px solid rgba(var(--theme-rgb), .15);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.ig-svg { width: 100%; min-width: 620px; height: auto; display: block; font-family: var(--font-body); }
.ig-svg :where(text:not([fill])) { fill: var(--color-text); }
.ig-svg .ig-h { font-family: var(--font-display); font-weight: 700; font-size: 17px; fill: #fff; }
.ig-svg .ig-p { font-size: 13.5px; fill: var(--color-text); }
.ig-svg .ig-tick text, .ig-svg .ig-lbl, .ig-svg .ig-col text { fill: var(--color-text-muted); }
.ig-svg .ig-col text { letter-spacing: .12em; }
.ig-svg .ig-num text { fill: #fff; }
.ig-svg .ig-warn { fill: #ff8a50; font-weight: 700; }
.ig-svg .ig-node rect { fill: rgba(0,229,255,.07); stroke: rgba(0,229,255,.45); stroke-width: 1.5; transition: fill .25s; }
.ig-svg .ig-node text { fill: #fff; font-size: 14.5px; font-weight: 600; text-anchor: middle; }
.ig-svg .ig-node--up rect { fill: rgba(139,92,246,.12); stroke: rgba(167,139,250,.6); }
.ig-svg .ig-node--super rect { fill: rgba(255,46,203,.12); stroke: rgba(255,46,203,.6); }
.ig-svg .ig-god rect { filter: drop-shadow(0 0 14px rgba(255,170,0,.45)); }
.ig-svg .ig-card rect { transition: stroke-width .2s; }
.ig-svg .ig-card:hover rect { stroke-width: 2.5; }
.infographic figcaption { text-align: center; font-size: .82rem; color: var(--color-text-muted); margin-top: .6rem; }

/* --- Portada: decoración flotante del hero --- */
.hero-decor { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.hero-decor span {
  position: absolute;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  opacity: .22;
  filter: drop-shadow(0 0 12px rgba(0,229,255,.35));
  animation: nu-float 9s ease-in-out infinite;
}
.hero-decor span:nth-child(1) { left: 8%;  top: 22%; animation-delay: 0s; }
.hero-decor span:nth-child(2) { left: 86%; top: 18%; animation-delay: -2s; animation-duration: 11s; }
.hero-decor span:nth-child(3) { left: 14%; top: 70%; animation-delay: -4s; animation-duration: 10s; }
.hero-decor span:nth-child(4) { left: 80%; top: 66%; animation-delay: -1s; }
.hero-decor span:nth-child(5) { left: 50%; top: 8%;  animation-delay: -3s; animation-duration: 12s; opacity: .14; }
.hero-decor span:nth-child(6) { left: 92%; top: 42%; animation-delay: -5s; animation-duration: 13s; opacity: .16; }
@keyframes nu-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(8deg); }
}
.hero .container { position: relative; z-index: 1; }
.hero::before { background: radial-gradient(circle, rgba(0,229,255,.16) 0%, transparent 70%); }
.hero::after { background: radial-gradient(circle, rgba(255,46,203,.12) 0%, transparent 70%); }

/* --- Portada: tarjetas con foco de luz y color por juego --- */
.card { --card-rgb: 0,229,255; }
.card[data-category="simulacion"] { --card-rgb: 255,95,215; }
.card[data-category="accion"] { --card-rgb: 182,255,59; }
.card:hover {
  border-color: rgba(var(--card-rgb), .5);
  box-shadow: var(--shadow-card), 0 0 40px rgba(var(--card-rgb), .22);
  background:
    radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--card-rgb), .10), transparent 45%),
    rgba(15, 15, 26, 0.85);
}
.card[data-category] .card-cta { color: rgb(var(--card-rgb)); }

/* Directorio: color por panel */
#dir-am { --theme-rgb: 255,95,215; --theme: #ff5fd7; }
#dir-bf3 { --theme-rgb: 255,138,80; --theme: #ff8a50; }
#dir-bf2 { --theme-rgb: 167,139,250; --theme: #a78bfa; }
.dir-panel .island-chip:hover { border-color: rgba(var(--theme-rgb), .5); background: rgba(var(--theme-rgb), .07); }
.dir-panel .island-num { background: rgba(var(--theme-rgb), .1); color: var(--theme); }
.dir-panel .island-chip:hover .lvl { color: var(--theme); }

/* --- Portada: bloque de códigos --- */
.codes-block {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1.4fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(ellipse 50% 80% at 0% 0%, rgba(255,215,0,.12), transparent 70%),
    radial-gradient(ellipse 50% 80% at 100% 100%, rgba(0,229,255,.10), transparent 70%),
    rgba(15,15,26,.7);
  border: 1px solid rgba(255,215,0,.22);
  overflow: hidden;
}
.codes-block h2 { margin: .4rem 0 .6rem; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.codes-block p { color: var(--color-text-muted); margin: 0 0 1.2rem; }
.codes-kicker {
  display: inline-block;
  font: 700 .75rem var(--font-display);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #ffd700;
  background: rgba(255,215,0,.1);
  border: 1px solid rgba(255,215,0,.3);
  padding: .25rem .7rem;
  border-radius: 999px;
}
.codes-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.codes-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .6rem .7rem .6rem .9rem;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.03);
  border: 1px dashed rgba(255,255,255,.12);
}
.codes-list code { font: 700 .88rem ui-monospace, SFMono-Regular, Consolas, monospace; color: #fff; overflow: hidden; text-overflow: ellipsis; }
.codes-list small { display: block; font-size: .72rem; color: var(--color-text-muted); }
.codes-gift { position: absolute; left: 38%; bottom: -34px; font-size: 6rem; opacity: .06; transform: rotate(14deg); pointer-events: none; }

@media (max-width: 768px) {
  .codes-block { grid-template-columns: 1fr; padding: 1.5rem; }
  .article-header::before { inset: -3rem 0 auto 0; }
  .codes-gift { display: none; }
  .hero-decor span:nth-child(n+5) { display: none; }
}
@media (max-width: 480px) {
  .codes-list { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .infographic figcaption::before { content: '↔ Desliza para ver toda la imagen · '; color: var(--theme); font-weight: 600; }
}
