@charset "UTF-8";

:root {
    color-scheme: dark;
    --sky: #75c8ea;
    --deep-sky: #103d6a;
    --ink: #3a2117;
    --red: #b53623;
    --red-deep: #671b20;
    --gold: #f4c76a;
    --cream: #fff5d7;
    --muted: #f2dfbd;
    --paper: #fffaf0;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body {
    min-height: 100dvh;
    overflow: hidden;
    color: var(--paper);
    background: #173c5a;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}
body.lock { overflow: hidden; }
button, input { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
button, a, input[type="checkbox"], label[for="agree"] { cursor: pointer; }
a { color: var(--cream); }
button:focus-visible, a:focus-visible, input:focus-visible {
    outline: 3px solid #fff3b7;
    outline-offset: 4px;
}

body::before {
    content: "";
    position: fixed;
    inset: -28px;
    background:
        linear-gradient(180deg, rgba(6, 44, 82, .28), rgba(82, 24, 18, .64)),
        url("../img/main-art.png") center / cover;
    filter: blur(18px);
    transform: scale(1.04);
}
.game-background {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100dvh;
    object-fit: contain;
    object-position: center;
}
.game-background::selection { background: transparent; }

.start-game {
    position: fixed;
    z-index: 10;
    left: 50%;
    bottom: max(240px, env(safe-area-inset-bottom));
    display: grid;
    place-items: center;
    width: min(82vw, 350px);
    height: clamp(54px, 8.2dvh, 76px);
    padding: 0;
    transform: translateX(-50%);
    border: 0;
    background: transparent url("../img/start-button-wjjl.png") center / 100% 146% no-repeat;
    filter: drop-shadow(0 8px 14px rgba(48, 20, 8, .48));
    transition: transform .16s ease, filter .16s ease;
}
.start-game-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.start-game:hover, .start-game:focus-visible {
    filter: brightness(1.08) drop-shadow(0 10px 16px rgba(48, 20, 8, .6));
    transform: translateX(-50%) translateY(-2px);
}
.start-game:active { transform: translateX(-50%) translateY(1px); }

.modal-container {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 14px;
    background: rgba(12, 33, 54, .74);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, visibility .18s ease;
}
.modal-container.is-open { opacity: 1; visibility: visible; pointer-events: auto; }

.modal {
    position: relative;
    width: min(100%, 430px);
    max-height: calc(100dvh - 28px);
    padding: 28px 22px 22px;
    border: 2px solid var(--gold);
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 0, rgba(255, 232, 162, .22), transparent 36%),
        linear-gradient(155deg, rgba(188, 56, 30, .98), rgba(95, 24, 32, .99) 58%, rgba(42, 21, 34, .99));
    box-shadow:
        0 24px 64px rgba(20, 11, 10, .72),
        inset 0 0 0 4px rgba(255, 235, 174, .2),
        inset 0 0 0 7px rgba(79, 19, 24, .7);
}
.modal::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(255, 230, 158, .52);
    border-radius: 11px;
    pointer-events: none;
}
.modal::after {
    content: "";
    position: absolute;
    inset: 4px;
    pointer-events: none;
    background:
        linear-gradient(var(--cream), var(--cream)) left top / 52px 2px no-repeat,
        linear-gradient(var(--cream), var(--cream)) left top / 2px 52px no-repeat,
        linear-gradient(var(--cream), var(--cream)) right top / 52px 2px no-repeat,
        linear-gradient(var(--cream), var(--cream)) right top / 2px 52px no-repeat,
        linear-gradient(var(--gold), var(--gold)) left bottom / 52px 2px no-repeat,
        linear-gradient(var(--gold), var(--gold)) left bottom / 2px 52px no-repeat,
        linear-gradient(var(--gold), var(--gold)) right bottom / 52px 2px no-repeat,
        linear-gradient(var(--gold), var(--gold)) right bottom / 2px 52px no-repeat;
    border-radius: 15px;
}
.modal-box {
    position: relative;
    max-height: calc(100dvh - 84px);
    padding: 0 3px 4px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #f1c36b rgba(61, 16, 27, .6);
}
.auth-close {
    position: absolute;
    top: 12px;
    right: 13px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 232, 169, .86);
    border-radius: 50%;
    background: rgba(63, 16, 23, .78);
    color: var(--cream);
    font-size: 26px;
    line-height: 1;
}
.auth-close:hover { background: rgba(255, 219, 135, .2); }
.auth-title-art {
    width: min(100%, 290px);
    height: 104px;
    margin: 0 auto 8px;
    display: grid;
    place-items: center;
    overflow: hidden;
}
.auth-title-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.auth-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 22px;
    color: var(--cream);
    font-family: "STKaiti", "KaiTi", serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .15em;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
}
.auth-heading::before, .auth-heading::after {
    content: "";
    height: 1px;
    flex: 1;
    background: rgba(255, 220, 140, .55);
}
.modal-item { position: relative; margin-bottom: 15px; }
.field-label {
    display: block;
    margin-bottom: 7px;
    color: #ffe8bc;
    font-size: 13px;
    line-height: 1.5;
}
.form-control {
    display: block;
    width: 100%;
    height: 50px;
    padding: 0 43px;
    border: 1px solid rgba(255, 221, 145, .7);
    border-radius: 10px;
    background: rgba(42, 20, 31, .72);
    color: #fff9eb;
    font-size: 16px;
    transition: border-color .16s ease, background .16s ease;
}
.form-control::placeholder { color: rgba(255, 239, 205, .58); font-size: 14px; }
.form-control:focus {
    outline: 2px solid rgba(255, 230, 155, .38);
    border-color: #fff1bb;
    background: rgba(42, 20, 31, .92);
}
.field-icon {
    position: absolute;
    left: 14px;
    bottom: 15px;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #ffd783;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}
.reg_res .form-control { padding-left: 14px; }
.eye {
    position: absolute;
    right: 3px;
    bottom: 3px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #ffd783;
}
.eye:hover { background: rgba(255, 220, 140, .16); color: #fff3bf; }
.eye svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.eye-slash { display: none; }
.eye[aria-pressed="true"] .eye-slash { display: block; }
.modal-btn { margin: 22px 0 17px; }
#btnlogin, #btnlogin1 {
    width: 100%;
    height: 56px;
    padding: 0;
    border: 1px solid #ffdf92;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffd987, #e2993f 56%, #b84329);
    box-shadow: inset 0 0 0 3px rgba(106, 37, 20, .82), inset 0 0 0 4px rgba(255, 241, 180, .35), 0 7px 15px rgba(55, 16, 18, .35);
    color: #4a1c12;
    font-family: "STKaiti", "KaiTi", serif;
    font-size: 23px;
    font-weight: 700;
    letter-spacing: .2em;
    text-indent: .2em;
}
#btnlogin:hover, #btnlogin1:hover { filter: brightness(1.08); }
#btnlogin:active, #btnlogin1:active { transform: translateY(1px); }
#btnlogin:disabled, #btnlogin1:disabled { cursor: wait; opacity: .65; filter: saturate(.5); }
.auth-consent {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    color: #ffe8c5;
    font-size: 12px;
    line-height: 1.85;
}
#agree { flex: 0 0 auto; width: 17px; height: 17px; margin: 3px 0 0; accent-color: #f3bd5b; }
.auth-consent a { color: #fff1b8; text-decoration: underline; text-underline-offset: 3px; }
.register-link {
    display: block;
    width: fit-content;
    min-height: 44px;
    margin: 12px auto 0;
    padding: 10px 14px;
    color: #ffe1a1;
    font-size: 14px;
    line-height: 24px;
    text-decoration: none;
}
.register-link:hover { color: #fff7dc; text-decoration: underline; }
.tishi { margin: 4px 0 12px; color: #ffd1a4 !important; font-size: 13px; line-height: 1.7; }

.content_box {
    position: fixed;
    left: 50% !important;
    top: 50% !important;
    z-index: 40;
    width: min(92vw, 700px) !important;
    height: min(78dvh, 640px) !important;
    margin: 0;
    padding: 0;
    transform: translate(-50%, -50%);
    border: 2px solid var(--gold);
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(188, 56, 30, .97), rgba(77, 23, 31, .99)),
        #641b23;
    box-shadow: 0 24px 64px rgba(20, 11, 10, .76), inset 0 0 0 4px rgba(255, 231, 160, .18);
    color: #fff3dc;
}
.content_box::before {
    content: "";
    position: absolute;
    inset: 9px;
    border: 1px solid rgba(255, 224, 143, .48);
    border-radius: 11px;
    pointer-events: none;
}
.content_box .con_tit1 {
    position: sticky;
    top: 0;
    z-index: 1;
    height: 58px !important;
    margin: 0;
    padding: 0 18px;
    background: rgba(110, 27, 29, .92) !important;
    border-bottom: 1px solid rgba(255, 219, 133, .56) !important;
    color: var(--cream) !important;
    font-family: "STKaiti", "KaiTi", serif;
    font-size: 20px !important;
    line-height: 58px !important;
    text-align: center !important;
}
.content_box .con_tit1 a {
    float: right;
    margin-right: 0 !important;
    padding: 0 8px;
    color: #fff1bb;
    font-family: "Microsoft YaHei", sans-serif;
    font-size: 13px;
    line-height: 58px;
}
.content_box > p:last-child {
    margin: 0;
    padding: 22px 24px !important;
    color: #fff1df;
    font-size: 14px;
    line-height: 1.95;
}
@media (max-width: 360px) {
    .modal { padding: 23px 17px 18px; }
    .auth-title-art { height: 86px; }
    .auth-heading { margin-bottom: 17px; font-size: 18px; }
    .modal-item { margin-bottom: 12px; }
    .content_box > p:last-child { padding: 18px 17px !important; font-size: 13px; }
}
@media (max-height: 650px) {
    .modal { padding-top: 20px; padding-bottom: 16px; }
    .modal-box { max-height: calc(100dvh - 62px); }
    .auth-title-art { height: 76px; margin-bottom: 2px; }
    .auth-heading { margin-bottom: 13px; }
    .modal-item { margin-bottom: 10px; }
    .modal-btn { margin-top: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
