/* Beyond — website theme. Dark warm fantasy to match the in-game look: engraved Kreon headings,
   gold-on-brown accents, ember glow. */
@import url('https://fonts.googleapis.com/css2?family=Kreon:wght@400;500;600;700&display=swap');

:root {
  --bg: #120d0a;
  --bg2: #1b130d;
  --panel: #221913;
  --panel2: #2b2017;
  --line: rgba(232, 185, 106, 0.16);
  --gold: #e8b96a;
  --gold-dim: #b98a44;
  --cream: #efe3cf;
  --muted: #b6a489;
  --ember: #d8662a;
  --ok: #7ec97e;
  --bad: #e08a6a;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Kreon', Georgia, serif;
  color: var(--cream);
  background: radial-gradient(1200px 700px at 50% -10%, #2a1c12 0%, var(--bg) 60%) fixed, var(--bg);
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: #ffd592; }
h1, h2, h3 { font-weight: 700; letter-spacing: 0.02em; color: var(--cream); margin: 0 0 .4em; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---- top nav ---- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 22px;
  padding: 14px 30px;
  background: rgba(18, 13, 10, 0.82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav .brand { font-size: 22px; font-weight: 700; color: var(--gold); letter-spacing: .18em; }
.nav a.link { color: var(--cream); opacity: .82; font-size: 16px; }
.nav a.link:hover { opacity: 1; color: var(--gold); }
.nav .spacer { flex: 1; }

/* ---- buttons (game-style warm plaque) ---- */
.btn {
  display: inline-block; cursor: pointer;
  font-family: inherit; font-size: 17px; font-weight: 600; letter-spacing: .03em;
  color: #2a1c0e;
  padding: 11px 22px; border: 0; border-radius: 10px;
  background: linear-gradient(180deg, #f0c87f 0%, #d6a651 55%, #b98a44 100%);
  box-shadow: 0 4px 0 #6e4f24, 0 10px 22px rgba(0,0,0,.4);
  transition: transform .08s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #6e4f24, 0 6px 14px rgba(0,0,0,.4); }
.btn.ghost {
  color: var(--gold); background: transparent;
  border: 1px solid var(--gold-dim); box-shadow: none;
}
.btn.ghost:hover { background: rgba(232,185,106,.08); }
.btn.wide { width: 100%; }

/* ---- hero ---- */
.hero {
  position: relative; overflow: hidden;
  min-height: 78vh; display: flex; align-items: center; justify-content: center;
  text-align: center;
}
.hero .art {
  position: absolute; inset: 0;
  background-image: linear-gradient(180deg, rgba(18,13,10,.25) 0%, rgba(18,13,10,.55) 55%, var(--bg) 100%), var(--hero-img, none);
  background-size: cover; background-position: center;
}
.hero .art.fallback {
  background-image: linear-gradient(180deg, rgba(18,13,10,.2), var(--bg) 100%),
    radial-gradient(800px 500px at 50% 30%, rgba(216,102,42,.35), transparent 70%),
    radial-gradient(600px 600px at 70% 80%, rgba(120,60,160,.25), transparent 70%);
}
.hero .inner { position: relative; z-index: 2; padding: 40px 24px; max-width: 820px; }
.hero h1 {
  font-size: clamp(54px, 11vw, 116px); letter-spacing: .14em; margin: 0;
  color: var(--gold);
  text-shadow: 0 2px 0 #5a3c18, 0 0 40px rgba(216,102,42,.45);
}
.hero .tag { font-size: clamp(18px, 2.6vw, 26px); color: var(--cream); opacity: .92; margin: 10px 0 26px; }
.hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---- sections ---- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.section { padding: 70px 0; }
.section h2 { font-size: clamp(28px, 4vw, 40px); text-align: center; color: var(--gold); }
.section .lead { text-align: center; max-width: 680px; margin: 0 auto 38px; color: var(--muted); font-size: 18px; }

.grid { display: grid; gap: 18px; }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px) { .grid.c3, .grid.c2 { grid-template-columns: 1fr; } }

.card {
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card h3 { color: var(--gold); font-size: 22px; }
.card p { color: var(--muted); margin: 0; }
.card .pill { display:inline-block; font-size:13px; color:var(--ember); border:1px solid rgba(216,102,42,.4); border-radius:999px; padding:2px 10px; margin-bottom:10px; }

/* ---- forms / panels ---- */
.panel {
  max-width: 460px; margin: 60px auto; padding: 30px;
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.panel h2 { color: var(--gold); text-align: center; }
label { display: block; font-size: 14px; color: var(--muted); margin: 14px 0 6px; }
input {
  width: 100%; font-family: inherit; font-size: 16px; color: var(--cream);
  background: #160f0a; border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px;
}
input:focus { outline: none; border-color: var(--gold-dim); }
.msg { margin: 14px 0 0; padding: 10px 12px; border-radius: 9px; font-size: 15px; display: none; }
.msg.show { display: block; }
.msg.err { background: rgba(224,138,106,.12); color: var(--bad); border: 1px solid rgba(224,138,106,.35); }
.msg.ok { background: rgba(126,201,126,.1); color: var(--ok); border: 1px solid rgba(126,201,126,.3); }
.switch { text-align: center; margin-top: 16px; color: var(--muted); font-size: 15px; }

.code-badge {
  display: inline-block; font-size: 28px; font-weight: 700; letter-spacing: .08em;
  color: var(--gold); background: #160f0a; border: 1px solid var(--gold-dim);
  border-radius: 10px; padding: 8px 18px; margin: 6px 0;
}

/* ---- tables (rankings / guilds) ---- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
th { color: var(--gold-dim); font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
td { color: var(--cream); }
tr:hover td { background: rgba(232,185,106,.04); }
.rank-num { color: var(--gold); font-weight: 700; }
.tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 22px; flex-wrap: wrap; }
.tab { cursor: pointer; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tab.active { color: #2a1c0e; background: var(--gold); border-color: var(--gold); }

footer { padding: 40px 0; text-align: center; color: var(--muted); border-top: 1px solid var(--line); margin-top: 40px; }
.hidden { display: none !important; }
