:root{
  --bg: #0b0f17;
  --bg2:#0a0d14;

  --text:#e9eefc;
  --muted:#9aa7c2;

  --border: rgba(255,255,255,0.10);

  --blue:#2f7dff;
  --blue2:#5aa2ff;

  --glass: blur(14px);

  --max: 1200px;
  --navH: 68px;

  --primary: var(--blue2);
  --primaryHover: rgba(47,125,255,0.35);
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }
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));
  opacity:0;
  transform: translateY(10px) scale(0.985);
  animation: pageLoad .55s cubic-bezier(.2,.8,.2,1) forwards;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
@keyframes pageLoad { to{opacity:1; transform: translateY(0) scale(1);} }

.container{
  width: min(var(--max), calc(100% - 40px));
  margin:auto;
}

/* ✅ NAVBAR FULL-WIDTH WRAPPER */
.nav-shell{
  width: calc(100% - 40px);
  margin: 0 auto;
}

/* 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 ===== */
.nav-holder{ height: var(--navH); flex-shrink: 0; }
.navbar{
  position: fixed !important;
  top:0; left:0; right:0;
  height: var(--navH);
  z-index: 9999;
  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{
  display:flex;
  align-items:center;
  height:100%;
  gap:14px;
}
.logo{
  display:flex;
  align-items:center;
  gap:10px;
  font-family:'Poppins',sans-serif;
  font-size:1.2rem;
  font-weight:800;
  letter-spacing:.6px;
  margin-right:auto;
  user-select:none;
  white-space:nowrap;
  cursor:pointer;
}
.logo-badge{
  width:34px;height:34px;
  border-radius:10px;
  background: linear-gradient(135deg, rgba(47,125,255,0.9), rgba(90,162,255,0.65));
  box-shadow: 0 10px 22px rgba(47,125,255,0.18);
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,0.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;
}

nav{
  display:flex;
  align-items:center;
  gap:8px;
}
nav a{
  position:relative;
  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,0.06);
}
nav a.active{
  color: var(--text);
  background: rgba(47,125,255,0.16);
  border: 1px solid rgba(47,125,255,0.28);
}

.actions{
  display:flex;
  gap:10px;
  align-items:center;
}
.btn-primary{
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.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,0.35);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}
.btn-primary.primary{
  background: rgba(47,125,255,0.18);
  border-color: rgba(47,125,255,0.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: rgba(233,238,252,0.95);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:160ms ease;
}
.profileBtn i{ font-size:16px; }
.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{
  /* ✅ FIX ONLY: ensure mobile menu sits ABOVE page content on small screens */
  position: fixed;
  left:0; right:0;
  top: calc(var(--navH) - 2px);
  z-index: 9998;

  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;
  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;
}

/* =========================
   PAGE CONTENT
   ========================= */
.header{
  padding: 38px 0 22px;
  flex: 1;
}
.header h1{
  font-family:'Poppins',sans-serif;
  font-size: 2.1rem;
  letter-spacing: -.3px;
  font-weight:800;
}
.header p{
  color: rgba(154,167,194,0.92);
  margin-top: 10px;
  max-width: 820px;
  line-height:1.7;
}

.toolbar{
  margin-top: 18px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  background: rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  padding: 12px 14px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.toolbar .left, .toolbar .right{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  color: rgba(233,238,252,0.92);
  font-size: 13px;
  font-weight:800;
}
.search{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
}
.search input{
  background: transparent;
  border:none;
  outline:none;
  color: rgba(233,238,252,0.92);
  width: 260px;
  font-weight:700;
}
.search input::placeholder{ color: rgba(154,167,194,0.70); }

/* THREAD LIST */
.list{
  margin-top: 18px;
  display:flex;
  flex-direction:column;
  gap: 12px;
}
.row{
  position:relative;
  background: rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: 180ms ease;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 26px rgba(0,0,0,0.22);
  cursor: pointer; 
}
.row::before{
  content:"";
  position:absolute;
  left:0; top:0; bottom:0;
  width:0px;
  background: linear-gradient(180deg, rgba(47,125,255,0.95), rgba(90,162,255,0.65));
  border-radius: 18px 0 0 18px;
  transition: 180ms ease;
}
.row:hover{
  transform: translateY(-2px);
  border-color: rgba(47,125,255,0.28);
  box-shadow: 0 18px 40px rgba(0,0,0,0.40);
}
.row:hover::before{ width:4px; }

.rowTop{
  display:flex;
  gap:14px;
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap:wrap;
}

.rowTitle{
  color: rgba(233,238,252,0.98);
  font-weight:900;
  letter-spacing:-.2px;
  font-size: 16px;
  max-width: 100%;
  display: inline-block;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
.rowSub{
  margin-top: 6px;
  color: rgba(154,167,194,0.92);
  font-size: 12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  font-weight:800;
}

.tag{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  border:1px solid rgba(47,125,255,0.35);
  color: rgba(233,238,252,0.95);
  font-weight:800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .4px;
  background: rgba(47,125,255,0.12);
}

.rightMeta{
  color: rgba(154,167,194,0.92);
  font-size: 12px;
  font-weight:900;
  display:flex;
  align-items:center;
  gap:10px;
  white-space:nowrap;
}
.threadCountLabel{
  color: rgba(233,238,252,0.92);
  font-weight:900;
}

/* =========================
   ✅ NOTIFICATIONS MODAL
   ========================= */
.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;
  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;
}

/* =========================
   FOOTER
   ========================= */
.footer{
  margin-top: 70px;
  padding: 20px 0 20px;
  font-size: 12.5px;
  border-top: 1px solid rgba(255,255,255,0.10);
}
.footer-content{
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  gap: 12px;
  color: rgba(154,167,194,0.85);
}
.footer-content a{
  color: rgba(154,167,194,0.85);
  margin-left: 12px;
  text-decoration:none;
  font-weight:800;
}
.footer-content a:hover{ color: var(--text); }

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 860px){
  nav{ display:none; }
  .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; }
  
  .search input{ width: 180px; }
}

@media(max-width:680px){
  .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;
  }
}