:root {
    --bg-dark: #07070f;
    --bg-card: rgba(14, 14, 24, 0.85);
    --bg-panel: rgba(18, 18, 32, 0.92);
    --gold: #c9a227;
    --gold-light: #e8c547;
    --gold-dark: #8a6d15;
    --red: #8b2635;
    --blue: #2a5298;
    --text: #e8e4dc;
    --text-muted: #8a8698;
    --border: rgba(201, 162, 39, 0.25);
    --border-glow: rgba(201, 162, 39, 0.5);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    --radius: 4px;
    --font-display: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
    --badge-job-w: 88px;
    --badge-empire-w: 72px;
    --badge-level-w: 36px;
    --badge-h: 22px;
    --badge-count-w: 28px;
    --badge-status-w: 44px;
}

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

html { scroll-behavior: smooth; }

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

/* ---- Background layers ---- */
.bg-overlay {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(139, 38, 53, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(42, 82, 152, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, #0a0a14 0%, #07070f 50%, #050508 100%);
    z-index: -3;
    animation: bgShift 20s ease-in-out infinite alternate;
}

.particles {
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 20% 30%, rgba(201,162,39,0.35) 0%, transparent 100%),
        radial-gradient(1px 1px at 60% 70%, rgba(201,162,39,0.25) 0%, transparent 100%),
        radial-gradient(1px 1px at 80% 20%, rgba(255,255,255,0.12) 0%, transparent 100%);
    z-index: -2;
    animation: shimmer 8s ease-in-out infinite alternate;
}

.ember-field {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.ember {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--gold-light);
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 6px 1px rgba(232, 197, 71, 0.6);
    animation: emberFloat linear infinite;
}

@keyframes bgShift {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(8deg); }
}

@keyframes shimmer {
    from { opacity: 0.45; transform: translateY(0); }
    to { opacity: 0.9; transform: translateY(-4px); }
}

@keyframes emberFloat {
    0% { opacity: 0; transform: translateY(0) scale(0.5); }
    10% { opacity: 0.8; }
    90% { opacity: 0.3; }
    100% { opacity: 0; transform: translateY(-120px) scale(1); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes heroGlowPulse {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -60%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -62%) scale(1.08); }
}

@keyframes titleShine {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@keyframes panelScan {
    0% { left: -100%; }
    100% { left: 200%; }
}

@keyframes badgePulse {
    0%, 100% { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06); }
    50% { box-shadow: inset 0 0 8px rgba(255,255,255,0.08); }
}

@keyframes rankGold {
    0%, 100% { box-shadow: inset 3px 0 0 rgba(201,162,39,0.5); }
    50% { box-shadow: inset 3px 0 0 rgba(232,197,71,0.9); }
}

@keyframes statPop {
    0% { transform: scale(0.92); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes btnShine {
    0% { left: -120%; }
    100% { left: 220%; }
}

/* ---- Layout ---- */
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 480px; }

main { animation: fadeIn 0.5s ease; }

.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Navbar ---- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 7, 15, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--gold-light);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.05em;
    transition: filter 0.25s ease;
}

.brand:hover { filter: brightness(1.12); }

.brand-icon {
    font-size: 22px;
    display: inline-block;
    animation: iconFloat 3s ease-in-out infinite;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius);
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover, .nav-links a.active { color: var(--gold-light); }

.nav-btn { border: 1px solid var(--border) !important; margin-left: 4px; }

.nav-btn-gold {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold)) !important;
    color: #0a0a0f !important;
    border-color: var(--gold) !important;
    font-weight: 600 !important;
}

.nav-btn-gold:hover { filter: brightness(1.1); color: #0a0a0f !important; }
.nav-btn-outline:hover { border-color: var(--gold) !important; color: var(--gold-light) !important; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--gold);
    transition: transform 0.25s ease;
}

/* ---- Hero ---- */
.hero {
    position: relative;
    padding: 96px 0 80px;
    text-align: center;
    overflow: hidden;
}

.hero-inner { animation: fadeInUp 0.7s ease; }

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(201,162,39,0.14) 0%, transparent 70%);
    pointer-events: none;
    animation: heroGlowPulse 5s ease-in-out infinite;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 24px;
    animation: badgePulse 3s ease-in-out infinite;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 700;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold), var(--gold-light), var(--gold-dark));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
    animation: titleShine 6s linear infinite;
}

.hero-subtitle {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 40px;
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---- Buttons ---- */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    letter-spacing: 0.03em;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
    transform: skewX(-20deg);
}

.btn:hover::after { animation: btnShine 0.65s ease; }

.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }

.btn-gold {
    background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 50%, var(--gold-light) 100%);
    color: #0a0a0f;
    box-shadow: 0 4px 20px rgba(201,162,39,0.3);
}

.btn-gold:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(201,162,39,0.42);
}

.btn-outline {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--border-glow);
}

.btn-outline:hover {
    background: rgba(201,162,39,0.08);
    border-color: var(--gold);
    transform: translateY(-1px);
}

/* ---- Sections ---- */
.section { padding: 56px 0; }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-header h1, .section-header h2 {
    font-family: var(--font-display);
    color: var(--gold-light);
    font-size: 28px;
    letter-spacing: 0.04em;
}

.section-header-spaced { margin-top: 48px; }

.link-gold {
    color: var(--gold);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s, letter-spacing 0.2s;
}

.link-gold:hover { color: var(--gold-light); letter-spacing: 0.02em; }

/* ---- Panel ---- */
.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.5;
}

.panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(201,162,39,0.03), transparent);
    pointer-events: none;
    animation: panelScan 8s ease-in-out infinite;
}

.panel h2 {
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--gold);
    padding: 20px 24px 0;
}

/* ---- Stats ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.stat-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.35);
}

.stat-card:nth-child(1) { animation: statPop 0.5s ease 0.1s both; }
.stat-card:nth-child(2) { animation: statPop 0.5s ease 0.2s both; }
.stat-card:nth-child(3) { animation: statPop 0.5s ease 0.3s both; }

.stat-icon {
    font-size: 32px;
    margin-bottom: 12px;
    display: inline-block;
    animation: iconFloat 4s ease-in-out infinite;
}

.stat-card:nth-child(2) .stat-icon { animation-delay: 0.5s; }
.stat-card:nth-child(3) .stat-icon { animation-delay: 1s; }

.stat-value {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 700;
    color: var(--gold-light);
    line-height: 1;
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ---- Features ---- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    transition: border-color 0.25s, transform 0.25s;
}

.feature-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-3px);
}

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

.feature-card h3 {
    font-family: var(--font-display);
    color: var(--gold);
    font-size: 16px;
    margin-bottom: 10px;
}

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

/* ---- Tables ---- */
.rank-table { width: 100%; border-collapse: collapse; }

.rank-table th {
    padding: 14px 20px;
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid var(--border);
}

.rank-table td {
    padding: 14px 20px;
    font-size: 14px;
    border-bottom: 1px solid rgba(201,162,39,0.08);
    vertical-align: middle;
}

.rank-table tbody tr {
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-table tbody tr:hover {
    background: rgba(201,162,39,0.05);
}

.rank-table tbody tr.row-animate {
    animation: fadeInUp 0.4s ease both;
}

.rank-table tbody tr.top-1 {
    background: rgba(201,162,39,0.07);
    animation: rankGold 3s ease-in-out infinite;
}

.rank-table tbody tr.top-2 { background: rgba(192,192,192,0.05); }
.rank-table tbody tr.top-3 { background: rgba(205,127,50,0.05); }

.rank-num {
    color: var(--text-muted);
    font-weight: 700;
    width: 48px;
    font-variant-numeric: tabular-nums;
    font-size: 15px;
}

.col-badge { width: calc(var(--badge-job-w) + 24px); }
.col-level { width: calc(var(--badge-level-w) + 24px); }

.char-name { font-weight: 600; color: var(--text); }

.empty-row, .empty-message {
    text-align: center;
    color: var(--text-muted);
    padding: 32px !important;
}

/* ---- Fixed-size badges (pixel perfect) ---- */
.badge-text {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    line-height: var(--badge-h);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.job-badge,
.empire-badge,
.level-badge,
.status-badge,
.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--badge-h);
    padding: 0 4px;
    border-radius: 2px;
    flex-shrink: 0;
    vertical-align: middle;
    box-sizing: border-box;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.job-badge:hover,
.empire-badge:hover,
.level-badge:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

.job-badge { width: var(--badge-job-w); }
.empire-badge { width: var(--badge-empire-w); }
.level-badge { width: var(--badge-level-w); }
.status-badge { width: var(--badge-status-w); }
.count-badge { width: var(--badge-count-w); height: 18px; }
.count-badge .badge-text { line-height: 18px; font-size: 10px; }

.job-warrior { background: rgba(139,38,53,0.28); color: #e07080; border: 1px solid rgba(139,38,53,0.45); }
.job-ninja { background: rgba(80,80,90,0.32); color: #b0b0c0; border: 1px solid rgba(120,120,130,0.45); }
.job-sura { background: rgba(120,40,160,0.28); color: #c080e0; border: 1px solid rgba(120,40,160,0.45); }
.job-shaman { background: rgba(40,120,80,0.28); color: #70c090; border: 1px solid rgba(40,120,80,0.45); }
.job-lycan { background: rgba(160,100,40,0.28); color: #d0a060; border: 1px solid rgba(160,100,40,0.45); }

.empire-shinsoo { background: rgba(139,38,53,0.22); color: #e06070; border: 1px solid rgba(139,38,53,0.38); }
.empire-chunjo { background: rgba(184,134,11,0.22); color: #d4a830; border: 1px solid rgba(184,134,11,0.38); }
.empire-jinno { background: rgba(42,82,152,0.22); color: #6090d0; border: 1px solid rgba(42,82,152,0.38); }

.status-ok { background: rgba(40,120,60,0.22); color: #70c090; border: 1px solid rgba(40,120,60,0.4); }
.count-badge { background: rgba(201,162,39,0.2); color: var(--gold); border: 1px solid rgba(201,162,39,0.35); }

.text-gold { color: var(--gold-light); }
.text-muted { color: var(--text-muted); }

/* ---- Tabs ---- */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.tab {
    padding: 11px 20px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.25s, border-color 0.25s, background 0.25s;
}

.tab:hover { color: var(--gold); background: rgba(201,162,39,0.04); }
.tab.active { color: var(--gold-light); border-bottom-color: var(--gold); }

/* ---- Auth ---- */
.auth-section { padding-top: 32px; }
.auth-card { padding: 40px; animation: fadeInUp 0.5s ease; }
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-icon { font-size: 40px; margin-bottom: 12px; animation: iconFloat 3s ease-in-out infinite; }

.auth-header h1 {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--gold-light);
    margin-bottom: 6px;
}

.auth-header p { color: var(--text-muted); font-size: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hint { text-transform: none; letter-spacing: 0; font-weight: 400; opacity: 0.7; }

.form-group input {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    color: var(--text);
    font-size: 14px;
    font-family: var(--font-body);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,162,39,0.12);
}

.auth-footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-muted); }

/* ---- Register ---- */
.register-section { padding-top: 24px; padding-bottom: 64px; }

.register-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    align-items: stretch;
}

.register-aside {
    position: relative;
    overflow: hidden;
    min-height: 100%;
}

.register-aside-glow {
    position: absolute;
    top: -20%;
    right: -30%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(201,162,39,0.18) 0%, transparent 70%);
    pointer-events: none;
}

.register-aside-inner {
    position: relative;
    padding: 40px 32px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.register-tag {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 13px;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 24px;
    width: fit-content;
}

.register-aside h2 {
    font-family: var(--font-display);
    font-size: 36px;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 16px;
}

.register-aside-lead {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 32px;
}

.register-perks {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: auto;
}

.register-perks li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text);
}

.perk-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(201,162,39,0.1);
    border: 1px solid var(--border);
    border-radius: 2px;
    font-size: 14px;
    flex-shrink: 0;
}

.register-aside-note {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-muted);
}

.register-form-wrap { padding: 40px 36px; }

.register-form-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(201,162,39,0.12);
}

.register-form-header h1 {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--gold-light);
    margin-bottom: 6px;
}

.register-form-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.register-form { display: flex; flex-direction: column; gap: 24px; }

.form-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-block-title {
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(201,162,39,0.15);
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 14px;
    opacity: 0.45;
    pointer-events: none;
    line-height: 1;
}

.input-wrap input {
    width: 100%;
    background: rgba(0,0,0,0.35);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 13px 14px 13px 42px;
    color: var(--text);
    font-size: 14px;
    font-family: var(--font-body);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
}

.input-wrap input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,162,39,0.1);
    background: rgba(0,0,0,0.45);
}

.input-wrap input::placeholder { color: rgba(138,134,152,0.55); }

.input-wrap-pin input {
    letter-spacing: 0.35em;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.field-hint {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 2px;
}

.label-optional {
    font-size: 11px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    opacity: 0.65;
}

.btn-register {
    margin-top: 4px;
    padding: 15px 24px;
    font-size: 15px;
}

.btn-register span { position: relative; z-index: 1; }

@media (max-width: 900px) {
    .register-layout { grid-template-columns: 1fr; }
    .register-aside { min-height: auto; }
    .register-aside-inner { padding: 28px 24px; }
    .register-aside h2 { font-size: 28px; }
    .register-perks { margin-bottom: 0; }
    .register-form-wrap { padding: 28px 24px; }
}

@media (max-width: 640px) {
    .register-form-wrap { padding: 24px 20px; }
    .form-row { grid-template-columns: 1fr; }
}

/* ---- Dashboard ---- */
.dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 16px;
}

.dashboard-header h1 {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--text);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 20px;
    align-items: start;
}

.account-panel { padding-bottom: 24px; }
.info-list { padding: 16px 24px 0; }

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(201,162,39,0.08);
    font-size: 14px;
}

.info-row dt { color: var(--text-muted); }
.info-row dd { font-weight: 500; }

.char-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    padding: 16px 24px 24px;
}

.char-card {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.char-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.char-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 8px;
}

.char-card-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--gold-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.char-card-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.char-stat { font-size: 13px; }
.char-stat span {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.char-stat strong { font-size: 14px; font-variant-numeric: tabular-nums; }

/* ---- Flash ---- */
.flash-container { padding-top: 16px; }

.flash {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 8px;
    font-size: 14px;
    border: 1px solid;
    animation: fadeInUp 0.35s ease;
}

.flash-success { background: rgba(40,120,60,0.15); border-color: rgba(40,120,60,0.4); color: #70c090; }
.flash-error { background: rgba(139,38,53,0.15); border-color: rgba(139,38,53,0.4); color: #e07080; }
.flash-warning { background: rgba(184,134,11,0.15); border-color: rgba(184,134,11,0.4); color: #d4a830; }
.flash-info { background: rgba(42,82,152,0.15); border-color: rgba(42,82,152,0.4); color: #80a0d0; }

/* ---- Footer ---- */
.footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    margin-top: 32px;
    text-align: center;
}

.footer-inner p { font-size: 13px; color: var(--text-muted); }
.footer-sub { margin-top: 4px; font-size: 12px !important; opacity: 0.6; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .stats-grid, .features-grid { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0; right: 0;
        flex-direction: column;
        background: rgba(7,7,15,0.98);
        border-bottom: 1px solid var(--border);
        padding: 16px;
    }
    .nav-links.open { display: flex; }
    .form-row { grid-template-columns: 1fr; }
    .hero { padding: 64px 0 48px; }
    .rank-table-full { display: block; overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
