/* Vanity Rust: black and gold, same palette as VMenu and the Discord bots */
@font-face {
  font-family: 'Sulfurous';
  src: url('../fonts/Sulfurous-Regular.otf') format('opentype');
  font-display: swap;
}

:root {
  --bg: #0b0904;
  --panel: #14110a;
  --panel-2: #1b170d;
  --line: #3a3112;
  --gold: #ffd21a;
  --gold-light: #ffe46b;
  --gold-soft: rgba(255, 210, 26, 0.12);
  --text: #f5f0e0;
  --dim: #a89f80;
  --red: #fa7373;
  --green: #7bd88f;
  --radius: 10px;
  --heading: 'Sulfurous', 'Arial Black', Impact, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; padding-bottom: 48px; }
a { color: var(--gold-light); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
code, .mono { font-family: ui-monospace, Consolas, monospace; font-size: 0.9em; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 1.15rem; color: var(--gold); letter-spacing: 0.02em; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(720px, 100% - 32px); }
.muted { color: var(--dim); }
.small { font-size: 0.85rem; }
.bad { color: var(--red); }

/* Top bar */
.topbar { background: rgba(11, 9, 4, 0.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px); }
.topbar-inner { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--heading); font-size: 1.3rem; letter-spacing: 0.04em; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--dim); padding: 8px 12px; border-radius: 6px; font-weight: 600; }
.nav a:hover, .nav a.active { color: var(--gold); background: var(--gold-soft); text-decoration: none; }
.account { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.account img { border-radius: 50%; }
.account form { margin: 0; }

/* Buttons and forms */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--gold); color: #120e02; border: 0; border-radius: 8px;
  padding: 11px 20px; font: 700 0.95rem system-ui, sans-serif; cursor: pointer; text-decoration: none;
}
.button:hover { background: var(--gold-light); text-decoration: none; }
.button.ghost { background: transparent; color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.button.ghost:hover { background: var(--gold-soft); }
.button.small { padding: 7px 14px; font-size: 0.85rem; }
.button.danger { background: var(--red); color: #1a0505; }
.button:disabled { opacity: 0.4; cursor: not-allowed; }
.link-button { background: none; border: 0; color: var(--gold-light); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }
.link-button.danger { color: var(--red); }
input[type=text], input[type=search], input[type=number], select, textarea {
  background: #0d0b05; color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 12px; font: inherit; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
textarea { width: 100%; resize: vertical; }
.inline, form.inline { display: inline; margin: 0; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; }
.inline-form.wide input[type=text] { flex: 1 1 260px; }
.stack { display: grid; gap: 10px; }
.stack .button { justify-self: start; }

.notice { background: var(--gold-soft); border: 1px solid var(--gold); border-radius: var(--radius); padding: 12px 16px; margin: 20px 0 0; }

/* Cards and grids */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 20px; }
.card.alert { border-color: var(--red); }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.grid-2 > .card, .grid-3 > .card { margin-top: 0; }
.cards { margin-top: 24px; }
.page-title { font-family: var(--heading); font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--text); margin: 32px 0 8px; letter-spacing: 0.03em; }
.section-title { font-family: var(--heading); font-size: 1.6rem; margin: 40px 0 0; }
.more { display: inline-block; margin-top: 12px; font-weight: 600; }

/* Hero */
.hero {
  background: linear-gradient(180deg, rgba(11, 9, 4, 0.35), var(--bg) 92%), url('../img/hero.jpg') center 30% / cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.hero-inner { min-height: 440px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 0; }
.hero-logo { filter: drop-shadow(0 6px 24px rgba(255, 210, 26, 0.35)); }
.hero h1 { font-family: var(--heading); font-size: clamp(2.6rem, 8vw, 5rem); margin: 8px 0 0; letter-spacing: 0.05em; text-shadow: 0 4px 24px rgba(0, 0, 0, 0.8); }
.tagline { color: var(--gold-light); font-weight: 600; margin: 8px 0 24px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* Status */
.status .big { font-family: var(--heading); font-size: 3rem; margin: 4px 0 0; color: var(--gold); }
.status .big span { font-size: 1.4rem; color: var(--dim); }
.status.offline .big { color: var(--red); }
.meter { appearance: none; width: 100%; height: 8px; border: 0; border-radius: 4px; background: #241e0c; margin: 12px 0; }
.meter::-webkit-progress-bar { background: #241e0c; border-radius: 4px; }
.meter::-webkit-progress-value { background: var(--gold); border-radius: 4px; }
.meter::-moz-progress-bar { background: var(--gold); border-radius: 4px; }
.connect code { display: block; background: #0d0b05; border: 1px dashed var(--line); padding: 8px 10px; border-radius: 6px; overflow-wrap: anywhere; }
.mini-board { margin: 0; padding-left: 22px; }
.mini-board li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid #221c0b; }
.mini-board b { color: var(--gold); }
.news + .news { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.news h3 { font-size: 1rem; margin: 0; }
.news p { margin: 4px 0; }

/* Tabs, toolbar, tables */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.toolbar .tabs { margin-top: 0; }
.tabs a { padding: 8px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--dim); font-weight: 600; font-size: 0.9rem; }
.tabs a.active, .tabs a:hover { color: #120e02; background: var(--gold); border-color: var(--gold); text-decoration: none; }
.search { display: flex; gap: 8px; margin-top: 16px; }
.search input { width: min(320px, 100%); }
.big-search input { flex: 1; font-size: 1.05rem; padding: 12px 14px; }
.table-wrap { overflow-x: auto; margin-top: 16px; }
.board { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.board th { text-align: left; color: var(--dim); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.board td { padding: 10px 12px; border-bottom: 1px solid #221c0b; white-space: nowrap; }
.board td.player { white-space: normal; font-weight: 600; }
.board tbody tr:hover { background: var(--gold-soft); }
.board tr.podium td:first-child { color: var(--gold); font-weight: 800; }
.perms td:not(:first-child), .perms th:not(:first-child) { text-align: center; color: var(--gold); }

/* Store */
.products { margin-top: 20px; }
.product { position: relative; display: flex; flex-direction: column; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; color: var(--text); transition: border-color 0.15s, transform 0.15s; }
.product:hover { border-color: var(--gold); transform: translateY(-2px); text-decoration: none; }
.product img { aspect-ratio: 16 / 10; object-fit: cover; border-radius: 6px; background: #0d0b05; }
.product-name { font-weight: 700; font-size: 1.05rem; }
.price { color: var(--gold); font-weight: 800; }
.price s { color: var(--dim); font-weight: 400; }
.price.big { font-size: 1.6rem; margin: 8px 0 16px; }
.badge { display: inline-block; background: var(--gold-soft); color: var(--gold); border: 1px solid var(--line); border-radius: 999px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 10px; }
.badge.good { color: var(--green); border-color: var(--green); background: rgba(123, 216, 143, 0.1); }
.product .badge { position: absolute; top: 24px; left: 24px; background: var(--gold); color: #120e02; }
.product-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; align-items: start; }
.product-detail img { border-radius: 8px; width: 100%; }
.product-detail h1 { font-family: var(--heading); font-size: 2.2rem; margin: 8px 0 0; }
.description { color: var(--text); }
.description p { margin: 0 0 10px; }
.buy { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 10px; }
.back { display: inline-block; margin-top: 24px; }

/* Link page */
.steps .step { display: flex; gap: 16px; padding: 16px 0; }
.steps .step + .step { border-top: 1px solid var(--line); }
.step-num { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); font-weight: 800; color: var(--dim); }
.step.done .step-num { background: var(--gold); border-color: var(--gold); color: #120e02; }
.step h2 { margin-bottom: 6px; }
.step p { margin: 0 0 8px; }

/* Staff panel */
.admin { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.admin-nav { position: sticky; top: 84px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-top: 32px; }
.admin-nav nav { display: grid; gap: 2px; }
.admin-nav a { color: var(--dim); padding: 8px 10px; border-radius: 6px; font-weight: 600; }
.admin-nav a.active, .admin-nav a:hover { color: var(--gold); background: var(--gold-soft); text-decoration: none; }
.admin-who { margin: 0 0 12px; font-weight: 700; display: flex; flex-direction: column; gap: 4px; }
.role { align-self: start; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); }
.role-owner { background: var(--gold); color: #120e02; }
.tiles { margin-top: 20px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; }
.tile span { color: var(--dim); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.tile b { font-size: 1.35rem; color: var(--gold-light); }
.tile.warn { border-left-color: #f59e0b; }
.tile.bad { border-left-color: var(--red); }
.tile.bad b { color: var(--red); }
.profile-head { display: flex; gap: 20px; align-items: center; }
.profile-head img { border-radius: 8px; }
.profile-head p { margin: 4px 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--dim); }
.facts dd { margin: 0; }
.actions { display: grid; gap: 12px; }
.note { border-top: 1px solid var(--line); padding: 10px 0; }
.note p { margin: 0 0 4px; }
.note-form { display: grid; gap: 8px; margin-bottom: 8px; }
.note-form .button { justify-self: start; }
.meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid #221c0b; }
.audit { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.audit time { color: var(--dim); font-size: 0.85rem; margin-right: 6px; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.console-entry { margin-top: 12px; }
.console-entry p { margin: 0 0 4px; }
.console-entry pre { background: #0d0b05; border: 1px solid var(--line); border-radius: 6px; padding: 10px; overflow: auto; max-height: 320px; white-space: pre-wrap; margin: 0; }
.pager { display: flex; justify-content: space-between; margin: 16px 0 0; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 20px 0; color: var(--dim); font-size: 0.85rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .admin { grid-template-columns: 1fr; }
  .admin-nav { position: static; margin-top: 16px; }
  .admin-nav nav { grid-auto-flow: column; overflow-x: auto; }
  .product-detail { grid-template-columns: 1fr; }
  .account span { display: none; }
  .hero-inner { min-height: 360px; }
}
