:root{
  --bg:#0b0f17; --bg2:#0a0d14;
  --text:#e9eefc; --muted:#9aa7c2;
  --blue:#2f7dff; --blue2:#5aa2ff;
  --glass: blur(14px);
  --radius2: 22px;

  --max: 1400px;
  --navH: 68px;
}
*{box-sizing:border-box;margin:0;padding:0}
a{color:inherit;text-decoration:none}

/* ✅ FIX: Prevents unresponsiveness/side-scrolling wobble on mobile */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

body{
  font-family:'Inter',sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(47,125,255,0.18), transparent 60%),
    radial-gradient(900px 500px at 85% 0%, rgba(90,162,255,0.10), transparent 55%),
    radial-gradient(900px 700px at 50% 110%, rgba(47,125,255,0.10), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.container{width:min(var(--max),calc(100% - 40px));margin:0 auto}
.nav-shell{width:min(var(--max),calc(100% - 40px));margin:0 auto}
.nav-holder{ height: var(--navH); flex-shrink: 0; }

/* ✅ FIX: auth flicker gate (instant state from pre-paint hint, then backend verifies) */
.authGate{ visibility:hidden; }
.authGate.authReady{ visibility:visible; }

/* Instant signed-in/out paint */
html.auth-known-in #desktopAuthActions.authGate{ display:none !important; }
html.auth-known-in #notifWrap.authGate,
html.auth-known-in #profileWrap.authGate{ visibility:visible; display:inline-flex; }

html.auth-known-out #desktopAuthActions.authGate{ visibility:visible; display:flex; }
html.auth-known-out #notifWrap.authGate,
html.auth-known-out #profileWrap.authGate{ display:none !important; }

/* mobile auth area instant behavior */
html.auth-known-in #mobileAuthArea.authGate{ visibility:visible; }
html.auth-known-out #mobileAuthArea.authGate{ visibility:visible; }

/* SCROLLBAR */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(30,35,55,0.9) #0b0f17;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0b0f17; }
::-webkit-scrollbar-thumb {
  background: rgba(30,35,55,0.9);
  border: 2px solid #0b0f17;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(40,48,72,0.95); }
::-webkit-scrollbar-corner { background: #0b0f17; }

/* navbar */
.navbar{
  position: fixed;
  top:0; left:0; right:0;
  height: var(--navH);
  z-index: 60;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  background: rgba(10,13,20,0.55);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
}
.nav-content{
  height:100%;
  display:flex;
  align-items:center;
  gap: 14px;
  position:relative;
}

/* logo */
.logo{
  display:flex;align-items:center;gap:10px;
  font-weight:800;letter-spacing:.6px;white-space:nowrap;
  cursor:pointer; user-select:none;
}
.logo-badge{
  width:34px;height:34px;border-radius:10px;
  background:linear-gradient(135deg,rgba(47,125,255,.9),rgba(90,162,255,.65));
  box-shadow:0 10px 22px rgba(47,125,255,.18);
  display:grid;place-items:center;
  border:1px solid rgba(255,255,255,.15);
}
.logo-badge i{font-size:15px;color:#eaf2ff}
.logo .accent{color:var(--blue2)}

.nav-right{
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* desktop nav */
nav{
  display:flex;
  align-items:center;
  gap:8px;
}
nav a{
  padding:9px 12px;border-radius:12px;
  color:var(--muted);font-weight:800;font-size:13.5px;
  transition:160ms ease;
}
nav a:hover{color:var(--text);background:rgba(255,255,255,.06)}
nav a.active{
  color:var(--text);
  background: rgba(47,125,255,0.16);
  border:1px solid rgba(47,125,255,0.28);
}

/* desktop actions */
.nav-actions{
  display:flex;align-items:center;gap:10px;
}
.btn-primary{
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:var(--text);
  padding:10px 13px;border-radius:14px;
  font-weight:800;font-size:13px;
  cursor:pointer;transition:160ms ease;
  display:inline-flex;align-items:center;gap:8px;
}
.btn-primary:hover{
  transform:translateY(-1px);
  border-color:rgba(47,125,255,.35);
  box-shadow:0 10px 28px rgba(0,0,0,.35);
}
.btn-primary.primary{
  background:rgba(47,125,255,.18);
  border-color:rgba(47,125,255,.35);
}

/* hamburger */
.hamburger{
  display:none;
  width:42px;height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor:pointer;
  align-items:center;
  justify-content:center;
  transition:160ms ease;
}
.hamburger i{ font-size:16px; }
.hamburger:hover{
  border-color: rgba(47,125,255,0.35);
  box-shadow:0 10px 28px rgba(0,0,0,0.25);
  transform:translateY(-1px);
}
.hamburger:focus-visible{ outline: 3px solid rgba(47,125,255,0.35); outline-offset:2px; }

/* ✅ Notifications (bell) */
.notifWrap{
  position: relative;
  display:none;
}
.notifBtn{
  width:42px;height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(233,238,252,0.95);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:160ms ease;
  position:relative;
}
.notifBtn i{ font-size:16px; }
.notifBtn:hover{
  border-color: rgba(47,125,255,0.35);
  box-shadow:0 10px 28px rgba(0,0,0,0.25);
  transform: translateY(-1px);
}
.notifBtn:focus-visible{
  outline: 3px solid rgba(47,125,255,0.35);
  outline-offset:2px;
}
.notifBadge{
  position:absolute;
  top:-4px; right:-4px;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  display:none;
  align-items:center;
  justify-content:center;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .2px;
  color: rgba(255,255,255,0.98);
  background: rgba(47,125,255,0.95);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 10px 18px rgba(47,125,255,0.20);
}
.notifBadge.show{ display:inline-flex; }

/* profile icon + dropdown */
.profileWrap{ position:relative; display:none; }
.profileBtn{
  width:42px;height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:160ms ease;
}
.profileBtn:hover{
  border-color: rgba(47,125,255,0.35);
  box-shadow:0 10px 28px rgba(0,0,0,0.25);
  transform:translateY(-1px);
}
.profileBtn:focus-visible{ outline: 3px solid rgba(47,125,255,0.35); outline-offset:2px; }

.profileMenu{
  position:absolute;
  right:0;
  top: calc(100% + 10px);
  min-width: 220px;
  background: rgba(10,13,20,0.90);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
  padding: 10px;
  display:none;
  z-index: 70;
}
.profileMenu.open{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.profileMenu a, .profileMenu button{
  width:100%;
  text-align:left;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(74, 72, 72, 0.199);
  color: rgba(233,238,252,0.92);
  font-weight: 800;
  font-size: 13.5px;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:10px;
  transition:160ms ease;
}
.profileMenu a:hover, .profileMenu button:hover{
  border-color: rgba(47,125,255,0.28);
  color: var(--text);
}

/* mobile panel */
.mobilePanel{
  position:absolute;
  left:0; right:0;
  top: calc(var(--navH) - 2px);
  background: rgba(10,13,20,0.82);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display:none;
  padding: 12px 0 14px;
}
.mobilePanel.open{ display:block; }

.mobileLinks{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:0 10px;
}
.mobileLinks a{
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(74, 72, 72, 0.199);
  color: rgba(233,238,252,0.92);
  font-weight: 800;
  font-size: 13.5px;
  transition: 160ms ease;
  text-decoration:none;
  display:flex;
  align-items:center;
  gap:10px;
}
.mobileLinks a:hover{
  color: var(--text);
  border-color: rgba(47,125,255,0.28);
}
.mobile-auth{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:6px;
}
.mobile-auth a{ width:100%; }

/* ✅ Notifications Modal (IDENTICAL TO TERMS.HTML) */
.notifModal{
  position: fixed;
  inset: 0;
  z-index: 200;
  display:none;
  align-items:flex-start;
  justify-content:flex-start;
  padding: 0;
}
.notifModal.open{ display:flex; }
.notifBackdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
@keyframes notifPop{
  0%{ opacity:0; transform: translateY(-6px) scale(0.985); }
  100%{ opacity:1; transform: translateY(0) scale(1); }
}
.notifPanel{
  position:absolute; /* positioned by JS */
  width: min(560px, calc(100% - 24px));
  max-height: min(74vh, 640px);
  background: rgba(10,13,20,0.92);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(0,0,0,0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow:hidden;
  animation: notifPop 160ms ease forwards;
}
.notifHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.notifHeader .title{
  font-family:Poppins, sans-serif;
  font-weight: 900;
  letter-spacing:-.2px;
  display:flex;
  align-items:center;
  gap:10px;
}
.notifHeader .right{
  display:flex;
  align-items:center;
  gap:10px;
}
.notifHeader .muted{
  color: rgba(154,167,194,0.92);
  font-weight: 800;
  font-size: 12.5px;
}
.notifAction{
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(233,238,252,0.95);
  padding: 9px 10px;
  border-radius: 12px;
  cursor:pointer;
  font-weight: 900;
  font-size: 12.5px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  transition:160ms ease;
}
.notifAction:hover{
  border-color: rgba(47,125,255,0.35);
  transform: translateY(-1px);
}
.notifAction[disabled]{
  opacity:.55;
  cursor:not-allowed;
  transform:none !important;
}
.notifClose{
  width:38px;height:38px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(233,238,252,0.95);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:160ms ease;
}
.notifClose:hover{
  border-color: rgba(47,125,255,0.35);
  transform: translateY(-1px);
}
.notifBody{
  padding: 10px 10px 12px;
  overflow:auto;
  overflow-y:auto;
  max-height: calc(min(74vh, 640px) - 56px);
  -webkit-overflow-scrolling: touch;
}
.notifList{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.notifItem{
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 11px 11px;
  cursor:pointer;
  transition:160ms ease;
  display:flex;
  align-items:flex-start;
  gap:10px;
}
.notifItem:hover{
  border-color: rgba(47,125,255,0.25);
  background: rgba(47,125,255,0.07);
}
.notifDot{
  width:10px;height:10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.20);
  margin-top: 5px;
  flex: 0 0 auto;
}
.notifItem.unread .notifDot{
  background: rgba(47,125,255,0.95);
  box-shadow: 0 0 0 3px rgba(47,125,255,0.10);
}
.notifMain{
  flex: 1 1 auto;
  min-width: 0;
}
.notifText{
  font-weight: 900;
  color: rgba(233,238,252,0.95);
  line-height: 1.35;
}
.notifMeta{
  margin-top: 4px;
  color: rgba(154,167,194,0.90);
  font-size: 12px;
  font-weight: 800;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.notifEmpty{
  padding: 18px 10px;
  color: rgba(154,167,194,0.92);
  font-weight: 800;
  text-align:center;
}

/* RESPONSIVE */
@media (max-width: 860px){
  nav{ display:none; }
  .nav-actions{ display:none !important; }
  
  /* ✅ Hamburger -> Bell -> Profile */
  .hamburger{ display:inline-flex; margin-left:0; order:1; align-items:center; justify-content:center; }
  .notifWrap { order: 2; }
  .profileWrap { order: 3; }
  .markAllText { display: none; }
}

@media(max-width:680px){
  /* Guarantees the modal is flawless and perfectly responsive on small screens */
  .notifPanel{
    position: fixed !important;
    top: calc(var(--navH) + 12px) !important;
    left: 12px !important;
    right: 12px !important;
    width: calc(100% - 24px) !important;
    max-width: none !important;
    max-height: calc(100vh - var(--navH) - 24px) !important;
  }
}

/* page */
.page{padding:26px 0 40px; flex:1;}
.hero{padding:28px 0 18px}
.hero h1{
  font-family:'Poppins',sans-serif;
  font-size:22px;
  margin-bottom:8px;
}
.hero p{color:var(--muted);max-width:820px;line-height:1.7;font-size:13.5px}

.panel{
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.05);
  border-radius:var(--radius2);
  overflow:hidden;
}
.panel-head{
  padding:14px 16px;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  border-bottom:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.04);
}
.panel-head h3{
  margin:0;
  font-size:12.5px;
  color:var(--muted);
  font-weight:800;
  text-transform:uppercase;
  font-family:'Poppins',sans-serif;
}
.panel-body{padding:16px}
.panel-body p{
  color:rgba(154,167,194,0.92);
  line-height:1.75;
  margin-bottom:12px;
  font-size:13.5px;
}

/* Footer */
.siteFooter{
  padding: 18px 0 26px;
  margin-top: 10px;
}
.footerLine{
  height:1px;
  background: rgba(255,255,255,0.10);
  margin: 0 0 14px 0;
}
.footerInner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.footerCopy{
  color: rgba(154,167,194,0.90);
  font-weight: 800;
  font-size: 12.5px;
}
.footerLinks{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.footerLinks a{
  color: rgba(154,167,194,0.90);
  font-weight: 800;
  font-size: 12.5px;
  padding: 8px 10px;
  border-radius: 12px;
  transition: 160ms ease;
}
.footerLinks a:hover{
  color: var(--text);
  background: rgba(255,255,255,0.06);
}