body {
    margin: 0;
    min-height: 100vh;
    background: #4f7f31;
    color: #f7ead7;
    font-family: Georgia, "Times New Roman", serif;
}

[hidden] {
    display: none !important;
}

h1 {
    margin: 48px auto 28px;
    text-align: center;
    font-size: clamp(42px, 8vw, 96px);
    letter-spacing: 0.08em;
    text-shadow: 0 6px 0 rgba(30, 46, 20, 0.45);
}

#mainMenu,
#rulesScreen,
#waitingScreen,
#gameScreen {
    width: min(1100px, 94vw);
    margin-left: auto;
    margin-right: auto;
}

#mainMenu {
    display: grid;
    justify-items: center;
    gap: 18px;
}

#nickname {
    width: min(340px, 80vw);
    padding: 12px 16px;
    border: 3px solid #2b211e;
    border-radius: 12px;
    background: #f7ead7;
    color: #2b211e;
    font-size: 18px;
}

.menu-buttons {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-top: 14px;
}

.icon-button {
    width: 118px;
    height: 118px;
    border: 6px solid #3a2a36;
    border-radius: 12px;
    background: #050505;
    color: #f2a048;
    font-size: 64px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: inset 0 0 0 2px #7f6d82, 0 8px 0 rgba(36, 41, 29, 0.35);
}

.icon-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.icon-button:active {
    transform: translateY(4px);
    box-shadow: inset 0 0 0 2px #7f6d82, 0 3px 0 rgba(36, 41, 29, 0.35);
}

#playButton {
    color: transparent;
    position: relative;
}

#playButton::before {
    content: "";
    position: absolute;
    left: 36px;
    top: 27px;
    width: 0;
    height: 0;
    border-top: 30px solid transparent;
    border-bottom: 30px solid transparent;
    border-left: 48px solid #f29a49;
    filter: drop-shadow(0 0 12px rgba(255, 194, 115, 0.72));
}

#rulesButton {
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1;
}

#disconnectButton {
    color: #f04f3f;
    line-height: 1;
}

#rulesScreen {
    max-width: 900px;
    padding: 28px 34px;
    border: 5px solid #3a2a36;
    border-radius: 18px;
    background: rgba(5, 8, 5, 0.82);
    box-shadow: 0 14px 0 rgba(36, 41, 29, 0.3);
}

#rulesScreen h2 {
    margin-top: 0;
    text-align: center;
    font-size: 38px;
    letter-spacing: 0.08em;
}

.rules-list {
    display: grid;
    gap: 10px;
    margin: 22px 0;
    padding-left: 24px;
    line-height: 1.45;
}

.rules-list li::marker {
    color: #f2a048;
}
