
/* =========================================================
   KRAFEX PLAY — NEON ARENA
   CSS COMPLETO
   Compatible con el play.html proporcionado
========================================================= */

:root{
    --bg:#020208;
    --bg2:#050711;
    --panel:#090c17;
    --panel2:#0d1120;

    --text:#f5f1e8;
    --muted:#9299ad;

    --cyan:#00eaff;
    --cyan2:#0077ff;

    --purple:#a855ff;
    --violet:#6d3cff;

    --pink:#ff2fa3;
    --magenta:#ff006e;

    --green:#31ff88;
    --lime:#b6ff00;

    --yellow:#f7ff00;
    --orange:#ff8a00;

    --red:#ff3158;
    --red2:#ff003c;

    --gold:#d6c3a3;

    --line:#ffffff14;
    --line2:#ffffff24;

    --sidebar:60px;
    --top:70px;

    --radius:22px;
    --glow:0 0 30px;
}

/* =========================================================
   RESET
========================================================= */

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

html{
    scroll-behavior:smooth;
}

body{
    min-height:100vh;
    color:var(--text);
    font-family:Arial,Helvetica,sans-serif;

    background:
        radial-gradient(
            circle at 8% 5%,
            rgba(0,234,255,.14),
            transparent 25%
        ),
        radial-gradient(
            circle at 90% 8%,
            rgba(168,85,255,.15),
            transparent 27%
        ),
        radial-gradient(
            circle at 50% 100%,
            rgba(255,47,163,.07),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            #010107,
            #03040c 45%,
            #020207
        );

    overflow-x:hidden;
}

body::before{
    content:"";
    position:fixed;
    inset:0;
    pointer-events:none;
    z-index:-1;

    background-image:
        linear-gradient(
            rgba(255,255,255,.018) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255,255,255,.018) 1px,
            transparent 1px
        );

    background-size:40px 40px;

    mask-image:
        linear-gradient(
            to bottom,
            black,
            transparent 85%
        );
}

a{
    color:inherit;
    text-decoration:none;
}

button{
    font:inherit;
}

.material-symbols-rounded{
    line-height:1;
    user-select:none;
}

/* =========================================================
   TOPBAR
========================================================= */

.topbar{
    position:fixed;
    top:0;
    left:0;
    right:0;

    height:var(--top);

    z-index:2000;

    display:flex;
    align-items:center;
    justify-content:space-between;

    padding:0 24px 0 84px;

    background:
        linear-gradient(
            180deg,
            rgba(4,5,12,.98),
            rgba(4,5,12,.90)
        );

    border-bottom:1px solid rgba(0,234,255,.25);

    backdrop-filter:blur(18px);

    box-shadow:
        0 10px 40px rgba(0,0,0,.45),
        0 0 30px rgba(0,234,255,.04);
}

.topbar-logo{
    position:relative;
}

.topbar-logo::after{
    content:"";

    position:absolute;
    inset:-5px;

    border-radius:50%;

    border:1px solid rgba(0,234,255,.25);

    animation:
        logoPulse 2.5s ease-in-out infinite;
}

.topbar-logo img{
    width:44px;
    height:44px;

    object-fit:cover;

    border-radius:50%;

    border:1px solid var(--cyan);

    box-shadow:
        0 0 10px rgba(0,234,255,.8),
        0 0 25px rgba(0,234,255,.25);
}

@keyframes logoPulse{
    0%,100%{
        transform:scale(1);
        opacity:.4;
    }

    50%{
        transform:scale(1.15);
        opacity:.1;
    }
}

.topbar-actions{
    display:flex;
    gap:10px;
}

.topbar-item{
    width:44px;
    height:44px;

    display:grid;
    place-items:center;

    border-radius:13px;

    color:var(--gold);

    border:1px solid rgba(214,195,163,.22);

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.06),
            rgba(255,255,255,.015)
        );

    transition:
        transform .2s ease,
        border-color .2s ease,
        color .2s ease,
        box-shadow .2s ease;
}

.topbar-item:hover{
    color:var(--cyan);

    border-color:var(--cyan);

    transform:translateY(-2px);

    box-shadow:
        0 0 15px rgba(0,234,255,.3),
        inset 0 0 12px rgba(0,234,255,.06);
}

.cart-item{
    position:relative;
}

.cart-counter{
    position:absolute;

    top:-6px;
    right:-6px;

    min-width:19px;
    height:19px;

    padding:0 5px;

    display:grid;
    place-items:center;

    border-radius:50px;

    color:white;
    background:var(--pink);

    font-size:10px;
    font-weight:900;

    box-shadow:
        0 0 8px var(--pink),
        0 0 18px rgba(255,47,163,.35);
}

/* =========================================================
   SIDEBAR
========================================================= */

.sidebar{
    position:fixed;

    left:0;
    top:0;

    width:var(--sidebar);
    height:100vh;

    z-index:2100;

    padding-top:var(--top);

    overflow-y:auto;
    overflow-x:hidden;

    background:
        linear-gradient(
            180deg,
            #020207,
            #05060c 55%,
            #020207
        );

    border-right:1px solid rgba(0,234,255,.22);

    box-shadow:
        8px 0 30px rgba(0,0,0,.45),
        0 0 20px rgba(0,234,255,.04);

    transition:
        width .28s cubic-bezier(.2,.8,.2,1);
}

.sidebar:hover{
    width:255px;
}

.expander{
    height:58px;

    display:grid;
    place-items:center;

    border-bottom:1px solid rgba(255,255,255,.07);
}

.expander span{
    color:var(--cyan);
    font-size:27px;

    cursor:pointer;

    text-shadow:
        0 0 8px var(--cyan),
        0 0 20px rgba(0,234,255,.4);

    transition:.2s;
}

.expander span:hover{
    transform:rotate(90deg) scale(1.08);
}

.category{
    height:48px;

    display:flex;
    align-items:center;

    padding-left:17px;

    color:var(--gold);

    font-size:9px;
    font-weight:900;
    letter-spacing:2.5px;

    border-bottom:1px solid rgba(255,255,255,.06);

    white-space:nowrap;
}

.side-title{
    width:100%;
    height:53px;

    display:flex;
    align-items:center;
    gap:14px;

    padding:0 16px;

    border:0;
    background:transparent;

    color:var(--gold);

    cursor:pointer;

    white-space:nowrap;

    transition:.2s;
}

.side-title:hover{
    color:var(--cyan);

    background:
        linear-gradient(
            90deg,
            rgba(0,234,255,.08),
            transparent
        );
}

.side-title .material-symbols-rounded{
    min-width:28px;
}

.descriptor{
    opacity:0;

    transition:
        opacity .2s ease;
}

.sidebar:hover .descriptor{
    opacity:1;
}

.submenu{
    display:none;

    background:
        rgba(0,0,0,.35);

    border-left:2px solid rgba(0,234,255,.08);
}

.side-group.open .submenu{
    display:block;
}

.submenu a{
    min-height:44px;

    display:flex;
    align-items:center;

    gap:11px;

    padding-left:28px;

    color:#aaaebd;

    font-size:12px;

    border-top:1px solid rgba(255,255,255,.035);

    white-space:nowrap;

    transition:.18s;
}

.submenu a:hover{
    color:var(--green);

    background:
        linear-gradient(
            90deg,
            rgba(49,255,136,.08),
            transparent
        );

    text-shadow:
        0 0 8px rgba(49,255,136,.5);
}

/* =========================================================
   CONTENIDO
========================================================= */

.content{
    min-height:100vh;

    padding:
        calc(var(--top) + 28px)
        28px
        70px
        calc(var(--sidebar) + 28px);
}

.play-page{
    width:100%;
    max-width:1250px;
    margin:auto;
}

/* =========================================================
   HERO
========================================================= */

.hero{
    position:relative;
    overflow:hidden;

    display:flex;
    align-items:center;

    gap:24px;

    min-height:190px;

    padding:35px;

    margin-bottom:22px;

    border:1px solid rgba(168,85,255,.5);

    border-radius:28px;

    background:
        radial-gradient(
            circle at 90% 20%,
            rgba(0,234,255,.13),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            rgba(168,85,255,.13),
            rgba(0,234,255,.035)
        );

    box-shadow:
        0 0 35px rgba(168,85,255,.12),
        inset 0 0 45px rgba(0,234,255,.035);
}

.hero::before{
    content:"";

    position:absolute;

    width:250px;
    height:250px;

    right:-100px;
    top:-130px;

    border-radius:50%;

    border:1px solid rgba(0,234,255,.25);

    box-shadow:
        0 0 40px rgba(0,234,255,.15);
}

.hero::after{
    content:"";

    position:absolute;

    left:0;
    right:0;
    bottom:0;

    height:2px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--purple),
            var(--cyan),
            var(--pink),
            transparent
        );

    box-shadow:
        0 0 14px var(--cyan);
}

.hero-icon{
    width:78px;
    height:78px;

    flex:none;

    display:grid;
    place-items:center;

    border-radius:22px;

    color:var(--purple);

    border:1px solid rgba(168,85,255,.65);

    background:
        linear-gradient(
            145deg,
            rgba(168,85,255,.18),
            rgba(0,234,255,.04)
        );

    box-shadow:
        0 0 20px rgba(168,85,255,.3),
        inset 0 0 20px rgba(168,85,255,.08);

    font-size:42px;

    animation:
        heroFloat 4s ease-in-out infinite;
}

@keyframes heroFloat{
    0%,100%{
        transform:translateY(0);
    }

    50%{
        transform:translateY(-5px);
    }
}

.eyebrow{
    display:block;

    margin-bottom:4px;

    color:var(--cyan);

    font-size:10px;
    font-weight:900;
    letter-spacing:4px;

    text-shadow:
        0 0 10px rgba(0,234,255,.7);
}

.hero h1{
    font-size:clamp(42px,6vw,70px);

    line-height:.95;

    letter-spacing:5px;

    background:
        linear-gradient(
            90deg,
            white,
            var(--cyan),
            var(--purple)
        );

    -webkit-background-clip:text;
    background-clip:text;

    color:transparent;

    text-shadow:
        0 0 25px rgba(0,234,255,.12);
}

.hero p{
    margin-top:10px;

    color:var(--muted);

    font-size:14px;
}

/* =========================================================
   PUNTOS
========================================================= */

.points-panel{
    position:relative;

    display:flex;
    align-items:center;
    gap:17px;

    min-height:82px;

    padding:17px 22px;

    margin-bottom:25px;

    border:1px solid rgba(247,255,0,.45);

    border-radius:18px;

    background:
        linear-gradient(
            90deg,
            rgba(247,255,0,.07),
            rgba(247,255,0,.015),
            rgba(255,255,255,.015)
        );

    box-shadow:
        0 0 25px rgba(247,255,0,.08),
        inset 0 0 25px rgba(247,255,0,.025);
}

.points-panel>.material-symbols-rounded{
    color:var(--yellow);
    font-size:38px;

    text-shadow:
        0 0 10px var(--yellow),
        0 0 25px rgba(247,255,0,.5);

    animation:
        starPulse 2s ease-in-out infinite;
}

@keyframes starPulse{
    50%{
        transform:scale(1.1);
    }
}

.points-main small{
    display:block;

    color:var(--muted);

    font-size:9px;
    font-weight:900;
    letter-spacing:2px;
}

.points-main strong{
    display:block;

    margin-top:2px;

    color:var(--yellow);

    font-size:31px;

    text-shadow:
        0 0 10px rgba(247,255,0,.7);
}

.points-change{
    min-width:70px;

    color:var(--green);

    font-weight:900;

    text-shadow:
        0 0 10px var(--green);
}

.risk-pill{
    margin-left:auto;

    padding:8px 13px;

    border-radius:50px;

    color:#ff7187;

    border:1px solid rgba(255,49,88,.55);

    background:
        rgba(255,49,88,.07);

    font-size:10px;
    font-weight:900;
    letter-spacing:1px;

    box-shadow:
        0 0 12px rgba(255,49,88,.08);
}

/* =========================================================
   CONTROLES DE DIFICULTAD
========================================================= */

.play-controls{
    display:grid;

    grid-template-columns:1.5fr 1fr;

    gap:15px;

    margin-bottom:12px;
}

.difficulty-box,
.level-box{
    padding:18px;

    border:1px solid rgba(255,255,255,.12);

    border-radius:18px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.045),
            rgba(255,255,255,.012)
        );

    box-shadow:
        inset 0 0 20px rgba(255,255,255,.015);
}

.control-label{
    display:block;

    margin-bottom:10px;

    color:#777e91;

    font-size:9px;
    font-weight:900;
    letter-spacing:2.5px;
}

.difficulty-selector,
.level-selector{
    display:flex;
    gap:8px;
}

.difficulty{
    flex:1;

    min-height:47px;

    display:flex;
    justify-content:center;
    align-items:center;

    gap:8px;

    border:1px solid rgba(255,255,255,.14);

    border-radius:12px;

    color:#858b9d;

    background:
        rgba(255,255,255,.025);

    cursor:pointer;

    font-size:11px;
    font-weight:900;
    letter-spacing:1px;

    transition:.2s;
}

.difficulty:hover{
    color:white;

    border-color:rgba(255,255,255,.3);

    transform:translateY(-1px);
}

.difficulty.active[data-difficulty="normal"]{
    color:var(--cyan);

    border-color:var(--cyan);

    background:
        rgba(0,234,255,.09);

    box-shadow:
        0 0 16px rgba(0,234,255,.18),
        inset 0 0 12px rgba(0,234,255,.04);
}

.difficulty.active[data-difficulty="extreme"]{
    color:#ff637d;

    border-color:var(--red);

    background:
        rgba(255,49,88,.1);

    box-shadow:
        0 0 18px rgba(255,49,88,.25),
        inset 0 0 12px rgba(255,49,88,.05);
}

.level{
    flex:1;

    height:47px;

    border:1px solid rgba(255,255,255,.12);

    border-radius:11px;

    background:
        rgba(255,255,255,.025);

    color:#7d8393;

    cursor:pointer;

    font-size:14px;
    font-weight:900;

    transition:.2s;
}

.level:hover{
    color:white;

    border-color:rgba(0,234,255,.4);

    transform:translateY(-2px);
}

.level.active{
    color:var(--cyan);

    border-color:var(--cyan);

    background:
        linear-gradient(
            180deg,
            rgba(0,234,255,.14),
            rgba(0,234,255,.035)
        );

    box-shadow:
        0 0 15px rgba(0,234,255,.22),
        inset 0 0 12px rgba(0,234,255,.04);
}

/* =========================================================
   DESCRIPCIÓN
========================================================= */

.difficulty-description{
    display:flex;
    align-items:center;

    gap:11px;

    padding:13px 16px;

    margin-bottom:30px;

    border-left:2px solid var(--cyan);

    background:
        linear-gradient(
            90deg,
            rgba(0,234,255,.06),
            transparent
        );

    color:#8e95a8;

    font-size:12px;

    transition:.25s;
}

.difficulty-description .material-symbols-rounded{
    color:var(--cyan);

    font-size:20px;

    text-shadow:
        0 0 10px var(--cyan);
}

/* =========================================================
   TÍTULO
========================================================= */

.section-title{
    position:relative;

    margin-bottom:18px;

    padding-left:14px;
}

.section-title::before{
    content:"";

    position:absolute;

    left:0;
    top:4px;
    bottom:3px;

    width:3px;

    background:
        linear-gradient(
            var(--cyan),
            var(--purple)
        );

    box-shadow:
        0 0 10px var(--cyan);
}

.section-title span{
    color:var(--cyan);

    font-size:9px;
    font-weight:900;
    letter-spacing:3px;
}

.section-title h2{
    margin-top:3px;

    font-size:30px;

    letter-spacing:-.5px;
}

/* =========================================================
   GAME CARD
========================================================= */

.game-card{
    --accent:var(--cyan);

    position:relative;

    overflow:hidden;

    margin-bottom:22px;

    padding:24px;

    border:1px solid rgba(255,255,255,.12);

    border-radius:22px;

    background:
        radial-gradient(
            circle at 100% 0%,
            color-mix(
                in srgb,
                var(--accent) 8%,
                transparent
            ),
            transparent 35%
        ),
        linear-gradient(
            145deg,
            rgba(255,255,255,.045),
            rgba(255,255,255,.012)
        );

    box-shadow:
        0 20px 45px rgba(0,0,0,.35),
        inset 0 0 25px rgba(255,255,255,.01);

    transition:
        transform .22s ease,
        border-color .22s ease,
        box-shadow .22s ease;
}

.game-card::before{
    content:"";

    position:absolute;

    left:0;
    top:0;

    width:100%;
    height:3px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--accent),
            var(--purple),
            var(--pink),
            transparent
        );

    box-shadow:
        0 0 14px var(--accent);
}

.game-card::after{
    content:"";

    position:absolute;

    width:180px;
    height:180px;

    right:-100px;
    bottom:-110px;

    border-radius:50%;

    border:1px solid color-mix(
        in srgb,
        var(--accent) 18%,
        transparent
    );

    box-shadow:
        0 0 35px color-mix(
            in srgb,
            var(--accent) 10%,
            transparent
        );

    pointer-events:none;
}

.game-card:hover{
    transform:translateY(-3px);

    border-color:
        color-mix(
            in srgb,
            var(--accent) 45%,
            transparent
        );

    box-shadow:
        0 22px 55px rgba(0,0,0,.48),
        0 0 25px color-mix(
            in srgb,
            var(--accent) 12%,
            transparent
        );
}

/* =========================================================
   COLORES DE JUEGOS
========================================================= */

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

.purple{
    --accent:var(--purple);
}

.yellow{
    --accent:var(--yellow);
}

.green{
    --accent:var(--green);
}

.neon-rainbow{
    --accent:var(--pink);
}

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

.football,
.geometry,
.shooting,
.boss,
.infinity{
    --accent:var(--red);
}

.blue{
    --accent:#398cff;
}

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

.violet{
    --accent:#a875ff;
}

.orange{
    --accent:var(--orange);
}

.teal{
    --accent:#00ffd5;
}

.ice{
    --accent:#8eeaff;
}

.fire{
    --accent:#ff5a1f;
}

.dark-red{
    --accent:#ff174d;
}

.magenta{
    --accent:#ff22cc;
}

.gravity{
    --accent:#7c5cff;
}

.lime{
    --accent:var(--lime);
}

.space{
    --accent:#5e8cff;
}

.pink{
    --accent:var(--pink);
}

.racing{
    --accent:#ff5e00;
}

.gold-red{
    --accent:#ffb000;
}

.puzzle{
    --accent:#c36bff;
}

.volcano{
    --accent:#ff4a1c;
}

.ninja{
    --accent:#8cff00;
}

.boss{
    --accent:var(--red);
}

.infinity{
    --accent:var(--purple);
}

/* =========================================================
   CABECERA DE JUEGO
========================================================= */

.game-card header{
    position:relative;

    display:flex;
    justify-content:space-between;

    gap:25px;

    padding-bottom:19px;

    border-bottom:1px solid rgba(255,255,255,.08);
}

.tag{
    display:inline-block;

    color:var(--accent);

    font-size:9px;
    font-weight:900;
    letter-spacing:2px;

    text-shadow:
        0 0 9px color-mix(
            in srgb,
            var(--accent) 50%,
            transparent
        );
}

.game-card h2{
    margin:7px 0 8px;

    font-size:27px;

    line-height:1.15;

    letter-spacing:-.4px;
}

.game-card p{
    max-width:850px;

    color:#989fb1;

    font-size:13px;

    line-height:1.6;
}

.game-card small{
    display:block;

    margin-top:8px;

    color:var(--gold);

    font-size:10px;
    font-weight:700;
}

.game-symbol{
    flex:none;

    width:58px;
    height:58px;

    display:grid;
    place-items:center;

    border-radius:17px;

    color:var(--accent);

    border:1px solid color-mix(
        in srgb,
        var(--accent) 45%,
        transparent
    );

    background:
        color-mix(
            in srgb,
            var(--accent) 7%,
            transparent
        );

    font-size:31px;

    text-shadow:
        0 0 10px var(--accent),
        0 0 25px color-mix(
            in srgb,
            var(--accent) 50%,
            transparent
        );

    box-shadow:
        inset 0 0 15px color-mix(
            in srgb,
            var(--accent) 6%,
            transparent
        );
}

/* =========================================================
   GAME META
========================================================= */

.game-meta{
    display:inline-flex;

    margin-top:16px;

    padding:7px 10px;

    border-radius:8px;

    color:#737a8e;

    background:
        rgba(255,255,255,.025);

    border:1px solid rgba(255,255,255,.06);

    font-size:8px;
    font-weight:900;
    letter-spacing:1.5px;
}

/* =========================================================
   BOTONES
========================================================= */

.game-actions{
    display:flex;
    justify-content:center;

    padding:20px 0 8px;
}

.play-button{
    position:relative;

    min-width:170px;

    padding:13px 24px;

    border:1px solid var(--accent,var(--cyan));

    border-radius:12px;

    color:var(--accent,var(--cyan));

    background:
        linear-gradient(
            180deg,
            color-mix(
                in srgb,
                var(--accent,var(--cyan)) 9%,
                transparent
            ),
            rgba(255,255,255,.015)
        );

    font-size:11px;
    font-weight:900;
    letter-spacing:1.5px;

    cursor:pointer;

    overflow:hidden;

    transition:.2s;

    box-shadow:
        0 0 12px color-mix(
            in srgb,
            var(--accent,var(--cyan)) 15%,
            transparent
        );
}

.play-button::before{
    content:"";

    position:absolute;

    top:0;
    left:-100%;

    width:60%;
    height:100%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,.16),
            transparent
        );

    transform:skewX(-20deg);

    transition:.5s;
}

.play-button:hover::before{
    left:130%;
}

.play-button:hover{
    transform:translateY(-2px);

    color:white;

    background:
        color-mix(
            in srgb,
            var(--accent,var(--cyan)) 13%,
            transparent
        );

    box-shadow:
        0 0 20px color-mix(
            in srgb,
            var(--accent,var(--cyan)) 35%,
            transparent
        );
}

.play-button:active{
    transform:translateY(1px) scale(.98);
}

.danger-button{
    --accent:var(--red);

    color:#ff7187;

    border-color:var(--red);

    box-shadow:
        0 0 14px rgba(255,49,88,.16);
}

.danger-button:hover{
    color:white;

    background:
        rgba(255,49,88,.12);

    box-shadow:
        0 0 25px rgba(255,49,88,.35);
}

/* =========================================================
   GAME CONTAINER
========================================================= */

/* =========================================================
   CONTENEDOR PRINCIPAL DEL JUEGO — KRAFEX PLAY
========================================================= */

.game-container{
    position:relative;

    width:100%;
    margin-top:20px;

    padding:18px;

    border-radius:22px;

    background:
        radial-gradient(
            circle at 50% 0%,
            color-mix(
                in srgb,
                var(--accent) 8%,
                transparent
            ),
            transparent 48%
        ),
        linear-gradient(
            145deg,
            #070912,
            #020208
        );

    border:1px solid color-mix(
        in srgb,
        var(--accent) 42%,
        rgba(255,255,255,.08)
    );

    box-shadow:
        inset 0 0 45px rgba(0,0,0,.72),
        0 15px 45px rgba(0,0,0,.5),
        0 0 28px color-mix(
            in srgb,
            var(--accent) 10%,
            transparent
        );

    animation:gameOpen .25s ease;
}

/* Línea neon superior */

.game-container::before{
    content:"";

    position:absolute;

    top:0;
    left:8%;
    right:8%;

    height:2px;

    border-radius:50%;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--accent),
            var(--purple),
            var(--accent),
            transparent
        );

    box-shadow:
        0 0 12px var(--accent),
        0 0 25px color-mix(
            in srgb,
            var(--accent) 35%,
            transparent
        );

    pointer-events:none;
}

/* Brillo interior */

.game-container::after{
    content:"";

    position:absolute;

    inset:8px;

    border-radius:17px;

    border:1px solid
        rgba(255,255,255,.025);

    pointer-events:none;
}

.game-container[hidden]{
    display:none;
}

/* =========================================================
   ANIMACIÓN DE APERTURA
========================================================= */

@keyframes gameOpen{

    from{
        opacity:0;
        transform:
            translateY(12px)
            scale(.985);
    }

    to{
        opacity:1;
        transform:
            translateY(0)
            scale(1);
    }

}

/* =========================================================
   CANVAS DEL JUEGO
========================================================= */

.game-container canvas{
    position:relative;
    z-index:1;

    display:block;

    width:100%;
    max-width:1100px;

    height:auto;

    margin:0 auto;

    border-radius:14px;

    background:#020207;

    border:1px solid
        rgba(255,255,255,.12);

    box-shadow:
        0 0 25px rgba(0,0,0,.8),
        0 0 8px color-mix(
            in srgb,
            var(--accent) 8%,
            transparent
        );

    touch-action:none;
}

/* =========================================================
   HUD
========================================================= */

.hud{
    position:relative;
    z-index:2;

    display:flex;

    justify-content:center;
    align-items:center;

    flex-wrap:wrap;

    gap:9px;

    width:100%;

    margin-top:14px;

    padding:0 4px;
}

.hud>*{
    min-height:32px;

    display:flex;
    align-items:center;
    justify-content:center;

    padding:7px 12px;

    border:1px solid
        rgba(255,255,255,.1);

    border-radius:9px;

    color:#858c9f;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.045),
            rgba(255,255,255,.015)
        );

    font-size:10px;
    font-weight:700;

    letter-spacing:.4px;

    box-shadow:
        inset 0 0 10px
        rgba(255,255,255,.015);
}

.hud b{
    color:var(--yellow);

    border-color:
        rgba(247,255,0,.28);

    text-shadow:
        0 0 8px
        rgba(247,255,0,.55);

    box-shadow:
        0 0 10px
        rgba(247,255,0,.06),
        inset 0 0 10px
        rgba(247,255,0,.025);
}

/* =========================================================
   RESULTADO
========================================================= */

.result{
    position:relative;
    z-index:2;

    width:100%;

    margin-top:14px;

    padding:16px 18px;

    border-radius:13px;

    text-align:center;

    border:1px solid var(--green);

    color:var(--green);

    background:
        linear-gradient(
            90deg,
            rgba(49,255,136,.08),
            rgba(49,255,136,.025),
            rgba(49,255,136,.08)
        );

    box-shadow:
        0 0 20px
        rgba(49,255,136,.09),
        inset 0 0 18px
        rgba(49,255,136,.025);

    font-weight:800;

    animation:
        resultAppear .3s ease;
}

.result[hidden]{
    display:none;
}

@keyframes resultAppear{

    from{
        opacity:0;
        transform:translateY(5px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }

}

/* =========================================================
   ADVERTENCIAS
========================================================= */

.warning{
    position:relative;
    z-index:2;

    width:100%;

    margin-top:17px;

    padding:14px 17px;

    border-radius:12px;

    color:#ff8498;

    border:1px solid
        rgba(255,49,88,.35);

    background:
        linear-gradient(
            90deg,
            rgba(255,49,88,.09),
            rgba(255,49,88,.025),
            rgba(255,49,88,.06)
        );

    font-size:11px;

    line-height:1.5;

    box-shadow:
        inset 0 0 20px
        rgba(255,49,88,.025),
        0 0 12px
        rgba(255,49,88,.04);
}

.warning b{
    color:var(--red);

    text-shadow:
        0 0 7px
        rgba(255,49,88,.5);
}

/* =========================================================
   MODO GEOMETRY
========================================================= */

.mode-buttons{
    position:relative;
    z-index:2;

    display:flex;

    justify-content:center;

    align-items:center;

    flex-wrap:wrap;

    gap:9px;

    margin-top:18px;
}

.mode{
    min-width:115px;

    padding:10px 15px;

    border:1px solid
        rgba(255,255,255,.13);

    border-radius:10px;

    color:#858b9c;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.045),
            rgba(255,255,255,.015)
        );

    cursor:pointer;

    font-size:10px;
    font-weight:900;

    letter-spacing:1px;

    transition:
        transform .2s ease,
        color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.mode:hover{
    color:white;

    border-color:
        rgba(255,255,255,.35);

    transform:translateY(-2px);

    box-shadow:
        0 0 12px
        rgba(255,255,255,.05);
}

.mode.active{
    color:var(--cyan);

    border-color:var(--cyan);

    background:
        linear-gradient(
            180deg,
            rgba(0,234,255,.12),
            rgba(0,234,255,.035)
        );

    box-shadow:
        0 0 15px
        rgba(0,234,255,.2),
        inset 0 0 12px
        rgba(0,234,255,.04);

    text-shadow:
        0 0 7px
        rgba(0,234,255,.5);
}

/* =========================================================
   RULETA
========================================================= */

.roulette-box{
    position:relative;
    z-index:2;

    width:100%;

    min-height:420px;

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    gap:28px;

    padding:25px 10px;
}

/* Rueda */

#roulette-wheel{
    position:relative;

    width:275px;
    height:275px;

    flex:none;

    display:grid;

    place-items:center;

    border-radius:50%;

    color:white;

    font-size:55px;

    background:
        conic-gradient(
            var(--pink) 0deg 45deg,
            var(--purple) 45deg 90deg,
            var(--cyan) 90deg 135deg,
            var(--green) 135deg 180deg,
            var(--yellow) 180deg 225deg,
            var(--orange) 225deg 270deg,
            var(--purple) 270deg 315deg,
            var(--cyan) 315deg 360deg
        );

    border:9px solid #090a10;

    box-shadow:
        0 0 18px
        rgba(0,234,255,.7),
        0 0 45px
        rgba(168,85,255,.3),
        inset 0 0 25px
        rgba(0,0,0,.65);

    transition:
        transform 2.8s
        cubic-bezier(.12,.8,.18,1);
}

/* Centro de la ruleta */

#roulette-wheel::after{
    content:"";

    position:absolute;

    width:30px;
    height:30px;

    border-radius:50%;

    background:#090a10;

    border:2px solid white;

    box-shadow:
        0 0 12px
        rgba(255,255,255,.7),
        0 0 25px
        rgba(255,255,255,.15);
}

/* =========================================================
   REGLAS
========================================================= */

.rules{
    position:relative;

    display:flex;

    gap:17px;

    margin-top:28px;

    padding:23px;

    border:1px solid
        rgba(214,195,163,.25);

    border-radius:20px;

    background:
        linear-gradient(
            145deg,
            rgba(214,195,163,.055),
            rgba(255,255,255,.012)
        );

    box-shadow:
        inset 0 0 25px
        rgba(214,195,163,.015),
        0 10px 30px
        rgba(0,0,0,.2);
}

.rules>.material-symbols-rounded{
    flex:none;

    color:var(--gold);

    font-size:31px;

    text-shadow:
        0 0 10px
        rgba(214,195,163,.5);
}

.rules h2{
    margin-bottom:10px;

    font-size:20px;
}

.rules p{
    margin:6px 0;

    color:#8d94a6;

    font-size:12px;

    line-height:1.55;
}

.rules b{
    color:var(--yellow);

    text-shadow:
        0 0 6px
        rgba(247,255,0,.25);
}

/* =========================================================
   MODAL
========================================================= */

.play-modal{
    position:fixed;

    inset:0;

    z-index:5000;

    display:grid;

    place-items:center;

    padding:20px;

    background:
        rgba(0,0,0,.78);

    backdrop-filter:blur(10px);
}

.play-modal[hidden]{
    display:none;
}

.play-modal-box{
    width:min(440px,100%);

    padding:30px;

    text-align:center;

    border:1px solid
        rgba(0,234,255,.4);

    border-radius:22px;

    background:
        linear-gradient(
            145deg,
            #0a0d18,
            #05060d
        );

    box-shadow:
        0 0 45px
        rgba(0,234,255,.12),
        0 30px 80px
        rgba(0,0,0,.7);
}

.play-modal-box>.material-symbols-rounded{
    color:var(--cyan);

    font-size:42px;

    text-shadow:
        0 0 15px var(--cyan),
        0 0 30px
        rgba(0,234,255,.3);
}

.play-modal-box h2{
    margin:13px 0 8px;

    font-size:25px;
}

.play-modal-box p{
    color:var(--muted);

    font-size:13px;

    line-height:1.5;
}

.modal-actions{
    display:flex;

    gap:10px;

    margin-top:22px;
}

.modal-actions .play-button,
.secondary-button{
    flex:1;
}

.secondary-button{
    padding:12px 18px;

    border:1px solid
        rgba(255,255,255,.18);

    border-radius:11px;

    color:#a1a6b5;

    background:
        rgba(255,255,255,.03);

    cursor:pointer;

    font-size:11px;

    font-weight:900;

    transition:.2s;
}

.secondary-button:hover{
    color:white;

    border-color:
        rgba(255,255,255,.35);

    background:
        rgba(255,255,255,.05);

    transform:translateY(-1px);
}

/* =========================================================
   SCROLLBAR
========================================================= */

::-webkit-scrollbar{
    width:8px;
}

::-webkit-scrollbar-track{
    background:#020207;
}

::-webkit-scrollbar-thumb{
    border-radius:20px;

    background:
        linear-gradient(
            var(--cyan),
            var(--purple)
        );
}

::-webkit-scrollbar-thumb:hover{
    background:
        linear-gradient(
            var(--pink),
            var(--cyan)
        );
}

/* =========================================================
   SELECCIÓN
========================================================= */

::selection{
    color:#020207;

    background:var(--cyan);
}

/* =========================================================
   RESPONSIVE — TABLET
========================================================= */

@media(max-width:900px){

    .topbar{
        padding-left:78px;
    }

    .content{
        padding-left:76px;
        padding-right:15px;
    }

    .play-controls{
        grid-template-columns:1fr;
    }

    .game-card{
        padding:20px;
    }

    .game-card h2{
        font-size:24px;
    }

    .game-container{
        padding:14px;
    }

    .roulette-box{
        min-height:390px;
    }

}

/* =========================================================
   RESPONSIVE — MÓVIL
========================================================= */

@media(max-width:600px){

    :root{
        --sidebar:52px;
        --top:62px;
    }

    .topbar{
        height:62px;

        padding:
            0
            10px
            0
            63px;
    }

    .topbar-logo img{
        width:36px;
        height:36px;
    }

    .topbar-item{
        width:37px;
        height:37px;

        border-radius:10px;
    }

    .content{
        padding:
            76px
            8px
            45px
            61px;
    }

    .sidebar:hover{
        width:245px;
    }

    .hero{
        min-height:auto;

        padding:20px;

        gap:14px;

        border-radius:20px;
    }

    .hero-icon{
        width:55px;
        height:55px;

        border-radius:16px;

        font-size:29px;
    }

    .hero h1{
        font-size:39px;

        letter-spacing:3px;
    }

    .hero p{
        font-size:11px;
    }

    .points-panel{
        padding:14px;

        gap:10px;
    }

    .points-panel>.material-symbols-rounded{
        font-size:29px;
    }

    .points-main strong{
        font-size:25px;
    }

    .risk-pill{
        width:100%;

        margin-left:0;

        text-align:center;
    }

    .difficulty-selector{
        flex-direction:column;
    }

    .level-selector{
        gap:5px;
    }

    .level{
        height:42px;
    }

    .section-title h2{
        font-size:24px;
    }

    .game-card{
        padding:16px;

        border-radius:18px;
    }

    .game-card header{
        gap:10px;
    }

    .game-card h2{
        font-size:21px;

        max-width:
            calc(100% - 50px);
    }

    .game-card p{
        font-size:11px;
    }

    .game-symbol{
        width:46px;
        height:46px;

        border-radius:13px;

        font-size:24px;
    }

    .game-meta{
        font-size:7px;

        max-width:100%;

        overflow:hidden;
    }

    .play-button{
        width:100%;

        min-width:0;
    }

    /* CONTENEDOR DEL JUEGO */

    .game-container{
        margin-top:15px;

        padding:8px;

        border-radius:16px;
    }

    .game-container::after{
        inset:5px;

        border-radius:12px;
    }

    .game-container canvas{
        width:100%;

        border-radius:10px;
    }

    /* HUD */

    .hud{
        gap:5px;

        margin-top:9px;
    }

    .hud>*{
        min-height:28px;

        padding:5px 7px;

        font-size:8px;
    }

    /* RESULTADO */

    .result{
        margin-top:10px;

        padding:12px;

        font-size:11px;
    }

    /* ADVERTENCIA */

    .warning{
        margin-top:12px;

        padding:11px 12px;

        font-size:10px;
    }

    /* GEOMETRY */

    .mode-buttons{
        gap:6px;

        margin-top:13px;
    }

    .mode{
        min-width:95px;

        padding:8px 10px;

        font-size:9px;
    }

    /* RULETA */

    .roulette-box{
        min-height:330px;

        gap:22px;

        padding:20px 5px;
    }

    #roulette-wheel{
        width:215px;
        height:215px;

        font-size:40px;

        border-width:7px;
    }

    #roulette-wheel::after{
        width:25px;
        height:25px;
    }

    /* REGLAS */

    .rules{
        flex-direction:column;

        padding:18px;

        gap:12px;
    }

    .rules h2{
        font-size:18px;
    }

    .rules p{
        font-size:11px;
    }

    /* MODAL */

    .play-modal{
        padding:12px;
    }

    .play-modal-box{
        padding:23px 18px;

        border-radius:18px;
    }

    .play-modal-box h2{
        font-size:21px;
    }

    .play-modal-box p{
        font-size:12px;
    }

    .modal-actions{
        flex-direction:column;
    }

}

/* =========================================================
   REDUCCIÓN DE MOVIMIENTO
========================================================= */

@media(prefers-reduced-motion:reduce){

    *,
    *::before,
    *::after{

        animation-duration:.01ms!important;

        animation-iteration-count:1!important;

        scroll-behavior:auto!important;

        transition-duration:.01ms!important;
    }

}

/* =========================================================
   JUEGOS PRÓXIMAMENTE
========================================================= */

.proximamente-card{
    cursor:not-allowed;

    position:relative;
}

.proximamente-card::after{
    content:"PRÓXIMAMENTE";

    position:absolute;

    top:15px;
    right:15px;

    background:
        rgba(0,0,0,.88);

    color:#ffffff;

    padding:7px 12px;

    border-radius:6px;

    font-size:11px;

    font-weight:bold;

    letter-spacing:1px;

    z-index:5;

    border:1px solid
        rgba(255,255,255,.12);

    box-shadow:
        0 0 12px
        rgba(0,0,0,.5);
}

.proximamente-card img{
    filter:brightness(.55);
}
/* =========================================================
   IMÁGENES DE LAS TARJETAS QUE LLEVAN A LOS JUEGOS
========================================================= */

.game-card a{
    display:block;
    width:100%;
    max-width:100%;
    overflow:hidden;
    border-radius:16px;
}

.game-card a img{
    display:block;

    width:100%;
    max-width:100%;

    height:180px;

    object-fit:cover;

    border-radius:16px;

    box-sizing:border-box;

    transition:
        transform .25s ease,
        filter .25s ease;
}

/* Efecto al pasar el mouse */

.game-card a:hover img{
    transform:scale(1.03);
}

/* Tarjetas de juegos próximamente */

.proximamente-card a{
    display:block;
    width:100%;
    max-width:100%;
    overflow:hidden;
    border-radius:16px;
}

.proximamente-card a img{
    width:100%;
    max-width:100%;
    height:180px;

    object-fit:cover;

    display:block;

    filter:brightness(.55);

    border-radius:16px;
}

/* =========================================================
   CELULAR
========================================================= */

@media(max-width:600px){

    .game-card a img,
    .proximamente-card a img{
        height:140px;
    }

}
/* =========================================================
   TAMAÑO REAL DE LAS PORTADAS DE LOS JUEGOS
========================================================= */

/* Contenedor de la imagen/enlace */

.game-card > a,
.game-card a.game-link,
.game-card .game-link{
    display:block !important;

    width:100% !important;
    max-width:100% !important;

    height:180px !important;

    overflow:hidden !important;

    border-radius:16px !important;

    box-sizing:border-box !important;
}

/* Imagen */

.game-card > a > img,
.game-card a.game-link > img,
.game-card .game-link img{
    display:block !important;

    width:100% !important;
    max-width:100% !important;

    height:180px !important;
    min-height:0 !important;
    max-height:180px !important;

    object-fit:cover !important;

    border-radius:16px !important;

    margin:0 !important;

    padding:0 !important;

    box-sizing:border-box !important;
}

/* =========================================================
   COMPUTADOR / PANTALLAS GRANDES
========================================================= */

@media(min-width:901px){

    .game-card > a,
    .game-card a.game-link,
    .game-card .game-link{
        height:180px !important;
    }

    .game-card > a > img,
    .game-card a.game-link > img,
    .game-card .game-link img{
        height:180px !important;
        max-height:180px !important;
    }

}

/* =========================================================
   TABLET
========================================================= */

@media(min-width:601px) and (max-width:900px){

    .game-card > a,
    .game-card a.game-link,
    .game-card .game-link{
        height:160px !important;
    }

    .game-card > a > img,
    .game-card a.game-link > img,
    .game-card .game-link img{
        height:160px !important;
        max-height:160px !important;
    }

}

/* =========================================================
   CELULAR
========================================================= */

@media(max-width:600px){

    .game-card > a,
    .game-card a.game-link,
    .game-card .game-link{
        height:125px !important;
    }

    .game-card > a > img,
    .game-card a.game-link > img,
    .game-card .game-link img{
        height:125px !important;
        max-height:125px !important;
    }

}
/* =========================================================
   FIX DEFINITIVO — PORTADAS KRAFEX PLAY
========================================================= */

section.cover-games-section .cover-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 22px !important;
}

section.cover-games-section .cover-grid > .cover-card,
section.cover-games-section .cover-grid > a.cover-card,
section.cover-games-section .cover-grid > div.cover-card {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 260px !important;
    max-height: 260px !important;
    min-height: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

section.cover-games-section .cover-grid > .cover-card > img,
section.cover-games-section .cover-grid > a.cover-card > img,
section.cover-games-section .cover-grid > div.cover-card > img {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    object-fit: cover !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* TABLET */
@media (max-width: 900px) {
    section.cover-games-section .cover-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    section.cover-games-section .cover-grid > .cover-card {
        height: 220px !important;
        max-height: 220px !important;
    }
}

/* CELULAR */
@media (max-width: 600px) {
    section.cover-games-section .cover-grid {
        grid-template-columns: 1fr !important;
    }

    section.cover-games-section .cover-grid > .cover-card {
        height: 180px !important;
        max-height: 180px !important;
    }
}

/* CELULAR PEQUEÑO */
@media (max-width: 400px) {
    section.cover-games-section .cover-grid > .cover-card {
        height: 160px !important;
        max-height: 160px !important;
    }
}
/* =========================================================
   KRAFEX SING
========================================================= */

.cover-games-section > a.cover-card {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 260px !important;
    max-height: 260px !important;
    min-height: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.cover-games-section > a.cover-card > img {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* TABLET */
@media (max-width: 900px) {
    .cover-games-section > a.cover-card {
        height: 220px !important;
        max-height: 220px !important;
    }
}

/* CELULAR */
@media (max-width: 600px) {
    .cover-games-section > a.cover-card {
        height: 180px !important;
        max-height: 180px !important;
    }
}

/* CELULAR PEQUEÑO */
@media (max-width: 400px) {
    .cover-games-section > a.cover-card {
        height: 160px !important;
        max-height: 160px !important;
    }
}