:root{
  --bg:#0b1220;
  --card:#0f172a;
  --text:#e5e7eb;
  --muted:#94a3b8;
  --primary:#1e88e5;
  --accent:#22d3ee;
  --line:rgba(148,163,184,.18);
  --bg-shift-x: 0px;
  --bg-shift-y: 0px;
  --bg-shift-x2: 0px;
  --bg-shift-y2: 0px;
  --bg-shift-x3: 0px;
  --bg-shift-y3: 0px;
}

*{box-sizing:border-box}
html, body{
  height:100%;
  overflow-x:hidden;
}
header.top-bar,
.topbar,
.top-bar{
  position:fixed !important;
  top:0;
  left:0;
  right:0;
  z-index:9999 !important;
  transform: translateZ(0);
}
body{
  margin:0;
  min-height:100%;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  background: radial-gradient(1200px 600px at 20% 0%, rgba(34,211,238,.14), transparent 55%),
              radial-gradient(900px 500px at 80% 10%, rgba(30,136,229,.16), transparent 50%),
              var(--bg);
  color:var(--text);
  line-height:1.55;
}
body:not(.legal-page){
  background:
    radial-gradient(circle at calc(10% + var(--bg-shift-x)) calc(10% + var(--bg-shift-y)), #0b3b91 0%, transparent 45%),
    radial-gradient(circle at calc(80% + var(--bg-shift-x2)) calc(20% + var(--bg-shift-y2)), #0ea5e9 0%, transparent 42%),
    radial-gradient(circle at calc(70% + var(--bg-shift-x3)) calc(80% + var(--bg-shift-y3)), #7c3aed 0%, transparent 48%),
    linear-gradient(180deg, #020617, #020617) !important;
  background-attachment: fixed !important;
}
.bg-haze{
  position:fixed;
  inset:0;
  width:100vw;
  height:100vh;
  pointer-events:none;
  z-index:-1;
  backdrop-filter: blur(var(--bg-blur, 6px));
  filter: brightness(var(--bg-glow, 1));
  opacity:0.55;
  transition: opacity 0.5s ease;
}
body.legal-page{
  --legal-bg:#040812;
  background:
    radial-gradient(circle at calc(18% + var(--bg-shift-x)) calc(14% + var(--bg-shift-y)), rgba(59,130,246,0.2), transparent 48%),
    radial-gradient(circle at calc(82% + var(--bg-shift-x2)) calc(22% + var(--bg-shift-y2)), rgba(14,165,233,0.16), transparent 50%),
    radial-gradient(circle at calc(68% + var(--bg-shift-x3)) calc(78% + var(--bg-shift-y3)), rgba(99,102,241,0.14), transparent 55%),
    linear-gradient(180deg, #050815, #03050f);
  background-attachment: fixed;
  min-height:100vh;
  color:#f4f5fb;
  display:flex;
  flex-direction:column;
}
body.legal-page main{
  flex:1;
  display:flex;
  flex-direction:column;
}
main{
  width:100%;
  margin-bottom:0;
}

.container{max-width:980px;margin:0 auto;padding:24px}
.legal-shell{
  max-width:980px;
  margin:0 auto;
  padding:36px 24px 48px;
  display:flex;
  flex-direction:column;
  gap:28px;
  flex:1;
}
.legal-card{
  background:rgba(7,12,24,0.55);
  border-radius:22px;
  border:1px solid rgba(255,255,255,0.04);
  padding:32px;
  box-shadow:0 20px 45px rgba(2,6,23,0.45);
}
.legal-card h2{
  margin-top:0;
  font-size:30px;
}
.legal-card h3{
  margin-bottom:10px;
  font-size:18px;
}
.legal-card p,
.legal-card li{
  color:rgba(229,231,235,0.82);
  line-height:1.7;
}
.legal-card a{
  color:rgba(191,219,254,0.95);
  text-decoration:none;
}
.legal-card a:hover{
  color:#ffffff;
  text-decoration:underline;
}
.legal-blocks{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:14px;
  margin:18px 0 6px;
}
.legal-block{
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(15,23,42,0.45);
  padding:14px;
  box-shadow:0 12px 26px rgba(2,6,23,0.35);
}
.legal-block h5{
  margin:0 0 6px;
  font-size:14px;
  letter-spacing:.02em;
  color:#e2e8f0;
}
.legal-block p{
  margin:0;
  font-size:12px;
  color:rgba(226,232,240,0.78);
}
.legal-updated{
  margin-top:18px;
  font-size:12px;
  color:rgba(226,232,240,0.7);
  text-align:right;
}
.logout-modal-backdrop{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(2,6,23,0.65);
  backdrop-filter:blur(6px);
  z-index:10000;
}
.logout-modal-backdrop.open{
  display:flex;
}
.logout-modal{
  width:min(420px, calc(100% - 32px));
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.1);
  background:rgba(7,12,24,0.92);
  box-shadow:0 30px 80px rgba(2,6,23,0.6);
  padding:20px;
  color:#e5e7eb;
}
.logout-modal h3{
  margin:0 0 8px;
  font-size:18px;
}
.logout-modal p{
  margin:0 0 16px;
  color:rgba(229,231,235,0.75);
  font-size:13px;
  line-height:1.5;
}
.logout-modal-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
}
.logout-btn{
  border:0;
  border-radius:12px;
  padding:10px 14px;
  font-weight:700;
  cursor:pointer;
}
.logout-btn.cancel{
  background:rgba(255,255,255,0.08);
  color:#e5e7eb;
}
.logout-btn.confirm{
  background:linear-gradient(120deg, #0ea5e9, #38bdf8);
  color:#031321;
}
.legal-card ul{
  margin:0;
  padding-left:18px;
}
.legal-card ul li{
  margin-bottom:6px;
}
.legal-langSwitch{
  gap:12px;
}
.legal-title{
  margin:0;
  text-align:center;
  font-size:36px;
  font-weight:700;
  letter-spacing:0.4px;
}
.legal-title + .lang-switch{
  margin-top:12px;
}

.hero{border-bottom:1px solid var(--line)}
.hero-inner{max-width:1100px;margin:0 auto;padding:24px}
.hero-banner{
  width:100%;
  max-height:320px;
  object-fit:cover;
  border-radius:18px;
  border:1px solid var(--line);
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
}
.hero-title{padding:18px 6px 0}
.hero-title h1{margin:0;font-size:42px;letter-spacing:.5px}
.subtitle{margin:6px 0 0;color:var(--muted)}
.links{margin:10px 0 0}
.links a{
  display:inline-block;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(15,23,42,.55);
  color:var(--accent);
  text-decoration:none;
}
.links a:hover{border-color: rgba(34,211,238,.45)}

.toc{
  margin:0 0 18px;
  padding:18px;
  border:1px solid var(--line);
  border-radius:16px;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(10px);
}
.toc h2{margin:0 0 10px;font-size:18px}
.toc ol{margin:0;padding-left:18px}
.toc a{color:var(--accent);text-decoration:none}
.toc a:hover{text-decoration:underline}

.card{
  margin:18px 0;
  padding:22px;
  border:1px solid var(--line);
  border-radius:18px;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(10px);
}
.card h2{margin:0 0 6px;font-size:22px;color:#ffffff}
.lead{margin:0 0 14px;color:var(--muted)}
.card h3{margin:18px 0 8px;font-size:16px;color:var(--accent)}
ul{margin:0 0 8px;padding-left:18px}
li{margin:6px 0}

.footer{
  border-top:1px solid var(--line);
  margin-top:1px;
  padding:4px 0;
  color:var(--muted);
}
.footer-inner{display:flex;gap:12px;justify-content:space-between;align-items:center}

/* override banner size */
.hero-banner{max-height:220px; object-fit:cover;}

/* === FIXED FOOTER (left text | center buttons | right date) === */
/* === TOC blocks === */
.toc{
  margin-top:14px;
  padding:14px 16px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  background:rgba(15,23,42,.55);
}
.toc h3{margin:0 0 10px 0;font-size:16px;color:var(--text);}
.toc ul{margin:0;padding-left:18px;}
.toc a{color:rgba(47,129,247,1);text-decoration:none;}
.toc a:hover{text-decoration:underline;}
.lang-switch{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px;}
.lang-switch a{display:inline-block;padding:8px 12px;border-radius:10px;border:1px solid rgba(255,255,255,.10);background:rgba(22,27,34,.65);color:var(--text);text-decoration:none;font-weight:600;}
.lang-switch a:hover{border-color:rgba(47,129,247,.6);color:rgba(47,129,247,1);}


/* === Back to Home button (top-left) === */
.back-home{
  position:fixed;
  top:20px;
  left:20px;
  z-index:10000;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  background:rgba(15,23,42,.85);
  color:#fff;
  text-decoration:none;
  border-radius:12px;
  font-weight:800;
  border:1px solid rgba(255,255,255,.12);
  backdrop-filter:blur(6px);
}
.back-home:hover{
  background:rgba(30,136,229,.9);
  border-color:rgba(30,136,229,.9);
}

.bottom-bar{
  border-top:1px solid rgba(255,255,255,0.06);
  padding:6px 16px !important;
  margin:0 auto;
  max-width:1180px;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  gap:12px;
  align-items:center;
  font-size:12px;
  color:rgba(229,231,235,0.7);
}
.bottom-bar > span:last-child{
  justify-self:end;
}
body.legal-page .bottom-bar{
  grid-template-columns:1fr auto 1fr;
}
.legal-links{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  transform:translateX(-50px);
}
body.legal-page .legal-links{
  transform:translateX(0) !important;
}
.legal-links span.separator{
  color:rgba(229,231,235,0.48);
}
.legal-links a{
  color:rgba(229,231,235,0.8);
  text-decoration:none;
}
.legal-links a:hover{
  color:#fff;
  text-decoration:underline;
}
/* safety links removed (links moved to bottom bar) */

@media(max-width:960px){
  .footer-inner{
    grid-template-columns:1fr;
  }
  .footer-brand{
    text-align:center;
  }
  .footer-col{
    text-align:center;
  }
  .bottom-bar{
    flex-direction:column;
    text-align:center;
  }
}

/* === Footer premium styling === */
.footer-wrap{
  position:relative;
  background:
    radial-gradient(circle at 20% 20%, rgba(99,102,241,0.06), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(56,189,248,0.08), transparent 40%),
    var(--legal-bg, rgba(2,6,23,0.96));
  border-top:1px solid rgba(255,255,255,0.06);
  margin-top:auto;
  padding:18px 18px 8px !important;
  flex-shrink:0;
  overflow:hidden;
}
.footer-wrap::before{
  content:"";
  position:absolute;
  inset:0;
  background-image:radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size:4px 4px;
  opacity:.35;
  pointer-events:none;
  mix-blend-mode:overlay;
}
.footer-inner{
  position:relative;
  max-width:1180px;
  margin:0 auto;
  padding:6px 18px 0 !important;
  display:grid;
  grid-template-columns:minmax(220px,1.2fr) repeat(3,minmax(180px,1fr));
  gap:20px;
  color:rgba(229,231,235,0.92);
}
.footer-brand h3{
  margin:0 0 6px;
  font-size:20px;
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:700;
}
.footer-logo{
  width:40px;
  height:40px;
  object-fit:contain;
  border-radius:12px;
  display:inline-block;
}
.footer-icon{
  width:28px;
  height:28px;
  border-radius:50%;
  background:linear-gradient(135deg,#6366f1,#3b82f6);
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:16px;
  line-height:1;
}
.footer-brand p{
  margin:4px 0;
  color:rgba(229,231,235,0.65);
  font-size:13px;
  line-height:1.5;
}
.footer-col h4{
  margin:0 0 12px;
  font-size:14px;
  letter-spacing:.02em;
  color:#f4f7ff;
}
.footer-links{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.footer-links a{
  color:rgba(229,231,235,0.72);
  text-decoration:none;
  font-size:13px;
  transition:color .2s ease;
}
.footer-links a:hover{
  color:#fff;
}
.discord-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 18px;
  border-radius:999px;
  border:1px solid rgba(99,102,241,0.45);
  background:linear-gradient(135deg,#6366f1,#3b82f6);
  color:#0b1020;
  font-weight:700;
  text-decoration:none;
  box-shadow:0 14px 30px rgba(99,102,241,0.25);
}
.social-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:12px 0 4px;
}
.social-chip{
  font-size:12px;
  padding:6px 12px;
  border-radius:50px;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
  color:rgba(229,231,235,0.75);
}
.invite-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-top:10px;
  color:rgba(229,231,235,0.88);
  text-decoration:none;
  font-weight:700;
}
.invite-link:hover{
  color:#fff;
}
.safety-bar{
  border-top:1px solid rgba(255,255,255,.06);
  padding:14px 18px;
  margin:0 auto;
  max-width:1180px;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:6px;
  color:rgba(229,231,235,.68);
  font-size:12px;
}
.safety-bar .safety-line:first-child{order:1;}
.safety-bar .safety-line:last-child{order:2;}
.safety-bar a{
  color:rgba(229,231,235,.8);
  text-decoration:none;
}
.safety-bar a:hover{
  text-decoration:underline;
}
.safety-line{
  margin:0;
}
/* safety divider removed (links moved to bottom bar) */
.lang-switch {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:28px;
}
.lang-switch button {
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.3);
  background:rgba(255,255,255,0.08);
  color:#f7fbff;
  padding:8px 18px;
  font-weight:600;
  cursor:pointer;
  transition:transform .2s ease, background .2s ease, border .2s ease;
}
.lang-switch button.active {
  background:rgba(255,255,255,0.22);
  border-color:#fff;
  box-shadow:0 8px 20px rgba(15,23,42,0.45);
  color:#fff;
}
.lang-switch button:focus-visible {
  outline:2px solid rgba(96,165,250,0.85);
  outline-offset:2px;
}
.lang-panel [data-lang-section] {
  display:none;
}
.lang-panel [data-lang-section].visible {
  display:block;
}
