.central-game-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 250px;
    margin-top: 20px;
}

.juego {
    text-align: center;
    padding: 4px;
}

.hidden {
    display: none !important;
}

.cifras-board {
    margin: 0 auto;
    background: #eee;
    padding: 9px;
    border-radius: 10px;
    border: 1px solid #ddd;
    position: relative;
}

.screen-area {
    background: #333;
    color: #ffff00;
    padding: 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: 2.5em;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

.timer-display {
    font-size: 1.5em;
    color: white;
    font-family: sans-serif;
    background: #d00;
    padding: 5px 10px;
    border-radius: 4px;
    min-width: 60px;
    text-align: center;
}

.tiles-area {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 20px;
    align-items: center;
}

.tile {
    width: 60px;
    height: 60px;
    background: linear-gradient(180deg, #3377ff 0%, #2255dd 100%);
    color: white;
    font-size: 1.4em;
    font-weight: bold;
    border: 2px solid #003399;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s;
    line-height: 1;
    padding-bottom: 2px;
}

.tile:active {
    transform: translateY(2px);
}

.tile.new-tile {
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-color: #ffd700;
    z-index: 10;
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.tile.selected {
    background: #ff9900;
    border-color: #cc7a00;
    transform: scale(1.1);
    box-shadow: 0 0 10px #ff9900;
}

.tile.used {
    opacity: 0;
    pointer-events: none;
    cursor: default;
}

.operators-area {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.operator-btn {
    width: 50px;
    height: 50px;
    background: #fff;
    color: #333;
    font-size: 1.5em;
    font-weight: bold;
    border: 2px solid #ccc;
    border-radius: 50%;
    cursor: pointer;
}

.operator-btn.selected {
    background: #ff9900;
    color: white;
    border-color: #e68a00;
}

.history-container {
    background: white;
    border: 1px solid #ccc;
    padding: 10px;
    text-align: left;
    margin-bottom: 20px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 1.1em;
}

.history-line {
    border-bottom: 1px solid #eee;
    padding: 4px 0;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.btn-control {
    padding: 8px 15px;
    font-size: 1.3em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: white;
    font-weight: bold;
}

.btn-undo {
    background-color: #f0ad4e;
}

.btn-check {
    background-color: #5cb85c;
}

.msg-box {
    font-weight: bold;
    padding: 5px;
    color: #333;
    text-align: center;
    display: block;
    line-height: 1.3;
    margin-bottom: 20px;
    width: 100%;
}

.success-msg {
    color: #28a745;
}

.error-msg {
    color: #d9534f;
}

.start-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.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);
}

.overlay-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 82%;
    max-width: 600px;
    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;
}

.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;
}

.instructions-list {
    padding-left: 15px;
    margin-bottom: 0;
    line-height: 1.4;
}

.instructions-list li {
    margin-bottom: 6px;
    font-size: 1.1em;
}

@media(max-width: 500px) {
    .tile {
        width: 42px;
        height: 42px;
        font-size: 1em;
        margin: 1px;
    }

    .operator-btn {
        width: 40px;
        height: 40px;
    }

    .target-number {
        font-size: 2em;
    }
}