/* ── Juegos section — shared design system ────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #ffffff;
    --bg-soft: #fafafa;
    --bg-muted: #f5f5f5;
    --border: #e8e8e8;
    --border-light: #f0f0f0;
    --text: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Header ──────────────────────────────────────────────────────── */
.juegos-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.juegos-header-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 2rem;
    height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.juegos-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem; font-weight: 600;
    color: var(--text); text-decoration: none; letter-spacing: -0.02em; white-space: nowrap;
}
.juegos-logo span { font-weight: 400; color: var(--text-muted); }

.juegos-nav {
    display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap;
}
.juegos-nav a {
    color: var(--text-secondary); text-decoration: none;
    font-size: 0.8rem; font-weight: 500;
    transition: color var(--transition);
    letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap;
}
.juegos-nav a:hover { color: var(--text); }
.juegos-nav a.active { color: var(--text); border-bottom: 2px solid var(--text); padding-bottom: 2px; }

.juegos-back {
    display: flex; align-items: center; gap: 0.5rem;
    color: var(--text-muted); text-decoration: none;
    font-size: 0.8rem; font-weight: 500;
    transition: color var(--transition);
    letter-spacing: 0.02em; text-transform: uppercase;
    padding-left: 1.5rem; border-left: 1px solid var(--border); margin-left: 0.5rem;
    white-space: nowrap;
}
.juegos-back:hover { color: var(--text); }

@media (max-width: 768px) {
    .juegos-nav { display: none; }
    .juegos-back { border-left: none; padding-left: 0; margin-left: 0; }
}

/* ── Layout ──────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 4rem 0; }

/* ── Page header ─────────────────────────────────────────────────── */
.page-header {
    padding: 3rem 0 2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2.5rem;
}
.page-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 600; letter-spacing: -0.03em; margin-bottom: 0.5rem;
}
.page-header p { color: var(--text-secondary); }
.breadcrumb { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }

/* ── Buttons ─────────────────────────────────────────────────────── */
button, .btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    font-family: inherit; font-size: 0.9rem; font-weight: 500;
    border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: var(--bg); color: var(--text);
    cursor: pointer; transition: all var(--transition); text-decoration: none;
}
button:hover, .btn:hover { background: var(--text); color: white; border-color: var(--text); }
.btn-primary { background: var(--text); color: white; border-color: var(--text); }
.btn-primary:hover { background: #333; }

/* ── Score / stats row ───────────────────────────────────────────── */
.score-row {
    display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.score-item { text-align: center; }
.score-value {
    font-family: 'Playfair Display', serif;
    font-size: 2rem; font-weight: 700; color: var(--text); line-height: 1;
}
.score-label {
    font-size: 0.72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--text-muted); margin-top: 0.2rem;
}

/* ── Game over overlay ───────────────────────────────────────────── */
.game-overlay {
    position: absolute; inset: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(4px);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 1rem; text-align: center;
    border-radius: var(--radius);
    z-index: 10;
}
.game-overlay h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem; font-weight: 700;
}
.game-overlay p { color: var(--text-secondary); font-size: 0.95rem; }

/* ── Back link ───────────────────────────────────────────────────── */
.back-link {
    display: inline-flex; align-items: center; gap: 0.5rem;
    color: var(--text-muted); text-decoration: none;
    font-size: 0.85rem; font-weight: 500;
    transition: color var(--transition); margin-top: 2rem;
}
.back-link:hover { color: var(--text); }

a { color: var(--text); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.7; }
h1, h2, h3 { color: var(--text); }

@media (max-width: 600px) { .container { padding: 0 1rem; } }
