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

body {
    font-family: 'Arial Black', Arial, sans-serif;
    background-color: #fef6e4;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    font-size: 3rem;
    color: #001858;
    text-transform: uppercase;
    margin-bottom: 30px;
    border: 6px solid #001858;
    padding: 20px;
    background-color: #f582ae;
    box-shadow: 12px 12px 0 #001858;
}

.game-area {
    background-color: #8bd3dd;
    border: 6px solid #001858;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 12px 12px 0 #001858;
}

.lock-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.lock-option {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #fef6e4;
    border: 4px solid #001858;
    padding: 15px;
    box-shadow: 6px 6px 0 #001858;
}

.lock-option input[type="checkbox"] {
    width: 30px;
    height: 30px;
    cursor: pointer;
}

.lock-option input[type="number"] {
    width: 60px;
    height: 50px;
    border: 4px solid #001858;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    background-color: #ffffff;
}

.lock-option label {
    font-size: 1.2rem;
    font-weight: bold;
    color: #001858;
}

.question {
    text-align: center;
    margin-bottom: 30px;
}

.numbers {
    font-size: 4rem;
    color: #001858;
    margin-bottom: 20px;
    font-weight: bold;
}

.answer-input {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    align-items: center;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#answer {
    width: 150px;
    height: 80px;
    font-size: 3rem;
    font-weight: bold;
    text-align: center;
    border: 6px solid #001858;
    background-color: #ffffff;
    box-shadow: 8px 8px 0 #001858;
}

button {
    padding: 20px 40px;
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    border: 6px solid #001858;
    background-color: #f3d2c1;
    cursor: pointer;
    box-shadow: 8px 8px 0 #001858;
    transition: all 0.1s;
}

button:hover {
    background-color: #fef6e4;
}

button:active {
    transform: translate(4px, 4px);
    box-shadow: 4px 4px 0 #001858;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 24, 88, 0.8);
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: #fef6e4;
    border: 8px solid #001858;
    padding: 40px;
    text-align: center;
    box-shadow: 16px 16px 0 #001858;
    max-width: 500px;
    width: 90%;
    animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content.correct {
    background-color: #a7ff83;
}

.modal-content.wrong {
    background-color: #ff6b6b;
}

.modal-message {
    font-size: 2.5rem;
    font-weight: bold;
    color: #001858;
    margin-bottom: 20px;
}

.modal-content.wrong .modal-message {
    color: #ffffff;
}

.modal-close {
    padding: 15px 30px;
    font-size: 1.3rem;
    margin-top: 10px;
}

.tables-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.table {
    background-color: #fef6e4;
    border: 6px solid #001858;
    padding: 20px;
    box-shadow: 8px 8px 0 #001858;
}

.table h3 {
    font-size: 1.5rem;
    color: #001858;
    margin-bottom: 15px;
    text-align: center;
    text-transform: uppercase;
}

.table-row {
    font-size: 1.3rem;
    padding: 8px;
    color: #001858;
    border-bottom: 3px solid #001858;
}

.table-row:last-child {
    border-bottom: none;
}

.score {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #001858;
    background-color: #f3d2c1;
    border: 6px solid #001858;
    padding: 15px;
    box-shadow: 8px 8px 0 #001858;
    margin-bottom: 20px;
}

.stars-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 20px;
    background-color: #fef6e4;
    border: 6px solid #001858;
    margin-bottom: 20px;
    box-shadow: 8px 8px 0 #001858;
    min-height: 80px;
    align-items: center;
}

.star {
    font-size: 3rem;
    animation: starPop 0.5s ease-out;
}

@keyframes starPop {
    0% {
        transform: scale(0) rotate(0deg);
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
    }
}

.reset-button {
    text-align: center;
    margin-bottom: 20px;
}

.reset-button button {
    background-color: #ff6b6b;
    padding: 15px 30px;
    font-size: 1.2rem;
}

.reset-button button:hover {
    background-color: #ff5252;
}

.toggle-tables {
    text-align: center;
    margin-bottom: 20px;
}

.toggle-tables button {
    padding: 15px 30px;
    font-size: 1.2rem;
}

.tables-container.hidden {
    display: none;
}

.modal-image {
    max-width: 200px;
    width: 100%;
    margin-bottom: 20px;
    border: 6px solid #001858;
    box-shadow: 8px 8px 0 #001858;
}

.firework {
    position: fixed;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1001;
}

@keyframes fireworkExplode {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    70% {
        transform: translate(var(--tx), var(--ty)) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0.5);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
        padding: 15px;
    }

    .numbers {
        font-size: 3rem;
    }

    #answer {
        width: 120px;
        height: 60px;
        font-size: 2rem;
    }

    .tables-container {
        grid-template-columns: 1fr;
    }

    .lock-controls {
        flex-direction: column;
    }
}
