/* ==========================================================
   THE DOMINION: styles
   Change the colours in :root to re-theme the whole site.
   ========================================================== */
:root {
  --bg:        #0b0d10;
  --bg-2:      #111419;
  --panel:     #151920;
  --panel-2:   #1b2029;
  --line:      #262c37;
  --text:      #e8eaee;
  --muted:     #9aa3b2;
  --fire:      #ff6a2b;
  --fire-2:    #ffb03a;
  --online:    #3ddc84;
  --warn:      #ffc043;
  --stopped:   #7c8594;
  --down:      #ff4d5e;
  --discord:   #5865f2;
  --twitch:    #9146ff;
  --radius:    14px;
  --wrap:      1200px;
  --head: "Rajdhani", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Your background image: replace images/bg/hero.jpg with your own */
  --hero-image: url("../images/bg/hero.jpg");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); line-height: 1.05; margin: 0; letter-spacing: .01em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 700; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--fire); color: #000; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--fire-2); outline-offset: 3px; border-radius: 6px; }

.eyebrow {
  font: 600 .78rem/1 var(--body); letter-spacing: .18em; text-transform: uppercase;
  color: var(--fire); margin: 0 0 10px;
}

/* ---------- icons (Simple Icons via CDN, tinted with currentColor) ---------- */
.ico { display: inline-block; width: 1.15em; height: 1.15em; background: currentColor; flex: none;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.ico--discord { --i: url("https://cdn.jsdelivr.net/npm/simple-icons@13/icons/discord.svg"); }
.ico--twitch  { --i: url("https://cdn.jsdelivr.net/npm/simple-icons@13/icons/twitch.svg"); }
.ico--youtube { --i: url("https://cdn.jsdelivr.net/npm/simple-icons@13/icons/youtube.svg"); }
.ico--x       { --i: url("https://cdn.jsdelivr.net/npm/simple-icons@13/icons/x.svg"); }
.ico--tiktok  { --i: url("https://cdn.jsdelivr.net/npm/simple-icons@13/icons/tiktok.svg"); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  font: 700 1rem/1 var(--head); letter-spacing: .06em; text-transform: uppercase;
  padding: 14px 22px; border-radius: 10px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--fire { background: linear-gradient(135deg, var(--fire), var(--fire-2)); color: #140a02; box-shadow: 0 8px 30px -10px var(--fire); }
.btn--fire:hover { box-shadow: 0 10px 36px -8px var(--fire); }
.btn--discord { background: var(--discord); color: #fff; }
.btn--discord:hover { background: #4752e0; }
.btn--ghost { background: rgba(255,255,255,.04); border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--fire); }
.btn--sm { padding: 10px 16px; font-size: .9rem; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,13,16,.78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav__inner { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; height: 66px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__logo { height: 34px; width: auto; }
.brand__text { font: 600 1.35rem/1 var(--head); letter-spacing: .12em; }
.brand__text b { color: var(--fire); font-weight: 700; }
.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__links > a:not(.btn) {
  font: 600 1.02rem/1 var(--head); letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  color: var(--muted); padding: 10px 14px; border-radius: 8px; position: relative; display: inline-flex; align-items: center; gap: 8px;
}
.nav__links > a:not(.btn):hover, .nav__links > a.is-current { color: var(--text); }
.nav__links > a.is-current::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--fire); border-radius: 2px; }
.nav__cta { margin-left: 8px; padding: 11px 16px; font-size: .92rem; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff3b3b; box-shadow: 0 0 0 0 rgba(255,59,59,.7); animation: pulse 1.6s infinite; }
.nav__toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: .2s; }

@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: 66px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 10px 16px 18px;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .2s;
  }
  .nav__links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links > a:not(.btn) { padding: 14px 8px; font-size: 1.15rem; border-bottom: 1px solid var(--line); }
  .nav__links > a.is-current::after { display: none; }
  .nav__cta { margin: 14px 0 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(86vh, 760px); display: flex; align-items: center; overflow: hidden; isolation: isolate; }
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(11,13,16,.35) 0%, rgba(11,13,16,.6) 55%, var(--bg) 100%),
    linear-gradient(90deg, rgba(11,13,16,.92) 0%, rgba(11,13,16,.3) 70%),
    var(--hero-image) center / cover no-repeat,
    radial-gradient(1200px 600px at 80% 20%, #3a1a0c 0%, transparent 60%),
    radial-gradient(900px 500px at 10% 90%, #13203a 0%, transparent 60%),
    var(--bg);
}
.hero__content { padding-top: 70px; padding-bottom: 70px; width: 100%; }
.hero h1 { font-size: clamp(3rem, 9vw, 6.2rem); font-weight: 700; text-transform: uppercase; }
.fire { background: linear-gradient(90deg, var(--fire), var(--fire-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lede { max-width: 560px; font-size: 1.15rem; color: #c9ced8; margin: 20px 0 30px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.stats { display: flex; flex-wrap: wrap; gap: 14px; margin: 46px 0 0; }
.stat { background: rgba(21,25,32,.7); border: 1px solid var(--line); border-radius: 12px; padding: 14px 20px; min-width: 150px; backdrop-filter: blur(6px); }
.stat dt { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stat dd { margin: 4px 0 0; font: 700 2rem/1 var(--head); }
#statOnline { color: var(--online); }

/* ---------- sections ---------- */
.section { padding: 90px 0; }
.section--tight { padding: 34px 0; }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.section__head h2 { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.updated { color: var(--muted); font-size: .9rem; margin: 0; }

/* ---------- toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-bottom: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  font: 600 .95rem/1 var(--head); letter-spacing: .06em; text-transform: uppercase;
  padding: 10px 16px; border-radius: 999px; cursor: pointer; transition: .15s;
}
.chip:hover { color: var(--text); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .n { opacity: .6; margin-left: 4px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; min-width: 240px; flex: 0 1 300px; }
.search:focus-within { border-color: var(--fire); }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search input { background: none; border: 0; color: var(--text); font: inherit; padding: 10px 0; width: 100%; outline: none; }

/* ---------- server cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); border-color: #384050; box-shadow: 0 18px 40px -20px rgba(0,0,0,.8); }
.card[data-state="online"] { border-color: rgba(61,220,132,.28); }
.card__art { position: relative; aspect-ratio: 460 / 215; background: linear-gradient(135deg, #1e2530, #10141a); overflow: hidden; }
.card__art img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s, filter .3s; }
.card:hover .card__art img { transform: scale(1.04); }
.card[data-state="stopped"] .card__art img, .card[data-state="offline"] .card__art img { filter: grayscale(.75) brightness(.7); }
.card__fallback { position: absolute; inset: 0; display: grid; place-items: center; font: 700 2.4rem/1 var(--head); color: rgba(255,255,255,.18); letter-spacing: .1em; text-transform: uppercase; }
.status {
  position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 7px;
  background: rgba(8,10,13,.82); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.08);
  padding: 6px 10px; border-radius: 999px; font: 700 .8rem/1 var(--head); letter-spacing: .08em; text-transform: uppercase;
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--stopped)); }
.status--online   { --c: var(--online); color: var(--online); }
.status--online::before { animation: pulse-g 2s infinite; }
.status--starting, .status--sleeping { --c: var(--warn); color: var(--warn); }
.status--stopped, .status--unknown { --c: var(--stopped); color: #c3c9d3; }
.status--offline  { --c: var(--down); color: var(--down); }
.card__body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card__title { font-size: 1.4rem; font-weight: 700; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); padding: 3px 8px; border-radius: 6px; }
.players { font-size: .88rem; color: var(--muted); display: grid; gap: 6px; }
.players b { color: var(--text); font-weight: 600; }
.bar { height: 6px; background: #0e1116; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--online), #9af7c2); border-radius: inherit; }
.card__foot { margin-top: auto; display: flex; gap: 8px; }
.addr {
  flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0;
  background: var(--bg-2); border: 1px dashed var(--line); border-radius: 8px; padding: 9px 10px;
  font: 500 .85rem/1 ui-monospace, "SFMono-Regular", Consolas, monospace; color: #cfd5de; cursor: pointer;
}
.addr span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addr:hover { border-color: var(--fire); }
.addr em { font: 700 .7rem/1 var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--fire); font-style: normal; }
.card__foot .btn { flex: 1; padding: 11px 12px; font-size: .88rem; }

.skeleton .card__art, .skeleton .sk { background: linear-gradient(90deg, #161a21 0%, #1f2530 50%, #161a21 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.sk { height: 14px; border-radius: 6px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.note { margin-top: 26px; background: linear-gradient(90deg, rgba(255,106,43,.1), transparent); border-left: 3px solid var(--fire); padding: 14px 18px; border-radius: 0 10px 10px 0; color: #cdd2da; }

/* ---------- rules ---------- */
.rules-band { background: var(--bg-2); border-block: 1px solid var(--line); }
.rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.rules li { display: flex; align-items: center; gap: 14px; font: 600 1.2rem/1.2 var(--head); letter-spacing: .02em; }
.rules b { font-size: 2rem; color: var(--fire); opacity: .9; }

/* ---------- live ---------- */
.badge { font: 700 .8rem/1 var(--head); letter-spacing: .1em; text-transform: uppercase; padding: 7px 11px; border-radius: 999px; vertical-align: middle; }
.badge--offline { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.badge--live { background: #e91916; color: #fff; display: inline-flex; gap: 7px; align-items: center; }
.badge--live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse-w 1.6s infinite; }
.player { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.player__frame { aspect-ratio: 16 / 9; position: relative; }
.player__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__load {
  position: absolute; inset: 0; width: 100%; border: 0; cursor: pointer; color: var(--text);
  display: grid; place-content: center; justify-items: center; gap: 10px; font: 700 1.3rem/1 var(--head); letter-spacing: .06em; text-transform: uppercase;
  background: radial-gradient(600px 300px at 50% 40%, rgba(145,70,255,.25), transparent 70%), #07080a;
}
.player__load .ico { width: 54px; height: 54px; color: var(--twitch); }
.player__load small { font: 400 .85rem/1.3 var(--body); color: var(--muted); text-transform: none; letter-spacing: 0; }

/* ---------- community ---------- */
.community { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; }
.community__copy p { color: #c9ced8; font-size: 1.05rem; }
.ticks { list-style: none; padding: 0; margin: 18px 0 28px; display: grid; gap: 10px; }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 5px; width: 16px; height: 16px; border-radius: 4px; background: var(--fire); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat; }
.community__widget iframe { width: 100%; height: 480px; border: 0; border-radius: var(--radius); }
.discord-card {
  border-radius: var(--radius); padding: 34px; text-align: center; border: 1px solid rgba(88,101,242,.4);
  background: radial-gradient(400px 220px at 50% 0%, rgba(88,101,242,.35), transparent 70%), var(--panel);
}
.discord-card .ico { width: 64px; height: 64px; color: #fff; margin: 0 auto 14px; }
.discord-card h3 { font-size: 1.8rem; margin-bottom: 6px; }
.discord-card p { color: var(--muted); margin: 0 0 20px; }
@media (max-width: 860px) { .community { grid-template-columns: 1fr; gap: 34px; } }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.gallery button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; overflow: hidden; aspect-ratio: 16/10; position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery button:hover img { transform: scale(1.05); }
.gallery .ph { display: grid; place-items: center; height: 100%; background: repeating-linear-gradient(45deg, var(--panel) 0 12px, var(--panel-2) 12px 24px); color: var(--muted); font: 600 .9rem/1.3 var(--head); letter-spacing: .08em; text-transform: uppercase; border: 1px dashed var(--line); border-radius: 12px; text-align: center; padding: 10px; cursor: default; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92); display: grid; place-content: center; padding: 30px; gap: 12px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 82vh; max-width: 92vw; border-radius: 10px; }
.lightbox__cap { text-align: center; color: var(--muted); margin: 0; }
.lightbox__close { position: absolute; top: 14px; right: 20px; font-size: 2.4rem; background: none; border: 0; color: #fff; cursor: pointer; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0; background: var(--bg-2); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer p { margin: 4px 0 0; }
.socials { display: flex; gap: 10px; }
.socials a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); transition: .15s; }
.socials a:hover { color: var(--text); border-color: var(--fire); transform: translateY(-2px); }

/* ---------- toast ---------- */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 10px; font-weight: 600; opacity: 0; transition: .25s; z-index: 120; pointer-events: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- animations ---------- */
@keyframes pulse   { 70% { box-shadow: 0 0 0 8px rgba(255,59,59,0); } 100% { box-shadow: 0 0 0 0 rgba(255,59,59,0); } }
@keyframes pulse-g { 0% { box-shadow: 0 0 0 0 rgba(61,220,132,.7); } 70% { box-shadow: 0 0 0 7px rgba(61,220,132,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); } }
@keyframes pulse-w { 50% { opacity: .35; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
@media (max-width: 560px) {
  .section { padding: 64px 0; }
  .stat { min-width: 0; flex: 1 1 40%; }
  .search { flex: 1 1 100%; min-width: 0; }
}
