/* =====================================================================
   liga-base.css  -  Estilos comunes de la Liga Chileciteña
   (temas claro/oscuro, encabezado, menú y mascota Lichi)
   ===================================================================== */
        /* =========================================================
           TEMAS (claro por defecto / oscuro con data-theme="dark")
           Se conservan los nombres de variables originales.
           ========================================================= */
        :root {
            --bg-dark: #f3f4fa;
            --card-bg: #ffffff;
            --card-bg-2: #f6f7fc;
            --card-border: #e5e8f2;
            --red-primary: #8f1424;
            --red-hover: #6f0f1b;
            --red-soft: rgba(143, 20, 36, 0.08);
            --text-light: #151826;
            --text-muted: #6a7087;
            --chip-bg: rgba(21, 24, 38, 0.05);
            --accent-amber: #b45309;
            --shadow-card: 0 8px 28px rgba(31, 38, 90, 0.08);
            --shadow-soft: 0 2px 10px rgba(31, 38, 90, 0.06);
            --header-bg: linear-gradient(135deg, #8f1424 0%, #5c0b17 100%);
            --hero-overlay-top: rgba(243, 244, 250, 0.84);
            --hero-overlay-bottom: rgba(243, 244, 250, 0.98);
            --img-bg: #0b0c10;
            --ctrl-bg: #ffffff;
            --ctrl-border: #dfe2ee;
            --ctrl-color: #151826;
            --font-impact: 'Plus Jakarta Sans', sans-serif;
            --font-body: 'Plus Jakarta Sans', sans-serif;
                        --gold: #c99700;
            --silver: #8a929e;
            --bronze: #b4691f;
            --green-primary: #198754;
            --green-hover: #157347;
            --amber-card: #f59e0b;
            --ok-text: #15803d;
            --err-text: #b91c1c;
            --pos-green: #15803d;
            --neg-red: #dc2626;
            --tie-text: #92400e;
            --badge-red-text: #b91c1c;
            --badge-green-text: #047857;
            --badge-amber-text: #b45309;
            color-scheme: light;
        }

        :root[data-theme="dark"] {
            --bg-dark: #0b0d14;
            --card-bg: #141824;
            --card-bg-2: #1a1f2e;
            --card-border: #262c3e;
            --red-primary: #e5384c;
            --red-hover: #c92a3d;
            --red-soft: rgba(229, 56, 76, 0.14);
            --text-light: #f2f4fa;
            --text-muted: #98a1b8;
            --chip-bg: rgba(255, 255, 255, 0.07);
            --accent-amber: #f59e0b;
            --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.45);
            --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.35);
            --header-bg: linear-gradient(135deg, #4d0b16 0%, #1f0509 100%);
            --hero-overlay-top: rgba(11, 13, 20, 0.80);
            --hero-overlay-bottom: rgba(11, 13, 20, 0.985);
            --img-bg: #07080c;
            --ctrl-bg: #1a1f2e;
            --ctrl-border: #2d3448;
            --ctrl-color: #f2f4fa;
                        --gold: #ffd700;
            --silver: #c0c0c0;
            --bronze: #cd7f32;
            --ok-text: #4ade80;
            --err-text: #f87171;
            --pos-green: #4ade80;
            --neg-red: #f87171;
            --tie-text: #fcd34d;
            --badge-red-text: #fca5a5;
            --badge-green-text: #6ee7b7;
            --badge-amber-text: #fbbf24;
            color-scheme: dark;
        }

        * { box-sizing: border-box; margin: 0; padding: 0; font-family: var(--font-body); }
        html { scroll-behavior: smooth; }
        body {
            background-color: var(--bg-dark);
            color: var(--text-light);
            line-height: 1.5;
            overflow-x: clip;
            -webkit-font-smoothing: antialiased;
            transition: background-color .25s ease, color .25s ease;
        }
        a { text-decoration: none; color: inherit; }

        /* HEADER & NAV */
        header {
            background: var(--header-bg);
            color: #fff;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 5%;
            position: sticky;
            top: 0;
            z-index: 1000;
            border-bottom: 1px solid rgba(255, 255, 255, 0.12);
            box-shadow: 0 6px 24px rgba(60, 8, 16, 0.28);
            backdrop-filter: blur(10px);
        }

        .logo-container { display: flex; align-items: center; gap: 12px; letter-spacing: .5px; }
        .logo-title { font-size: 1.15rem; font-weight: 800; line-height: 1.1; text-transform: uppercase; color: #fff; }
        .logo-subtitle { font-size: 0.62rem; color: rgba(255, 255, 255, 0.72); letter-spacing: 2.5px; font-weight: 700; }

        .hamburger-btn {
            display: none;
            background: rgba(255, 255, 255, 0.12);
            border: 1px solid rgba(255, 255, 255, 0.18);
            border-radius: 12px;
            color: #fff;
            font-size: 1.2rem;
            cursor: pointer;
            padding: 6px 11px;
        }

        .nav-wrapper { display: flex; align-items: center; gap: 22px; margin-left: auto; }
        nav ul { display: flex; list-style: none; gap: 6px; align-items: center; }
        nav a {
            font-size: 0.78rem; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase;
            color: rgba(255, 255, 255, 0.86); padding: 8px 14px; border-radius: 999px;
            transition: background .2s, color .2s; display: inline-block;
        }
        nav a:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
        nav a.active { background: #fff; color: #8f1424; }

        .btn-login {
            background-color: #fff;
            color: #8f1424;
            padding: 9px 18px;
            border-radius: 999px;
            font-weight: 800;
            letter-spacing: 0.6px;
            font-size: 0.78rem;
            transition: all 0.2s;
            display: inline-block;
            text-align: center;
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
        }
        .btn-login:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }

        /* BOTÓN MODO OSCURO */
        .theme-toggle {
            width: 40px; height: 40px; flex: 0 0 40px;
            margin-left: 16px;
            border-radius: 50%;
            border: 1px solid rgba(255, 255, 255, 0.25);
            background: rgba(255, 255, 255, 0.12);
            color: #fff;
            display: inline-flex; align-items: center; justify-content: center;
            cursor: pointer; font-size: 1rem; transition: all .2s ease;
        }
        .theme-toggle:hover { background: rgba(255, 255, 255, 0.25); transform: rotate(14deg); }
        .theme-toggle .icon-sun { display: none; }
        :root[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
        :root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }


        @media (max-width: 900px) {
            .hamburger-btn { display: block; order: 2; margin-left: 10px; }
            .theme-toggle { order: 1; margin-left: auto; }
            .nav-wrapper {
                display: none; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%;
                background: linear-gradient(135deg, #7a101e 0%, #4a0914 100%); padding: 20px 5%; border-bottom: 1px solid rgba(255,255,255,0.12);
                box-shadow: 0 14px 24px rgba(0,0,0,0.35); gap: 15px; margin-left: 0;
            }
            .nav-wrapper.active { display: flex; }
            nav ul { flex-direction: column; gap: 8px; width: 100%; }
            nav ul li { width: 100%; text-align: center; }
            nav a { display: block; }
            .btn-login { width: 100%; }
        }

        /* =========================================================
           MASCOTA "LICHI" (pixel art basada en el escudo de la liga)
           ========================================================= */
        .lichi {
            position: fixed; left: 24px; bottom: 10px;
            width: 63px; height: 63px; z-index: 1500;
            cursor: pointer; user-select: none; outline: none;
            -webkit-tap-highlight-color: transparent;
            transition-property: left; transition-timing-function: linear; transition-duration: 0s;
        }
        .lichi-flip { width: 100%; height: 100%; }
        .lichi.face-left .lichi-flip { transform: scaleX(-1); }
        .lichi:focus-visible .lichi-flip { outline: 2px dashed var(--red-primary); outline-offset: 4px; border-radius: 10px; }
        .lichi-sprite { width: 100%; height: 100%; display: block; overflow: visible; transform-origin: 50% 100%; filter: drop-shadow(0 2px 0 rgba(0,0,0,.12)); }
        :root[data-theme="dark"] .lichi-sprite { filter: drop-shadow(0 0 2px rgba(255,255,255,.6)); }
        .lichi-sprite g { transform-box: fill-box; }
        .lichi-sprite .leg, .lichi-sprite .arm { transform-origin: 50% 0; }
        .lichi-sprite .eyes, .lichi-sprite .eyes-closed { transform-origin: 50% 50%; }
        .lichi-sprite .eyes-closed { display: none; }
        .lichi-sprite .eyes { animation: lichiBlink 4.5s infinite; }
        .lichi-shadow { position: absolute; left: 14%; right: 14%; bottom: -1px; height: 6px; border-radius: 50%; background: rgba(0,0,0,.18); }
        :root[data-theme="dark"] .lichi-shadow { background: rgba(0,0,0,.5); }

        /* Globo de diálogo */
        .lichi-bubble {
            position: absolute; bottom: calc(100% + 10px); left: 50%;
            width: max-content; max-width: 210px;
            background: var(--card-bg); color: var(--text-light);
            border: 2px solid var(--text-light); border-radius: 12px;
            padding: 8px 11px; font-size: .74rem; font-weight: 700; line-height: 1.35; text-align: center;
            box-shadow: 3px 3px 0 var(--red-primary);
            opacity: 0; visibility: hidden; pointer-events: none;
            transform: translateX(-50%) scale(.85); transform-origin: bottom center;
            transition: opacity .2s ease, transform .2s ease, visibility .2s;
        }
        .lichi-bubble.show { opacity: 1; visibility: visible; transform: translateX(-50%) scale(1); }
        .lichi-bubble::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--text-light); }
        .lichi-bubble.pos-left { left: 0; transform: scale(.85); transform-origin: bottom left; }
        .lichi-bubble.pos-left.show { transform: scale(1); }
        .lichi-bubble.pos-left::after { left: 22px; margin-left: 0; }
        .lichi-bubble.pos-right { left: auto; right: 0; transform: scale(.85); transform-origin: bottom right; }
        .lichi-bubble.pos-right.show { transform: scale(1); }
        .lichi-bubble.pos-right::after { left: auto; right: 22px; margin-left: 0; }

        /* Pelota y zzz */
        .lichi-ball { position: absolute; right: -20px; bottom: 0; width: 21px; height: 21px; display: none; }
        .lichi.face-left .lichi-ball { right: auto; left: -20px; }
        .lichi.is-ball .lichi-ball { display: block; animation: lichiBall .55s ease-out infinite alternate; }
        .lichi-z { position: absolute; top: 2px; right: -4px; font-size: .8rem; font-weight: 800; color: var(--red-primary); opacity: 0; display: none; }
        .lichi.is-sleep .lichi-z { display: block; animation: lichiZ 2.4s ease-in infinite; }
        .lichi.is-sleep .lichi-z.z2 { animation-delay: .8s; }
        .lichi.is-sleep .lichi-z.z3 { animation-delay: 1.6s; }

        /* Estados */
        .lichi.is-walk .lichi-sprite { animation: lichiBob .5s steps(1) infinite; }
        .lichi.is-walk .leg-l { animation: lichiStepA .5s steps(1) infinite; }
        .lichi.is-walk .leg-r { animation: lichiStepB .5s steps(1) infinite; }
        .lichi.is-walk .arm-l { animation: lichiStepB .5s steps(1) infinite; }
        .lichi.is-walk .arm-r { animation: lichiStepA .5s steps(1) infinite; }
        .lichi.is-jump .lichi-sprite { animation: lichiJump .7s ease-out 2; }
        .lichi.is-wave .arm-r { animation: lichiWave .35s ease-in-out infinite alternate; }
        .lichi.is-dance .lichi-sprite { animation: lichiDance .45s ease-in-out infinite alternate; }
        .lichi.is-dance .arm-l { animation: lichiArmUp .45s ease-in-out infinite alternate; }
        .lichi.is-dance .arm-r { animation: lichiArmUp2 .45s ease-in-out infinite alternate; }
        .lichi.is-sleep .lichi-sprite { transform: scaleY(.93); }
        .lichi.is-sleep .eyes { display: none; }
        .lichi.is-sleep .eyes-closed { display: block; }
        .lichi.is-ball .leg-r { animation: lichiKick .55s ease-out infinite alternate; }

        @keyframes lichiBob { 0%{transform:translateY(0)} 50%{transform:translateY(-1.5px)} }
        @keyframes lichiStepA { 0%{transform:rotate(26deg)} 50%{transform:rotate(-26deg)} }
        @keyframes lichiStepB { 0%{transform:rotate(-26deg)} 50%{transform:rotate(26deg)} }
        @keyframes lichiJump { 0%{transform:translateY(0) scale(1.08,.9)} 20%{transform:translateY(0) scale(.95,1.08)} 55%{transform:translateY(-38px) scale(1,1)} 100%{transform:translateY(0) scale(1,1)} }
        @keyframes lichiWave { from{transform:rotate(-120deg)} to{transform:rotate(-165deg)} }
        @keyframes lichiDance { from{transform:rotate(-9deg) translateY(0)} to{transform:rotate(9deg) translateY(-4px)} }
        @keyframes lichiArmUp { from{transform:rotate(150deg)} to{transform:rotate(110deg)} }
        @keyframes lichiArmUp2 { from{transform:rotate(-110deg)} to{transform:rotate(-150deg)} }
        @keyframes lichiKick { from{transform:rotate(0)} to{transform:rotate(-45deg)} }
        @keyframes lichiBall { from{transform:translateY(0)} to{transform:translateY(-16px)} }
        @keyframes lichiBlink { 0%,93%,100%{transform:scaleY(1)} 96%{transform:scaleY(.1)} }
        @keyframes lichiZ { 0%{opacity:0;transform:translate(0,0) scale(.7)} 20%{opacity:1} 100%{opacity:0;transform:translate(10px,-26px) scale(1.2)} }

        @media (max-width: 600px) { .lichi { width: 52px; height: 52px; } }
        @media (prefers-reduced-motion: reduce) { .lichi, .lichi * { animation: none !important; } }
