/* Cinderrealm — realm-site style. Structure inspired by classic MMO fansites; all visuals original.
   Visual language unified with the game login page: ember-and-gold on near-black, Cinzel display type. */
:root {
  --gold: #c9a227;
  --gold-hi: #e8c547;
  --gold-bright: #f0c352;
  --gold-dim: #6e5a1e;
  --ember: #ff7a1a;
  --ember-red: #d3381a;
  --ember-orange: #f86a21;
  --parch: #e8dbce;
  --parch-dim: #8c7a6b;
  --ink: #14100a;
  --bg: #070504;
  --panel: #100c0a;
  --panel2: #161110;
  --line: #3d2c1d;
  --ice: #7fd4e8;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--parch);
  font-family: Verdana, Geneva, sans-serif;
  font-size: 14px;
  background-image: radial-gradient(ellipse at 50% 0%, rgba(255,122,26,0.05), transparent 55%);
}
/* Ember particle canvas + vignette sit behind everything (see js/embers.js) */
#ember-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
body::after {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(circle at center, transparent 55%, rgba(3,2,2,0.55) 100%);
}
.wrap, .topstrip, .masthead, footer { position: relative; z-index: 1; }
/* The profile dropdown must overlay the masthead below it, not slide under it.
   .topstrip and .masthead share z-index 1 and the masthead comes later in the DOM,
   so without this the open menu paints behind the masthead's gold border. */
.topstrip { z-index: 10; }
h1, h2, h3, .masthead .logo, .btn {
  font-family: 'Cinzel', Georgia, 'Times New Roman', serif;
}
a { color: var(--gold-hi); }
a:hover { color: #fff; }

/* top strip */
.topstrip {
  background: #000; color: var(--parch-dim); font-size: 12px;
  padding: 5px 16px; display: flex; justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.topstrip .online { color: var(--gold-hi); }

/* masthead */
.masthead {
  background: linear-gradient(180deg, #241c0e, #14100a);
  border-bottom: 3px double var(--gold-dim);
  padding: 18px 20px 4px;
}
.masthead { text-align: center; }
.masthead .logoimg img { height: 110px; width: auto; max-width: 100%; display: block; flex-shrink: 1; }
.masthead .logoimg { display: flex; justify-content: center; align-items: center; padding: 16px 10px 18px; margin: 0 auto; max-width: 900px;
  background: none; border: none; outline: none;
}
.masthead nav.bar { justify-content: center; margin-top: 18px; }
nav.bar {
  display: flex; gap: 2px; margin-top: 12px; flex-wrap: wrap;
}
nav.bar a {
  color: var(--parch); text-decoration: none; font-variant: small-caps; letter-spacing: 1px;
  padding: 8px 14px; background: var(--panel); border: 1px solid var(--line); border-bottom: none;
  border-radius: 6px 6px 0 0; font-size: 13px;
}
nav.bar a:hover, nav.bar a.active { background: var(--panel2); color: var(--gold-hi); }
.loginrow {
  display: flex; gap: 6px; align-items: center; padding: 8px 16px;
  background: var(--panel); border-bottom: 1px solid var(--line); font-size: 12px; flex-wrap: wrap;
}
.loginrow input {
  background: #0c0b09; border: 1px solid var(--line); color: var(--parch);
  padding: 5px 8px; border-radius: 3px; font-family: inherit; font-size: 12px; width: 130px;
}

/* buttons — login-page language */
.btn {
  background: linear-gradient(180deg, #8a6a20, #5a4512);
  color: #ffe9b0; border: 1px solid var(--gold-dim); border-radius: 4px;
  padding: 7px 18px; font-variant: small-caps; letter-spacing: 2px; cursor: pointer;
  text-decoration: none; display: inline-block; font-size: 15px; font-weight: 700;
  text-shadow: 0 1px 2px #000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: all 0.2s ease;
}
.btn:hover { filter: brightness(1.25); color: #fff; box-shadow: 0 0 12px rgba(240,195,82,0.25); }
.btn.play {
  background: linear-gradient(180deg, #8a1f11 0%, #521006 100%);
  border-color: var(--ember-red); font-size: 19px; padding: 11px 34px;
}
.btn.play:hover { border-color: var(--ember-orange); box-shadow: 0 0 20px rgba(248,106,33,0.4); }
.btn.ghost { background: transparent; border: 1px solid var(--gold-dim); color: var(--gold-hi); }
.btn:disabled { opacity: 0.5; cursor: default; }

/* layout */
.wrap { max-width: 1060px; margin: 0 auto; padding: 18px 14px 40px; }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
  margin-bottom: 16px;
}
.panel > h2, .panel > h3 {
  background: linear-gradient(180deg, #241a10, #14100a);
  color: var(--gold-bright); font-variant: small-caps; letter-spacing: 3px;
  padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 17px;
  margin: 0; text-shadow: 0 0 12px rgba(240,195,82,0.25);
}
.panel .body { padding: 14px; }
.panel p { line-height: 1.65; margin-bottom: 10px; color: #c9bd97; }

/* hero */
.hero {
  text-align: center; padding: 44px 16px 36px;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(211,56,26,0.22), transparent 60%),
    linear-gradient(180deg, #141010, #070504);
  border: 1px solid var(--line); border-radius: 6px; margin-bottom: 16px;
  position: relative; overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.7), 0 0 20px rgba(200,149,40,0.06);
}
.hero h1 { color: var(--gold-bright); font-size: 40px; letter-spacing: 4px; margin-bottom: 8px;
  text-shadow: 0 0 26px rgba(248,106,33,0.45), 0 2px 4px #000; font-variant: small-caps; font-weight: 700; }
.hero .tag { color: var(--parch-dim); font-style: italic; margin-bottom: 20px; }

/* news */
.newsitem { display: flex; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.newsitem:last-child { border-bottom: none; }
.newsitem .thumb {
  width: 86px; height: 64px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 3px;
  background: linear-gradient(135deg, #2a1f10, #14100a);
  display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.newsitem .meta { font-size: 11px; color: var(--parch-dim); margin-bottom: 3px; }
.newsitem .meta .cat { color: var(--ember); font-variant: small-caps; letter-spacing: 1px; }
.newsitem h3 { font-size: 16px; margin-bottom: 4px; }
.newsitem h3 a { color: var(--gold-hi); text-decoration: none; }
.newsitem p { font-size: 13px; color: #b3a67f; line-height: 1.55; margin: 0; }

/* columns */
.cols { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } .hero h1 { font-size: 28px; } }

/* hiscores */
table.scores { width: 100%; border-collapse: collapse; font-size: 13px; }
table.scores th, table.scores td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line); }
table.scores th { color: var(--gold); font-variant: small-caps; background: #14110b; }
table.scores tr:nth-child(even) td { background: rgba(255,255,255,0.015); }
/* Keep wide tables inside their panel on small screens: the box stays put,
   the table scrolls within it instead of widening the whole page. */
.panel .body { overflow-x: auto; }
/* Never let the page itself scroll sideways on phones. */
html, body { overflow-x: hidden; }
@media (max-width: 640px) {
  table.scores { font-size: 12px; }
  table.scores th, table.scores td { padding: 6px 6px; }
  .wrap { padding: 12px 8px 32px; }
  .panel .body { padding: 10px 8px; }
}
.notice { border: 1px dashed #55503c; padding: 14px; text-align: center; color: var(--parch-dim); font-style: italic; font-size: 13px; }

/* polls */
.poll { border-bottom: 1px solid var(--line); padding: 12px 0; }
.poll:last-child { border-bottom: none; }
.poll h3 { font-size: 15px; color: var(--parch); margin-bottom: 8px; }
.poll label { display: block; padding: 6px 8px; margin: 4px 0; background: #12100c; border: 1px solid var(--line);
  border-radius: 3px; cursor: pointer; font-size: 13px; }
.poll label:hover { border-color: var(--gold-dim); }
.poll .opt { display: flex; align-items: center; gap: 8px; }
.poll .bar { height: 8px; background: #0c0b09; border-radius: 4px; overflow: hidden; margin-top: 4px; }
.poll .bar i { display: block; height: 100%; background: linear-gradient(90deg, #7a3410, var(--ember)); }
.poll .pct { font-size: 11px; color: var(--parch-dim); margin-left: auto; }
.poll .voted { border-color: var(--gold-dim); background: #1a160e; }

/* donate */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 14px 0; }
.tier { border: 1px solid var(--line); border-radius: 4px; padding: 14px; background: var(--panel2); text-align: center; }
.tier.featured { border-color: var(--gold-dim); box-shadow: 0 0 18px rgba(201,162,39,0.15); }
.tier h3 { color: var(--gold-hi); font-size: 18px; margin-bottom: 4px; font-variant: small-caps; }
.tier .amt { font-size: 24px; color: var(--parch); margin-bottom: 8px; }
.tier ul { list-style: none; font-size: 12px; color: #b3a67f; line-height: 1.9; margin-bottom: 12px; }
.progress { background: #0c0b09; border: 1px solid var(--line); border-radius: 6px; height: 22px; overflow: hidden; margin: 8px 0; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #7a3410, var(--ember), var(--gold-hi)); }

/* misc */
.status { font-size: 12px; color: var(--parch-dim); }
#login-status.ok { color: #8fce7f; } #login-status.err { color: #ff9a9a; }
.searchrow { display: flex; gap: 6px; margin-bottom: 12px; }
.searchrow input { flex: 1; background: #0c0b09; border: 1px solid var(--line); color: var(--parch);
  padding: 7px 10px; border-radius: 3px; font-family: inherit; }
.trade { display: flex; justify-content: space-between; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.trade .price { color: var(--gold-hi); }
ul.rules li { margin-bottom: 10px; line-height: 1.6; color: #c9bd97; font-size: 13px; }
ul.rules li b { color: var(--gold-hi); }
.lorebody { line-height: 1.8; color: #c9bd97; font-size: 14px; }
.lorebody p { margin-bottom: 12px; }
.godrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.god { border: 1px solid var(--line); border-radius: 4px; padding: 12px; background: var(--panel2); }
.god h3 { color: var(--gold-hi); font-size: 16px; margin-bottom: 6px; font-variant: small-caps; }
.god p { font-size: 12.5px; }
footer {
  border-top: 3px double var(--gold-dim); padding: 20px 16px; font-size: 12px; color: var(--parch-dim);
  display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; background: #0a0908;
}
footer a { color: var(--parch-dim); text-decoration: none; margin-right: 12px; }
footer a:hover { color: var(--gold-hi); }
.heat { display: flex; align-items: center; gap: 8px; }
.heat .bar { width: 120px; height: 8px; background: #1c1a14; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.heat .bar i { display: block; height: 100%; width: 99.8%; background: linear-gradient(90deg, #7a3410, var(--ember)); }

/* profile chip (top-right) */
.pwrap { position: relative; }
.pchip { display: flex; align-items: center; gap: 8px; background: #171008; border: 1px solid var(--gold-dim);
  border-radius: 20px; padding: 4px 12px 4px 8px; cursor: pointer; color: var(--parch); font-family: inherit; font-size: 12px; }
.pchip:hover { border-color: var(--gold-hi); }
.pdot { width: 8px; height: 8px; border-radius: 50%; background: #6b5a3a; display: inline-block; }
.pdot.on { background: #8fce7f; box-shadow: 0 0 6px #8fce7f; }
.pname { font-weight: 700; color: var(--gold-hi); }
.plvl { color: var(--parch-dim); }
.pcaret { color: var(--gold-dim); font-size: 10px; }
.pmenu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: #100b06;
  border: 1px solid var(--gold-dim); border-radius: 6px; padding: 8px; z-index: 50; box-shadow: 0 8px 24px rgba(0,0,0,.6); }
.pmenu .prow { display: flex; justify-content: space-between; padding: 6px 8px; font-size: 12px; color: var(--parch-dim); }
.pmenu .prow b { color: var(--parch); font-weight: 600; }
.pmenu a, .pmenu button { display: block; width: 100%; text-align: left; margin-top: 4px; padding: 8px 10px;
  border-radius: 4px; font-size: 13px; }
.pmenu a { background: var(--gold-dim); color: #0d0906; font-weight: 700; text-align: center; }
.pmenu button { background: transparent; border: 1px solid var(--line); color: var(--parch-dim); cursor: pointer; font-family: inherit; }
.pmenu button:hover { border-color: var(--gold-dim); color: var(--parch); }

/* polls: blind ballot, reveal-after-vote, auto-close */
.tallies { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.trow { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; background: #0d0906; }
.trow.mine { border-color: var(--gold-dim); }
.trow.win { border-color: var(--gold-hi); box-shadow: 0 0 10px rgba(212,175,55,.25); }
.tlabel { font-size: 13px; color: var(--parch); grid-column: 1 / -1; }
.trow.mine .tlabel { color: var(--gold-hi); font-weight: 600; }
.tbar { grid-column: 1; height: 10px; background: #1c130a; border-radius: 5px; overflow: hidden; }
.tbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold-hi)); border-radius: 5px; }
.trow.mine .tbar i { background: linear-gradient(90deg, #b8860b, var(--gold-hi)); }
.tpct { grid-column: 2; font-size: 12px; color: var(--parch); white-space: nowrap; }
.closed-banner { margin-top: 8px; padding: 8px 12px; border: 1px dashed var(--gold-dim); border-radius: 4px;
  font-size: 13px; color: var(--parch-dim); }

/* donate: character name + paypal buttons */
.donor-name-row { margin: 14px 0 4px; }
.donor-name-row label { display: block; margin-bottom: 6px; font-size: 14px; }
.donor-name-row input { width: 100%; max-width: 340px; padding: 10px 12px; font-size: 15px;
  background: #0d0906; border: 1px solid var(--gold-dim); border-radius: 4px; color: var(--parch);
  font-family: inherit; }
.donor-name-row input:focus { outline: none; border-color: var(--gold-hi); }
.ppbtn { margin-top: 10px; min-height: 45px; }
.ppbtn iframe { border-radius: 4px; }

/* numbered news badges (structural) */
.newsitem .thumb.num { font-size: 22px; color: var(--gold-hi); font-weight: bold;
  font-family: Georgia, 'Times New Roman', serif; letter-spacing: 1px; }

/* skill icon grid */
.skillgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.skillcard { display: flex; gap: 12px; align-items: flex-start; background: #100c07;
  border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.skillicon { width: 46px; height: 46px; flex-shrink: 0; border: 1px solid var(--gold-dim);
  border-radius: 8px; display: flex; align-items: center; justify-content: center; background: #0d0906; }
.skillicon img { width: 26px; height: 26px; }
.skillcard h3 { margin: 0 0 4px; font-size: 15px; color: var(--parch); }
.skillcard p { margin: 0; font-size: 12.5px; color: var(--parch-dim); line-height: 1.5; }

/* Forum composer */
textarea.forum, input.forum {
  width: 100%; box-sizing: border-box; background: #0c0b09;
  border: 1px solid var(--line); color: var(--parch);
  border-radius: 8px; padding: 10px 12px; font-size: 15px; font-family: inherit;
}
textarea.forum:focus, input.forum:focus { outline: none; border-color: var(--gold-hi); }
textarea.forum { min-height: 140px; resize: vertical; }
