:root {
    --bg: #0b101b; --panel: #121a28; --panel-2: #182235; --line: #283244;
    --gold: #dfbc79; --gold-2: #f6dfb0; --text: #f1f2f6; --muted: #98a4b8; --green: #6ed6aa; --red: #f07e7e;
    --karus: #e08a5c; --elmo: #79a7e0;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0; color: var(--text); font: 16px/1.6 "Segoe UI", system-ui, sans-serif;
    background: radial-gradient(ellipse at 80% 0, #23324b55, transparent 700px), var(--bg);
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-2); }
em { font-style: normal; color: var(--gold); }
img { max-width: 100%; }
.shell { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }

/* header */
.topbar { background: #080d16; border-bottom: 1px solid #ffffff08; font-size: 12px; letter-spacing: 1.5px; color: var(--muted); }
.topbar .shell { display: flex; justify-content: space-between; padding-top: 10px; padding-bottom: 10px; }
.header { position: sticky; top: 0; z-index: 20; background: #0b101bf2; backdrop-filter: blur(8px); border-bottom: 1px solid #ffffff0d; }
.nav { display: flex; align-items: center; gap: 28px; height: 82px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 800; letter-spacing: 2px; font-size: 18px; }
.brand img { width: 44px; height: 44px; border-radius: 10px; }
.brand small { display: block; font-size: 9px; font-weight: 500; color: var(--muted); letter-spacing: 4px; }
.links { display: flex; gap: 6px; flex: 1; justify-content: center; }
.links a { color: var(--text); font-weight: 600; font-size: 15px; padding: 10px 10px; border-bottom: 2px solid transparent; }
.links a:hover, .links a.on { color: var(--gold); border-bottom-color: var(--gold); }
.actions { display: flex; gap: 10px; align-items: center; }
.menu-btn { display: none; background: none; border: 0; color: var(--gold); font-size: 26px; cursor: pointer; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 12px 22px; border-radius: 8px;
       font-weight: 750; font-size: 14px; letter-spacing: .3px; border: 1px solid #ffffff1c; color: var(--text); background: #ffffff06; cursor: pointer; }
.btn:hover { color: #fff; border-color: #ffffff40; }
.btn-gold { background: linear-gradient(120deg, #efd6a0, #ccaa68); color: #151923; border-color: transparent; }
.btn-gold:hover { color: #151923; filter: brightness(1.07); }
.btn-sm { min-height: 36px; padding: 8px 14px; font-size: 13px; }

/* hero */
.hero { position: relative; min-height: 640px; padding: 80px 0 90px; border-bottom: 1px solid #dabc7530;
        background: linear-gradient(90deg, #070c18ee 5%, #080d18b0 42%, #080d1838 75%), linear-gradient(0deg, #0b101b, transparent 45%),
                    url('../img/wall6.jpg') center 35%/cover; }
.hero .shell > div { max-width: 640px; }
.eyebrow { color: #e5c990; font-size: 12px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; }
.wordmark { font-size: clamp(30px, 4vw, 50px); font-weight: 850; letter-spacing: 8px; margin: 16px 0; text-shadow: 0 3px 30px #000; }
.wordmark span { color: var(--gold); font-weight: 400; }
.hero h1 { font-size: clamp(46px, 5.6vw, 76px); line-height: 1.06; letter-spacing: -3px; margin: 10px 0 20px; }
.hero h1 em { font-family: Georgia, serif; font-weight: 500; color: #edc783; }
.hero p { font-size: 19px; color: #ced3df; max-width: 580px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* stat strip */
.strip { position: relative; z-index: 2; display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 24px; align-items: center;
         margin-top: -1px; padding: 22px 28px; border: 1px solid #b9945345; border-radius: 0 0 16px 16px;
         background: linear-gradient(125deg, #233149, #111a2a); box-shadow: 0 20px 50px #0005; }
.strip > div + div { border-left: 1px solid #ffffff15; padding-left: 24px; }
.strip strong { display: block; font-size: 28px; font-weight: 750; }
.strip small { display: block; font-size: 11px; letter-spacing: 1.5px; color: #a6b3ca; text-transform: uppercase; }
.strip .title strong { font-size: 20px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); margin-right: 6px; }
.dot.off { background: var(--red); box-shadow: 0 0 10px var(--red); }

/* sections */
.section { padding: 56px 0; }
.kicker { font-size: 12px; letter-spacing: 2.4px; color: var(--gold); font-weight: 700; text-transform: uppercase; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 26px; }
.section-head h2 { font-size: 38px; letter-spacing: -1.5px; line-height: 1.15; margin: 6px 0 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.card { background: linear-gradient(135deg, #172133, #111927); border: 1px solid var(--line); border-radius: 14px; padding: 24px; min-width: 0; }
.explore { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 300px; padding: 26px;
           border: 1px solid #9d784f55; border-radius: 14px; overflow: hidden; color: var(--text);
           background: linear-gradient(0deg, #0a111bf5 0%, #0a111ba0 50%, #0a111b10), var(--cover) center/cover; transition: transform .2s, border-color .2s; }
.explore:hover { transform: translateY(-4px); border-color: #eac780; color: var(--text); }
.explore h3 { font-size: 26px; margin: 10px 0 8px; }
.explore p { color: #bec9dc; margin: 0 0 14px; font-size: 15px; }
.explore b { color: #f1cf93; font-size: 12px; letter-spacing: 1.2px; }

.realm { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; padding: 40px; border: 1px solid #61718c45; border-radius: 16px;
         background: linear-gradient(90deg, #101b2df5, #14243acb), url('../img/wall3.jpg') center/cover; }
.realm h2 { font-size: 40px; letter-spacing: -1.5px; line-height: 1.15; margin: 12px 0; }
.realm p { color: #aebdd3; }
.balance { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: center; gap: 18px; align-self: center; }
.balance img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 0 20px #e3b87c40); }
.balance span { display: block; color: var(--gold); font-size: 12px; letter-spacing: 2px; font-weight: 750; }
.balance strong { display: block; font-size: 36px; }
.versus { font-family: Georgia, serif; font-size: 24px; font-style: italic; color: #9cacbf; }
.meter { grid-column: 1/-1; height: 8px; background: var(--elmo); border-radius: 5px; overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, #b67749, #f4cc85); }

.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #ffffff0b; }
.rank-list .n { min-width: 26px; font-weight: 800; color: #6e839e; }
.rank-list li:nth-child(1) .n { color: #f3d58c; } .rank-list li:nth-child(2) .n { color: #d2dce6; } .rank-list li:nth-child(3) .n { color: #c89872; }
.rank-list img { width: 24px; height: 28px; object-fit: contain; }
.rank-list .who { flex: 1; min-width: 0; }
.rank-list .who b { display: block; overflow-wrap: anywhere; }
.rank-list .who small, .rank-list .val small { display: block; color: #8399b7; font-size: 12px; }
.rank-list .val { text-align: right; color: #ead09f; font-weight: 700; }
.panel-title { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #ffffff12; padding-bottom: 14px; margin-bottom: 4px; }
.panel-title h3 { margin: 0; font-size: 19px; }
.panel-title span { color: var(--gold); font-size: 22px; }

.news { display: flex; flex-direction: column; gap: 10px; }
.news .meta { font-size: 11px; letter-spacing: 1.5px; color: #efd5a8; text-transform: uppercase; }
.news h3 { margin: 0; font-size: 22px; line-height: 1.25; }
.news p { margin: 0; color: #b9c6d9; font-size: 15px; }

.banner { padding: 52px 24px; text-align: center; border: 1px solid #cfac6a50; border-radius: 18px;
          background: linear-gradient(0deg, #0d1523f0, #0d1523ba), url('../img/wall1.jpg') center/cover; }
.banner h2 { font-size: 50px; letter-spacing: -2px; line-height: 1.15; margin: 14px 0; }
.banner .hero-actions { justify-content: center; }
.steps { display: flex; justify-content: center; gap: 34px; border-top: 1px solid #ffffff15; margin-top: 32px; padding-top: 24px; color: #a2b3cd; font-size: 14px; }
.steps b { color: var(--gold); margin-right: 8px; }

/* inner pages */
.page { min-height: 60vh; padding: 36px 0 70px; }
.page-head { margin: 10px 0 28px; }
.page-head h1 { font-size: 38px; letter-spacing: -1.5px; line-height: 1.2; margin: 6px 0 8px; }
.page-head p { color: var(--muted); margin: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tabs a { padding: 10px 16px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #121a28; font-size: 14px; }
.tabs a.on, .tabs a:hover { color: var(--gold); border-color: #dfbc7966; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table.data { width: 100%; border-collapse: collapse; min-width: 560px; }
table.data th { background: #0c1421; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; text-align: left; padding: 14px 16px; }
table.data td { padding: 13px 16px; border-top: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
table.data tr:hover td { background: #ffffff04; }
.nation { display: inline-flex; align-items: center; gap: 6px; }
.nation img { width: 20px; height: 22px; object-fit: contain; }
.item { display: inline-flex; align-items: center; gap: 8px; }
.item img { width: 30px; height: 30px; border: 1px solid #5a4a30; border-radius: 3px; background: #000; }
.item small { color: var(--muted); }
.notice { padding: 15px 18px; border: 1px solid #dfbc7933; background: #dfbc790c; border-radius: 10px; color: var(--gold); margin-bottom: 18px; }
.notice.err { color: #ffb5b5; background: #f05e620c; border-color: #f05e6233; }
.notice.ok { color: #8de2bb; background: #6ed6aa0c; border-color: #6ed6aa33; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }

/* forms */
.auth { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; min-height: 560px; }
.auth h1 { font-size: 52px; line-height: 1.12; letter-spacing: -2px; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; font-size: 13px; color: #b8c4d8; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; background: #0c1421; border: 1px solid #2a3549; color: var(--text);
    border-radius: 8px; padding: 12px 14px; font: inherit; }
.field input:focus, .field textarea:focus { outline: 1px solid var(--gold); border-color: var(--gold); }
.hint { color: var(--muted); font-size: 13px; margin: 0; }
.hp { position: absolute; left: -5000px; }
.account { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.side a { display: block; padding: 12px 14px; border-radius: 8px; color: var(--muted); }
.side a.on, .side a:hover { background: #dfbc7910; color: var(--gold); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.stats .card small { display: block; color: var(--muted); font-size: 12px; }
.stats .card b { font-size: 26px; color: var(--gold); }
.article { max-width: 820px; }
.article .body { color: #c9d3e2; font-size: 17px; line-height: 1.85; white-space: pre-wrap; }

/* footer */
.footer { margin-top: 40px; background: #080d16; padding: 44px 0 24px; border-top: 1px solid #ffffff0b; }
.footer .shell > div:first-child { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer nav a { color: #a5b0c2; font-size: 14px; }
.footer .copy { border-top: 1px solid #ffffff0b; margin-top: 30px; padding-top: 18px; font-size: 12px; color: #63738b; }

@media (max-width: 1000px) {
    .strip { grid-template-columns: repeat(2, 1fr); }
    .strip > div + div { border-left: 0; padding-left: 0; }
    .grid3 { grid-template-columns: 1fr 1fr; }
    .realm, .auth { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 760px) {
    .shell { padding: 0 16px; }
    .topbar .shell > span:first-child { display: none; }
    .nav { height: 70px; gap: 12px; }
    .menu-btn { display: block; order: 3; }
    .links { display: none; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; background: #101827; padding: 12px 16px; }
    .links.open { display: flex; }
    .actions .btn:not(.btn-gold) { display: none; }
    .brand { font-size: 14px; } .brand img { width: 36px; height: 36px; }
    .hero { min-height: 560px; padding: 50px 0 70px; background-position: 62% 40%; }
    .hero h1 { font-size: 46px; letter-spacing: -2px; }
    .hero p { font-size: 16px; }
    .grid3, .grid2, .stats { grid-template-columns: 1fr; }
    .section-head { flex-direction: column; align-items: flex-start; }
    .section-head h2, .page-head h1 { font-size: 30px; }
    .banner h2 { font-size: 34px; }
    .steps { gap: 14px; font-size: 12px; flex-wrap: wrap; }
    .account { grid-template-columns: 1fr; }
    .side { display: flex; overflow-x: auto; gap: 4px; }
    .side a { white-space: nowrap; }
    .auth h1 { font-size: 36px; }
}
