/* ============================================================
   PREMIO — styles.css
   Tokens: #0D0D0D bg | #FF3D1E red | #FFD700 gold | #F0EDE8 fg
   Fonts:  Fredoka One (display) + Inter (body)
   ============================================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --red:    #FF3D1E;
  --gold:   #FFD700;
  --bg:     #0D0D0D;
  --bg-2:   #111111;
  --bg-3:   #141414;
  --fg:     #F0EDE8;
  --fg-60:  rgba(240, 237, 232, 0.60);
  --fg-40:  rgba(240, 237, 232, 0.40);
  --fg-20:  rgba(240, 237, 232, 0.20);
  --fg-08:  rgba(240, 237, 232, 0.08);
  --red-15: rgba(255, 61, 30, 0.15);
  --red-40: rgba(255, 61, 30, 0.40);
  --gold-15: rgba(255, 215, 0, 0.15);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --font-display: 'Fredoka One', cursive;
  --font-body:    'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ─────────────────────────────────────────────────── */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
  border-bottom: 1px solid var(--red-15);
  position: sticky;
  top: 0;
  background: rgba(13, 13, 13, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--red);
  letter-spacing: 0.04em;
  user-select: none;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  color: var(--fg-60);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--fg);
}

.btn-nav {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 0.45rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-nav:hover {
  opacity: 0.85;
}

/* ── HERO ────────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 5rem 2rem 4rem;
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 6rem);
  line-height: 1.05;
  color: var(--fg);
  margin-bottom: 0.75rem;
}

.accent-red  { color: var(--red); }
.accent-gold { color: var(--gold); }

.hero-sub {
  font-size: 1.05rem;
  color: var(--fg-60);
  max-width: 460px;
  margin: 1.25rem auto 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.btn-primary {
  display: inline-block;
  background: var(--red);
  color: #fff;
  padding: 0.7rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: opacity 0.2s;
}

.btn-primary:hover {
  opacity: 0.88;
}

.btn-ghost {
  display: inline-block;
  background: transparent;
  color: var(--fg-60);
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid var(--fg-20);
  transition: border-color 0.2s, color 0.2s;
}

.btn-ghost:hover {
  border-color: var(--fg-40);
  color: var(--fg);
}

.hero-pills {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--fg-40);
  letter-spacing: 0.04em;
}

.pill-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
}

/* ── DIVIDER ─────────────────────────────────────────────── */

.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red-15), transparent);
}

/* ── GAMES SECTION ───────────────────────────────────────── */

.games-section {
  padding: 3rem 2.5rem 4rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--fg);
  margin-bottom: 0.3rem;
}

.section-header p {
  font-size: 0.875rem;
  color: var(--fg-40);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── GAME CARD ───────────────────────────────────────────── */

.game-card {
  background: var(--bg-3);
  border: 1px solid var(--fg-08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.25s, transform 0.2s;
}

.game-card:hover {
  border-color: var(--red-40);
  transform: translateY(-3px);
}

.game-card--soon {
  cursor: default;
  opacity: 0.65;
}

.game-card--soon:hover {
  transform: none;
  border-color: var(--fg-08);
}

.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.thumb-red    { background: #1A0F0D; }
.thumb-green  { background: #0D1A10; }
.thumb-purple { background: #100D1A; }
.thumb-amber  { background: #1A1508; }
.thumb-teal   { background: #0D181A; }
.thumb-pink   { background: #1A0D14; }

.thumb-icon {
  font-size: 2.25rem;
  line-height: 1;
}

.card-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.games-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--fg-40);
  font-size: 0.9rem;
  padding: 2rem 0;
}

.badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
}

.badge-new  { background: var(--red);  color: #fff; }
.badge-hot  { background: var(--gold); color: #1A1000; }
.badge-soon { background: var(--fg-08); color: var(--fg-40); }

.card-body {
  padding: 0.85rem 0.9rem 1rem;
}

.card-body h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.25rem;
}

.card-body p {
  font-size: 0.78rem;
  color: var(--fg-40);
  line-height: 1.45;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.65rem;
}

.cat {
  font-size: 0.68rem;
  color: var(--red);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.plays {
  font-size: 0.68rem;
  color: var(--fg-40);
}

/* ── NEWSLETTER ──────────────────────────────────────────── */

.newsletter {
  margin: 0 2.5rem 3rem;
  background: var(--bg-2);
  border: 1px solid var(--gold-15);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
}

.newsletter h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.newsletter p {
  font-size: 0.875rem;
  color: var(--fg-40);
  max-width: 380px;
  margin: 0 auto 1.25rem;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  max-width: 360px;
  margin: 0 auto;
  justify-content: center;
}

.newsletter-form input {
  flex: 1;
  background: var(--bg-3);
  border: 1px solid var(--fg-08);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  color: var(--fg);
  font-size: 0.875rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-form input::placeholder {
  color: var(--fg-40);
}

.newsletter-form input:focus {
  border-color: rgba(255, 215, 0, 0.35);
}

.btn-gold {
  background: var(--gold);
  color: #1A1000;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  white-space: nowrap;
  transition: opacity 0.2s;
}

.btn-gold:hover {
  opacity: 0.88;
}

.subscribe-msg {
  font-size: 0.8rem;
  margin-top: 0.75rem;
  min-height: 1.2em;
  color: var(--gold);
}

/* ── ABOUT ───────────────────────────────────────────────── */

.about {
  padding: 3rem 2.5rem;
  border-top: 1px solid var(--fg-08);
}

.about-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.about-inner h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--fg);
  margin-bottom: 1rem;
}

.about-inner p {
  font-size: 0.9rem;
  color: var(--fg-60);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.about-inner strong {
  color: var(--fg);
  font-weight: 600;
}

.link-apab {
  font-size: 0.875rem;
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: opacity 0.2s;
}

.link-apab:hover {
  opacity: 0.75;
}

/* ── FOOTER ──────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--fg-08);
  padding: 1.5rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1rem;
  color: rgba(255, 61, 30, 0.55);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--fg-40);
}

.footer-brand {
  font-size: 0.75rem;
  color: var(--fg-40);
}

.footer-brand a {
  color: rgba(255, 61, 30, 0.55);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-brand a:hover {
  color: var(--red);
}

/* ── COOKIE CONSENT BANNER ───────────────────────────────── */

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg-2);
  border: 1px solid var(--gold-15);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 300;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.cookie-text {
  flex: 1;
  font-size: 0.82rem;
  color: var(--fg-60);
  line-height: 1.5;
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cookie-accept,
.cookie-reject {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.2s, border-color 0.2s, color 0.2s;
}

.cookie-accept {
  background: var(--gold);
  color: #1A1000;
  border: none;
}

.cookie-accept:hover { opacity: 0.88; }

.cookie-reject {
  background: transparent;
  color: var(--fg-60);
  border-color: var(--fg-20);
}

.cookie-reject:hover {
  color: var(--fg);
  border-color: var(--fg-40);
}

@media (max-width: 560px) {
  .cookie-banner { flex-direction: column; align-items: stretch; }
  .cookie-actions { justify-content: flex-end; }
}

/* ── GAME CARD AS LINK ───────────────────────────────────── */

a.game-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* ── GAME PAGE  (/juego/[slug]/) ─────────────────────────── */

.game-page .logo {
  text-decoration: none;
}

.game-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
}

/* Slot de ad: vacío no ocupa alto; ads.js fija min-height al llenar (Prompt 3),
   y colapsa (display:none) en "no fill". */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

/* Slot vacío (sin consentimiento / aún sin llenar): sin alto ni margen
   para no dejar un hueco antes de que carguen los ads. */
.ad-slot:empty {
  margin: 0;
  min-height: 0;
}

.game-layout {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.game-stage {
  flex: 1;
  min-width: 0;
}

/* El juego va aquí dentro; los ads viven FUERA de este iframe (ARQUITECTURA_ADS §4). */
.game-frame-wrap {
  width: 100%;
  height: min(70vh, 600px);
  margin: 0 auto;
  background: var(--bg-2);
  border: 1px solid var(--red-15);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.game-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.game-aside {
  width: 300px;
  flex-shrink: 0;
}

.game-info {
  max-width: 720px;
  margin: 1.75rem auto 0;
  text-align: center;
}

.game-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--fg);
  margin: 0.35rem 0 0.5rem;
}

.game-desc {
  color: var(--fg-60);
  font-size: 0.95rem;
  line-height: 1.7;
}

.game-controls {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.ctrl {
  font-size: 0.72rem;
  color: var(--fg-60);
  background: var(--bg-3);
  border: 1px solid var(--fg-08);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
}

@media (max-width: 900px) {
  .game-layout { flex-direction: column; }
  .game-aside { width: 100%; }
  .game-frame-wrap { height: min(62vh, 520px); }
}

/* ── RESPONSIVE ──────────────────────────────────────────── */

@media (max-width: 640px) {
  .nav { padding: 1rem 1.25rem; }
  .nav-links { display: none; }
  .hero { padding: 3rem 1.25rem 2.5rem; }
  .hero-title { font-size: 3rem; }
  .games-section { padding: 2rem 1.25rem 3rem; }
  .newsletter { margin: 0 1.25rem 2.5rem; }
  .newsletter-form { flex-direction: column; }
  .about { padding: 2.5rem 1.25rem; }
  .footer { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
