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

body {
    font-family: "Roboto", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #556c3b, #302b63, #4f7895);
    color: #eee;
    padding: 20px;
}

.game-card {
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    border: 3px solid rgba(233, 69, 96, 0.3);
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition:
        border-color 0.5s,
        box-shadow 0.5s;
    opacity: 0.96;
}

h1 {
    color: #e94560;
    font-size: 1.8rem;
    margin-bottom: 25px;
}

.subtitle {
    color: #aaa;
    margin-bottom: 26px;
}

.controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

input {
    padding: 12px;
    font-size: 18px;
    width: 100px;
    text-align: center;
    border: 2px solid rgba(233, 69, 96, 0.4);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #eee;
    outline: none;
    transition:
        border-color 0.3s,
        box-shadow 0.3s;
}

input:focus {
    border-color: #e94560;
    box-shadow: 0 0 12px rgba(233, 69, 96, 0.3);
}

/* Ocultar flechas del input numérico */
input::-webkit-inner-spin-button,
input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

input[type="number"] {
    -moz-appearance: textfield;
}

button {
    padding: 12px 24px;
    font-size: 18px;
    background-color: #e94560;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition:
        transform 0.2s,
        background-color 0.3s;
}

button:hover {
    background-color: #d63d56;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(1px);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

#mensaje {
    font-size: 24px;
    margin: 20px 0;
    min-height: 40px;
    transition: font-size 0.3s;
}

.historial {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 20px;
    min-height: 30px;
}
.guess-pill {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
}

#historial {
    margin-top: 20px;
    font-size: 14px;
    color: #aaa;
}

#btnReiniciar {
    background-color: #0f3460;
    margin-top: 12px;
}

@media (max-width: 480px) {
    .game-card {
        padding: 30px 20px;
    }

    .controls {
        flex-direction: column;
        align-items: center;
    }

    input {
        width: 80%;
    }

    button {
        width: 80%;
    }
}