/* ShadowOT Reborn – dark, bold, ember accents */
:root {
  --bg: #08090c;
  --bg2: #0f1117;
  --panel: #141720;
  --panel2: #1a1e2a;
  --line: #262b39;
  --text: #e7e9ef;
  --muted: #8d93a5;
  --ember: #ff7a1a;
  --gold: #f2b84b;
  --blood: #d23b3b;
  --green: #3ccf7a;
  --radius: 14px;
  --sorc: #8f7bff;
  --druid: #3ccf7a;
  --pally: #f2b84b;
  --knight: #ff6b5a;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.6 Inter, system-ui, sans-serif;
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(255,122,26,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(210,59,59,.08), transparent 60%);
  background-attachment: fixed;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: #ffd27f; }
h1, h2, h3 { font-family: Cinzel, Georgia, serif; letter-spacing: .02em; line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(26px, 4vw, 38px); }
h2 { font-size: clamp(20px, 3vw, 26px); }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(8,9,12,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo, .foot-logo { font: 800 22px Cinzel, serif; color: var(--text); white-space: nowrap; }
.logo span, .foot-logo span { background: linear-gradient(90deg, var(--ember), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; align-items: center; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav > a, .nav-account > a:not(.btn) { color: var(--muted); padding: 6px 10px; border-radius: 8px; font-weight: 500; font-size: 14px; }
.nav > a:hover, .nav > a.on { color: var(--text); background: var(--panel); }
.nav-account { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.burger { display: none; margin-left: auto; cursor: pointer; padding: 8px; }
.burger i { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; }
.status-bar { border-bottom: 1px solid var(--line); background: var(--bg2); font-size: 13px; color: var(--muted); padding: 6px 0; }
.status-bar a { color: var(--text); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); margin-right: 4px; }

/* buttons and forms */
.btn { display: inline-block; border: 0; cursor: pointer; font: 700 15px Inter, sans-serif; color: #1a0c00;
  background: linear-gradient(135deg, var(--ember), var(--gold)); padding: 12px 22px; border-radius: 10px;
  box-shadow: 0 6px 24px rgba(255,122,26,.25); transition: transform .15s, box-shadow .15s; }
.btn:hover { color: #1a0c00; transform: translateY(-1px); box-shadow: 0 10px 30px rgba(255,122,26,.35); }
.btn-small { padding: 7px 14px; font-size: 13px; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn-ghost:hover { color: var(--text); border-color: var(--gold); box-shadow: none; }
.btn-danger { background: var(--blood); color: #fff; box-shadow: none; }
.btn-danger:hover { color: #fff; }
form.form { display: grid; gap: 14px; max-width: 460px; }
label { display: grid; gap: 6px; font-weight: 500; font-size: 14px; }
input, select, textarea { width: 100%; font: 15px Inter, sans-serif; color: var(--text); background: var(--bg2);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px rgba(255,122,26,.15); }
textarea { min-height: 160px; resize: vertical; }
.hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.hp { position: absolute; left: -9999px; }
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice label { display: block; cursor: pointer; }
.choice input { display: none; }
.choice span { display: block; padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); }
.choice input:checked + span { border-color: var(--ember); background: rgba(255,122,26,.12); color: var(--text); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form input { flex: 1; min-width: 180px; }

/* dropdowns: open on hover or keyboard focus (desktop), always open in the mobile menu */
.drop { position: relative; }
.drop-btn { font: 500 14px Inter, sans-serif; color: var(--muted); background: none; border: 0; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.drop:hover .drop-btn, .drop:focus-within .drop-btn, .drop.on .drop-btn { color: var(--text); background: var(--panel); }
.caret { font-size: 10px; opacity: .7; }
.drop-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 190px; padding: 8px; margin-top: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.5); }
.drop::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; }
.drop:hover .drop-menu, .drop:focus-within .drop-menu { display: grid; }
.drop-menu a { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.drop-menu a:hover, .drop-menu a.on { color: var(--text); background: var(--panel2); }

/* layout pieces */
.main { padding-top: 28px; padding-bottom: 60px; min-height: 60vh; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 22px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-side { grid-template-columns: 2fr 1fr; align-items: start; }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; border: 1px solid; }
.flash-ok { background: rgba(60,207,122,.1); border-color: rgba(60,207,122,.4); }
.flash-error { background: rgba(210,59,59,.12); border-color: rgba(210,59,59,.5); }
.errors { margin: 0 0 14px; padding: 12px 16px 12px 32px; background: rgba(210,59,59,.12); border: 1px solid rgba(210,59,59,.5); border-radius: 10px; }

/* hero */
.hero { position: relative; overflow: hidden; border-radius: 20px; padding: clamp(36px, 7vw, 80px) clamp(20px, 5vw, 56px);
  margin-bottom: 28px; border: 1px solid var(--line);
  background:
    radial-gradient(600px 300px at 85% 30%, rgba(255,122,26,.28), transparent 70%),
    radial-gradient(500px 300px at 10% 100%, rgba(210,59,59,.22), transparent 70%),
    linear-gradient(160deg, #161924, #0b0c11); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.015) 0 2px, transparent 2px 12px); }
.eyebrow { text-transform: uppercase; letter-spacing: .25em; font-size: 12px; color: var(--ember); font-weight: 700; margin-bottom: 14px; }
.hero h1 { font-size: clamp(36px, 7vw, 72px); font-weight: 800; margin-bottom: .2em; text-shadow: 0 4px 30px rgba(0,0,0,.5); }
.hero h1 span { background: linear-gradient(90deg, var(--ember), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .tagline { font: 600 clamp(18px, 3vw, 26px) Cinzel, serif; color: var(--gold); margin-bottom: 18px; }
.hero p.lead { max-width: 600px; font-size: 17px; color: #c9ccd6; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; position: relative; z-index: 1; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat b { display: block; font: 800 28px Cinzel, serif; color: var(--text); }
.stat span { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }

/* feature cards */
.feature { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: border-color .2s, transform .2s; }
.feature:hover { border-color: rgba(255,122,26,.5); transform: translateY(-2px); }
.feature .icon { width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 14px;
  border: 1px solid var(--line); background: radial-gradient(circle at 50% 40%, rgba(255,122,26,.2), rgba(0,0,0,.25) 70%); }
.feature .icon img { width: 48px; height: 48px; object-fit: contain; }
.feature h3 { color: var(--text); }
.feature p { color: var(--muted); margin: 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 34px 0 16px; }
.section-title h2 { margin: 0; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255,255,255,.02); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.rank { color: var(--muted); width: 40px; }
tr.top1 .rank { color: var(--gold); font-weight: 800; }
tr.top2 .rank { color: #cfd5e2; font-weight: 800; }
tr.top3 .rank { color: #d28b55; font-weight: 800; }
a.char { color: var(--text); font-weight: 600; }
a.char:hover { color: var(--gold); }
.voc { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.voc-sorc { color: var(--sorc); } .voc-druid { color: var(--druid); } .voc-pally { color: var(--pally); } .voc-knight { color: var(--knight); } .voc-none { color: var(--muted); }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); }
.tag-online { color: var(--green); border-color: rgba(60,207,122,.4); }
.tag-free { color: var(--green); border-color: rgba(60,207,122,.4); }
.tag-owned { color: var(--ember); border-color: rgba(255,122,26,.5); }
.tag-protected { color: var(--gold); border-color: rgba(242,184,75,.5); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 500; }

/* tabs and pager */
.tabs, .pager { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tabs a, .pager a { padding: 7px 13px; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 500; }
.tabs a.on, .pager a.on, .tabs a:hover, .pager a:hover { color: var(--text); border-color: var(--ember); }
.pager { margin: 16px 0 0; }

/* territories */
.territories { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.territory { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; overflow: hidden; }
.territory.owned { border-color: rgba(255,122,26,.45); background: linear-gradient(160deg, rgba(255,122,26,.10), var(--panel) 60%); }
.territory .lvl { position: absolute; top: 14px; right: 14px; font: 800 13px Inter; color: var(--muted); }
.territory h3 { margin: 0 0 10px; padding-right: 60px; }
.territory .owner { font-size: 15px; font-weight: 600; }
.territory .since { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* news */
.news-item { border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 20px; }
.news-item:last-child { border: 0; margin: 0; padding: 0; }
.news-item .date { color: var(--ember); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.news-item .body { color: #c9ccd6; white-space: pre-line; }

/* steps on the download page */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; position: relative; padding-left: 46px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; color: #1a0c00; background: linear-gradient(135deg, var(--ember), var(--gold)); }
code { background: var(--bg2); border: 1px solid var(--line); padding: 1px 7px; border-radius: 6px; font-size: 14px; color: var(--gold); }

.foot { border-top: 1px solid var(--line); background: var(--bg2); padding: 34px 0; color: var(--muted); font-size: 14px; }
.foot-logo { margin-bottom: 8px; }
.foot p { margin: 0 0 6px; }

@media (max-width: 860px) {
  .burger { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--bg2); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; }
  #menu:checked ~ .nav { display: flex; }
  .drop-btn { pointer-events: none; padding: 8px 10px 2px; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; background: none !important; }
  .caret { display: none; }
  .drop-menu { display: grid; position: static; box-shadow: none; border: 0; padding: 0; background: none; min-width: 0; }
  .drop-menu a { padding: 6px 10px; }
  .drop + .drop, .nav > a + .drop, .drop + a { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
  .nav-account { margin: 8px 0 0; }
  .grid-2, .grid-3, .grid-side { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .panel { padding: 18px; }
  td, th { padding: 9px 8px; }
  .hide-sm { display: none; }
}

/* token shop */
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.item-card { display: flex; gap: 16px; background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; transition: border-color .2s, transform .2s; }
.item-card:hover { border-color: rgba(255,122,26,.5); transform: translateY(-2px); }
.item-pic { flex: 0 0 76px; height: 76px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 40%, rgba(255,122,26,.18), rgba(0,0,0,.2) 70%); }
.item-pic img { width: 64px; height: 64px; }
.item-body { min-width: 0; }
.item-body h3 { margin: 0 0 4px; color: var(--text); }
.price { color: var(--gold); font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.item-stats { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.item-stats li { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); }
.item-desc { font-size: 13px; color: var(--muted); margin: 0; }

/* art from our own map and sprites (tools/website_art.py) */
/* --art is set on the page as url(art/...): a url in a custom property resolves against this stylesheet */
.hero-art { background:
    linear-gradient(90deg, rgba(8,9,12,.94) 0%, rgba(8,9,12,.78) 45%, rgba(8,9,12,.35) 100%),
    linear-gradient(0deg, rgba(8,9,12,.9) 0%, transparent 40%),
    var(--art) center / cover no-repeat; }
.hero > *:not(.hero-monster) { position: relative; z-index: 1; }
.hero-monster { position: absolute; right: clamp(-20px, 2vw, 40px); bottom: 0; height: min(78%, 380px); width: auto; z-index: 1;
  filter: drop-shadow(0 10px 40px rgba(255,90,20,.45)); pointer-events: none; }
.hero-monster-small { height: min(70%, 220px); }
.vocations { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.voc-card { position: relative; text-align: center; padding: 22px 16px 20px; border-radius: var(--radius); border: 1px solid var(--line);
  background: radial-gradient(180px 140px at 50% 25%, var(--glow), transparent 70%), linear-gradient(180deg, var(--panel2), var(--panel)); transition: transform .2s, border-color .2s; }
.voc-card:hover { transform: translateY(-3px); border-color: var(--glow); }
.voc-card img { height: 128px; width: auto; filter: drop-shadow(0 8px 18px rgba(0,0,0,.6)); }
.voc-card h3 { margin: 12px 0 4px; }
.voc-card p { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.voc-path { font-size: 13px; font-weight: 600; color: var(--gold); }
.voc-path span { color: var(--muted); }
.voc-card-sorcerer { --glow: rgba(143,123,255,.35); } .voc-card-druid { --glow: rgba(60,207,122,.3); }
.voc-card-paladin { --glow: rgba(242,184,75,.3); } .voc-card-knight { --glow: rgba(255,107,90,.32); }
.beasts { display: grid; grid-template-columns: 1fr 1.6fr; gap: 20px; align-items: center; margin-top: 34px; padding: 28px;
  border-radius: 20px; border: 1px solid var(--line); overflow: hidden;
  background: radial-gradient(500px 260px at 75% 70%, rgba(210,59,59,.25), transparent 70%), linear-gradient(160deg, #161924, #0b0c11); }
.beasts-row { display: flex; align-items: flex-end; justify-content: flex-end; gap: 4px; }
.beasts-row img { height: 150px; width: auto; margin-left: -28px; filter: drop-shadow(0 10px 20px rgba(0,0,0,.7)); }
.beasts-row img:nth-child(odd) { height: 128px; }
.territory { padding-top: 0; }
.territory-pic { height: 120px; margin: 0 -18px 14px; background-size: cover; background-position: center;
  border-bottom: 1px solid var(--line); position: relative; }
.territory-pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--panel) 0%, transparent 60%); }
.territory.owned .territory-pic::after { background: linear-gradient(0deg, rgba(30,22,18,1) 0%, transparent 60%); }
.territory .lvl { top: 10px; right: 10px; z-index: 1; background: rgba(8,9,12,.75); padding: 2px 8px; border-radius: 999px; color: var(--text); }
@media (max-width: 860px) {
  .vocations { grid-template-columns: repeat(2, 1fr); }
  .beasts { grid-template-columns: 1fr; }
  .beasts-row { justify-content: center; }
  .beasts-row img { height: 96px; margin-left: -18px; }
  .beasts-row img:nth-child(odd) { height: 82px; }
  .hero-monster { display: none; }
}

/* accessibility and touch (ui-ux-pro-max checklist) */
a, button, summary, label[for], .choice label { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
.nav > a, .drop-btn, .nav-account > a, .tabs a, .pager a { min-height: 40px; display: inline-flex; align-items: center; }
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.btn-small { min-height: 36px; }
.muted, .hint, th { color: #9aa0b2; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .feature:hover, .item-card:hover, .voc-card:hover, .btn:hover { transform: none; }
}
@media (max-width: 860px) {
  .drop-menu a, .nav > a, .nav-account > a { min-height: 44px; display: flex; align-items: center; }
}
