:root {
    --border-thick: 6px;
    --border-color: #7a7a7a;
}

/* БАЗА */
body {
    margin: 0;
    background: #eee;
    font-family: sans-serif;
}

/* ЦЕНТРОВКА ВСЕГО */
.game-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

/* ГЛАВНОЕ СЛОВО */
#main-word {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 620px;
    height: 260px;
    background: #ffffff;
    border: var(--border-thick) solid var(--border-color);
    border-radius: 24px;
    font-size: 64px;
    font-weight: 400;
    color: #111;
    margin: 0;
}

/* КНОПКИ ИГРЫ */
.button-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 34px;
    width: 620px; /* как меню */
}

.button-container button {
    width: 290px;
    height: 145px;
    background: #f3f3f3;
    border: var(--border-thick) solid var(--border-color);
    border-radius: 22px;
    font-size: 38px;
    font-weight: 400;
    color: #111;
    cursor: pointer;
    transition: 0.2s;

    /* ВОТ ЭТО ДОБАВЬ */
    box-shadow: 0 4px 0px rgba(0,0,0,0.15);
}

.button-container button:hover {
    background: #ffffff; /* белая как в меню */
    transform: translateY(-2px); /* “поднимается” */
    box-shadow: 0 6px 0px rgba(0,0,0,0.15); /* тень сильнее */
}

/* POPUP */
.popup {
    position: fixed;
    top: 31%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    padding: 20px 40px;
    border-radius: 20px;
    font-size: 50px;
    font-weight: 400;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.popup.correct {
    background: #d8f3dc;
    border: var(--border-thick) solid #95d5b2;
}

.popup.wrong {
    background: #f8d7da;
    border: var(--border-thick) solid #f1aeb5;
}

/* OVERLAY */
#overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
}

#overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* СЧЕТЧИКИ СПРАВА */
.progress-box,
.right-answer-box {
    position: fixed;
    right: 30px;
    width: 220px;
    height: 130px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    border: var(--border-thick) solid var(--border-color);
    border-radius: 24px;
    font-size: 56px;
    font-weight: 400;
    color: #111;
}

.progress-box {
    top: 20px;
}

.right-answer-box {
    top: 170px;
    color: #2d6a4f;
    background: #ffffff;
}

#right-answer-count {
    font-size: 60px;
}

/* БЛОКИ СЛЕВА */
.level-name-box,
.level-number-box {
    position: fixed;
    left: 30px;
    width: 260px;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    border: var(--border-thick) solid var(--border-color);
    border-radius: 24px;
    font-size: 52px;
    font-weight: 400;
    color: #111;
    text-align: center;
}

.level-name-box {
    top: 20px;
}

.level-number-box {
    top: 200px;
}

/* POPUP ОКНА УРОВНЯ И ФИНАЛА */
.popup.finishlevel,
.popup.final {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 35px;
    background: #f3f3f3;
    border: var(--border-thick) solid var(--border-color);
    border-radius: 26px;
    text-align: center;
    font-size: 32px;
    font-weight: 400;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.popup.finishlevel.show,
.popup.final.show {
    opacity: 1;
    transform: translate(-50%, -50%);
    pointer-events: auto;
}

.popup.finishlevel .title,
.popup.final .title {
    font-size: 58px;
    font-weight: 400;
    margin-bottom: 28px;
}

/* КНОПКИ В POPUP МЕЖДУ УРОВНЯМИ */
.popup.finishlevel .buttons {
    display: flex;
    gap: 20px;
    margin-top: 28px;
}

.popup.finishlevel button {
    flex: 1;
    height: 90px;
    background: #f3f3f3;
    border: var(--border-thick) solid var(--border-color);
    border-radius: 20px;
    font-size: 32px;
    font-weight: 400;
    cursor: pointer;
    transition: 0.2s;
}

.popup.finishlevel button:hover {
    background: #e9e9e9;
    transform: scale(1.02);
}

/* РЕЗУЛЬТАТЫ */
.results {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 20px 0;
}

.result-row {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 22px;
    align-items: center;
}

.level-name {
    display: flex;
    align-items: center;
    padding-left: 24px;
    height: 82px;
    background: #f3f3f3;
    border: var(--border-thick) solid #b5b5b5;
    border-radius: 20px;
    font-size: 32px;
    font-weight: 400;
}

.level-score {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 82px;
    background: #f3f3f3;
    border: var(--border-thick) solid var(--border-color);
    border-radius: 20px;
    font-size: 32px;
    font-weight: 400;
}

.total {
    margin-top: 28px;
    height: 92px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f3f3f3;
    border: var(--border-thick) solid var(--border-color);
    border-radius: 20px;
    font-size: 36px;
    font-weight: 400;
}

/* ФИНАЛЬНАЯ КНОПКА RESTART — КАК TOTAL */
.popup.final .buttons {
    display: flex;
    margin-top: 28px;
    justify-content: center;
}

.popup.final .buttons button {
    width: 1500px;
    height: 100px;
    min-height: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f3f3f3;
    border: var(--border-thick) solid var(--border-color);
    border-radius: 20px;
    font-size: 36px;
    font-weight: 400;
    cursor: pointer;
    transition: 0.2s;
}

.popup.final .buttons button:hover {
    background: #e9e9e9;
    transform: scale(1.02);
}

.result {
    background: #e3f2fd;
}

.result:hover {
    background: #bbdefb;
}

/* МЕНЮ */
.menu {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    background: #eee;
}

.menu-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.menu-title {
    width: 620px;
    height: 110px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f3f3f3;
    border: var(--border-thick) solid var(--border-color);
    border-radius: 24px;
    font-size: 52px;
    font-weight: 400;
    color: #111;
    box-shadow: var(--shadow-sm);
}


.menu-subtitle {
    font-size: 20px;
    color: #777;
    font-weight: 400;
}

.menu-section-title {
    font-size: 22px;
    color: #555;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.level-buttons {
    display: grid;
    grid-template-columns: repeat(2, 290px);
    gap: 20px;
    width: 620px;
}

.level-buttons button {
    width: 290px;
    height: 120px;
    border: none;
    border-radius: 22px;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 0px rgba(0,0,0,0.15);
}

.level-buttons button:hover {
    transform: translateY(-2px);
    filter: brightness(1.07);
    box-shadow: 0 6px 0px rgba(0,0,0,0.15);
}

.level-btn-icon {
    font-size: 36px;
    line-height: 1;
}

.menu-footer {
    font-size: 16px;
    color: #999;
}

.level-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 34px;
    width: 620px;
}

.level-buttons button {
    width: 100%;
    height: 130px;
    background: #f3f3f3;
    border: var(--border-thick) solid var(--border-color);
    border-radius: 22px;
    font-size: 28px;
    font-weight: 400;
    color: #111;
    cursor: pointer;
    transition: 0.2s;
}

.level-buttons button:hover {
    background: #ededed;
    transform: scale(1.02);
}

.level-buttons button:disabled {
    background: #e2e2e2;
    color: #8a8a8a;
    cursor: not-allowed;
    transform: none;
}