﻿.juego {
    text-align: center;
    padding: 4px;
}

/* Styles from Palabra Oculta */
.cifras-board {
    margin: 0 auto;
    background: #eee;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #ddd;
    position: relative;
}

.screen-area {
    background: #222;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.target-number {
    font-size: 2.5rem;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 255, 0, 0.5);
}

.timer-display {
    font-size: 2rem;
    color: #dc3545;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    background: #000;
    padding: 5px 15px;
    border-radius: 4px;
    border: 1px solid #444;
}

.overlay-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75%;
    max-width: 360px;
    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: 100;
}

.start-button {
    font-size: 1.5em;
    padding: 12px 25px;
    margin-bottom: 12px;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s;
    background: #007bff;
    color: white;
    border: none;
    cursor: pointer;
}

.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: 10px;
    width: auto;
    max-width: none;
    line-height: normal;
}

.common-description h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.instructions-list {
    padding-left: 10px;
    margin-bottom: 0;
    line-height: 1.5;
    font-size: 0.9em;
}

.instructions-list li {
    margin-bottom: 8px;
}

.lifelines {
    margin-top: 15px;
    border-top: 1px dashed #ccc;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding-top: 10px;
    flex-wrap: wrap;
}

.lifelines-title {
    font-size: 0.9em;
    text-transform: uppercase;
    color: #777;
    font-weight: bold;
    margin: 0;
}

.lifelines-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

button.comodines {
    background-color: #f0ad4e;
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 0.9em;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.1s;
    text-transform: uppercase;
}

button.comodines:hover {
    background-color: #ec971f;
    transform: scale(1.05);
}

button.comodines:active {
    transform: scale(0.98);
}

button.comodines:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Game-specific styles */
#game,
.start-container {
    width: 100%;
    margin: 0 auto;
    padding-top: 12px;
}

.parrafos {
    margin: 2px 0;
    text-align: center;
    line-height: 1.3em;
    font-size: 1.1em;
    color: #333;
}

.rosco {
    position: relative;
    width: 290px;
    height: 290px;
    margin: 0px auto;
    border-radius: 50%;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.letter {
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    transform-origin: center center;
    border-radius: 50%;
    background: linear-gradient(180deg, #3377ff 0%, #2255dd 100%);
    color: white;
    font-weight: bold;
    font-size: 13px;
    border: 2px solid #003399;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 10;
    user-select: none;
}

.active-letter {
    background: #ff9900 !important;
    border-color: #cc7a00 !important;
    transform: scale(1.3) !important;
    box-shadow: 0 0 15px rgba(255, 153, 0, 0.6) !important;
    z-index: 20 !important;
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1.3);
    }
}

.letter.correct,
.letter[style*="background-color: green"] {
    background: linear-gradient(180deg, #28a745 0%, #218838 100%) !important;
    border-color: #1e7e34 !important;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2) !important;
    color: white !important;
}

.letter.incorrect,
.letter[style*="background-color: red"] {
    background: linear-gradient(180deg, #dc3545 0%, #c82333 100%) !important;
    border-color: #bd2130 !important;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2) !important;
    color: white !important;
}

/* Legacy/Unused? Kept for safety */
.timer-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #333;
    border: 4px solid #555;
    border-radius: 50%;
    width: 175px;
    height: 175px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    color: white;
    z-index: 5;
}

.counter-container {
    display: flex;
    justify-content: space-between;
    width: 80%;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
}

.correct-counter {
    color: #28a745;
    font-size: 1.2em;
    text-shadow: 0 0 5px #28a745;
}

.incorrect-counter {
    color: #d9534f;
    font-size: 1.2em;
    text-shadow: 0 0 5px #d9534f;
}

.timer {
    font-size: 3em;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    color: #ffcc00;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
    margin: 0;
    line-height: 1;
}

.word-container {
    margin: 14px 0;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
}

.definition-prefix {
    display: block;
    font-weight: bold;
    color: #1978a1;
    font-size: 1.2em;
    text-transform: uppercase;
}

.word-changing {
    animation: flashText 0.5s;
}

@keyframes flashText {
    0% {
        opacity: 0.2;
    }

    100% {
        opacity: 1;
    }
}

.options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.option {
    background: white;
    border: 1px solid #ccc;
    border-bottom: 3px solid #bbb;
    border-radius: 6px;
    padding: 8px 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    color: #333;
    width: 45%;
    min-width: 100px;
    text-align: center;
    transition: all 0.1s;
}

.option:hover {
    transform: translateY(-2px);
    border-bottom-width: 3px;
    box-shadow: 0 2px 0 #bbb;
    background: #fdfdfd;
    color: #1978a1;
}

.option:active {
    transform: translateY(1px);
    border-bottom-width: 1px;
}

.option.correct {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.option.incorrect {
    background-color: #f8d7da;
    border-color: #d9534f;
    color: #721c24;
}

.boton,
.continue-button {
    background-color: #1978a1;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.1s;
    text-transform: uppercase;
    margin: 10px auto;
    display: inline-block;
    text-decoration: none;
}

.boton:hover,
.continue-button:hover {
    background-color: #146080;
    transform: scale(1.05);
    color: white !important;
}

.boton:active,
.continue-button:active {
    transform: scale(0.98);
}

.hidden {
    display: none !important;
}

@media (max-width: 500px) {
    .cifras-board {
        padding: 8px;
    }

    .screen-area {
        padding: 10px;
        margin-bottom: 10px;
    }

    .target-number,
    #targetDisplay {
        font-size: 1.2rem !important;
    }

    .timer-display,
    #timerDisplay {
        font-size: 1.2rem !important;
        padding: 2px 8px;
    }
}