/* ===== 全局重置 & 基础 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gold: #d4a853;
    --gold-light: #f0d68a;
    --gold-dark: #a67c2e;
    --red: #c0392b;
    --red-dark: #8a1f1a;
    --dark: #0a0a0f;
    --dark2: #12121a;
    --dark3: #1a1a28;
    --card-bg: rgba(20, 20, 35, 0.85);
    --text: #e0d5c1;
    --text-dim: #8a7e6b;
    --border: rgba(212, 168, 83, 0.2);
    --shadow: rgba(212, 168, 83, 0.15);
    --font-cn: 'STKaiti', 'KaiTi', 'SimSun', serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-cn);
    color: var(--text);
    background: var(--dark);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--gold-light);
}

/* ===== 背景 ===== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(180, 60, 30, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 30%, rgba(200, 150, 50, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(30, 30, 60, 0.3) 0%, transparent 50%),
        linear-gradient(180deg, var(--dark) 0%, var(--dark2) 40%, var(--dark3) 100%);
    z-index: -1;
    pointer-events: none;
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 65px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 28px;
    animation: swordGlow 2s ease-in-out infinite;
}

@keyframes swordGlow {
    0%, 100% { text-shadow: 0 0 10px var(--gold); }
    50% { text-shadow: 0 0 20px var(--gold), 0 0 40px rgba(212, 168, 83, 0.3); }
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 4px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    padding: 8px 16px;
    font-size: 15px;
    color: var(--text-dim);
    border-radius: 4px;
    transition: all 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--gold-light);
    background: rgba(212, 168, 83, 0.08);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--gold);
    border-radius: 1px;
}

.nav-btn {
    padding: 8px 20px !important;
    border: 1px solid var(--gold);
    color: var(--gold) !important;
    border-radius: 4px !important;
    margin-left: 4px;
}

.nav-btn:hover {
    background: var(--gold) !important;
    color: var(--dark) !important;
}

.nav-btn-reg {
    background: var(--gold) !important;
    color: var(--dark) !important;
}

.nav-btn-reg:hover {
    background: var(--gold-light) !important;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ===== Hero 主视觉 ===== */
.hero {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 50px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Ctext x='10' y='40' font-size='40' opacity='0.03' fill='%23d4a853'%3E兵%3C/text%3E%3C/svg%3E") repeat;
    opacity: 0.5;
    pointer-events: none;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-title {
    font-size: clamp(36px, 8vw, 72px);
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 16px;
}

.title-line {
    display: block;
    color: var(--text);
}

.title-highlight {
    background: linear-gradient(135deg, var(--gold-light), var(--gold), #ff6b35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 8px;
}

.hero-desc {
    font-size: clamp(16px, 2.5vw, 22px);
    color: var(--text-dim);
    margin-bottom: 30px;
    letter-spacing: 6px;
}

.hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    font-size: 17px;
    font-family: var(--font-cn);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    letter-spacing: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-light));
    color: var(--dark);
    box-shadow: 0 4px 20px rgba(212, 168, 83, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(212, 168, 83, 0.5);
}

.btn-secondary {
    background: rgba(212, 168, 83, 0.1);
    color: var(--gold);
    border: 1px solid var(--gold);
}

.btn-secondary:hover {
    background: rgba(212, 168, 83, 0.2);
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 20px;
    font-size: 14px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--dark);
    border-radius: 4px;
}

.btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(212, 168, 83, 0.4);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    font-size: 18px;
}

/* ===== 统计数据 ===== */
.hero-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(212, 168, 83, 0.3);
}

.stat-label {
    font-size: 14px;
    color: var(--text-dim);
    margin-top: 4px;
}

/* ===== 特色介绍 ===== */
.features {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--gold);
    margin-bottom: 10px;
    letter-spacing: 4px;
}

.section-title p {
    color: var(--text-dim);
    font-size: 16px;
    letter-spacing: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 36px 28px;
    text-align: center;
    transition: all 0.4s;
    opacity: 0;
    transform: translateY(20px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(212, 168, 83, 0.15);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 20px;
    color: var(--gold-light);
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.8;
}

/* ===== 服务器分区列表 ===== */
.servers {
    padding: 40px 20px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.server-zones {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.zone-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px 32px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.zone-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-dark));
    opacity: 0;
    transition: opacity 0.3s;
}

.zone-card:hover {
    border-color: var(--gold);
    box-shadow: 0 8px 30px rgba(212, 168, 83, 0.1);
    transform: translateY(-2px);
}

.zone-card:hover::before {
    opacity: 1;
}

.zone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.zone-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.zone-name h3 {
    font-size: 22px;
    color: var(--gold-light);
    letter-spacing: 2px;
}

.zone-tag {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 4px;
    background: rgba(138, 126, 107, 0.15);
    color: var(--text-dim);
    white-space: nowrap;
}

.zone-tag-rec {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(212, 168, 83, 0.2));
    color: #ff8c42;
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.zone-tag-new {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.15), rgba(212, 168, 83, 0.15));
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.zone-status {
    font-size: 14px;
    padding: 5px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

.zone-status-online {
    background: rgba(255, 107, 53, 0.15);
    color: #ff8c42;
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.zone-status-new {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.zone-status-normal {
    background: rgba(212, 168, 83, 0.1);
    color: var(--gold);
    border: 1px solid rgba(212, 168, 83, 0.2);
}

/* 区内服务器子项 */
.zone-servers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.zone-server {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 168, 83, 0.08);
    border-radius: 8px;
    transition: all 0.25s;
}

.zone-server:hover {
    background: rgba(212, 168, 83, 0.06);
    border-color: rgba(212, 168, 83, 0.2);
}

.server-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.server-name {
    font-size: 14px;
    color: var(--text);
}

/* 新区/老区标签 */
.server-era-tag {
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 3px;
    white-space: nowrap;
    line-height: 1.5;
}

.era-new {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.era-old {
    background: rgba(138, 126, 107, 0.15);
    color: var(--text-dim);
    border: 1px solid rgba(138, 126, 107, 0.2);
}

.server-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot-green {
    background: #2ecc71;
    box-shadow: 0 0 6px rgba(46, 204, 113, 0.5);
}

.dot-yellow {
    background: #f1c40f;
    box-shadow: 0 0 6px rgba(241, 196, 15, 0.5);
}

.dot-red {
    background: #e74c3c;
    box-shadow: 0 0 6px rgba(231, 76, 60, 0.5);
}

.server-status-text {
    font-size: 12px;
    color: var(--text-dim);
}

.zone-server .btn-small {
    padding: 5px 14px;
    font-size: 12px;
}

/* 分区底部信息 */
.zone-detail {
    font-size: 13px;
    color: var(--text-dim);
    display: flex;
    gap: 8px;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(212, 168, 83, 0.06);
}

.zone-detail b {
    color: var(--gold);
    font-weight: normal;
}

/* ===== 页脚 ===== */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 20px;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-dim);
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-copy {
    font-size: 12px;
    color: rgba(138, 126, 107, 0.6);
    line-height: 1.8;
}

/* ===========================
   登录页面
   =========================== */

.login-back {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 50;
}

.login-back a {
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text-dim);
    background: rgba(10, 10, 15, 0.6);
    border-radius: 4px;
    backdrop-filter: blur(10px);
}

.login-back a:hover {
    color: var(--gold-light);
}

.login-container {
    display: flex;
    min-height: 100vh;
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
    align-items: center;
}

/* 左侧装饰 */
.login-decoration {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    background:
        radial-gradient(ellipse at center, rgba(212, 168, 83, 0.05) 0%, transparent 70%),
        var(--card-bg);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: 16px 0 0 16px;
    min-height: 500px;
}

.decoration-content {
    text-align: center;
}

.decoration-content h2 {
    font-size: 36px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: 6px;
}

.decoration-content > p {
    color: var(--text-dim);
    font-size: 14px;
    letter-spacing: 4px;
    margin-bottom: 40px;
}

.decoration-quote {
    font-size: 20px;
    color: var(--text);
    line-height: 1.8;
    font-style: italic;
    margin-bottom: 12px;
}

.decoration-author {
    font-size: 14px;
    color: var(--gold);
    text-align: right;
    padding-right: 20px;
}

/* 右侧表单 */
.login-form-wrapper {
    flex: 1;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0 16px 16px 0;
    padding: 50px 40px;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.login-form,
.register-form {
    width: 100%;
}

.form-title {
    font-size: 26px;
    color: var(--gold-light);
    margin-bottom: 6px;
    letter-spacing: 2px;
}

.form-subtitle {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 6px;
}

.label-icon {
    margin-right: 4px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-family: var(--font-cn);
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
    transition: all 0.3s;
}

.form-group input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.form-group input::placeholder {
    color: rgba(138, 126, 107, 0.5);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 13px;
}

.remember-me {
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    accent-color: var(--gold);
}

.forgot-pwd {
    color: var(--text-dim);
    font-size: 13px;
}

.forgot-pwd:hover {
    color: var(--gold);
}

.form-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-dim);
}

.form-switch a {
    color: var(--gold);
    font-weight: bold;
}

.social-login {
    margin-top: 24px;
}

.social-label {
    color: var(--text-dim);
    font-size: 13px;
    text-align: center;
    margin-bottom: 12px;
}

.social-icons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 13px;
    transition: all 0.3s;
}

.social-icon:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(212, 168, 83, 0.1);
    transform: translateY(-2px);
}

/* 注册表单额外样式 */
.register-form .form-group {
    margin-bottom: 16px;
}

.form-agreement {
    margin-bottom: 20px;
}

.form-agreement label {
    font-size: 12px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.form-agreement input[type="checkbox"] {
    accent-color: var(--gold);
}

.form-agreement a {
    color: var(--gold);
}

/* ===== Toast 提示 ===== */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.error {
    border-color: var(--red);
    color: #ff6b6b;
}

.toast.success {
    border-color: #2ecc71;
    color: #2ecc71;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 65px;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(20px);
        padding: 20px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .hero {
        padding: 80px 16px 40px;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-num {
        font-size: 22px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .zone-servers {
        grid-template-columns: 1fr;
    }

    .zone-card {
        padding: 20px 18px;
    }

    .zone-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* 登录页响应式 */
    .login-container {
        flex-direction: column;
        padding: 80px 16px 40px;
    }

    .login-decoration {
        display: none;
    }

    .login-form-wrapper {
        border-radius: 16px;
        border: 1px solid var(--border);
        padding: 32px 24px;
        min-height: auto;
    }

    .login-back {
        top: 80px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .login-decoration {
        padding: 40px 24px;
    }

    .login-form-wrapper {
        padding: 36px 28px;
    }
}
