/* MU Legend – gold & black */
:root {
    --bg: #070605;
    --bg2: #0e0b08;
    --panel: rgba(20, 15, 10, 0.86);
    --panel-solid: #15100b;
    --panel-2: rgba(30, 22, 14, 0.9);
    --line: rgba(212, 162, 76, 0.22);
    --line-strong: rgba(232, 186, 98, 0.55);
    --gold: #d9a94e;
    --gold-2: #f4d58d;
    --gold-3: #a8792b;
    --gold-deep: #6e4a14;
    --text: #ece2cf;
    --muted: #a49678;
    --dim: #6f6551;
    --red: #e0543f;
    --green: #6fd27a;
    --blue: #6fb6ff;
    --exc: #5fe08a;
    --anc: #43c6ff;
    --radius: 12px;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    --glow: 0 0 0 1px rgba(232, 186, 98, 0.25), 0 0 30px rgba(217, 169, 78, 0.12);
    --font-title: "Cinzel", Georgia, serif;
    --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.6 var(--font);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}
.bg-layer {
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(1200px 600px at 50% -10%, rgba(217, 169, 78, 0.12), transparent 60%),
        radial-gradient(900px 500px at 100% 100%, rgba(120, 70, 20, 0.12), transparent 60%),
        linear-gradient(180deg, #0b0907 0%, #070605 100%);
}
.bg-layer::after {
    content: ""; position: absolute; inset: 0; opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
main { flex: 1; }
a { color: var(--gold-2); text-decoration: none; transition: color .15s; }
a:hover { color: #fff3cf; }
h1, h2, h3, h4 { font-family: var(--font-title); color: var(--gold-2); letter-spacing: .04em; margin: 0 0 .6em; line-height: 1.2; }
h1 { font-size: clamp(30px, 4vw, 46px); }
h2 { font-size: clamp(22px, 2.6vw, 30px); }
h3 { font-size: 19px; }
h4 { font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.center { text-align: center; }
.right { text-align: right; }
.inline { display: inline; margin: 0; }
.wrap { width: min(1220px, 100% - 32px); margin: 0 auto; }
.section { padding: 56px 0; }
.section-tight { padding: 32px 0; }
.gold { color: var(--gold-2); }
.green { color: var(--green); }
.red { color: var(--red); }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
    position: sticky; top: 0; z-index: 50;
    background: linear-gradient(180deg, rgba(8, 6, 4, 0.96), rgba(8, 6, 4, 0.82));
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.topbar::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .6;
}
.topbar-inner { display: flex; align-items: center; gap: 22px; height: 68px; }
.brand { white-space: nowrap; flex: none; display: flex; align-items: center; gap: 10px; font-family: var(--font-title); font-weight: 900; font-size: 21px; letter-spacing: .08em; }
.brand-icon { width: 40px; height: 40px; border-radius: 9px; box-shadow: 0 0 18px rgba(217, 169, 78, .35); }
.brand-mu { color: #fff; text-shadow: 0 0 18px rgba(255, 220, 150, .5); }
.brand-legend { background: linear-gradient(180deg, #fff1c4, #d9a94e 55%, #8c6118); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mainnav { display: flex; gap: 4px; flex: 1; }
.mainnav a {
    color: var(--muted); font-weight: 600; font-size: 13.5px; letter-spacing: .06em; text-transform: uppercase;
    padding: 8px 12px; border-radius: 8px; position: relative;
}
.mainnav a:hover { color: var(--gold-2); background: rgba(217, 169, 78, .06); }
.mainnav a.active { color: var(--gold-2); }
.mainnav a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--gold); border-radius: 2px; box-shadow: 0 0 10px var(--gold); }
.mainnav .nav-admin { color: #ff9a7a; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.langs { display: flex; gap: 2px; margin-right: 6px; }
.langs a { font-size: 12px; font-weight: 700; color: var(--dim); padding: 4px 7px; border-radius: 6px; }
.langs a.on { color: var(--gold-2); background: rgba(217, 169, 78, .12); }
.burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.burger span { display: block; width: 22px; height: 2px; background: var(--gold-2); margin: 4px 0; border-radius: 2px; }
.banner { background: linear-gradient(90deg, #4a2f0b, #8a6020, #4a2f0b); color: #fff4d6; text-align: center; padding: 8px 0; font-weight: 600; font-size: 14px; }

/* ---------- buttons ---------- */
.btn {
    --b: var(--line-strong);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border-radius: 10px; border: 1px solid var(--b);
    font: 600 14px var(--font); letter-spacing: .03em; cursor: pointer; color: var(--gold-2);
    background: rgba(217, 169, 78, .06); transition: all .18s; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: rgba(217, 169, 78, .14); color: #fff1c8; box-shadow: 0 0 22px rgba(217, 169, 78, .2); }
.btn-gold {
    color: #1a1004; border-color: #f2cf7f;
    background: linear-gradient(180deg, #ffe7a6 0%, #e2b358 45%, #b17d27 100%);
    box-shadow: 0 6px 20px rgba(217, 169, 78, .25), inset 0 1px 0 rgba(255, 255, 255, .5);
    text-shadow: 0 1px 0 rgba(255, 235, 180, .5);
}
.btn-gold:hover { color: #000; filter: brightness(1.08); box-shadow: 0 8px 30px rgba(217, 169, 78, .45), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn-ghost { background: transparent; }
.btn-danger { --b: rgba(224, 84, 63, .6); color: #ffb2a3; background: rgba(224, 84, 63, .08); }
.btn-danger:hover { background: rgba(224, 84, 63, .2); color: #fff; box-shadow: 0 0 20px rgba(224, 84, 63, .25); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 15px 30px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }

/* ---------- panels ---------- */
.panel {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.panel::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 215, 140, .06), transparent 40%);
}
.panel-pad { padding: 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; }
.panel-body { padding: 20px 22px; }
.corner { position: relative; }
.corner::after {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
    background:
        linear-gradient(var(--gold), var(--gold)) left top / 18px 2px no-repeat,
        linear-gradient(var(--gold), var(--gold)) left top / 2px 18px no-repeat,
        linear-gradient(var(--gold), var(--gold)) right top / 18px 2px no-repeat,
        linear-gradient(var(--gold), var(--gold)) right top / 2px 18px no-repeat,
        linear-gradient(var(--gold), var(--gold)) left bottom / 18px 2px no-repeat,
        linear-gradient(var(--gold), var(--gold)) left bottom / 2px 18px no-repeat,
        linear-gradient(var(--gold), var(--gold)) right bottom / 18px 2px no-repeat,
        linear-gradient(var(--gold), var(--gold)) right bottom / 2px 18px no-repeat;
    opacity: .8;
}
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-main { grid-template-columns: 2fr 1fr; }
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.title-row h2 { margin: 0; }
.eyebrow { font: 700 12px var(--font); letter-spacing: .25em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); margin: 22px 0; border: 0; }
.ornament { display: flex; align-items: center; gap: 14px; color: var(--gold); margin: 0 auto 18px; justify-content: center; }
.ornament::before, .ornament::after { content: ""; height: 1px; width: 70px; background: linear-gradient(90deg, transparent, var(--gold)); }
.ornament::after { transform: scaleX(-1); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 560px; display: flex; align-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-bg { position: absolute; inset: 0; background: url("/img/hero.jpg") center 35% / cover no-repeat; transform: scale(1.04); animation: heroZoom 30s ease-in-out infinite alternate; }
.hero-bg::after {
    content: ""; position: absolute; inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 6, 5, .96) 0%, rgba(7, 6, 5, .78) 38%, rgba(7, 6, 5, .35) 70%, rgba(7, 6, 5, .7) 100%),
        linear-gradient(0deg, var(--bg) 0%, transparent 35%);
}
@keyframes heroZoom { to { transform: scale(1.1) translateX(-1%); } }
.hero-content { position: relative; z-index: 2; padding: 70px 0; max-width: 640px; }
.hero h1 { font-size: clamp(42px, 6vw, 78px); font-weight: 900; margin-bottom: 8px; line-height: 1.02; }
.hero h1 .brand-mu { display: block; font-size: .62em; letter-spacing: .3em; color: #fff; }
.hero h1 .brand-legend { filter: drop-shadow(0 4px 28px rgba(217, 169, 78, .45)); }
.hero-sub { font-size: 18px; color: #d8c9a6; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
    background: rgba(10, 8, 6, .72); border: 1px solid var(--line); font-size: 13.5px; color: var(--text); backdrop-filter: blur(6px);
}
.chip b { color: var(--gold-2); font-weight: 700; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); display: inline-block; }
.dot.on { background: var(--green); box-shadow: 0 0 12px var(--green); animation: pulse 2s infinite; }
.dot.off { background: var(--red); box-shadow: 0 0 10px var(--red); }
@keyframes pulse { 50% { opacity: .55; } }

/* ---------- stat tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -48px; position: relative; z-index: 3; }
.tile { padding: 20px 22px; text-align: center; }
.tile-value { font: 900 30px var(--font-title); color: var(--gold-2); text-shadow: 0 0 20px rgba(217, 169, 78, .35); }
.tile-label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }

/* ---------- news ---------- */
.news-list { display: flex; flex-direction: column; gap: 16px; }
.news { padding: 22px 24px; }
.news-meta { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.tag { font: 700 10.5px var(--font); letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px; border-radius: 5px; background: rgba(217, 169, 78, .14); color: var(--gold-2); border: 1px solid var(--line); }
.tag-update { background: rgba(111, 182, 255, .12); color: #a8d4ff; border-color: rgba(111, 182, 255, .3); }
.tag-event { background: rgba(111, 210, 122, .12); color: #a9f0b2; border-color: rgba(111, 210, 122, .3); }
.tag-pin { background: rgba(224, 84, 63, .14); color: #ffb2a3; border-color: rgba(224, 84, 63, .35); }
.news h3 { margin-bottom: 8px; font-size: 21px; }
.news-body { color: #d3c7ad; white-space: pre-line; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { font: 700 11.5px var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid rgba(212, 162, 76, .08); vertical-align: middle; }
.table tr:hover td { background: rgba(217, 169, 78, .04); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.rank { font: 900 15px var(--font-title); color: var(--muted); width: 46px; }
.rank-1 { color: #ffd76a; text-shadow: 0 0 12px rgba(255, 215, 106, .6); }
.rank-2 { color: #d9dde4; }
.rank-3 { color: #e3a46a; }
.cls { display: inline-block; font: 700 10.5px var(--font); letter-spacing: .08em; padding: 3px 7px; border-radius: 5px; background: rgba(255, 255, 255, .06); color: var(--muted); margin-right: 6px; }
.cls-DW { color: #9cc8ff; } .cls-DK { color: #ff9b8a; } .cls-ELF { color: #9ff0a8; } .cls-MG { color: #e6b3ff; }
.cls-DL { color: #ffd87a; } .cls-SUM { color: #ff9fd8; } .cls-RF { color: #ffc28a; }
.guild-logo { width: 22px; height: 22px; vertical-align: middle; image-rendering: pixelated; border: 1px solid var(--line); border-radius: 3px; background: #000; margin-right: 8px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tab { padding: 9px 16px; border-radius: 9px; border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 13.5px; background: rgba(0, 0, 0, .25); }
.tab:hover { color: var(--gold-2); border-color: var(--line-strong); }
.tab.on { color: #1a1004; background: linear-gradient(180deg, #ffe7a6, #d9a94e); border-color: #f2cf7f; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.input, select.input, textarea.input {
    width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .45);
    color: var(--text); font: 15px var(--font); transition: border .15s, box-shadow .15s; outline: none;
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 169, 78, .15); }
textarea.input { min-height: 140px; resize: vertical; }
.field-hint { font-size: 12.5px; color: var(--dim); margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.auth-box { width: min(460px, 100%); margin: 50px auto; }
.auth-box .panel-pad { padding: 34px; }
.auth-title { text-align: center; margin-bottom: 22px; }
.auth-title img { width: 64px; height: 64px; border-radius: 14px; margin-bottom: 12px; box-shadow: 0 0 30px rgba(217, 169, 78, .3); }

.flash { margin: 18px 0 0; padding: 14px 18px; border-radius: 10px; font-weight: 600; }
.flash-ok { background: rgba(111, 210, 122, .1); border: 1px solid rgba(111, 210, 122, .4); color: #b7f4be; }
.flash-err { background: rgba(224, 84, 63, .1); border: 1px solid rgba(224, 84, 63, .45); color: #ffc1b5; }

/* ---------- account ---------- */
.page-head { padding: 42px 0 10px; }
.page-head .muted { max-width: 720px; }
.acc-top { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.acc-stat { padding: 18px 20px; }
.acc-stat .label { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.acc-stat .value { font: 700 22px var(--font-title); color: var(--gold-2); margin-top: 4px; }
.chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.char { display: flex; flex-direction: column; }
.char-head { display: flex; gap: 14px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(217, 169, 78, .08), transparent); }
.char-avatar {
    width: 58px; height: 58px; border-radius: 12px; display: grid; place-items: center; flex: none;
    font: 900 15px var(--font-title); color: #1a1004; background: linear-gradient(160deg, #ffe7a6, #b17d27); box-shadow: 0 0 20px rgba(217, 169, 78, .3);
}
.char-name { font: 700 20px var(--font-title); color: #fff3d4; }
.char-sub { font-size: 13px; color: var(--muted); }
.char-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.char-stats div { background: var(--panel-solid); padding: 10px 14px; }
.char-stats div:last-child:nth-child(3n+1) { grid-column: span 3; }
.char-stats div:last-child:nth-child(3n+2) { grid-column: span 2; }
.char-stats span { display: block; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.char-stats b { font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }
.char-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 20px; margin-top: auto; }
.badge { display: inline-block; font: 700 10.5px var(--font); letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border-radius: 5px; }
.badge-pk { background: rgba(224, 84, 63, .18); color: #ff9e8c; border: 1px solid rgba(224, 84, 63, .45); }
.badge-ok { background: rgba(111, 210, 122, .14); color: #a9f0b2; border: 1px solid rgba(111, 210, 122, .35); }
.badge-gm { background: rgba(255, 154, 122, .14); color: #ffb49c; border: 1px solid rgba(255, 154, 122, .35); }
.badge-ban { background: rgba(224, 84, 63, .25); color: #fff; border: 1px solid rgba(224, 84, 63, .6); }
.notice { padding: 14px 18px; border-radius: 10px; background: rgba(217, 169, 78, .07); border: 1px dashed var(--line-strong); color: #e6d6b2; font-size: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.stat-grid .input { text-align: center; }
.stat-rows { display: flex; flex-direction: column; gap: 8px; }
.stat-row { display: grid; grid-template-columns: 44px 70px 1fr auto; gap: 10px; align-items: center; }
.stat-row label { font-weight: 700; font-size: 13px; color: var(--gold-2); letter-spacing: .08em; }
.stat-row .stat-now { font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
.stat-row .input { padding: 8px 12px; text-align: right; min-width: 0; -moz-appearance: textfield; }
.stat-row .input::-webkit-outer-spin-button, .stat-row .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stat-row .btn { padding: 7px 10px; font-size: 11.5px; }
dl.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; }
dl.kv dt { color: var(--muted); font-size: 13px; }
dl.kv dd { margin: 0; font-weight: 600; }

/* ---------- items / market ---------- */
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.item-card { display: flex; flex-direction: column; }
.item-pic { height: 150px; display: grid; place-items: center; background: radial-gradient(circle at 50% 60%, rgba(217, 169, 78, .12), transparent 70%); border-bottom: 1px solid var(--line); }
.item-pic img { max-width: 80%; max-height: 120px; image-rendering: auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .7)); }
.item-info { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.item-name { font-weight: 700; font-size: 14.5px; }
.item-normal { color: #e9e2d0; } .item-high { color: #ffd76a; } .item-exc { color: var(--exc); } .item-anc { color: var(--anc); }
.item-opts { font-size: 12.5px; color: #8fb6ff; line-height: 1.5; }
.item-price { font: 700 18px var(--font-title); color: var(--gold-2); }
.item-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.filters .input { width: auto; min-width: 160px; padding: 10px 12px; }
.vault { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.vault-item { padding: 12px; display: flex; gap: 12px; align-items: center; cursor: pointer; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, .3); transition: all .15s; }
.vault-item:hover { border-color: var(--line-strong); background: rgba(217, 169, 78, .06); }
.vault-item.sel { border-color: var(--gold); box-shadow: var(--glow); background: rgba(217, 169, 78, .1); }
.vault-item img { width: 46px; height: 46px; object-fit: contain; }
.vault-item .item-name { font-size: 13px; }
.tooltip {
    position: fixed; z-index: 100; pointer-events: none; display: none; max-width: 320px;
    background: rgba(6, 5, 4, .96); border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px 14px;
    font-size: 13px; line-height: 1.55; white-space: pre-line; color: #8fb6ff; box-shadow: var(--shadow);
}
.tooltip .tt-title { font-weight: 700; color: #fff; display: block; margin-bottom: 4px; }

/* ---------- armory ---------- */
.armory { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 22px; align-items: start; }
.equip > .slot { min-width: 0; }
.equip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 20px; }
.slot { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, .4); display: grid; place-items: center; position: relative; }
.slot img { max-width: 78%; max-height: 78%; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .8)); }
.slot .slot-name { position: absolute; bottom: 3px; left: 0; right: 0; text-align: center; font-size: 9.5px; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; }
.slot.has { border-color: var(--line-strong); }
.slot.exc { box-shadow: inset 0 0 18px rgba(95, 224, 138, .18); }
.slot.anc { box-shadow: inset 0 0 18px rgba(67, 198, 255, .2); }

/* ---------- events ---------- */
.events { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.event { padding: 20px 22px; }
.event-name { font: 700 17px var(--font-title); color: #fff3d4; margin-bottom: 6px; }
.event-time { font: 900 26px var(--font-title); color: var(--gold-2); font-variant-numeric: tabular-nums; }
.event-meta { font-size: 13px; color: var(--muted); }
.event.soon { border-color: rgba(111, 210, 122, .45); box-shadow: 0 0 30px rgba(111, 210, 122, .12); }
.event-times { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.event-times span { font-size: 11.5px; padding: 2px 7px; border-radius: 5px; background: rgba(255, 255, 255, .05); color: var(--muted); }

/* ---------- features / download ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { padding: 22px; display: flex; gap: 14px; align-items: flex-start; }
.feature-icon { width: 42px; height: 42px; border-radius: 10px; flex: none; display: grid; place-items: center; font-size: 20px; background: rgba(217, 169, 78, .12); border: 1px solid var(--line); }
.rates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.rate { padding: 16px; text-align: center; }
.rate b { display: block; font: 900 24px var(--font-title); color: var(--gold-2); }
.rate span { font-size: 12px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.dl-hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 26px; align-items: center; }
.steps { counter-reset: s; display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step::before { counter-increment: s; content: counter(s); flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 14px var(--font-title); color: #1a1004; background: linear-gradient(180deg, #ffe7a6, #c18c33); }
.req td:first-child { color: var(--muted); width: 40%; }
.cmd code, code { font-family: ui-monospace, Consolas, monospace; background: rgba(0, 0, 0, .45); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; color: var(--gold-2); font-size: 13px; }

/* ---------- admin ---------- */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; gap: 22px; padding: 30px 0 60px; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; padding: 14px; align-self: start; position: sticky; top: 88px; }
.admin-nav a { padding: 10px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 14px; }
.admin-nav a:hover, .admin-nav a.on { background: rgba(217, 169, 78, .1); color: var(--gold-2); }

.mainnav .nav-mobile { display: none; }


/* ---------- profiles (armory, guild) ---------- */
.profile { display: flex; gap: 20px; align-items: center; padding: 24px 26px; flex-wrap: wrap; background: linear-gradient(100deg, rgba(217, 169, 78, .12), rgba(20, 15, 10, .86) 55%); }
.char-avatar.big { width: 86px; height: 86px; border-radius: 18px; font-size: 22px; }
.char-avatar.dimmed { filter: grayscale(1) brightness(.5); }
.profile-name { font: 900 34px/1.1 var(--font-title); color: #fff3d4; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; text-shadow: 0 0 30px rgba(217, 169, 78, .35); }
.profile-name a { color: inherit; }
.profile-places { display: flex; gap: 12px; }
.profile-places div { min-width: 104px; text-align: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, .35); }
.profile-places b { display: block; font: 900 26px var(--font-title); color: var(--gold-2); }
.profile-places span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.guild-logo-big { width: 86px; height: 86px; image-rendering: pixelated; border: 1px solid var(--line-strong); border-radius: 12px; background: #000; flex: none; }
.meter-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); margin: 12px 0 5px; }
.meter-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.meter { height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .06); overflow: hidden; border: 1px solid rgba(255, 255, 255, .04); }
.meter i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #8a5d1c, #f2cf7f); box-shadow: 0 0 12px rgba(242, 207, 127, .45); transition: width .8s ease; }
.meter.master i { background: linear-gradient(90deg, #6d2f9e, #c58cff); box-shadow: 0 0 12px rgba(197, 140, 255, .4); }
.meter.stat-str i { background: linear-gradient(90deg, #8e2a1e, #ff8a6b); }
.meter.stat-agi i { background: linear-gradient(90deg, #1e6b3a, #7de39a); }
.meter.stat-vit i { background: linear-gradient(90deg, #8a1e3a, #ff7aa0); }
.meter.stat-ene i { background: linear-gradient(90deg, #1e4a8e, #7ab8ff); }
.meter.stat-cmd i { background: linear-gradient(90deg, #6e4a14, #ffd36b); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.mini-stats div { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, .3); }
.mini-stats span { display: block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.mini-stats b { font-size: 15px; color: var(--gold-2); }
.item-details { display: flex; flex-direction: column; gap: 4px; }
.item-detail { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.item-detail:last-child { border-bottom: 0; }
.item-detail img { width: 46px; height: 46px; object-fit: contain; flex: none; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .8)); }
.slot .slot-lvl { position: absolute; top: 4px; right: 6px; font: 700 11px var(--font); color: var(--gold-2); }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip-list .chip:hover { border-color: var(--line-strong); color: var(--gold-2); }

/* ---------- podium, hall of fame ---------- */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: end; margin-bottom: 20px; }
.podium-step { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 16px; text-align: center; color: var(--text); position: relative; transition: transform .2s, border-color .2s; }
.podium-step:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.podium-step.p1 { padding-top: 38px; border-color: rgba(242, 207, 127, .6); box-shadow: 0 0 40px rgba(217, 169, 78, .22); background: linear-gradient(180deg, rgba(217, 169, 78, .16), rgba(20, 15, 10, .9)); }
.podium-step.p2 { border-color: rgba(200, 210, 225, .35); }
.podium-step.p3 { border-color: rgba(205, 127, 50, .4); }
.podium-place { position: absolute; top: 10px; left: 14px; font: 900 22px var(--font-title); color: var(--gold-2); }
.p2 .podium-place { color: #d6dde8; } .p3 .podium-place { color: #d9935a; }
.podium-name { font: 700 18px var(--font-title); color: #fff3d4; }
.podium-value { font: 900 20px var(--font-title); color: var(--gold-2); margin-top: 4px; }
.hof { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.hof-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 16px; text-align: center; color: var(--text); }
.hof-small .hof-card { padding: 16px 12px; }
.hof-stats { display: flex; gap: 12px; font-size: 13px; color: var(--muted); margin: 4px 0; }
.hof-stats b { color: var(--gold-2); }
a.hof-card:hover { border-color: var(--line-strong); }

/* ---------- castle ---------- */
.castle-hero { padding: 54px 0 30px; background: radial-gradient(ellipse at 70% 0%, rgba(217, 169, 78, .18), transparent 60%); border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.castle-hero h1 { font-size: clamp(38px, 6vw, 64px); margin: 4px 0; }
.castle-countdown { display: inline-flex; flex-direction: column; gap: 6px; padding: 18px 24px; margin-top: 14px; }
.event-time.big { font-size: 44px; letter-spacing: .04em; text-shadow: 0 0 30px rgba(242, 207, 127, .4); }
.castle-crown { font-size: 52px; line-height: 1; color: var(--gold-2); text-shadow: 0 0 30px rgba(242, 207, 127, .5); }
.castle-owner { align-self: start; }
.castle-widget { display: flex; gap: 16px; align-items: center; padding: 18px 20px; color: var(--text); background: linear-gradient(120deg, rgba(217, 169, 78, .14), rgba(20, 15, 10, .86)); }
.castle-widget:hover { border-color: var(--line-strong); }
.castle-widget .castle-crown { font-size: 40px; }
.castle-name { font: 700 19px var(--font-title); color: #fff3d4; }
.timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; margin-top: 14px; position: relative; }
.tl-step { padding: 12px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, .3); text-align: center; position: relative; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; margin: 0 auto 8px; background: var(--dim); }
.tl-day { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.tl-name { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 3px; }
.tl-step.battle { border-color: rgba(224, 84, 63, .45); }
.tl-step.battle .tl-dot { background: var(--red); }
.tl-step.now { border-color: #f2cf7f; background: linear-gradient(180deg, rgba(217, 169, 78, .2), rgba(0, 0, 0, .3)); box-shadow: 0 0 24px rgba(217, 169, 78, .25); }
.tl-step.now .tl-dot { background: var(--gold-2); box-shadow: 0 0 12px var(--gold-2); }
.tl-step.now .tl-name { color: #fff3d4; }

/* ---------- stats columns ---------- */
.columns { display: flex; gap: 6px; align-items: flex-end; height: 200px; margin-top: 16px; }
.columns .col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.columns .col i { display: block; width: 100%; min-height: 3px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #f2cf7f, #8a5d1c); box-shadow: 0 0 14px rgba(242, 207, 127, .3); position: relative; }
.columns .col i b { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--gold-2); }
.columns .col span { font-size: 10px; color: var(--dim); white-space: nowrap; }

@media (max-width: 900px) {
    .profile-places { width: 100%; }
    .profile-places div { flex: 1; }
    .profile-name { font-size: 26px; }
    .podium { grid-template-columns: 1fr; }
    .podium-step.p1 { order: -1; }
    .mini-stats { grid-template-columns: 1fr 1fr; }
    .columns .col span { display: none; }
    .acc-top { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(10, 8, 6, .6), #050403); margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; padding: 40px 0 26px; }
.footer-grid a { display: block; color: var(--muted); padding: 3px 0; font-size: 14px; }
.footer-grid a:hover { color: var(--gold-2); }
.footer-brand { font-size: 20px; margin-bottom: 10px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 0 26px; border-top: 1px solid rgba(212, 162, 76, .1); font-size: 13px; color: var(--dim); }

.empty { padding: 40px; text-align: center; color: var(--muted); }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 22px; }
.fade-in { animation: fadeIn .5s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 1400px) and (min-width: 1081px) {
    .mainnav a { padding-left: 9px; padding-right: 9px; letter-spacing: .06em; }
    .topbar-inner { gap: 14px; }
    .brand { font-size: 18px; }
}
@media (max-width: 1220px) and (min-width: 1081px) {
    .brand-text { display: none; }
}
@media (max-width: 1080px) {
    .mainnav { position: fixed; top: 68px; left: 0; right: 0; flex-direction: column; background: rgba(8, 6, 4, .98); padding: 12px 16px 18px; border-bottom: 1px solid var(--line); display: none; }
    .menu-open .mainnav { display: flex; }
    .mainnav .nav-mobile { display: block; }
    .burger { display: block; margin-left: auto; }
    .topbar-inner { gap: 12px; }
    .grid-main, .armory, .dl-hero { grid-template-columns: 1fr; }
    .features { grid-template-columns: repeat(2, 1fr); }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-nav { position: static; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 760px) {
    .tiles, .acc-top { grid-template-columns: repeat(2, 1fr); }
    .grid-2, .grid-3, .grid-4, .features, .footer-grid, .form-row { grid-template-columns: 1fr; }
    .topbar-right .btn-ghost { display: none; }
    .brand-text { display: none; }
    .hero { min-height: 480px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .chars { grid-template-columns: 1fr; }
}

/* ---------- captcha ---------- */
.captcha-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.captcha-row img { border-radius: 10px; border: 1px solid var(--line-strong); }
.captcha-row .input { flex: 1; min-width: 140px; text-transform: uppercase; letter-spacing: .2em; font-weight: 700; }

/* ---------- vault grid (8 x 15, like the game) ---------- */
.vault-grid { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(15, 1fr); gap: 2px; aspect-ratio: 8 / 15; max-width: 440px; margin: 0 auto;
    background-color: rgba(0, 0, 0, .45); border: 1px solid var(--line-strong); border-radius: 10px; padding: 4px;
    background-image: linear-gradient(rgba(217, 169, 78, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(217, 169, 78, .08) 1px, transparent 1px);
    background-size: calc((100% - 8px) / 8) calc((100% - 8px) / 15); background-position: 4px 4px; }
.vault-cell { position: relative; display: grid; place-items: center; border-radius: 4px; background: rgba(70, 50, 20, .35); border: 1px solid rgba(217, 169, 78, .25); cursor: help; min-width: 0; min-height: 0; }
.vault-cell:hover { background: rgba(217, 169, 78, .18); border-color: #f2cf7f; }
.vault-cell img { max-width: 92%; max-height: 92%; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .8)); }
.vault-cell.item-exc { background: rgba(40, 110, 60, .3); border-color: rgba(95, 224, 138, .4); }
.vault-cell.item-anc { background: rgba(30, 90, 130, .3); border-color: rgba(67, 198, 255, .45); }
.vault-cell .vlvl { position: absolute; top: 1px; right: 3px; font-size: 10px; font-weight: 700; color: var(--gold-2); text-shadow: 0 1px 2px #000; }

/* ---------- market: auctions, wcoin ---------- */
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg label { flex: 1; min-width: 110px; display: flex; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, .3); cursor: pointer; font-weight: 600; font-size: 14px; }
.seg label:has(input:checked) { border-color: #f2cf7f; background: rgba(217, 169, 78, .14); color: var(--gold-2); }
.seg input { accent-color: #d9a94e; }
.item-card { position: relative; }
.card-tags { position: absolute; top: 10px; left: 10px; display: flex; gap: 5px; z-index: 2; }
.tag-auction { background: rgba(224, 84, 63, .18); color: #ffb2a3; border: 1px solid rgba(224, 84, 63, .45); }
.tag-wcoin { background: rgba(67, 198, 255, .14); color: #9adfff; border: 1px solid rgba(67, 198, 255, .45); }
.item-price.wcoin { color: #9adfff; }
.item-price.big { font: 900 30px var(--font-title); }
.item-card.auction { border-color: rgba(224, 84, 63, .3); }
.listing-detail { display: flex; gap: 24px; padding: 26px; flex-wrap: wrap; }
.listing-pic { width: 180px; height: 180px; flex: none; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 16px; background: radial-gradient(circle, rgba(217, 169, 78, .15), rgba(0, 0, 0, .5)); }
.listing-pic img { max-width: 80%; max-height: 80%; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .8)); }

/* ---------- achievements ---------- */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.ach-card { display: flex; gap: 14px; padding: 16px; align-items: flex-start; }
.ach-card.locked { opacity: .45; filter: grayscale(.7); }
.ach-icon { width: 48px; height: 48px; flex: none; display: grid; place-items: center; font-size: 24px; border-radius: 12px; border: 1px solid var(--line-strong); background: radial-gradient(circle, rgba(217, 169, 78, .25), rgba(0, 0, 0, .4)); }
.tier-2 .ach-icon { border-color: #c0c8d6; box-shadow: 0 0 14px rgba(192, 200, 214, .25); }
.tier-3 .ach-icon { border-color: #f2cf7f; box-shadow: 0 0 18px rgba(242, 207, 127, .4); }
.tier-4 .ach-icon { border-color: #c58cff; box-shadow: 0 0 22px rgba(197, 140, 255, .45); }
.ach-title { font-weight: 700; color: #fff3d4; }
.ach-line { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.ach-mini { font-size: 18px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-ach { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0, 0, 0, .35); font-size: 12.5px; font-weight: 600; }
.badge-ach.first { border-color: #f2cf7f; color: var(--gold-2); box-shadow: 0 0 12px rgba(242, 207, 127, .3); }
.badge-ach.tier-4 { border-color: #c58cff; }
.badge-ach.tier-3 { border-color: rgba(242, 207, 127, .6); }
.online-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--green); letter-spacing: .08em; }
.online-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 12.5px; color: var(--text); background: rgba(0, 0, 0, .3); }
.online-chip:hover { border-color: var(--line-strong); color: var(--gold-2); }
@media (max-width: 760px) { .online-chip { display: none; } }

/* MU Legend: the Discord button in the top bar. */
.btn-discord { background: #5865F2; border-color: #5865F2; color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.btn-discord:hover { color: #fff; filter: brightness(1.12); box-shadow: 0 6px 22px rgba(88, 101, 242, .45); }
