﻿@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

@font-face {
    font-family: 'Altivo Regular';
    src: url('../fonts/Altivo Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Altivo Bold';
    src: url('../fonts/Altivo Bold.ttf') format('truetype');
}

@font-face {
    font-family: 'Altivo Medium Italic';
    src: url('../fonts/Altivo Medium Italic.ttf') format('truetype');
    font-style: italic;
    /*font-weight: normal;*/
    /*font-weight: 500;*/
}

@font-face {
    font-family: 'Rampart One';
    src: url('../fonts/RampartOne-Regular.ttf') format('truetype');
}
/* ----------------------------- */
/* 🎨 PALETA DE COLORES SHIMAYA */
/* ----------------------------- */
:root {
    --primary-color: #e32b4b; /* Rojo Shimaya */
    --black-color: #292D3E; /* Negro Shimaya */
    --secondary-color: #333333; /* Gris oscuro */
    --soft-color: #F5B8C3;
    --soft-black-color: #70737E;
    --background-light: #f8f8f8;
    --background-color: #ffffff;
    --border-radius: 10px;
    --shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    --text-color: #4A4A4A;
    --hover-color: #F0F0F0;
    --border-color: #E0E0E0;
    --button-color: #D11F1F;
    --button-hover-color: #B01818;
    --pastel-green: #C1E1C1;
    --hover-green: #72A281;
    --subtitle-color: #7a7a7a;
    --success-color: #2ECC71;
    --hover-success: #21a358;
    --dark-color: #2b2a25;
    --hover-dark: #121211;
    --hover-red: #d6293d;
}

/* ----------------------------- */
/* 🔧 BASE                      */
/* ----------------------------- */


html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: var(--background-light);
    font-family: 'Altivo Regular','Rampart One', sans-serif;
    color: var(--text-color);
    outline: none;
    gap: 0;
}

/* ----------------------------- */
/* ⚠️ BLAZOR ERROR UI           */
/* ----------------------------- */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background-color: #b32121;
    background-image: url(data:image/svg+xml;base64,...); /* Truncado por brevedad */
    background-repeat: no-repeat;
    background-position: 1rem center;
    background-size: 1.8rem;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "Ha ocurrido un error.";
    }


.main-layout-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    margin: 0;
}

#wallpaper_id {
    background-color: #E32B4B;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    transition: background-image 0.3s ease-in-out, opacity 0.5s ease-in-out;
    opacity: 1;
}


.container-fluid {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0px !important;
}
/* ----------------------------- */
/* 🔝 HEADER + NAVBAR           */
/* ----------------------------- */
header {
    margin: 0;
    padding: 0;
    margin-right: .5rem;
    margin-left: .5rem;
}

    header.navbar {
        /*display: flex;*/
        /*      background-color: var(--primary-color);
        color: white;
        padding: 1rem;
        align-items: center;
        justify-content: space-between;
        box-shadow: var(--shadow);
        position: relative;
        z-index: 1001;*/
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        transform: translateY(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1001;
    }

        header.navbar.visible {
            transform: translateY(0);
        }

    header h1 {
        font-size: 1.4rem;
        margin: 0;
        font-weight: bold;
        /*color: white;*/
        color: var(--primary-color);
    }

#main-header {
    transition: transform 0.3s ease-in-out;
    transform: translateY(-100%);
}

    #main-header.visible {
        transform: translateY(0);
    }
/* Botón hamburguesa siempre visible */
header button {
    background: none;
    border: none;
    color: white;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

/* Forzar ocultar navegación horizontal */
header nav {
    display: none !important;
}


.navbar-brand {
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

    .navbar-brand h1 {
        font-family: 'Altivo Bold';
        outline: none;
        box-shadow: none;
        border: none;
        text-transform: uppercase;
    }


/* ----------------------------- */
/* 📂 MENU LATERAL COLAPSABLE   */
/* ----------------------------- */
aside {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background-color: var(--black-color);
    transition: left 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    padding-top: 4.5rem;
}

    aside.menu-open {
        left: 0;
    }

    aside nav ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    aside nav li {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--border-color);
    }

    aside nav a {
        text-decoration: none;
        color: white;
        font-weight: 500;
        transition: background 0.3s ease;
    }

.nav-link {
    border-radius: var(--border-radius);
}

aside nav a:hover {
    background-color: #E32B4B;
    color: var(--primary-color);
    border-radius: var(--border-radius);
}

/* ----------------------------- */
/* 📄 MAIN CONTENT              */
/* ----------------------------- */
main {
    flex-grow: 1;
    margin-top: .5rem;
    display: block;
    align-items: flex-start;
    background-color: var(--background-light);
}

article.content {
    width: 100%;
    max-width: 580px;
}

/* ----------------------------- */
/* 📱 RESPONSIVO                */
/* ----------------------------- */
@media screen and (max-width: 600px) {
    header h1 {
        font-size: 1.2rem;
    }
}



/* 🧩 CONTENEDOR PRINCIPAL DEL JUEGO */
.game-container {
    max-width: 600px;
    padding: 1.5rem .5rem;
    min-height: calc(100vh - 4.5rem);
}

/* 📝 TITULOS */
h3, h4 {
    color: var(--black-color);
    text-align: center;
    margin-bottom: 1.5rem;
}

/* 🧾 GRUPOS DE FORMULARIO */
.form-group {
    margin-bottom: 1.5rem;
}

/* 🏷️ LABELS */
label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 600;
}

/* 🖊 INPUTS */
input[type="text"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

    input[type="text"]:focus,
    input[type="email"]:focus,
    input[type="tel"]:focus {
        outline: none;
        border: 3px solid var(--border-color);
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(227, 43, 75, 0.15); /* rojo shimaya con transparencia */
    }

/* ✅ CHECKBOX */
.form-check-label {
    margin-left: 0.5rem;
    color: var(--text-color);
}

.is-legacy {
    font-size: .730rem;
}

.form-check-input {
    transform: scale(1.2);
}

/* 🔘 BOTONES GENERALES */
.btn-primary,
.btn-success,
.btn-warning,
.btn-dark {
    width: 100%;
    padding: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    box-shadow: var(--shadow) !important;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color) !important;
    color: white;
}

    .btn-primary:hover {
        background-color: var(--button-hover-color) !important;
        transform: translateY(-2px);
    }

.btn-dark {
    background-color: var(--dark-color) !important;
    color: white;
}

    .btn-dark:hover {
        background-color: var(--hover-dark) !important;
        transform: translateY(-2px);
    }

.btn-success {
    background-color: var(--success-color) !important;
    color: white !important;
}

    .btn-success:hover {
        background-color: var(--hover-success) !important;
        transform: translateY(-2px);
        color: white !important;
    }

.btn-warning {
    background-color: #f6e05e;
    color: var(--black-color) !important;
}

    .btn-warning:hover {
        background-color: #ecc94b !important;
        transform: translateY(-2px);
    }

/* 📊 TABLA DE PREGUNTAS */
.table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--background-color);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
}

    .table thead th {
        padding: 1rem;
        text-align: left;
        background-color: var(--hover-color);
        border-bottom: 2px solid var(--border-color);
        color: var(--subtitle-color);
        font-weight: 600;
    }

    .table tbody td {
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        color: var(--black-color);
    }

    .table tbody tr:hover {
        background-color: var(--hover-color);
    }

/* 📱 RESPONSIVE */
@media screen and (max-width: 600px) {
    .game-container {
        padding: 0.8rem;
    }

    .table thead th, .table tbody td {
        padding: 0.8rem;
    }

    h3, h4 {
        font-size: 1.2rem;
    }
}




.question-card {
    background: white;
    border-top: solid 1px var(--primary-color);
    border-bottom: solid 1px var(--primary-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 1.8rem 1rem;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    border-radius: 16px;
}

    .question-card:hover {
        transform: translateY(-5px);
    }


/*----------------------------------- questions starting -----------------------------------------*/

.question-container {
    background-color: #FFF3E0;
    border: 4px solid black;
    border-radius: 30px;
    padding: 2rem 1.5rem;
    max-width: 480px;
    margin: 2rem auto;
    box-shadow: 8px 10px 0px #000;
    text-align: center;
    position: relative;
    cursor: default;
}

.question-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
    text-align: center;
}

.question-header-text {
    width: 100%;
}

.question-nickname {
    font-family: 'Rampart One';
    font-size: 3rem;
    font-weight: 900;
    color: #7C4DFF;
    margin: 0;
}

.question-motivation {
    font-family: 'Altivo Bold';
    font-size: 1.6rem;
    font-weight: bold;
    color: #000;
    margin: 0.2rem 0 1rem;
}

.question-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.question-icon {
    width: 100px;
    z-index: 1;
}

.question-box {
    background-color: #000;
    padding: .6rem 1rem;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    flex-grow: 1;
    text-align: center;
    margin-left: -2rem;
}

.question-label {
    color: white;
    font-family: 'Altivo Bold';
    font-size: 1.4rem;
}

.question-timer {
    background-color: #7C4DFF;
    color: white;
    padding: 0.8rem 1rem;
    font-size: 1.4rem;
    font-weight: bold;
    border-radius: 10px;
    min-width: 50px;
}

.question-content {
    background-color: white;
    border-radius: 16px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}

.question-category {
    font-family: 'Altivo Bold';
    color: #7C4DFF;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 1.2rem;
}

.question-text {
    font-family: 'Altivo Bold';
    font-size: 1.3rem;
    font-weight: bold;
    color: #000;
    margin-bottom: 1rem;
}

.question-options {
    font-family: 'Altivo Regular';
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-button {
    font-family: 'Altivo Regular';
    background-color: #7C4DFF;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 16px;
    padding: 1.2rem;
    font-size: 1.2rem;
    box-shadow: 6px 6px 0px #000;
    text-align: center;
    transition: transform 0.1s ease;
    cursor: pointer;
}

    .option-button:hover {
        transform: translateY(-2px);
    }

.option-label {
    font-weight: bold;
    margin-right: 0.5rem;
}

.timer-warning {
    background-color: #FFA500 !important;
}

.timer-critical {
    background-color: red !important;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@media screen and (max-width: 480px) {
    .question-container {
        padding: 1.5rem 1rem;
        margin: 1.5rem 0.5rem;
        border-radius: 20px;
    }

    .question-nickname {
        font-size: 2rem;
    }

    .question-motivation {
        font-size: 1.1rem;
    }

    .question-row {
        /*flex-direction: column;
        gap: 0.5rem;*/
    }

    .question-icon {
        width: 80px;
    }

    .question-box {
        /*margin-left: 0;*/
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
        width: 100%;
    }

    .question-label {
        font-size: 1.1rem;
        word-break: break-word;
    }

    .question-timer {
        font-size: 1.2rem;
        /*padding: 0.6rem 0.9rem;*/
    }

    .question-category {
        font-size: 0.7rem;
    }

    .question-text {
        font-size: 1.1rem;
    }

    .option-button {
        font-size: 1rem;
        padding: 1rem;
    }
}

/*-------------------------------- questions ending -----------------------*/


/*----------------------------------  wrong answer stating ----------------------*/

.result-card {
    width: 100%;
    max-width: 480px;
    position: relative;
    margin: 7rem auto;
    text-align: center;
    padding: 3rem 1.5rem;
    border-radius: 30px;
    border: solid 4px #000;
    box-shadow: 8px 10px 0px #000;
    overflow: visible;
    cursor: default;
    /*z-index: 0;*/
}

    .result-card.result-error {
        background-image: url('/images/bg-card-wrong.webp');
        background-size: cover;
        background-repeat: no-repeat;
    }

    .result-card.correct-result {
        background-image: url('/images/bg-card-correct.webp');
        background-size: cover;
        background-repeat: no-repeat;
    }

    .result-card.summary-result {
        margin-top: 1rem;
        background-color: #FFF3E0;
    }

.result-icon-top {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

    .result-icon-top.wrong-aw {
        width: 220px;
        top: -152px;
    }

    .result-icon-top.success-aw {
        top: -90px;
        width: 260px;
    }

    .result-icon-top.complete-aw {
        margin-top: -4rem;
        width: 100px;
    }

.result-title {
    font-family: 'Altivo Bold';
    font-size: 2.2rem;
    font-weight: 900;
    color: #FFECD1;
    margin-top: 5rem;
    margin-bottom: 0.5rem;
}

    .result-title.complete-aw {
        margin-top: 1rem;
        color: #E32B4B;
    }

.result-subtitle {
    font-family: 'Altivo Regular';
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.italic-black {
    color: #292D3E;
}

.result-points {
    font-family: 'Altivo Regular';
    font-style: italic;
    color: white;
    font-size: 1rem;
    margin-bottom: 2rem;
}

.star-container {
    position: relative;
    width: 240px;
    margin: 0 auto 2rem;
    transition: transform 0.2s ease;
    transform-origin: center;
}

    .star-container:hover {
        transform: scale(1.1);
    }

    .star-container.complete-aw {
        margin-top: 1rem;
        width: 200px;
    }

.star-background {
    width: 100%;
    height: auto;
    display: block;
}

.star-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #8B4000;
    text-align: center;
    padding: 0.25rem;
}

.star-label {
    font-family: 'Altivo Bold';
    font-size: 1.2rem;
    text-transform: uppercase;
    color: #000;
    margin-bottom: 0.2rem;
}

.white-text {
    color: #F5F5F5;
}


.star-score {
    font-family: 'Altivo Bold';
    font-size: 1.8rem;
    font-weight: bold;
    line-height: 1;
}

    .star-score.complete-aw {
        margin-top: .5rem;
        font-size: 2.8rem;
        margin-bottom: .5rem;
        color: #F5F5F5;
    }

.star-unit {
    font-size: 1rem;
    margin-left: 0.2rem;
}

.result-summary {
    font-family: 'Altivo Bold';
    font-size: 1.2rem;
    background-color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 1.5rem;
    margin-left: 1rem;
    margin-right: 1rem;
    display: block;
}

.btn-next {
    background-color: #FFEB3B;
    color: #8B4000;
    font-weight: bold;
    border: 2px solid black;
    border-radius: 30px;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    box-shadow: 3px 3px 0px black;
    cursor: pointer;
    transition: transform 0.2s ease;
}

    .btn-next:hover {
        background-color: #EFB614;
        transform: translateY(-2px);
    }

@media screen and (max-width: 480px) {
    .result-card.result-error {
        padding: 1.5rem 1rem;
        margin: 5rem 0.5rem;
        border-radius: 20px;
    }

    .result-icon-top.wrong-aw {
        width: 160px;
        top: -110px;
    }

    .result-title {
        font-size: 1.6rem;
        margin-top: 4.5rem;
    }

    .result-subtitle {
        font-size: 1rem;
    }

    .result-points {
        font-size: 0.9rem;
    }

    .star-container {
        width: 160px;
    }

    .star-label {
        font-size: 0.9rem;
    }

    .star-score {
        font-size: 1.4rem;
    }

        .star-score.complete-aw {
            font-size: 1.8rem;
        }

    .star-unit {
        font-size: 0.85rem;
    }

    .result-summary {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }

    .btn-next {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }
}

.ranking-position-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    max-width: 400px;
    margin-top: -2rem;
}

.ranking-icon {
    width: 90px;
    height: auto;
}

.ranking-text-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    line-height: .02;
}

    .ranking-text-group.centered {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        line-height: 0.2;
        font-family: 'Altivo Bold', sans-serif;
        margin-top: 1.5rem;
    }

.ranking-label-top,
.ranking-label-bottom {
    font-family: 'Altivo Bold', sans-serif;
    font-size: 1rem;
    color: #CA7F67;
    width: 100%;
    text-align: center;
}

.ranking-number {
    font-size: 3.5rem;
    font-family: 'Rampart One', sans-serif;
    color: #503D08;
}


/*------------------------------  wrong answer ending -----------------------*/




/*-------------------------------------- intro starting ------------------*/

.intro-container {
    background-color: #FFF3E0;
    border: 4px solid black;
    border-radius: 30px;
    padding: 2rem 1.5rem;
    max-width: 480px;
    margin: 2rem auto;
    box-shadow: 8px 10px 0px #000;
    text-align: center;
    position: relative;
}

.intro-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: .5rem;
}

.intro-avatar {
    width: 120px;
    height: auto;
}

.intro-header-text {
    width: 100%;
    text-align: center;
}

.intro-welcome {
    font-family: 'Altivo Bold';
    font-size: 1.8rem;
    font-weight: 900;
    color: #000;
    margin: 0;
}

.intro-nickname {
    font-family: 'Rampart One';
    font-size: 2rem;
    color: #D71F2C;
    font-weight: 900;
    margin: 0;
}

.intro-message {
    font-family: 'Altivo Regular';
    font-size: 0.95rem;
    color: #333;
    margin-bottom: .8rem;
    padding: .2rem 2rem;
}

.rule-box {
    font-family: 'Altivo Regular';
    color: white;
    font-weight: 500;
    padding: 1rem;
    margin-bottom: 0.8rem;
    margin-left: 1rem;
    margin-right: 1rem;
    border-radius: 16px;
    box-shadow: 5px 5px 0px black;
    font-size: 0.8rem;
    text-align: left;
    text-align: center;
}

.play-button-single {
    background-color: transparent;
    border: none;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem auto 0 auto;
    cursor: pointer;
    /*width: 160px;*/
}

    .play-button-single:hover {
        transform: scale(1.05);
    }

.play-label-single {
    font-family: 'Altivo Bold';
    background-color: #FDD835;
    border: 2px solid black;
    box-shadow: 4px 4px 0px black;
    color: #8B4000;
    padding: 0rem 2.4rem;
    border-radius: 30px;
    font-weight: bold;
    font-size: 3rem;
    width: 100%;
}

    .play-label-single:hover {
        background-color: #F1B719;
        color: #503D08;
    }
/*--------------------------------------- intro ending ------------------------------------*/
/*-------------------------- summary starting -----------------------------------*/
.summary-stats {
    font-family: 'Altivo Regular';
    font-size: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0 1.5rem;
    margin: 0.25rem 0;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

    .stat-item.correct {
        color: #2ecc71;
        font-weight: 500;
    }

    .stat-item.incorrect {
        color: #e74c3c;
        font-weight: 500;
    }

    .stat-item.neutral {
        color: #000;
    }

.stat-icon {
    font-size: 1.2rem;
    line-height: 1;
}


.summary-actions-sm {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem;
    margin-top: 2rem;
}

.btn-next-sm {
    font-family: 'Altivo Bold', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    padding: 1rem;
    border: 2px solid black;
    border-radius: 20px;
    box-shadow: 4px 6px 0px black;
    cursor: pointer;
    text-transform: uppercase;
    transition: transform 0.2s ease, background-color 0.3s ease;
    width: 100%;
}

    /* Hover effect común */
    .btn-next-sm:hover {
        transform: translateY(-2px);
    }

/* Colores por botón */
.yellow-btn {
    background-color: #FFA000; /* Amarillo */
}

    .yellow-btn:hover {
        background-color: #FFB300;
    }

.orange-btn {
    background-color: #F57C00; /* Naranja */
}

    .orange-btn:hover {
        background-color: #FB8C00;
    }

.red-btn {
    background-color: #D71F2C; /* Rojo */
}

    .red-btn:hover {
        background-color: #E53935;
    }



/* Responsive */
@media screen and (max-width: 480px) {
    .summary-stats {
        font-size: 0.9rem; /* Reduce texto general */
    }

    .stat-row {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 0 0.5rem;
        row-gap: 0.5rem;
    }

    .stat-item {
        flex: 1 1 48%; /* cada item ocupa 48% y permite dos columnas */
        justify-content: flex-start;
        font-size: 0.9rem;
    }

    .stat-icon {
        font-size: 1rem;
    }

    .btn-next-sm {
        font-size: 1rem;
    }
}


/*----------------------------------- ranking starting ------------------------*/


.ranking-container {
    background-color: #fff3e0;
    padding: 2rem 1rem;
    border-radius: 30px;
    border: 4px solid black;
    box-shadow: 8px 10px 0px #000;
    max-width: 400px;
    margin: 0 auto;
    margin-top: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.ranking-title {
    font-size: 4rem;
    font-weight: 900;
    color: #000;
    margin-bottom: .5rem;
    font-family: 'Altivo Bold', sans-serif;
}

.podium-container {
    position: relative;
    margin-bottom: 2rem;
}

    .podium-container .third .points {
        color: #fff;
    }

.podium-image {
    width: 100%;
    height: auto;
    margin-top: 4rem;
}


.ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
    cursor: default;
}

/* 🏅 ENTRY BASE */
.ranking-entry {
    position: relative;
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: 16px;
    border: 2px solid black;
    margin-bottom: 2rem;
    padding: 0.75rem 1.2rem;
    box-shadow: 3px 4px 0px black;
    min-height: 80px;
    padding-left: 1.5rem; /* para que no choque con la estrella */
}

    /* 🌟 HIGHLIGHT AL JUGADOR ACTUAL */
    .ranking-entry.current-player {
        background-color: #FFF9C4;
        border-color: #FFD700;
        box-shadow: 4px 5px 0px #FFD700;
    }

/* ⭐ ICONO ESTRELLA */
.ranking-star {
    width: 28px;
    height: 28px;
    margin-right: 1rem;
    transition: transform 0.2s ease;
    transform-origin: center;
}

    .ranking-star::selection {
        background-color: transparent;
    }

    .ranking-star:hover {
        transform: scale(1.5);
    }

/* 📊 TEXTO PRINCIPAL */
.ranking-text {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    text-align: left;
    flex: 1;
}

/* 🏬 NOMBRE DE TIENDA */
.ranking-store-text {
    display: block;
    line-height: 1;
    color: #e32b4b;
    font-weight: 100;
    margin-top: 0.2rem;
}

/* 🔢 CAJA DE POSICIÓN (FLotante en esquina) */
.ranking-position-box {
    position: absolute;
    top: -20px;
    left: -14px;
    background-color: white;
    border: 1px solid black;
    border-radius: 12px;
    font-weight: bold;
    color: #D4A017;
    font-size: 1.2rem;
    width: 62px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 3px 0px black;
    z-index: 10;
}

    .ranking-position-box.current-player {
        background-color: #FFF9C4;
        border-color: #FFD700;
        box-shadow: 3px 4px 0px #FFD700;
        color: #7D1619;
    }

    .ranking-entry.current-player .ranking-text {
        color: #B8860B; /* goldenrod */
    }

    .ranking-text::selection,
    .ranking-store-text::selection {
        background-color: #FFD54F;
        color: #000;
    }

.ranking-empty {
    background-color: white;
    border: 3px solid black;
    padding: 1rem;
    border-radius: 16px;
    box-shadow: 4px 5px 0px black;
    color: #999;
    font-style: italic;
}




.podium-text {
    background-color: var(--background-light);
    animation: fadeIn 0.5s ease-in-out;
    border: solid 1px #503D08;
    box-shadow: var(--shadow);
    padding: .2rem;
    border-radius: 10px;
    position: absolute;
    width: 100px;
    text-align: center;
    font-weight: bold;
    color: #333;
    cursor: pointer;
}

    .podium-text p {
        margin: 0;
        font-size: 0.9rem;
        line-height: 1.2;
    }

    .podium-text .points {
        font-size: 0.8rem;
        font-weight: normal;
        color: #666;
    }

    .podium-image::selection,
    .ranking-title::selection,
    .podium-text::selection {
        background-color: transparent;
    }

.first {
    top: 1%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #FFD100;
    transition: transform 0.2s ease;
}

    .first:hover {
        transform: translateX(-50%) scale(1.05);
    }

.second {
    top: 12%;
    left: 18%;
    transform: translateX(-50%);
    background-color: #EAEAEA;
    transition: transform 0.2s ease;
}

    .second:hover {
        transform: translateX(-50%) scale(1.05);
    }

.third {
    top: 15%;
    left: 84%;
    transform: translateX(-50%);
    background-color: #CA7F67;
    transition: transform 0.2s ease;
}

    .third:hover {
        transform: translateX(-50%) scale(1.05);
    }

/*------------------------------  ranking ending -------------------------*/

/*---------------------------------------------*/
.banner-congrats {
    background-color: #c21838;
    text-align: center;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}


/*------------------------------  home start -------------------------*/
.home-container {
    min-height: calc(100vh - 4.5rem);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 5rem;
    padding: 1.5rem;
    cursor: default;
}

.home-card-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 1.6rem;
    margin-top: 2rem;
}

.home-card {
    background-color: #FFF3E0;
    border: 4px solid black;
    border-radius: 20px;
    /*box-shadow: [offset-x] [offset-y] [blur-radius] [spread-radius] [color];*/
    box-shadow: 12px 12px 7px .3px black;
    padding: .5rem;
    max-width: 480px;
    width: 100%;
    text-align: center;
    transition: transform 0.3s ease;
    position: relative;
}

.home-image {
    position: absolute;
    top: -132px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    z-index: 1;
}

.home-title {
    margin-top: 4rem;
    font-family: 'Altivo Bold';
    font-size: 2.3rem;
    color: var(--black-color);
    font-weight: bold;
    line-height: 1.2;
}

    .home-title .brand {
        color: var(--primary-color);
        font-size: 4rem;
        display: block;
        line-height: .8;
    }

        .home-title .brand .bland-end {
            display: block;
            font-size: 2.2rem;
            line-height: 1;
        }

.home-subtitle {
    font-family: 'Altivo Regular';
    font-size: .9rem;
    color: var(--soft-black-color);
    padding: 1rem 2.4rem;
    color: black;
    line-height: 1.2;
}



.home-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.6rem;
}

.card-button {
    display: flex;
    align-items: center;
    margin-left: 3rem;
    margin-right: 3rem;
    border-radius: 30px;
    padding: 1rem 1.5rem 1rem 1rem;
    max-width: 600px;
    box-shadow: 6px 8px 0px #000;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease;
    background-repeat: no-repeat;
    background-position: 1rem center;
    background-size: 100px auto;
    font-family: 'Altivo Regular', sans-serif;
    margin-bottom: 1.5rem;
    height: 80px;
}

    .card-button.start-game {
        background-color: #D71F2C;
    }

    .card-button.start-ranking {
        background-color: #891D2A;
    }


    .card-button:hover {
        transform: translateY(-2px);
    }

.card-label {
    background-color: #FDD835;
    color: #8B4000;
    font-weight: 900;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    border: 2px solid black;
    box-shadow: 3px 3px 0px black;
    font-size: 1.1rem;
    margin-right: 1.5rem;
    white-space: nowrap;
    min-width: 123px;
    transition: transform 0.2s ease;
    transform-origin: center;
}

    .card-label:hover {
        transform: scale(1.1);
    }

.card-description {
    line-height: 1.4;
    color: white;
    font-size: .8rem;
    text-align: center;
}

@media screen and (max-width: 600px) {
    .home-container {
        margin-top: 3rem;
        padding: 1rem;
    }

    .home-card-wrapper {
        padding: 1rem;
        margin-top: 1rem;
    }

    .home-card {
        padding: 1rem;
        border-radius: 16px;
    }

    .home-image {
        top: -100px;
        width: 160px;
    }

    .home-title {
        margin-top: 3rem;
        font-size: 1.5rem;
    }

        .home-title .brand {
            font-size: 2.5rem;
        }

        .home-title .bland-end {
            font-size: 1.5rem;
        }

    .home-subtitle {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    .card-button {
        flex-direction: column;
        align-items: center;
        text-align: center;
        height: auto;
        padding: 1rem;
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .card-label {
        margin-right: 0;
        margin-bottom: 0.6rem;
        width: auto;
        min-width: 123px;
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }

    .card-description {
        font-size: 0.75rem;
    }
}



/*----------------------------------------- home ending -----------------------------------*/



/*---------------------------------------------- join card start -------------------------------------*/


.join-card {
    background-color: #FFF3E0;
    border: 4px solid black;
    border-radius: 30px;
    padding: 2rem 1.5rem;
    max-width: 400px;
    margin: 2rem auto;
    box-shadow: 8px 10px 0px #000;
    text-align: center;
    position: relative;
    margin-top: 5rem;
    font-family: 'Altivo Bold';
    cursor: default;
}

.join-image {
    width: 160px;
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
}

.join-title {
    margin-top: 5rem;
    font-size: 2.3rem;
    color: var(--black-color);
    font-weight: bold;
    line-height: 1.2;
}

.join-brand {
    color: var(--primary-color);
    font-size: 4rem;
    display: block;
    line-height: .8;
}

    .join-brand .brand-sub {
        display: block;
        font-size: 2.2rem;
        line-height: 1;
    }

.brand-sub-store {
    font-size: 1.2rem;
    color: #8B4000;
    font-weight: 500;
    margin-top: -0.5rem;
}

.join-description {
    font-size: 0.9rem;
    color: #333;
    margin: 1.5rem 0 2rem;
    font-family: 'Altivo Regular', sans-serif;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 3px solid black;
    border-radius: 15px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    outline: none;
}

    .form-control.input.dni {
        text-align: center;
        font-size: 1.8rem;
    }

    .form-control:focus {
        border-color: #D71F2C;
        box-shadow: 0 0 0 2px rgba(215, 31, 44, 0.2);
    }

.join-label {
    display: block;
    text-align: left;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    font-family: 'Altivo Bold', sans-serif;
    color: #333;
}

.form-control.input {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 14px;
    border: 2px solid black;
    font-size: 0.95rem;
    font-family: 'Altivo Regular';
    box-shadow: 3px 3px 0px #000;
    outline: none;
}

.form-check-custom {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 1rem 0 2rem;
    font-size: 0.9rem;
    text-align: left;
}

.form-check-input-custom {
    appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid black;
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
    position: relative;
    box-shadow: 3px 3px 0px #000;
    outline: none;
    padding: 12px;
    transition: background-color 0.2s ease-in-out;
}

    .form-check-input-custom:checked {
        background-color: #FDD835;
    }

        .form-check-input-custom:checked::after {
            content: "✔";
            font-size: 1rem;
            color: #8B4000;
            position: absolute;
            top: 2px;
            left: 5px;
            font-weight: bold;
        }

.form-check-label-custom {
    font-family: 'Altivo Regular';
    color: #222;
    user-select: none;
}

.play-button {
    background-color: #D71F2C;
    border: none;
    padding: 0;
    border-radius: 20px;
    height: 60px;
    width: 100%;
    box-shadow: 5px 5px 0px #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

    .play-button:hover {
        background-color: #FF122D;
        transform: scale(1.05);
    }

.play-label {
    color: #F5F5F5;
    font-weight: bold;
    font-size: 1.8rem;
}



.register-button-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.icon-button {
    background-color: #D71F2C;
    border: 2px solid black;
    border-radius: 14px;
    padding: 0.6rem;
    width: 100px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 3px 4px 0px #000;
    cursor: pointer;
}

    .icon-button:hover {
        transform: scale(1.05);
    }

.icon-image {
    width: 35px;
    height: auto;
}

.register-button {
    background-color: #FFEB3B;
    border: 2px solid black;
    border-radius: 20px;
    padding: 0 2rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 4px 5px 0px #000;
    cursor: pointer;
    width: 100%;
}

    .register-button:hover {
        background-color: #FDD835;
        transform: scale(1.05);
    }

.register-label {
    font-family: 'Altivo Bold';
    color: #8B4000;
    font-size: 1.8rem;
    font-weight: bold;
}


/*----------------------------------- join card ending -----------------------------------*/
.ranking-toggle-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem auto;
    padding: 0 1rem;
    flex-wrap: wrap;
}

.btn-rank-toggle {
    background-color: #FFCA28;
    color: #000;
    border: 2px solid black;
    font-family: 'Altivo Bold';
    font-size: 1rem;
    padding: 0.8rem 1.6rem;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 3px 3px 0px black;
    transition: all 0.2s ease-in-out;
    min-width: 140px;
    text-transform: uppercase;
    color: #8B4000;
}

    .btn-rank-toggle:hover {
        transform: translateY(-2px);
        background-color: #FFB300;
    }

    .btn-rank-toggle.active {
        background-color: #D32F2F;
        color: #fff;
    }

    .back-to-game-container::selection,
    .back-to-game::selection,
    .play-button-single::selection,
    .rule-box::selection,
    .intro-message::selection,
    .intro-header::selection,
    .question-container::selection,
    .result-card::selection,
    .join-card::selection,
    .home-container::selection,
    .btn-rank-toggle::selection {
        background-color: transparent;
    }

.form-group::selection {
    background-color: #FFD54F;
}

select.form-control.input option {
    background-color: #FFF3E0;
    color: #000;
}

    select.form-control.input option:hover {
        background-color: #FFD54F;
        color: #000;
    }


.good-luck-message {
    text-align: center;
    font-family: 'Altivo Regular', sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    position: relative;
    padding: 1rem 0;
    margin: 2rem 0;
    display: inline-block;
}

    .good-luck-message::before,
    .good-luck-message::after {
        content: '';
        display: block;
        height: 5px;
        background: linear-gradient(to right, #000 30%, transparent 100%);
        margin: 0 auto;
        width: 100%;
        max-width: 300px;
    }

    .good-luck-message::after {
        background: linear-gradient(to right, transparent 0%, #000 70%);
        margin-top: 0.5rem;
    }

.static-text {
    font-weight: 400;
    color: #222;
    margin-right: 0.3rem;
}

.user-name {
    color: #E53935;
    font-family: 'Rampart One';
    font-weight: bold;
}


/*---------------------------------------- wrong modal starting  ---------------*/


.wrong-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wrong-modal-card {
    background-color: #FFF3E0;
    border: 4px solid black;
    border-radius: 30px;
    padding: 2.5rem 1.5rem;
    width: 90%;
    max-width: 360px;
    text-align: center;
    position: relative;
    box-shadow: 8px 10px 0px #000;
    font-family: 'Altivo Bold';
}

.wrong-modal-image {
    width: 120px;
    position: absolute;
    top: -70px;
    left: 50%;
    transform: translateX(-50%);
}

.wrong-modal-title {
    margin-top: 3rem;
    font-size: 1.8rem;
    color: #000;
}

.wrong-modal-brand {
    font-size: 2.4rem;
    color: #D71F2C;
    line-height: 1.1;
}

.wrong-modal-sub {
    font-size: 1.4rem;
    display: block;
    line-height: 1;
}

.wrong-modal-description {
    margin: 1.5rem 0 2rem;
    font-size: 0.95rem;
    color: #222;
    font-family: 'Altivo Regular';
}

.wrong-modal-button {
    background-color: #FFEB3B;
    border: 2px solid black;
    border-radius: 16px;
    width: 100%;
    height: 60px;
    cursor: pointer;
    box-shadow: 4px 4px 0px #000;
}

    .wrong-modal-button:hover {
        background-color: #FBC02D;
        transform: scale(1.02);
    }

.wrong-modal-button-label {
    font-family: 'Altivo Bold';
    font-size: 1.5rem;
    color: #8B4000;
}



/*------------------------------------- wrong modal ending ----------------------------*/


.back-to-game-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: start;
    width: 100%;
    margin-top: 2rem;
}

.icon-button-sm {
    background-color: #D71F2C;
    border: 2px solid black;
    border-radius: 12px;
    width: 60px;
    height: 50px;
    padding: 0.5rem;
    box-shadow: 3px 4px 0px #000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

    .icon-button-sm:hover {
        transform: scale(1.05);
    }

.icon-image-sm {
    width: 38px;
    height: 38px;
}


.back-to-game {
    font-family: 'Rampart One';
    font-size: 1.4rem;
    color: #8B4000;
    font-weight: 900;
    margin: 0;
    margin-top: 1rem;
    text-align: right;
    cursor: pointer;
    transition: color 0.2s ease, text-decoration 0.2s ease;
    display: block;
    width: 100%;
}

    .back-to-game:hover {
        color: #D32F2F;
        transform: translateY(-2px);
    }



    /*---------------------------------------------------------------*/

.loading-card-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #dc3545; /* rojo bootstrap */
    color: white;
    padding: 1rem 2rem;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    font-weight: bold;
    gap: 1rem;
    transition: 0.3s;
}

    .loading-card-button .spinner {
        width: 1.25rem;
        height: 1.25rem;
        border: 3px solid white;
        border-top: 3px solid transparent;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
