.juego {
    text-align: center;
    padding: 4px;
}

.ruleta-board {
    margin: 0 auto;
    background: #e0f7fa;
    padding: 9px;
    border-radius: 10px;
    border: 1px solid #4dd0e1;
    position: relative;
    min-height: 360px;
}

.central-game-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 200px;
}

.screen-area {
    background: #333;
    color: #ffff00;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 4px solid #555;
    min-height: 50px;
}

.target-number {
    font-size: 1.5em;
    /* Adjusted for longer titles */
    font-weight: bold;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    text-align: left;
    flex: 1;
}

.timer-display {
    font-size: 1.5em;
    color: white;
    font-family: sans-serif;
    background: #d00;
    padding: 5px 12px;
    border-radius: 4px;
    min-width: 50px;
    text-align: center;
    margin-left: 10px;
}

.panel {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 7px 0 17px 0;
    min-height: 100px;
}

.letra-panel {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    font-weight: bold;
    text-transform: uppercase;
    margin: 2px;
    background: linear-gradient(180deg, #ffffff 0%, #e1f5fe 100%);
    color: #01579b;
    border: 1px solid #0288d1;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.letra-panel.espacio {
    border: none;
    background: transparent;
    box-shadow: none;
    width: 4px;
}

@media(min-width:600px) {
    .letra-panel {
        width: 32px;
        height: 38px;
        font-size: 1.3em;
    }

    .letra-panel.espacio {
        width: 15px;
    }

    .panel {
        gap: 8px;
    }
}

.letra-panel.temblando {
    animation: pulseCyan 1s infinite alternate;
    background: #b2ebf2;
    border-color: #00bcd4;
}

@keyframes pulseCyan {
    0% {
        box-shadow: 0 0 5px #00bcd4;
        transform: scale(1);
    }

    100% {
        box-shadow: 0 0 15px #00bcd4;
        transform: scale(1.1);
    }
}

.letra-panel.error {
    background: linear-gradient(180deg, #d32f2f 0%, #b71c1c 100%);
    border-color: #c62828;
    color: white;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-3px);
    }

    40%,
    80% {
        transform: translateX(3px);
    }
}



#mensaje {
    margin-bottom: 8px;
    text-align: center;
    font-size: 1em;
    padding: 6px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#resultados {
    max-width: 400px;
    text-align: center;
    margin: auto;
}

.boton {
    display: block;
    margin: 10px auto;
    padding: 12px 20px;
    font-size: 1.1em;
    background-color: #00acc1;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s;
    text-decoration: none;
}

.boton:hover {
    background-color: #00838f;
}

h3 {
    margin: 0;
    text-align: left;
    font-size: 1.2em;
    color: #ffff00;
    text-shadow: none;
    text-transform: uppercase;
}

.keyboard {
    width: 100%;
    max-width: 100%;
    margin: 2px auto;
    padding: 5px;
    background: #f5f5f5;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.key-row {
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
    gap: 3px;
}

.key {
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    flex: 1;
    min-width: 0;
    font-size: 0.9rem;
    border: 1px solid #b0bec5;
    user-select: none;
    background: #fff;
    color: #37474f;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.1s;
}

.key:active {
    transform: translateY(2px);
    box-shadow: none;
}

.key.disabled {
    opacity: 0.8;
    background: #cfd8dc;
    cursor: default;
    box-shadow: none;
    pointer-events: none;
}

.key.disabled:active {
    transform: none;
}

.key[data-state='correct'] {
    background: linear-gradient(180deg, #43a047 0%, #2e7d32 100%) !important;
    color: white !important;
    border-color: #1b5e20 !important;
    opacity: 1 !important;
}

.key[data-state='absent'] {
    background: linear-gradient(180deg, #d32f2f 0%, #c62828 100%) !important;
    color: white !important;
    border-color: #b71c1c !important;
    opacity: 1 !important;
}

.key[data-state='selected'] {
    background: #ffca28 !important;
    border-color: #ff8f00 !important;
    color: #37474f !important;
    opacity: 1 !important;
}

.key[data-key='Z'] {
    margin-left: 15px;
}

.key[data-key='M'] {
    margin-right: 15px;
}

.overlay-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 82%;
    max-width: 380px;
    text-align: center;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    color: #333;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    border: 1px solid #ccc;
    z-index: 1000;
}

.start-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1.5em;
    cursor: pointer;
    border-radius: 30px;
    font-weight: bold;
    margin: 0;
    line-height: 1;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.start-button:hover {
    transform: scale(1.05);
}

.common-description {
    text-align: left;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    color: #444;
    border: 1px solid #e9ecef;
    margin-top: 15px;
}

.common-description h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #2c3e50;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    border-bottom: 2px solid #ddd;
    padding-bottom: 8px;
    text-shadow: none;
    /* Override general h3 shadow */
}

.instructions-list {
    padding-left: 15px;
    margin-bottom: 0;
    line-height: 1.4;
}

.instructions-list li {
    margin-bottom: 6px;
    font-size: 1.1em;
}

.hidden {
    display: none !important;
}