:root {
    --gold: #e8c574;
    --gold-2: #b88a3d;
    --text: #f4ecdd;
    --muted: #9a948a;
    --green: #58d68d;
    --danger: #ff6b6b;
    --accent: var(--gold);
    --card-bg: linear-gradient(160deg, rgba(24, 17, 9, .94), rgba(10, 8, 5, .97));
    --card-border: rgba(232, 197, 116, .5);
    --card-radius: 4px;
    --btn-bg: linear-gradient(135deg, #f6e0a5, #c99645);
    --btn-color: #1a1409;
    --input-bg: rgba(255, 255, 255, .035);
    --input-border: rgba(255, 255, 255, .1);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    background: #05070b;
    color: var(--text);
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: inherit; }
.bg-video {
    position: fixed; inset: 0; z-index: -3;
    width: 100%; height: 100%;
    object-fit: cover;
    filter: brightness(.42) saturate(1.08) contrast(1.06);
}
.bg-mask {
    position: fixed; inset: 0; z-index: -2;
    background:
        radial-gradient(1000px 700px at 16% 18%, rgba(35, 74, 118, .28), transparent 66%),
        radial-gradient(800px 620px at 86% 82%, rgba(150, 97, 27, .16), transparent 65%),
        linear-gradient(180deg, rgba(3,5,8,.55) 0%, rgba(3,5,8,.25) 42%, rgba(3,5,8,.9) 100%);
}
.bg-grain {
    position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .2;
    background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 72%);
}
.topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between;
    padding: 22px 5vw;
    background: linear-gradient(180deg, rgba(3,5,8,.7), transparent);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-size: 15px; letter-spacing: .16em; }
.brand-text em { margin-top: 3px; color: var(--gold); font-style: normal; font-size: 8px; letter-spacing: .32em; }
.top-links { display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 12px; }
.top-links a { text-decoration: none; transition: color .2s; }
.top-links a:hover { color: var(--gold); }
.stage {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    min-width: 0;
    gap: clamp(30px, 6vw, 80px);
    align-items: center;
    max-width: 1280px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 118px 5vw 60px;
}
.eyebrow { margin: 0 0 16px; color: var(--accent); font-size: 10px; letter-spacing: .34em; text-transform: uppercase; }
.intro .game-name {
    margin: 0;
    font-family: "SimSun", "Songti SC", serif;
    font-size: clamp(46px, 5.6vw, 78px);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: .06em;
    text-shadow: 0 22px 60px rgba(0,0,0,.55);
}
.intro .game-sub {
    margin: 18px 0 0;
    color: #c8c1b4;
    font-size: 15px;
    line-height: 1.9;
    max-width: 520px;
    overflow-wrap: anywhere;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.chips li {
    padding: 7px 11px;
    border: 1px solid rgba(255,255,255,.14);
    color: #d8d1c4;
    background: rgba(255,255,255,.03);
    font-size: 11px;
    letter-spacing: .05em;
}
.server-pill {
    display: inline-flex; align-items: center; gap: 9px;
    margin-top: 30px;
    padding: 9px 13px;
    border: 1px solid var(--line, rgba(232,197,116,.18));
    background: rgba(0,0,0,.22);
    color: #cfc8bb;
    font-size: 12px;
}
.server-pill i {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 12px rgba(88,214,141,.8);
}
.server-pill em { color: var(--green); font-style: normal; }
.login-card {
    position: relative;
    min-width: 0;
    width: 100%;
    padding: 30px 30px 24px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: 0 34px 100px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06);
    overflow: hidden;
}
.login-card:before {
    content: "";
    position: absolute; left: 0; top: 0;
    width: 46%; height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
}
.card-head { position: relative; z-index: 1; margin-bottom: 20px; }
.card-kicker { color: var(--accent); font-size: 9px; letter-spacing: .3em; text-transform: uppercase; }
.card-head h2 {
    margin: 8px 0 0;
    font-family: "SimSun", "Songti SC", serif;
    font-size: 25px;
    font-weight: 600;
    letter-spacing: .1em;
}
.card-head p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.login-tabs {
    display: flex;
    gap: 6px;
    margin: 0 0 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.login-tabs button {
    flex: 1;
    padding: 11px 8px;
    border: 0;
    color: var(--muted);
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    letter-spacing: .12em;
    cursor: pointer;
    transition: color .2s, background .2s;
}
.login-tabs button.active { color: var(--accent); }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin-bottom: 7px; color: #b8b1a5; font-size: 11px; letter-spacing: .08em; }
.field input {
    width: 100%;
    max-width: 100%;
    height: 46px;
    padding: 0 13px;
    border: 1px solid var(--input-border);
    border-radius: calc(var(--card-radius) * .6);
    outline: none;
    color: var(--text);
    background: var(--input-bg);
    font-family: inherit;
    font-size: 14px;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input::placeholder { color: #6d6962; }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,197,116,.08); background: rgba(255,255,255,.055); }
.field.pwd { position: relative; }
.field.pwd input { padding-right: 46px; }
.eye {
    position: absolute; right: 6px; bottom: 8px;
    width: 46px; height: 30px;
    border: 0; color: #8d877d; background: transparent;
    font-size: 11px; white-space: nowrap; cursor: pointer;
}
.eye:hover { color: var(--accent); }
.agree { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0 16px; color: #8d877d; font-size: 11px; line-height: 1.6; cursor: pointer; }
.agree input { margin: 2px 0 0; accent-color: var(--accent); }
.agree a { color: var(--accent); text-decoration: none; }
.agree a:hover { text-decoration: underline; }
.form-msg {
    min-height: 18px;
    margin: 0 0 10px;
    color: var(--danger);
    font-size: 12px;
    line-height: 1.5;
}
.form-msg.ok { color: var(--green); }
.submit-btn {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: calc(var(--card-radius) * .55);
    color: var(--btn-color);
    background: var(--btn-bg);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .18em;
    cursor: pointer;
    transition: filter .2s, transform .2s, opacity .2s;
}
.submit-btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.submit-btn:disabled { opacity: .62; cursor: wait; transform: none; }
.card-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed rgba(255,255,255,.08);
    color: #77736b;
    font-size: 10px;
    line-height: 1.6;
}
.card-foot a { color: #9b958a; text-decoration: none; }
.card-foot a:hover { color: var(--accent); }
.modal {
    position: fixed; inset: 0; z-index: 50;
    display: none;
    align-items: center; justify-content: center;
    padding: 24px;
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(6px);
}
.modal.show { display: flex; }
.modal-box {
    width: min(760px, 100%);
    max-height: 84vh;
    overflow: auto;
    padding: 26px 28px;
    background: #0d1118;
    border: 1px solid rgba(232,197,116,.25);
    color: #c9c2b6;
    font-size: 13px;
    line-height: 1.85;
}
.modal-box h2 { margin: 0 0 12px; color: var(--gold); font-family: "SimSun", serif; font-size: 22px; }
.modal-close {
    position: sticky; top: 0; float: right;
    width: 30px; height: 30px;
    border: 1px solid rgba(255,255,255,.16);
    color: #d8d1c4; background: #0d1118;
    cursor: pointer;
    font-size: 16px;
}
.modal-box h4, .modal-box h5 { color: #ded6c8; }
.modal-box a { color: var(--gold); }
.modal-box p { margin: 8px 0; }
.modal-box ul { margin: 8px 0 8px 20px; padding: 0; }
.modal-box li { margin: 5px 0; }
.modal-box strong { color: #e5ddcf; }

/* ---------- 四套登录框皮肤：形状、边框、按钮、标签页都不同 ---------- */
html.theme-gold .login-card { box-shadow: 0 34px 100px rgba(0,0,0,.55), inset 0 0 0 7px rgba(232,197,116,.035); }
html.theme-gold .login-card:after {
    content: ""; position: absolute; right: -40px; top: -40px; width: 130px; height: 130px;
    border: 1px solid rgba(232,197,116,.16); transform: rotate(45deg);
}
html.theme-gold .login-tabs button.active { border-bottom: 2px solid var(--gold); }
html.theme-gold .card-head { text-align: center; }
html.theme-gold .login-card:before { left: 50%; transform: translateX(-50%); width: 42%; }

html.theme-ice {
    --accent: #7fe3ff;
    --card-bg: rgba(8, 24, 38, .55);
    --card-border: rgba(127, 227, 255, .38);
    --card-radius: 24px;
    --btn-bg: linear-gradient(135deg, #9beeff, #379fc9);
    --btn-color: #04202c;
    --input-bg: rgba(120, 220, 255, .04);
    --input-border: rgba(127, 227, 255, .16);
}
html.theme-ice .login-card { backdrop-filter: blur(20px); box-shadow: 0 34px 110px rgba(0,0,0,.5), 0 0 60px rgba(86,190,230,.08); }
html.theme-ice .login-card:before { width: 100%; background: linear-gradient(90deg, transparent, rgba(127,227,255,.75), transparent); }
html.theme-ice .login-tabs { gap: 8px; border-bottom: 0; }
html.theme-ice .login-tabs button { border: 1px solid rgba(127,227,255,.16); border-radius: 999px; }
html.theme-ice .login-tabs button.active { background: rgba(127,227,255,.1); border-color: rgba(127,227,255,.55); }
html.theme-ice .submit-btn { border-radius: 999px; letter-spacing: .12em; }
html.theme-ice .field input { border-radius: 12px; }

html.theme-blood {
    --accent: #ff7b72;
    --card-bg: linear-gradient(135deg, rgba(48, 5, 10, .95), rgba(13, 4, 6, .97));
    --card-border: rgba(255, 107, 107, .45);
    --card-radius: 0;
    --btn-bg: linear-gradient(135deg, #ff9a86, #b82332);
    --btn-color: #fff4f0;
    --input-bg: rgba(255, 60, 60, .035);
    --input-border: rgba(255, 107, 107, .16);
}
html.theme-blood .login-card {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 26px), calc(100% - 26px) 100%, 0 100%);
    padding-bottom: 34px;
}
html.theme-blood .login-card:before { width: 34%; height: 3px; background: linear-gradient(90deg, #ff5a4f, transparent); }
html.theme-blood .card-head h2 { letter-spacing: .18em; }
html.theme-blood .login-tabs { border-bottom: 0; gap: 0; }
html.theme-blood .login-tabs button { background: rgba(255,255,255,.025); }
html.theme-blood .login-tabs button.active { background: var(--accent); color: #1a0507; font-weight: 700; }
html.theme-blood .submit-btn { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%); }

html.theme-jade {
    --accent: #6ce3b6;
    --card-bg: rgba(6, 30, 25, .76);
    --card-border: rgba(108, 227, 182, .38);
    --card-radius: 24px 4px 24px 4px;
    --btn-bg: linear-gradient(135deg, #9af2cf, #2fa87a);
    --btn-color: #042018;
    --input-bg: rgba(108, 227, 182, .04);
    --input-border: rgba(108, 227, 182, .16);
}
html.theme-jade .login-card { backdrop-filter: blur(14px); }
html.theme-jade .login-card:before { width: 60%; background: linear-gradient(90deg, rgba(108,227,182,.7), transparent); }
html.theme-jade .login-tabs { border-bottom: 0; }
html.theme-jade .login-tabs button.active { background: rgba(108,227,182,.1); border-left: 2px solid var(--accent); }
html.theme-jade .submit-btn { border-radius: 16px 3px 16px 3px; }
html.theme-jade .field input { border-radius: 14px 3px 14px 3px; }

@media (max-width: 900px) {
    .stage { grid-template-columns: 1fr; align-items: start; padding: 105px 18px 46px; gap: 28px; }
    .intro .game-name { font-size: clamp(38px, 11vw, 58px); }
    .intro .game-sub { font-size: 13px; }
    .chips { margin-top: 16px; }
    .server-pill { margin-top: 18px; }
    .login-card { max-width: 520px; width: 100%; margin: 0 auto; }
    .topbar { padding: 16px 18px; }
    .top-links { display: none; }
}
@media (max-width: 420px) {
    .login-card { padding: 24px 18px 20px; }
    .intro .game-name { font-size: 38px; }
    .card-head h2 { font-size: 22px; }
}
