body {
    height: 100vh;
    height: 100dvh;
}

[hidden] {
    display: none !important;
}

.game-background {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.start-game {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 10;
    width: min(88%, 540px);
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: filter 180ms ease;
}

.start-game img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 18px #000b);
}

.start-game:hover {
    filter: brightness(1.16);
}

.start-game:focus-visible {
    outline: 2px solid #f7d997;
    outline-offset: 8px;
}

.modal-container {
    position: absolute;
    inset: 0;
    width: 100%;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgb(3 6 15 / 58%);
    backdrop-filter: blur(3px);
    transform: none;
}

.modal {
    position: relative;
    width: min(100%, 420px);
    max-height: 100%;
    padding: 50px 34px 42px;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    filter: drop-shadow(0 16px 30px #000b);
    isolation: isolate;
}

.modal::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border: 60px solid transparent;
    border-image: url('../img/auth-frame.png') 150 150 150 150 fill / 60px / 0 stretch;
    pointer-events: none;
}

.modal-box {
    max-height: calc(100dvh - 124px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #8c7148 #101b26;
    padding: 0 3px;
}

.modal-title {
    margin: 0 0 8px;
    color: #f1d8a3;
    font-family: 'STSong', 'SimSun', serif;
    font-size: 28px;
    font-weight: 500;
    text-align: center;
    letter-spacing: 6px;
    text-shadow: 0 2px 8px #000;
}

.modal-subtitle {
    margin-bottom: 25px;
    color: #a5977f;
    font-size: 11px;
    text-align: center;
    letter-spacing: 3px;
}

.modal-close {
    position: absolute;
    top: 27px;
    right: 24px;
    width: 32px;
    height: 32px;
    border: 1px solid #8e724b;
    border-radius: 50%;
    color: #d9bd86;
    background: #101924;
    font-size: 24px;
    line-height: 26px;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus-visible {
    color: #fff0cf;
    border-color: #f1d8a3;
    outline: 1px solid #f1d8a3;
}

.modal-item {
    margin-bottom: 14px;
}

.form-control {
    min-height: 46px;
    padding: 12px 40px 12px 38px;
    border: 1px solid #66563c;
    border-radius: 3px;
    background: rgb(3 10 18 / 76%);
    box-shadow: inset 0 2px 7px #0006;
    color: #f2e8d5;
    font-size: 14px;
}

.form-control::placeholder {
    color: #99968f;
}

.form-control:focus {
    border-color: #d7b978;
    box-shadow: 0 0 0 2px #c7a36222;
}

.text-del,
.eye {
    color: #b29a6b;
    font-size: 15px;
}

.eye {
    display: grid;
    place-items: center;
    right: 6px;
    width: 32px;
    height: 36px;
    border: 0;
    background: none;
}

.eye:focus-visible {
    outline: 1px solid #d7b978;
}

.modal-btn {
    margin: 22px 0 16px;
}

.login-btn,
.login-btn1 {
    min-height: 46px;
    padding: 11px;
    border: 1px solid #b79251;
    border-radius: 3px;
    background: linear-gradient(180deg, #59432c, #2e241e);
    box-shadow: inset 0 0 0 2px #1d1811, inset 0 0 14px #bf945329, 0 4px 10px #0005;
    color: #f5dfad;
    font-family: 'STSong', 'SimSun', serif;
    font-size: 18px;
    letter-spacing: 4px;
}

.login-btn:hover,
.login-btn1:hover,
.login-btn:focus-visible,
.login-btn1:focus-visible {
    background: linear-gradient(180deg, #705637, #3b2c20);
    box-shadow: inset 0 0 0 2px #1d1811, 0 0 14px #c1a06844;
    transform: none;
    outline: 1px solid #e1c58f;
}

.agreement {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 7px;
    color: #b8b0a1;
    font-size: 12px;
    line-height: 1.8;
}

.agreement input {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    margin-top: 4px;
    accent-color: #c2a36a;
    appearance: auto;
}

.agreement input:focus-visible {
    outline: 1px solid #e1c58f;
    outline-offset: 3px;
}

.agreement a,
.register-link {
    color: #dfc28c;
    text-decoration: none;
}

.register-link {
    margin: 18px auto 0;
    padding: 4px;
    border: 0;
    background: none;
    font-size: 14px;
    letter-spacing: 1px;
    cursor: pointer;
}

.register-link:focus-visible {
    outline: 1px solid #dfc28c;
}

.tishi {
    color: #f4a69a;
    font-size: 13px;
    line-height: 1.6;
}

@media (max-width: 380px) {
    .modal-container { padding: 10px; }
    .modal { padding: 49px 25px 35px; }
    .modal-close { right: 20px; }
    .modal-title { font-size: 25px; }
    .agreement { font-size: 11px; gap: 5px; }
}
