/* fonts (SIL Open Font License, files in assets/fonts): Cairo by Mohamed Gaber, Cinzel by Natanael Gama */
@font-face { font-family: "Cairo"; src: url(fonts/cairo.woff2) format("woff2"); font-weight: 200 1000; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url(fonts/cinzel.woff2) format("woff2"); font-weight: 400 900; font-display: swap; }
/* RPG.Conquer - classic 5017-era look: dark stone frames, gold trim, fantasy dusk background */
:root {
  --ink: #f3e6c8; --muted: #c9b18a; --dim: #8f7a5c;
  --gold: #e8b04e; --gold2: #ffd98a; --gold3: #8a5418;
  --stone: #2b2420; --stone2: #3a312b; --stone3: #1b1512; --edge: #5b4a3c;
  --red: #8e2418; --ok: #4cc26b; --bad: #e0553f;
  --font: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
  --title: "Cinzel", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font: 16px/1.75 var(--font); background: #0c0705;
  background-image: linear-gradient(rgba(10,5,3,.55), rgba(10,5,3,.92) 70%), url(bg.svg);
  background-size: cover; background-attachment: fixed; background-position: center top;
  overflow-x: hidden;
}
html[lang=ar] body { font-family: "Cairo", Tahoma, Arial, sans-serif; }
a { color: var(--gold2); }
img { max-width: 100%; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; }
.ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }
code { direction: ltr; unicode-bidi: embed; background: #120c09; border: 1px solid #3a2e25; color: var(--gold2); padding: 1px 6px; border-radius: 4px; font-size: .92em; }

/* ---------- header ---------- */
.bar { position: sticky; top: 0; z-index: 20; background: linear-gradient(#1d1410, #120c09); border-bottom: 2px solid var(--gold3);
  box-shadow: 0 2px 0 #000, 0 6px 18px rgba(0,0,0,.6); }
.bar-in { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 6px 14px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand img { width: 44px; height: 44px; filter: drop-shadow(0 0 6px rgba(232,176,78,.4)); }
.brand b { font: 700 21px var(--title); color: var(--gold2); letter-spacing: .5px; text-shadow: 0 2px 0 #000; direction: ltr; }
.nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; justify-content: center; }
.nav a { color: var(--ink); text-decoration: none; padding: 7px 9px; border-radius: 4px; font-weight: 600; font-size: 14.5px; white-space: nowrap; border: 1px solid transparent; }
.nav a:hover, .nav a.on { color: var(--gold2); border-color: var(--edge); background: linear-gradient(#3a2c22, #221812); }
.tools { display: flex; gap: 8px; align-items: center; }
.lang { cursor: pointer; font: 600 14px var(--font); color: var(--gold2); background: transparent; border: 1px solid var(--gold3); border-radius: 4px; padding: 6px 10px; }
.menu { display: none; background: transparent; border: 1px solid var(--gold3); color: var(--gold2); border-radius: 4px; font-size: 20px; padding: 2px 10px; cursor: pointer; }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #777; }
.dot.up { background: var(--ok); box-shadow: 0 0 8px var(--ok); } .dot.down { background: var(--bad); }

/* ---------- buttons ---------- */
.btn { position: relative; display: inline-block; cursor: pointer; text-decoration: none; text-align: center;
  font: 700 17px var(--font); letter-spacing: .3px; padding: 12px 28px; border-radius: 6px; color: #fff6df;
  background: linear-gradient(#5a4a3e, #2c221c); border: 2px solid #8a6d4a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 3px 0 #000, 0 6px 14px rgba(0,0,0,.5); text-shadow: 0 1px 0 #000; }
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 0 #000; }
.btn.gold { color: #2a1404; text-shadow: 0 1px 0 rgba(255,255,255,.4); background: linear-gradient(#fff0b8, #e8b04e 45%, #a8661c); border-color: #fff0b8; }
.btn.red { background: linear-gradient(#b8382a, #6a150d); border-color: #e8b04e; }
.btn.big { font-size: 20px; padding: 15px 36px; }
.btn.disabled, .btn[disabled] { opacity: .5; pointer-events: none; }
.mini { cursor: pointer; font: 600 12px var(--font); color: var(--muted); background: #1a120e; border: 1px solid var(--edge); border-radius: 4px; padding: 2px 8px; }

/* ---------- stone frame ---------- */
.frame { position: relative; margin: 26px 0; padding: 26px 28px; border-radius: 6px;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.035), transparent 40%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.012) 0 2px, transparent 2px 6px),
    linear-gradient(var(--stone2), var(--stone) 30%, var(--stone3));
  border: 3px solid #0c0806; outline: 2px solid var(--edge); outline-offset: -8px;
  box-shadow: inset 0 0 0 1px #6e5a47, inset 0 0 40px rgba(0,0,0,.6), 0 8px 26px rgba(0,0,0,.65); }
.frame::before, .frame::after { content: ""; position: absolute; width: 14px; height: 14px; top: -7px; transform: rotate(45deg);
  background: linear-gradient(135deg, #fff0b8, #a8661c); border: 2px solid #3a2208; }
.frame::before { left: 18px; } .frame::after { right: 18px; }
.frame > h2:first-child, .frame > .head h2 { margin-top: 0; }
h1, h2, h3 { color: var(--gold2); line-height: 1.3; }
h2 { font: 700 27px var(--title); text-shadow: 0 2px 0 #000; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
h2::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, var(--gold3), transparent); }
html[dir=rtl] h2::after { background: linear-gradient(270deg, var(--gold3), transparent); }
html[lang=ar] h1, html[lang=ar] h2, html[lang=ar] h3 { font-family: "Cairo", var(--font); }
h3 { font-size: 19px; margin: 18px 0 6px; }

main { max-width: 1180px; margin: 0 auto; padding: 8px 16px 30px; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 56px 16px 40px; }
.hero .crest { width: 150px; height: 150px; filter: drop-shadow(0 0 24px rgba(232,176,78,.35)); }
.hero h1 { margin: 4px 0 0; font: 700 clamp(42px, 8vw, 84px)/1.05 var(--title); letter-spacing: 2px; color: var(--gold2); direction: ltr;
  background: linear-gradient(#fff6d6, #e8b04e 55%, #9a5a16); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 0 #000) drop-shadow(0 0 22px rgba(232,140,40,.35)); }
.hero .tag { font: 700 clamp(15px, 2.4vw, 20px) var(--title); letter-spacing: 6px; color: #f3d9a0; margin: 6px 0 4px; direction: ltr; }
.hero .badge { display: inline-block; margin: 8px 0 16px; padding: 4px 14px; border: 1px solid var(--gold); border-radius: 30px; color: var(--gold2); background: rgba(0,0,0,.45); font-weight: 700; }
.hero p.lead { max-width: 720px; margin: 0 auto 22px; font-size: 18px; color: #ecdcb8; text-shadow: 0 2px 4px #000; }
.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.statusbox { display: inline-flex; gap: 14px; align-items: center; margin-top: 22px; padding: 8px 18px; border-radius: 30px; background: rgba(0,0,0,.55); border: 1px solid var(--edge); flex-wrap: wrap; justify-content: center; }

/* ---------- grids / cards ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card { background: linear-gradient(#2a211b, #1a1310); border: 1px solid var(--edge); border-radius: 6px; padding: 16px 18px; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.card h3 { margin-top: 0; }
.card .ico { width: 46px; height: 46px; float: inline-end; opacity: .9; }
.tick { display: inline-block; font-size: 12px; font-weight: 700; color: #0f2a15; background: var(--ok); border-radius: 3px; padding: 0 6px; margin-inline-start: 6px; vertical-align: middle; }
.soon { display: inline-block; font-size: 12px; font-weight: 700; color: #2a1404; background: var(--gold); border-radius: 3px; padding: 0 6px; margin-inline-start: 6px; vertical-align: middle; }
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.gallery figure { margin: 0; border: 2px solid var(--edge); border-radius: 4px; overflow: hidden; background: #000; }
.gallery img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.gallery figcaption { padding: 6px 10px; font-size: 13px; color: var(--muted); }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 8px 10px; border-bottom: 1px solid #3a2e25; text-align: start; }
th { color: var(--gold2); background: #1a120e; font-weight: 700; }
tr:hover td { background: rgba(232,176,78,.05); }
.tablewrap { overflow-x: auto; }
.rank1 td:first-child { color: #ffd700; font-weight: 700; } .rank2 td:first-child { color: #d8d8d8; font-weight: 700; } .rank3 td:first-child { color: #d0884a; font-weight: 700; }

/* ---------- forms ---------- */
form.reg { display: grid; gap: 14px; max-width: 480px; }
label { display: grid; gap: 4px; }
label > span { font-weight: 700; }
input[type=text], input[type=password], input:not([type]) { font: 16px var(--font); padding: 11px 12px; border-radius: 4px; border: 1px solid var(--edge);
  background: #0f0a08; color: var(--ink); direction: ltr; text-align: left; box-shadow: inset 0 2px 6px rgba(0,0,0,.6); }
input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
small { color: var(--muted); }
.msg.bad { color: #ff9b88; } .msg.good { color: #86e39c; }
.check { display: flex; gap: 8px; align-items: flex-start; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; }
.result { min-height: 24px; font-weight: 700; }
.result.ok { color: #9ff0b2; background: rgba(76,194,107,.12); border: 1px solid #2f8a48; padding: 10px 12px; border-radius: 4px; }
.result.err { color: #ffb9ab; background: rgba(224,85,63,.12); border: 1px solid #9a3a2a; padding: 10px 12px; border-radius: 4px; }
.two { display: grid; grid-template-columns: 1.1fr .9fr; gap: 26px; align-items: start; }

/* ---------- misc ---------- */
ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
ol.steps > li { counter-increment: s; position: relative; padding: 10px 0; padding-inline-start: 52px; border-bottom: 1px dashed #3a2e25; }
ol.steps > li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: 10px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font: 700 18px var(--title); color: #2a1404; background: linear-gradient(#fff0b8, #c88a2c); border: 2px solid #5a3410; }
details { background: #1a120e; border: 1px solid var(--edge); border-radius: 4px; padding: 8px 12px; margin: 8px 0; }
summary { cursor: pointer; font-weight: 700; color: var(--gold2); }
.news-item { border-inline-start: 3px solid var(--gold); padding: 4px 16px; margin: 14px 0; }
.news-item time { color: var(--dim); font-size: 13px; }
.news-item h3 { margin: 2px 0 4px; }
.sha { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
.sha code { word-break: break-all; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; }
.kv b { color: var(--gold2); }
.note { border: 1px solid var(--gold3); background: rgba(232,176,78,.08); padding: 10px 14px; border-radius: 4px; }

footer.foot { margin-top: 30px; border-top: 2px solid var(--gold3); background: linear-gradient(#150e0b, #0a0604); color: var(--muted); }
.foot-in { max-width: 1180px; margin: 0 auto; padding: 22px 16px 34px; display: grid; gap: 10px; grid-template-columns: 1fr auto; align-items: center; }
.foot a { color: var(--muted); margin-inline-end: 14px; }

.grid.wide { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
@media (max-width: 1240px) { .pill .ptxt { display: none; } }
@media (max-width: 900px) {
  .two { grid-template-columns: 1fr; }
  .menu { display: inline-block; }
  .nav { display: none; position: absolute; top: 100%; inset-inline: 0; flex-direction: column; background: #150e0b; border-bottom: 2px solid var(--gold3); padding: 8px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 12px; }
  .bar-in { position: relative; flex-wrap: wrap; }
  .tools { margin-inline-start: auto; }
  .pill .ptxt { display: none; }
  .frame { padding: 20px 16px; }
  .foot-in { grid-template-columns: 1fr; }
  body { background-attachment: scroll; }
}
