/* 宏曦魔兽 - 暗黑魔兽风格 */
:root {
    --bg-primary: #0c0c14;
    --bg-secondary: #141620;
    --bg-card: rgba(22, 24, 38, 0.96);
    --border: rgba(255,255,255,0.06);
    --gold: #c9a84c;
    --gold-light: #d4c098;
    --gold-dim: rgba(180,150,80,0.25);
    --text: #b0b0c0;
    --text-dim: #6b6b7e;
    --text-bright: #d4c098;
    --red: #e74c3c;
    --green: #2ecc71;
    --blue: #3498db;
    --alliance: #0078ff;
    --horde: #c41e3a;
    --quality-poor: #9d9d9d;
    --quality-common: #ffffff;
    --quality-uncommon: #1eff00;
    --quality-rare: #0070dd;
    --quality-epic: #a335ee;
    --quality-legendary: #ff8000;
    --quality-artifact: #e6cc80;
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
    min-height: 100vh;
    background: var(--bg-primary) url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3"/></filter><rect width="100%" height="100%" filter="url(%23n)" opacity="0.04"/></svg>');
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    color: var(--text);
    line-height: 1.6;
}

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

/* ========== Navigation ========== */
.nav {
    background: rgba(14,16,26,0.95);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    backdrop-filter: blur(10px);
}
.nav-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; height: 60px;
}
.nav-logo {
    font-size: 20px; font-weight: 700; color: var(--gold-light);
    letter-spacing: 1px;
}
.nav-links { display: flex; gap: 8px; list-style: none; }
.nav-links a {
    padding: 8px 18px; border-radius: 6px; color: #8a8a9a;
    font-size: 14px; transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--gold-light); background: rgba(255,255,255,0.04);
}
.nav-user {
    display: flex; align-items: center; gap: 12px;
    font-size: 14px; color: #8a8a9a;
}
.nav-user .username { color: var(--gold-light); }
.btn-sm {
    padding: 6px 14px; border-radius: 5px; font-size: 13px;
    border: 1px solid var(--gold-dim); color: var(--gold);
    background: transparent; cursor: pointer; transition: 0.2s;
    text-decoration: none; display: inline-block;
}
.btn-sm:hover { background: rgba(180,150,80,0.1); }

/* ========== Container ========== */
.container { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }

/* ========== Cards ========== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px; padding: 32px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    margin-bottom: 24px;
}
.card-header {
    font-size: 18px; font-weight: 600; color: var(--gold-light);
    margin-bottom: 20px; padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex; align-items: center; gap: 10px;
}

/* ========== Buttons ========== */
.btn {
    padding: 12px 28px; border-radius: 6px; font-size: 14px; font-weight: 600;
    border: none; cursor: pointer; transition: all 0.2s;
    text-decoration: none; display: inline-block;
}
.btn-gold {
    background: linear-gradient(135deg, #8b6914, #c9a84c);
    color: #0a0a0f;
}
.btn-gold:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-outline {
    background: transparent; border: 1px solid var(--gold-dim);
    color: var(--gold);
}
.btn-outline:hover { background: rgba(180,150,80,0.1); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { opacity: 0.85; }

/* ========== Forms ========== */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block; margin-bottom: 6px; font-size: 13px;
    color: #8a8a9a; font-weight: 500;
}
.form-group input, .form-group select {
    width: 100%; padding: 12px 16px; border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.3); color: #d0d0e0; font-size: 14px;
    transition: border-color 0.2s;
}
.form-group select { color-scheme: dark; }
.form-group select option {
    background-color: #161826; color: #d0d0e0;
}
.form-group input:focus { outline: none; border-color: var(--gold-dim); }

/* ========== Messages ========== */
.msg {
    padding: 14px 20px; border-radius: 8px; margin-bottom: 20px;
    font-size: 14px; font-weight: 500;
}
.msg-error { background: rgba(231,76,60,0.15); color: #e74c3c; border: 1px solid rgba(231,76,60,0.3); }
.msg-success { background: rgba(46,204,113,0.15); color: #2ecc71; border: 1px solid rgba(46,204,113,0.3); }
.msg-info { background: rgba(52,152,219,0.15); color: #3498db; border: 1px solid rgba(52,152,219,0.3); }

/* ========== Home Stats ========== */
.hero {
    text-align: center; padding: 48px 24px 32px;
    background: linear-gradient(180deg, rgba(20,18,10,0.5) 0%, transparent 100%);
}
.hero-logo { max-width: 340px; width: 75%; margin-bottom: 12px; }
.hero .subtitle { color: var(--text-dim); font-size: 14px; margin-bottom: 4px; }
.hero .realm { color: var(--gold); font-size: 13px; }

/* ========== Mini Faction Bar ========== */
.mini-bar {
    margin-top: 8px; display: flex; height: 16px; border-radius: 3px;
    overflow: hidden; background: rgba(255,255,255,0.04);
}
.mini-bar-a, .mini-bar-h {
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700; color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5); white-space: nowrap;
    overflow: hidden; min-width: 0;
}
.mini-bar-a { background: #2b6fd4; }
.mini-bar-h { background: #c41e3a; }
.mini-bar-empty {
    width: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 10px; color: #4a4a5a;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px; margin-bottom: 8px;
}
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; padding: 20px; text-align: center;
}
.stat-card .value {
    font-size: 28px; font-weight: 700; color: var(--gold-light);
}
.stat-card .label {
    font-size: 13px; color: var(--text-dim); margin-top: 4px;
}
.stat-card .sub {
    font-size: 12px; color: var(--text-dim); margin-top: 6px;
}
.stat-card .sub span { font-weight: 600; }
.stat-card .sub .alliance { color: var(--alliance); }
.stat-card .sub .horde { color: var(--horde); }

/* ========== Table ========== */
.table-wrap { overflow-x: auto; }
table {
    width: 100%; border-collapse: collapse; font-size: 14px;
}
th {
    text-align: left; padding: 12px 16px;
    background: rgba(255,255,255,0.03); color: var(--gold-light);
    font-weight: 600; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
td {
    padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.04);
}
tr:hover td { background: rgba(255,255,255,0.02); }

/* Class colors */
.class-1 { color: #c79c6e; } /* warrior */
.class-2 { color: #f58cba; } /* paladin */
.class-3 { color: #abd473; } /* hunter */
.class-4 { color: #fff569; } /* rogue */
.class-5 { color: #ffffff; } /* priest */
.class-6 { color: #c41f3b; } /* dk */
.class-7 { color: #0070de; } /* shaman */
.class-8 { color: #69ccf0; } /* mage */
.class-9 { color: #9482c9; } /* warlock */
.class-11 { color: #ff7d0a; } /* druid */

/* Race-Faction */
.race-alliance { color: var(--alliance); }
.race-horde { color: var(--horde); }

.online-dot {
    width: 8px; height: 8px; border-radius: 50%; display: inline-block;
    margin-right: 6px;
}
.online-dot.on { background: var(--green); box-shadow: 0 0 6px rgba(46,204,113,0.5); }
.online-dot.off { background: #555; }

/* ========== Character Detail ========== */
.char-header {
    display: flex; align-items: center; gap: 20px; margin-bottom: 24px;
}
.char-avatar {
    width: 72px; height: 72px; border-radius: 8px;
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; font-weight: 700;
}
.char-info h2 { color: var(--gold-light); font-size: 22px; }
.char-info .meta { color: var(--text-dim); font-size: 13px; margin-top: 4px; }
.char-info .meta span { margin-right: 16px; }

.tab-nav {
    display: flex; gap: 4px; border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 24px; flex-wrap: wrap;
}
.tab-nav a {
    padding: 10px 20px; font-size: 14px; color: #8a8a9a;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: all 0.2s;
}
.tab-nav a:hover, .tab-nav a.active {
    color: var(--gold-light); border-bottom-color: var(--gold);
}

/* ========== Equipment Grid ========== */
.equip-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px; max-width: 680px;
}
@media (max-width: 600px) {
    .equip-grid { grid-template-columns: repeat(2, 1fr); }
}
.equip-slot {
    background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px; padding: 10px 12px; cursor: pointer;
    transition: all 0.15s; display: flex; align-items: center; gap: 10px;
}
.equip-slot:hover { border-color: var(--gold-dim); background: rgba(255,255,255,0.02); }
.equip-slot .slot-icon {
    width: 36px; height: 36px; border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; color: var(--text-dim); flex-shrink: 0;
}
.equip-slot .slot-info { min-width: 0; }
.equip-slot .item-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.equip-slot .slot-label { font-size: 11px; color: var(--text-dim); }
.equip-slot.empty .slot-label { color: #3a3a4a; }

/* ========== Item Quality Border ========== */
.equip-slot.q-0 .slot-icon { border-color: rgba(157,157,157,0.4); }
.equip-slot.q-1 .slot-icon { border-color: rgba(255,255,255,0.3); }
.equip-slot.q-2 .slot-icon { border-color: rgba(30,255,0,0.4); }
.equip-slot.q-3 .slot-icon { border-color: rgba(0,112,221,0.4); }
.equip-slot.q-4 .slot-icon { border-color: rgba(163,53,238,0.4); }
.equip-slot.q-5 .slot-icon { border-color: rgba(255,128,0,0.4); }

/* ========== Stats Panel ========== */
.stats-panel {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}
.stat-row {
    background: rgba(0,0,0,0.2); padding: 10px 14px; border-radius: 6px;
}
.stat-row .stat-name { font-size: 11px; color: var(--text-dim); }
.stat-row .stat-value { font-size: 16px; color: #d0d0e0; font-weight: 600; }

/* ========== Inventory ========== */
.inv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px;
}
.inv-item {
    padding: 8px 12px; border-radius: 5px;
    background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.04);
    font-size: 13px; display: flex; justify-content: space-between;
    transition: border-color 0.15s;
}
.inv-item:hover { border-color: var(--gold-dim); }
.inv-item .item-count { color: var(--text-dim); font-size: 12px; }

/* ========== Skills ========== */
.skill-bar {
    margin-bottom: 12px;
}
.skill-bar .skill-name { font-size: 13px; color: #c0c0d0; margin-bottom: 4px; }
.skill-bar .skill-bar-bg {
    height: 8px; background: rgba(255,255,255,0.05); border-radius: 4px; overflow: hidden;
}
.skill-bar .skill-bar-fill {
    height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 4px; transition: width 0.3s;
}
.skill-bar .skill-nums { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

/* ========== Reputation ========== */
.rep-bar { margin-bottom: 10px; }
.rep-bar .rep-name { font-size: 13px; color: #c0c0d0; margin-bottom: 3px; }
.rep-bar .rep-bar-bg { height: 6px; background: rgba(255,255,255,0.05); border-radius: 3px; overflow: hidden; }
.rep-bar .rep-bar-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.rep-bar .rep-nums { font-size: 11px; color: var(--text-dim); }

/* ========== Currency ========== */
.currency-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}
.currency-card {
    background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.04);
    border-radius: 8px; padding: 14px; text-align: center;
}
.currency-card .curr-name { font-size: 12px; color: var(--text-dim); margin-bottom: 4px; }
.currency-card .curr-value { font-size: 20px; color: var(--gold-light); font-weight: 700; }

/* ========== Gold Display ========== */
.gold { color: #e6cc80; }
.silver { color: #c0c0c0; }
.copper { color: #cd7f32; }

/* ========== Achievement Grid ========== */
.ach-grid { display: grid; gap: 6px; }
.ach-item {
    padding: 10px 14px; border-radius: 6px;
    background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.04);
    display: flex; align-items: center; gap: 12px; font-size: 13px;
}
.ach-item .ach-date { color: var(--text-dim); font-size: 11px; margin-left: auto; flex-shrink: 0; }

/* ========== Register Closed ========== */
.register-closed {
    text-align: center; padding: 48px 24px;
}
.register-closed .icon-lock {
    width: 80px; height: 80px; margin: 0 auto 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e1c14, #322c1a);
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--gold-dim);
}
.register-closed .icon-lock svg { width: 40px; height: 40px; fill: var(--gold); }
.register-closed h2 { color: var(--gold-light); font-size: 22px; margin-bottom: 8px; }
.register-closed .sub { color: var(--text-dim); font-size: 14px; margin-bottom: 24px; }
.qq-box {
    background: rgba(0,0,0,0.2); border-radius: 8px; padding: 14px 20px;
    margin-bottom: 8px; font-size: 14px; color: #9a9ab0; max-width: 360px;
    margin-left: auto; margin-right: auto;
}
.qq-box span { color: var(--gold); font-weight: 600; }

/* ========== Admin ========== */
.toggle-switch {
    position: relative; width: 56px; height: 30px; display: inline-block;
}
.toggle-switch input { display: none; }
.toggle-slider {
    position: absolute; inset: 0; border-radius: 30px;
    background: rgba(255,255,255,0.1); cursor: pointer; transition: 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
}
.toggle-slider:before {
    content: ''; position: absolute; width: 22px; height: 22px;
    left: 3px; top: 3px; border-radius: 50%; background: #fff;
    transition: 0.3s;
}
input:checked + .toggle-slider { background: var(--green); border-color: var(--green); }
input:checked + .toggle-slider:before { transform: translateX(26px); }

.status-badge {
    padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 600;
}
.status-badge.open { background: rgba(46,204,113,0.2); color: var(--green); }
.status-badge.closed { background: rgba(231,76,60,0.2); color: var(--red); }

/* ========== Modal ========== */
.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0.7); align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal-box {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 12px; padding: 32px; max-width: 420px; width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { opacity:0; transform:translateY(-20px); } to { opacity:1; transform:translateY(0); } }
.modal-box .modal-close {
    float: right; background: none; border: none; color: #6b6b7e;
    font-size: 20px; cursor: pointer; line-height: 1;
}
.modal-box .modal-close:hover { color: #fff; }
.modal-box h3 { color: var(--gold-light); margin-bottom: 20px; font-size: 18px; }

/* ========== Server Section ========== */
.server-section { margin-bottom: 24px; }
.server-section .server-title {
    font-size: 16px; color: var(--gold-light); margin-bottom: 12px;
    padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.server-section .server-title .sv-count { color: var(--text-dim); font-weight: 400; }

/* ========== Footer ========== */
.footer {
    text-align: center; padding: 24px; color: #3a3a4a; font-size: 12px;
    border-top: 1px solid rgba(255,255,255,0.04);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .nav-inner { flex-wrap: wrap; height: auto; padding: 12px 16px; gap: 8px; }
    .nav-links { order: 3; width: 100%; justify-content: center; gap: 2px; }
    .nav-links a { padding: 8px 12px; font-size: 12px; }
    .hero h1 { font-size: 24px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .equip-grid { grid-template-columns: repeat(2, 1fr); }
    .container { padding: 20px 12px; }
    .card { padding: 20px 16px; }
}
