/* ==========================================================================
   传奇 H5 官网 / 登录 / 注册 共享样式
   主题：国风暗黑 · 黑金水墨（参考《天诺》风格）
   说明：所有类名与旧版完全兼容，替换本文件即可整体换肤。
   ========================================================================== */

:root {
    --bg-deep: #0a0806;            /* 墨黑 */
    --bg-card: rgba(14, 11, 8, .9); /* 卡片深底 */
    --bg-card-solid: #110d09;
    --gold-1: #d8b878;             /* 鎏金 */
    --gold-2: #b8955a;
    --gold-3: #7c5f33;
    --red: #a03a3a;                /* 暗红 */
    --red-deep: #6e2424;
    --ink: #efe6d2;                /* 米白 */
    --text-mid: #cbbfa0;
    --text-low: #8d7f62;
    --line-gold: rgba(216, 184, 120, .38);
    --radius: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-deep);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* 书法标题字体 */
.font-calligraphy {
    font-family: "华文行楷", "STXingkai", "华文楷体", "楷体", "KaiTi", "SimSun", serif;
}

/* 装饰金线 */
.deco-line {
    display: block;
    position: relative;
    width: 90px;
    height: 2px;
    margin: 12px auto 0;
    background: linear-gradient(90deg, transparent, var(--gold-1) 20%, var(--gold-2) 50%, var(--gold-1) 80%, transparent);
    box-shadow: 0 0 8px rgba(216, 184, 120, .5);
}

/* ==========================================================================
   通用按钮（国风暗金质感）
   ========================================================================== */
.btn {
    display: inline-block;
    text-align: center;
    cursor: pointer;
    user-select: none;
    border: 1px solid var(--gold-2);
    outline: none;
    font-family: inherit;
    transition: transform .1s ease, filter .1s ease, box-shadow .1s ease;
}

.btn:active { transform: translateY(1px) scale(.98); }

.btn-primary {
    background: linear-gradient(180deg, #e0c58a 0%, #c9a55f 50%, #96743c 100%);
    color: #1d1508;
    font-weight: 800;
    letter-spacing: 4px;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .4), 0 0 16px rgba(216, 184, 120, .18);
    text-shadow: 0 1px 0 rgba(255, 255, 255, .3);
}

.btn-primary:hover { filter: brightness(1.08); }

.btn-red {
    background: linear-gradient(180deg, #a03a3a 0%, #7a2929 55%, #5a1d1d 100%);
    color: #f5ead2;
    font-weight: 800;
    letter-spacing: 4px;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .12);
}

.btn-red:hover { filter: brightness(1.08); }

.btn-ghost {
    background: rgba(10, 8, 6, .5);
    color: var(--gold-1);
    border: 1px solid var(--line-gold);
    border-radius: var(--radius);
    letter-spacing: 2px;
}

.btn-ghost:hover { background: rgba(216, 184, 120, .12); }

/* ==========================================================================
   首页：顶部导航
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    background: linear-gradient(180deg, rgba(8, 6, 4, .9) 0%, rgba(8, 6, 4, .4) 80%, transparent 100%);
    border-bottom: 1px solid rgba(216, 184, 120, .2);
}

.site-logo {
    display: flex;
    align-items: baseline;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--gold-1);
    font-family: "华文行楷", "STXingkai", "华文楷体", "楷体", "KaiTi", "SimSun", serif;
    text-shadow: 0 0 14px rgba(216, 184, 120, .5), 2px 2px 0 rgba(0, 0, 0, .7);
}

.site-logo .logo-s {
    margin-right: 6px;
    color: var(--red);
    font-size: 15px;
}

.site-header .btn {
    font-size: 14px;
    letter-spacing: 2px;
    padding: 6px 18px;
}

/* ==========================================================================
   首页：主视觉
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 84px 20px 40px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url("/static/img/tiannuo_bg.jpg") center center / cover no-repeat;
    transform: scale(1.02);
}

.hero-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(6, 5, 4, .62) 0%, rgba(6, 5, 4, .32) 45%, rgba(8, 6, 4, .84) 100%),
        radial-gradient(ellipse at 50% 38%, rgba(216, 184, 120, .12) 0%, transparent 58%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 520px;
}

.hero-badge {
    display: inline-block;
    padding: 5px 18px;
    font-size: 13px;
    letter-spacing: 6px;
    color: var(--gold-1);
    border: 1px solid var(--line-gold);
    border-radius: 3px;
    background: rgba(8, 6, 4, .55);
    margin-bottom: 22px;
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .4);
}

.hero-title {
    font-family: "华文行楷", "STXingkai", "华文楷体", "楷体", "KaiTi", "SimSun", serif;
    font-size: 56px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 10px;
    color: var(--gold-1);
    text-shadow: 0 0 24px rgba(216, 184, 120, .6), 2px 2px 0 #4a3515, 0 4px 10px rgba(0, 0, 0, .9);
}

.hero-title em {
    font-style: normal;
    color: var(--red);
    text-shadow: 0 0 20px rgba(160, 58, 58, .65), 2px 2px 0 #3a1212, 0 4px 10px rgba(0, 0, 0, .9);
}

.hero-slogan {
    margin-top: 18px;
    font-size: 16px;
    letter-spacing: 4px;
    color: var(--ink);
    text-shadow: 0 2px 6px rgba(0, 0, 0, .9);
}

.hero-slogan span { margin: 0 8px; color: var(--gold-2); }

.hero-btns {
    margin-top: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.hero-btns .btn-play {
    width: 268px;
    height: 60px;
    line-height: 58px;
    font-size: 24px;
    letter-spacing: 10px;
}

.hero-btns .btn-reg {
    width: 268px;
    height: 48px;
    line-height: 46px;
    font-size: 16px;
}

.hero-note {
    margin-top: 26px;
    font-size: 13px;
    color: rgba(239, 230, 210, .82);
    letter-spacing: 1px;
}

.hero-note .dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 9px var(--red);
    margin-right: 6px;
    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

/* ==========================================================================
   首页：游戏特色
   ========================================================================== */
.sect {
    padding: 56px 20px;
    position: relative;
}

.sect-dark {
    background:
        radial-gradient(ellipse at 50% -20%, rgba(216, 184, 120, .1) 0%, transparent 55%),
        linear-gradient(180deg, #120d09, #0a0806);
    border-top: 1px solid rgba(216, 184, 120, .2);
    border-bottom: 1px solid rgba(216, 184, 120, .2);
}

.sect-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 5px;
    color: var(--gold-1);
    font-family: "华文行楷", "STXingkai", "华文楷体", "楷体", "KaiTi", "SimSun", serif;
    text-shadow: 0 0 14px rgba(216, 184, 120, .45), 2px 2px 0 rgba(0, 0, 0, .7);
}

.sect-title small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 3px;
    color: var(--text-low);
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
}

.feature-grid {
    max-width: 900px;
    margin: 38px auto 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.feature-card {
    position: relative;
    background: linear-gradient(180deg, rgba(30, 23, 16, .92), rgba(16, 12, 9, .95));
    border: 1px solid rgba(216, 184, 120, .3);
    outline: 1px solid rgba(0, 0, 0, .5);
    outline-offset: -5px;
    border-radius: var(--radius);
    padding: 26px 18px 22px;
    text-align: center;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-1);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .5), 0 0 18px rgba(216, 184, 120, .14);
}

.feature-card .f-icon {
    width: 50px;
    height: 50px;
    line-height: 46px;
    margin: 0 auto 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--gold-1);
    border: 1px solid var(--gold-2);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(160, 58, 58, .45), rgba(90, 29, 29, .35));
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .35), 0 0 12px rgba(160, 58, 58, .3);
    font-family: "华文行楷", "STXingkai", "华文楷体", "楷体", "KaiTi", "SimSun", serif;
}

.feature-card h3 {
    font-size: 18px;
    letter-spacing: 2px;
    color: var(--gold-1);
    font-family: "华文行楷", "STXingkai", "华文楷体", "楷体", "KaiTi", "SimSun", serif;
}

.feature-card p {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-mid);
    line-height: 1.7;
}

/* ==========================================================================
   首页：新区 / 公告
   ========================================================================== */
.notice-box {
    max-width: 640px;
    margin: 34px auto 0;
    border: 1px solid var(--gold-2);
    outline: 1px solid rgba(0, 0, 0, .5);
    outline-offset: -6px;
    border-radius: var(--radius);
    background: rgba(14, 11, 8, .92);
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
}

.notice-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    background: linear-gradient(180deg, #221a12, #161008);
    border-bottom: 1px solid var(--gold-2);
}

.notice-head h3 {
    font-size: 17px;
    letter-spacing: 3px;
    color: var(--gold-1);
    font-family: "华文行楷", "STXingkai", "华文楷体", "楷体", "KaiTi", "SimSun", serif;
}

.notice-head .more { font-size: 12px; color: var(--text-low); }

.notice-list li {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px dashed rgba(216, 184, 120, .16);
    font-size: 14px;
}

.notice-list li:last-child { border-bottom: none; }

.notice-list .n-tag {
    flex: 0 0 auto;
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 3px;
    margin-right: 12px;
    color: #f5ead2;
    background: linear-gradient(180deg, #a03a3a, #6e2424);
    border: 1px solid rgba(216, 184, 120, .5);
    font-weight: 700;
}

.notice-list .n-tag.hot {
    background: linear-gradient(180deg, #d8b878, #96743c);
    color: #1d1508;
}

.notice-list .n-text {
    flex: 1;
    color: var(--text-mid);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notice-list .n-time {
    flex: 0 0 auto;
    margin-left: 10px;
    font-size: 12px;
    color: var(--text-low);
}

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
    padding: 28px 20px 34px;
    text-align: center;
    font-size: 12px;
    color: var(--text-low);
    background: linear-gradient(180deg, rgba(10, 8, 6, .96), rgba(7, 5, 3, .98));
    border-top: 1px solid rgba(216, 184, 120, .25);
    line-height: 2;
}

.site-footer b { color: var(--gold-1); font-weight: 600; }

/* ==========================================================================
   登录 / 注册：全屏背景 + 居中卡片
   ========================================================================== */
.auth-body {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 120px;
    background: var(--bg-deep);
}

.auth-bg {
    position: fixed;
    inset: 0;
    background: url("/static/img/tiannuo_bg.jpg") center center / cover no-repeat;
}

.auth-mask {
    position: fixed;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(6, 5, 4, .66) 0%, rgba(6, 5, 4, .4) 45%, rgba(8, 6, 4, .82) 100%),
        radial-gradient(ellipse at 50% 30%, rgba(216, 184, 120, .1) 0%, transparent 62%);
}

.auth-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 380px;
    background: var(--bg-card);
    border: 1px solid var(--gold-2);
    outline: 1px solid rgba(0, 0, 0, .5);
    outline-offset: -7px;
    border-radius: var(--radius);
    padding: 36px 28px 36px;
    box-shadow: 0 16px 46px rgba(0, 0, 0, .62), 0 0 26px rgba(160, 58, 58, .14);
}

/* 卡片顶部鎏金饰线 */
.auth-card::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-1) 20%, var(--gold-2) 50%, var(--gold-1) 80%, transparent);
    opacity: .9;
}

.auth-card .a-logo {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 8px;
    color: var(--gold-1);
    font-family: "华文行楷", "STXingkai", "华文楷体", "楷体", "KaiTi", "SimSun", serif;
    text-shadow: 0 0 16px rgba(216, 184, 120, .55), 2px 2px 0 #4a3515, 0 3px 8px rgba(0, 0, 0, .9);
}

/* Logo 下方拼音副标 */
.auth-card .a-logo::after {
    content: "T I A N · N U O";
    display: block;
    margin-top: 4px;
    font-size: 11px;
    letter-spacing: 5px;
    color: var(--text-low);
    font-family: "Microsoft YaHei", sans-serif;
    font-weight: 400;
    text-shadow: none;
}

.auth-card .a-logo em {
    font-style: normal;
    color: var(--red);
    text-shadow: 0 0 16px rgba(160, 58, 58, .6), 2px 2px 0 #3a1212, 0 3px 8px rgba(0, 0, 0, .9);
}

.auth-card .a-sub {
    margin-top: 10px;
    text-align: center;
    font-size: 13px;
    letter-spacing: 6px;
    color: var(--text-mid);
}

.auth-card .a-form { margin-top: 30px; }

.field {
    position: relative;
    margin-bottom: 18px;
}

.field input {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    font-size: 15px;
    color: var(--ink);
    background: rgba(5, 4, 3, .55);
    border: 1px solid var(--line-gold);
    border-radius: 5px;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .45);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.field input:focus {
    border-color: var(--gold-1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .45), 0 0 0 2px rgba(216, 184, 120, .16);
}

.field input::placeholder { color: var(--text-low); }

.auth-links {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin: 4px 0 22px;
}

.auth-links a { color: var(--gold-2); }
.auth-links a:hover { color: var(--gold-1); text-decoration: underline; }
.auth-links a.t-important { color: var(--red); }

.auth-btn {
    width: 100%;
    height: 56px;
    line-height: 54px;
    font-size: 22px;
}

.auth-tip-line {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: var(--text-low);
}

.auth-tip-line a { color: var(--gold-2); }
.auth-tip-line a:hover { text-decoration: underline; }

/* 找回密码弹层 */
.modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, .66);
}

.modal.show { display: flex; }

.modal-box {
    position: relative;
    width: 100%;
    max-width: 380px;
    background: rgba(17, 13, 9, .98);
    border: 1px solid var(--gold-2);
    outline: 1px solid rgba(0, 0, 0, .5);
    outline-offset: -6px;
    border-radius: var(--radius);
    padding: 30px 24px 26px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .65);
}

.modal-box h3 {
    text-align: center;
    font-size: 19px;
    letter-spacing: 4px;
    color: var(--gold-1);
    font-family: "华文行楷", "STXingkai", "华文楷体", "楷体", "KaiTi", "SimSun", serif;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 28px;
    height: 28px;
    line-height: 24px;
    text-align: center;
    font-size: 16px;
    color: var(--text-mid);
    border: 1px solid var(--line-gold);
    border-radius: 4px;
    cursor: pointer;
    background: rgba(5, 4, 3, .5);
}

.modal-close:hover { color: var(--gold-1); border-color: var(--gold-1); }

.modal-box p {
    margin-top: 14px;
    font-size: 13px;
    line-height: 1.9;
    color: var(--text-mid);
    text-align: justify;
}

.modal-box p b { color: var(--red); font-weight: 600; }

.modal-box .modal-btns { margin-top: 22px; text-align: center; }
.modal-box .btn { width: 60%; height: 44px; line-height: 42px; font-size: 15px; }

/* 背景音乐开关 */
.music-toggle {
    position: fixed;
    right: 14px;
    bottom: 96px;
    z-index: 60;
    width: 42px;
    height: 42px;
    line-height: 38px;
    text-align: center;
    font-size: 16px;
    color: var(--gold-1);
    border: 1px solid var(--line-gold);
    border-radius: 50%;
    background: rgba(8, 6, 4, .75);
    cursor: pointer;
    box-shadow: 0 0 12px rgba(216, 184, 120, .18), inset 0 1px 0 rgba(255, 255, 255, .1);
}

.music-toggle.off { opacity: .5; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 480px) {
    .hero-title { font-size: 42px; letter-spacing: 6px; }
    .hero-btns .btn-play { width: 248px; height: 56px; line-height: 54px; font-size: 22px; }
    .feature-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 30px 22px 32px; }
}

@media (min-width: 768px) {
    .feature-grid { grid-template-columns: repeat(4, 1fr); }
}
