:root {
  --bg: #0b0d12;
  --bg-2: #12151d;
  --panel: rgba(20, 24, 33, 0.92);
  --panel-solid: #161a24;
  --line: #2a3040;
  --text: #e6e2d8;
  --dim: #9aa0ad;
  --gold: #f2c66d;
  --gold-2: #c9922f;
  --blue: #58b8ff;
  --green: #4fd17a;
  --red: #ff6b5e;
  --radius: 10px;
  --heading: 'Cinzel', Georgia, serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font: 15px/1.6 var(--body);
  background:
    radial-gradient(ellipse at top, rgba(88, 184, 255, 0.06), transparent 60%),
    var(--bg);
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: #ffe1a1; }
h1, h2, h3 { font-family: var(--heading); font-weight: 700; letter-spacing: 0.02em; margin: 0 0 0.6em; color: #f5e6c4; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
code { background: #000; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--gold); }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(8, 10, 14, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar .inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand img { height: 42px; display: block; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a {
  color: var(--dim); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 8px 12px; border-radius: 6px;
}
.nav a:hover, .nav a.active { color: var(--gold); background: rgba(242, 198, 109, 0.08); }
.userbox { display: flex; gap: 8px; align-items: center; }
.userbox form { margin: 0; }

.container { width: min(1140px, 100% - 32px); margin: 0 auto; }
main { flex: 1; padding: 32px 0 56px; }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 8px; border: 1px solid var(--gold-2);
  background: linear-gradient(180deg, #f6d38a, #c9922f); color: #1b1203;
  font: 700 0.9rem var(--body); letter-spacing: 0.03em; cursor: pointer; white-space: nowrap;
  box-shadow: 0 2px 10px rgba(242, 198, 109, 0.15);
}
.btn:hover { filter: brightness(1.08); color: #1b1203; }
.btn.ghost { background: transparent; color: var(--gold); box-shadow: none; }
.btn.ghost:hover { background: rgba(242, 198, 109, 0.1); color: var(--gold); }
.btn.small { padding: 6px 12px; font-size: 0.8rem; }
.btn:disabled, .btn.disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.6); }
.btn.danger { background: transparent; border-color: var(--red); color: var(--red); box-shadow: none; }

label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--dim); text-transform: uppercase; letter-spacing: 0.05em; margin: 14px 0 6px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: #0c0f15; color: var(--text); font: 15px var(--body);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold-2); box-shadow: 0 0 0 3px rgba(242, 198, 109, 0.15); }
textarea { min-height: 140px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.form-actions { margin-top: 20px; display: flex; gap: 12px; align-items: center; }
.hint { color: var(--dim); font-size: 0.85rem; }

/* ---------- panels ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.panel + .panel { margin-top: 20px; }
.narrow { max-width: 460px; margin: 0 auto; }
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: 2fr 1fr; }
.grid.halves { grid-template-columns: 1fr 1fr; }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
@media (max-width: 860px) { .grid.two, .grid.halves { grid-template-columns: 1fr; } .nav { display: none; } }

/* ---------- flash ---------- */
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; border: 1px solid; }
.flash.success { background: rgba(79, 209, 122, 0.1); border-color: rgba(79, 209, 122, 0.4); color: #a7f0bf; }
.flash.error { background: rgba(255, 107, 94, 0.1); border-color: rgba(255, 107, 94, 0.4); color: #ffbdb6; }
.flash.info { background: rgba(88, 184, 255, 0.08); border-color: rgba(88, 184, 255, 0.35); color: #b9e0ff; }

/* ---------- hero ---------- */
.hero {
  position: relative; margin-top: -32px; padding: 90px 0 120px; text-align: center;
  background: url('/img/hero.jpg') center 30% / cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11, 13, 18, 0.35), rgba(11, 13, 18, 0.55) 60%, var(--bg));
}
.hero > * { position: relative; }
.hero .logo { width: min(560px, 90%); filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.7)); }
.hero .lead { font-size: 1.15rem; max-width: 620px; margin: 10px auto 28px; color: #efe9dc; text-shadow: 0 2px 8px #000; }
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.status-bar { margin-top: -56px; position: relative; z-index: 2; }
.status-bar .panel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 0; }
.stat { padding: 18px 22px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat .k { color: var(--dim); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.stat .v { font-family: var(--heading); font-size: 1.4rem; color: #f5e6c4; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.dot.on { background: var(--green); box-shadow: 0 0 10px var(--green); }
.dot.off { background: var(--red); }
@media (max-width: 700px) { .status-bar .panel { grid-template-columns: 1fr 1fr; } .stat:nth-child(3) { border-left: 0; } }

.features { margin-top: 36px; }
.feature { padding: 22px; }
.feature .ico { font-size: 1.6rem; margin-bottom: 6px; }
.feature p { color: var(--dim); margin: 0; }

.news-item { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.news-item:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.news-item .meta { color: var(--dim); font-size: 0.8rem; margin-bottom: 8px; }
.news-item .body { white-space: pre-line; }

/* ---------- account ---------- */
.balance { display: flex; gap: 12px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: #0c0f15; border: 1px solid var(--line); font-weight: 700;
}
.pill.vp { color: var(--blue); }
.pill.dp { color: var(--gold); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--dim); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.badge.ok { background: rgba(79, 209, 122, 0.15); color: var(--green); }
.badge.bad { background: rgba(255, 107, 94, 0.15); color: var(--red); }
.badge.alliance { background: rgba(88, 140, 255, 0.15); color: #8fb2ff; }
.badge.horde { background: rgba(255, 90, 70, 0.15); color: #ff9a8c; }
.empty { color: var(--dim); font-style: italic; }

/* ---------- store ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tabs a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--dim); font-weight: 600; }
.tabs a.active, .tabs a:hover { border-color: var(--gold-2); color: var(--gold); background: rgba(242, 198, 109, 0.08); }
.item { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.item .head { display: flex; gap: 12px; align-items: center; }
.item .icon { width: 44px; height: 44px; border-radius: 8px; border: 2px solid #333; flex-shrink: 0; background: #000; }
.item .name { font-weight: 700; line-height: 1.25; }
.item .desc { color: var(--dim); font-size: 0.88rem; flex: 1; }
.item .prices { display: flex; gap: 8px; flex-wrap: wrap; }
.item form { display: flex; flex-direction: column; gap: 8px; }
.item form .row { display: flex; gap: 8px; }
.item form select { padding: 8px; }

/* ---------- vote ---------- */
.vote-site { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.vote-site .name { font-family: var(--heading); font-size: 1.1rem; }

/* ---------- donate ---------- */
.package { text-align: center; padding: 26px 20px; }
.package .price { font-family: var(--heading); font-size: 2rem; color: var(--gold); margin: 6px 0; }
.package .dp { font-weight: 700; color: #f5e6c4; }
.package .bonus { color: var(--green); font-size: 0.85rem; min-height: 1.4em; }

/* ---------- connect ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 22px 52px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font: 700 1rem var(--heading); color: #1b1203;
  background: linear-gradient(180deg, #f6d38a, #c9922f);
}
.steps li h3 { margin-bottom: 4px; }
pre { background: #000; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; color: var(--gold); overflow-x: auto; }

/* ---------- admin ---------- */
.admin-table input, .admin-table select { padding: 6px 8px; font-size: 0.85rem; }
.admin-table td { vertical-align: middle; }
.inline { display: inline; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--dim); font-size: 0.85rem; background: #08090d; }
footer .inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- utilities ---------- */
.mt { margin-top: 20px; }
.mt-sm { margin-top: 12px; }
.center { text-align: center; }
.feat-icon { width: 40px; height: 40px; border-radius: 8px; border: 2px solid #333; margin-bottom: 8px; }
.store-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.quality-0 { color: #9d9d9d; } .quality-1 { color: #ffffff; } .quality-2 { color: #1eff00; } .quality-3 { color: #0070dd; }
.quality-4 { color: #a335ee; } .quality-5 { color: #ff8000; } .quality-6, .quality-7 { color: #e6cc80; }
.class-1 { color: #C79C6E; } .class-2 { color: #F58CBA; } .class-3 { color: #ABD473; } .class-4 { color: #FFF569; }
.class-5 { color: #FFFFFF; } .class-6 { color: #C41F3B; } .class-7 { color: #0070DE; } .class-8 { color: #69CCF0; }
.class-9 { color: #9482C9; } .class-11 { color: #FF7D0A; }
.icon-sm { width: 22px; height: 22px; border-radius: 4px; vertical-align: middle; margin-right: 6px; }
.price-form { display: flex; gap: 6px; align-items: center; }
.price-form input { width: 80px; }
.site-form { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.site-form .wide { grid-column: span 2; }
label.check { display: flex; align-items: center; gap: 8px; margin: 0; text-transform: none; font-size: 0.9rem; color: var(--text); }
label.check input { width: auto; }
.add-item .grid.cards { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 16px; }
/* panels laid out in a grid line up; stacked spacing only applies outside grids */
.grid > .panel + .panel { margin-top: 0; }
/* VIP tiers */
.vip-1 { color: #cd7f32; } .vip-2 { color: #d9d9d9; } .vip-3 { color: #ffd700; }
.pill.vip-1 { border-color: #cd7f32; } .pill.vip-2 { border-color: #c0c0c0; } .pill.vip-3 { border-color: #ffd700; }
.vip-line { margin: 4px 0 12px; }
