* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Inter', Arial, sans-serif;
    background: #0F1912;
    color: #EDEFEC;

    overflow: hidden;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-pagina {
    width: 100%;
    flex-shrink: 0;

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

    padding: 8px 40px;

    background: #1A2B20;
    color: #EDEFEC;
    border-bottom: 1px solid #2A3D30;
}

.marca {
    display: flex;
    align-items: center;
    gap: 8px;

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

.juego {
    width: 90%;
    max-width: 480px;

    flex: 1;
    min-height: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tarjeta-juego {
    width: 100%;

    background: #1A2B20;
    border-radius: 18px;
    border: 1px solid #2A3D30;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);

    padding: 16px 22px;
    text-align: center;
}

.etiqueta-statement {
    font-size: 11px;
    color: #8A9690;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 2px;
}

.nombre-equipo-titulo {
    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #3FA873;
    margin: 0 0 10px;
}

.contenedor-comparacion-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;

    margin: 0 auto 14px;
}

.contenedor-comparacion {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 20px;

    margin: 0;
}

.segunda-columna {
    width: 160px;
}

.selector-lateral {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    width: 100%;
    height: 100%;
}

.escudo-item {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;

    width: 160px;

    background: hwb(0 100% 0%);
    border-radius: 12px;
    border: 1px solid #2A3D30;
    padding: 20px;

    justify-content: center;
}

.escudo-item canvas,
.escudo-item img {
    max-width: 100%;
    max-height: 105px;
    object-fit: contain;
}

.escudo-item .etiqueta-box {
    font-size: 11px;
    color: #8A9690;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primario {
    background: #3FA873;
    color: #0F1912;
    border: none;
    border-radius: 10px;
    padding: 10px 26px;

    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;

    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.btn-primario:hover {
    background: #4fc186;
    transform: translateY(-2px);
}

.resultado {
    margin-top: 8px;
}

.color-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.muestra-color {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    border: 1px solid #2A3D30;
}

.hex-resultado {
    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 600;
    font-size: 12px;
    color: #2A3D30;
}

.porcentaje {
    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 700;
    font-size: 30px;
    color: #3FA873;
    margin: 6px 0 2px;
}

.mensaje {
    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: #8A9690;
    margin: 0 0 10px;
}

[hidden] {
    display: none !important;
}

.color-picker-custom {
    width: 100%;

    display: flex;
    flex-direction: column;
    gap: 10px;

    padding: 12px;

    background: #0F1912;
    border: 1px solid #2A3D30;
    border-radius: 12px;
}

.preview-color {
    width: 100%;
    height: 28px;

    border-radius: 8px;
    border: 1px solid #2A3D30;
}

.sv-square {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;

    border-radius: 8px;
    overflow: hidden;
    cursor: crosshair;
    touch-action: none;

    background:
        linear-gradient(to top, #000, transparent),
        linear-gradient(to right, #fff, transparent),
        var(--hue-color, red);
}

.sv-cursor {
    position: absolute;
    width: 16px;
    height: 16px;

    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);

    transform: translate(-50%, -50%);
    pointer-events: none;
}

.hue-bar {
    position: relative;
    width: 100%;
    height: 20px;

    border-radius: 10px;
    touch-action: none;
    cursor: pointer;

    background: linear-gradient(
        to right,
        #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000
    );
}

.hue-cursor {
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;

    border-radius: 50%;
    background: #fff;
    border: 2px solid #1A2B20;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);

    transform: translate(-50%, -50%);
    pointer-events: none;
}

@media (max-width: 600px) {

    .contenedor-comparacion {
        flex-direction: column;
        align-items: center;
        gap: 14px;
    }

    .segunda-columna {
        width: 100%;
        max-width: 280px;
    }

    .tarjeta-juego {
        padding: 20px 16px;
    }

    .escudo-item {
        width: 180px;
    }

    .escudo-item canvas,
    .escudo-item img {
        max-height: 130px;
    }

    .color-picker-custom {
        padding: 14px;
    }

    .sv-square {
        aspect-ratio: 1 / 1;
    }

    .sv-cursor {
        width: 26px;
        height: 26px;
    }

    .hue-bar {
        height: 36px;
    }

    .hue-cursor {
        width: 32px;
        height: 32px;
    }

    .preview-color {
        height: 36px;
    }
}

.indicador-escudo {
    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: #8A9690;
    text-align: center;
    margin: 0 0 10px;
}

.contador-puntos-dia {
    position: relative;
    display: inline-block;

    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #EDEFEC;

    margin: 0 auto 12px;
    text-align: center;
    width: 100%;
}

#valorPuntosDia {
    color: #3FA873;
}

.flotante-puntos-ganados {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);

    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 700;
    font-size: 90px;
    color: #3FA873;
    text-shadow: 0 4px 20px rgba(63, 168, 115, 0.5);

    pointer-events: none;
    z-index: 9999;

    animation: flotar-puntos-centro 1.2s ease-out forwards;
}

@keyframes flotar-puntos-centro {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    25% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    40% {
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -60%) scale(1.1);
    }
}

.flotante-puntos-ganados.puntos-en-cero {
    color: #FF7A5C;
    text-shadow: 0 4px 20px rgba(255, 122, 92, 0.5);
}