:root{
  --bg: #0b0f17;
  --bg2:#0a0d14;

  --text:#e9eefc;
  --muted:#9aa7c2;

  --card: rgba(255,255,255,0.06);
  --card2: rgba(255,255,255,0.08);

  --border: rgba(255,255,255,0.10);
  --border2: rgba(255,255,255,0.16);

  --shadow: 0 10px 30px rgba(0,0,0,0.40);

  --blue:#2f7dff;
  --blue2:#5aa2ff;

  --glass: blur(14px);
  --radius: 18px;
  --radius2: 22px;

  --max: 1100px;
  --navH: 68px;

  --field: rgba(10,14,22,0.58);
  --fieldBorder: rgba(255,255,255,0.10);
  --placeholder: rgba(255,255,255,0.40);
}

*{ box-sizing:border-box; margin:0; padding:0; }
a{ color:inherit; text-decoration:none; }
html{ scroll-behavior:smooth; }

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;

  opacity:0;
  transform: translateY(10px) scale(0.985);
  animation: pageLoad .55s cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes pageLoad{ to{opacity:1; transform: translateY(0) scale(1);} }

.container{
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

/* ✅ NAVBAR FULL-WIDTH WRAPPER */
.nav-shell{
  width: calc(100% - 40px);
  margin: 0 auto;
}

/* NAVBAR */
.nav-holder{ height: var(--navH); }

.navbar{
  position: fixed;
  top:0; left:0; right:0;
  height: var(--navH);
  z-index: 50;
  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;
}
.logo{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  letter-spacing:0.6px;
  white-space:nowrap;
  user-select:none;
  cursor:pointer;
  font-family:'Poppins',sans-serif;
  font-size:1.2rem;
}
.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); }

/* right side cluster */
.nav-right{
  display:flex;
  align-items:center;
  gap:10px;
  margin-left:auto; 
}

/* nav links */
nav{
  display:flex;
  align-items:center;
  gap:8px;
}
nav a{
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13.5px;
  transition: 160ms ease;
}
nav a:hover{
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

/* signed-out buttons (desktop only) */
.nav-actions{
  display:flex;
  align-items:center;
  gap:10px;
}
.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{
  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);
  display:none;
  place-items:center;
  cursor:pointer;
  transition:160ms ease;
}
.hamburger:hover{
  transform:translateY(-1px);
  border-color:rgba(47,125,255,0.35);
  box-shadow:0 10px 28px rgba(0,0,0,0.25);
}
.hamburger:focus-visible{
  outline: 3px solid rgba(47,125,255,0.35);
  outline-offset:2px;
}

/* 🔔 notifications (signed-in only) */
.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 (signed-in only) */
.profile-wrap{
  position:relative;
  display:none; 
}
.profile-btn{
  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);
  display:grid;
  place-items:center;
  cursor:pointer;
  transition:160ms ease;
}
.profile-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(47,125,255,0.35);
  box-shadow:0 10px 28px rgba(0,0,0,0.35);
}
.profile-btn:focus-visible{
  outline: 3px solid rgba(47,125,255,0.35);
  outline-offset:2px;
}
.profile-menu{
  position:absolute;
  right:0;
  top:calc(100% + 10px);
  min-width:220px;
  background:rgba(10,13,20,0.92);
  border:1px solid rgba(255,255,255,0.12);
  border-radius:16px;
  box-shadow:0 18px 55px rgba(0,0,0,0.45);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  padding:8px;
  display:none;
  z-index:60;
}
.profile-menu.open{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.profile-menu a, .profile-menu button{
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
  color:rgba(233,238,252,0.92);
  font-weight:800;
  font-size:13px;
  background:transparent;
  border:0;
  cursor:pointer;
  text-align:left;
  transition:160ms ease;
}
.profile-menu a:hover, .profile-menu button:hover{
  background:rgba(255,255,255,0.06);
  color:var(--text);
  border-color: rgba(47,125,255,0.28);
}

/* mobile panel */
.mobile-panel{
  position:fixed;
  top:var(--navH);
  left:0; right:0;
  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);
  z-index:55;
  display:none;
}
.mobile-inner{
  width:min(var(--max), calc(100% - 40px));
  margin:0 auto;
  padding: 12px 0 14px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.mobile-inner a,
.mobileAuthLink{
  display:flex;
  align-items:center;
  gap:10px;
  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;
}
.mobile-inner a:hover,
.mobileAuthLink:hover{
  color: var(--text);
  border-color: rgba(47,125,255,0.28);
}

.mlink{
  display:flex;
  align-items:center;
  gap:10px;
  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;
}
.mlink:hover{
  color: var(--text);
  border-color: rgba(47,125,255,0.28);
}
.mlink.small{
  opacity:0.92;
}
.mobile-auth{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:6px;
}
.mobile-auth a{ width:100%; }

.mobile-backdrop{
  position:fixed;
  inset:0;
  top:var(--navH);
  background:rgba(0,0,0,0.35);
  z-index:54;
  display:none;
}

/* PAGE */
.page{ padding: 70px 0 40px; }
.card{
  max-width: 820px;
  margin: 0 auto;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card-head{
  padding: 18px 18px;
  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);
}
.card-head h1{
  font-family:'Poppins',sans-serif;
  font-size: 16px;
  letter-spacing: 0.2px;
}
.card-head .hint{
  color: rgba(154,167,194,0.85);
  font-weight: 800;
  font-size: 12px;
  display:flex;
  align-items:center;
  gap:8px;
}
.card-body{ padding: 18px; }

.profile-head{
  display:flex;
  gap: 14px;
  align-items:center;
  margin-bottom: 14px;
}
.avatar{
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  color: rgba(233,238,252,0.92);
  letter-spacing: .4px;
  overflow:hidden;
  position:relative;
  flex: 0 0 auto;
}
.avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:none;
}
.avatar.has-img img{ display:block; }
.avatar.has-img .avatarInitials{ display:none; }
.avatarInitials{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  font-weight:900;
  letter-spacing:.4px;
}
.profileIdentity{
  min-width:0;
  flex:1 1 auto;
}
.displayName{
  font-family:'Poppins',sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.2px;
  line-height:1.2;
}
.displayMeta{
  color: rgba(154,167,194,0.90);
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
}
.profileBadges{
  margin-top: 8px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.bannerBadge{
  display:none;
  align-items:center;
  gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(47,125,255,0.24);
  background: rgba(47,125,255,0.10);
  color: rgba(233,238,252,0.96);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .15px;
  white-space: nowrap;
}
.bannerBadge.show{ display:inline-flex; }
.bannerBadge i{
  color: var(--blue2);
  font-size: 12px;
}
.avatarTools{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:10px;
}
.avatarUploadBtn{
  display:none;
  padding: 10px 12px;
  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.96);
  font-size: 12.5px;
  font-weight: 900;
  cursor: pointer;
  transition: 160ms ease;
  white-space: nowrap;
}
.avatarUploadBtn:hover{
  transform: translateY(-1px);
  border-color: rgba(47,125,255,0.35);
  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
}
.avatarUploadBtn[disabled]{
  opacity:.65;
  cursor:not-allowed;
  transform:none !important;
  box-shadow:none !important;
}

.notice{
  margin-top: 10px;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(47,125,255,0.22);
  background: rgba(47,125,255,0.08);
  color: rgba(229,231,235,0.92);
  font-size: 13px;
  line-height: 1.55;
  display:none;
  white-space:pre-wrap;
}
.notice.show{ display:block; }
.notice.error{
  border-color: rgba(248,113,113,0.32);
  background: rgba(248,113,113,0.10);
}

.field-title{
  display:block;
  margin-top: 12px;
  font-size: 12.5px;
  font-weight: 900;
  color: rgba(154,167,194,0.92);
  letter-spacing: .2px;
  font-family:'Poppins',sans-serif;
}

.field{
  width:100%;
  padding: 14px 14px;
  border-radius: 12px;
  outline:none;
  background: var(--field);
  border: 1px solid var(--fieldBorder);
  color: rgba(255,255,255,0.95);
  margin-top: 10px;
  font-family:'Poppins',sans-serif;
}
.field::placeholder{ color: var(--placeholder); }

.actions{
  display:flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap:wrap;
}
.btn{
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 900;
  font-size: 13px;
  cursor:pointer;
  transition: 160ms ease;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  box-shadow: 0 14px 40px rgba(0,0,0,0.18);
  min-width: 170px;
}
.btn:hover{
  transform: translateY(-1px);
  border-color: rgba(47,125,255,0.35);
  box-shadow: 0 16px 44px rgba(0,0,0,0.28);
}
.btn.primary{
  background: rgba(47,125,255,0.18);
  border-color: rgba(47,125,255,0.35);
}
.btn.secondary{
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow:none;
}
.btn.secondary:hover{
  background: rgba(255,255,255,0.16);
  transform: translateY(-1px);
}

.kv{
  margin-top: 12px;
  font-size: 12.8px;
  color: rgba(154,167,194,0.92);
  font-weight: 800;
}
.kv b{ color: rgba(233,238,252,0.92); }

/* ✅ Change Password Modal */
.modal-backdrop{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display:none;
}
.modal{
  position:fixed;
  inset:0;
  display:none;
  z-index: 201;
  align-items:center;
  justify-content:center;
  padding: 22px;
}
.modal-card{
  width: min(520px, calc(100% - 24px));
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(10,13,20,0.92);
  box-shadow: 0 30px 90px rgba(0,0,0,0.55);
  overflow:hidden;
}
.modal-head{
  padding: 16px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}
.modal-head h2{
  font-family:'Poppins',sans-serif;
  font-size: 14.5px;
  font-weight: 900;
  letter-spacing: .2px;
}
.modal-close{
  width:40px;height:40px;
  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:grid;
  place-items:center;
  transition: 160ms ease;
}
.modal-close:hover{
  transform: translateY(-1px);
  border-color: rgba(47,125,255,0.35);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}
.modal-body{ padding: 16px; }
.modal-actions{
  display:flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap:wrap;
}
.modal-note{
  margin-top: 10px;
  font-size: 12.5px;
  color: rgba(154,167,194,0.92);
  font-weight: 800;
  line-height: 1.45;
}

/* 🔔 Notifications modal (MATCH TERMS STYLE) */
.notifModal{
  position: fixed;
  inset: 0;
  z-index: 200;
  display:none;
  align-items:flex-start;
  justify-content:flex-start;
  padding: 0;
  background: transparent;
}
.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: 28px;
  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;
  font-weight: 800;
}
.footer-content a:hover{ color: var(--text); }

/* responsive */
@media (max-width: 860px){
  nav{ display:none; }
  .nav-actions{ display:none; }

  .hamburger{ display:grid; margin-left:0; order:1; }
  .notifWrap { order: 2; }
  .profile-wrap { order: 3; }

  .page{ padding-top: 58px; }
  .card-body{ padding: 16px; }
  .btn{ min-width: 150px; }

  .profile-head{
    align-items:flex-start;
    flex-wrap:wrap;
  }
  .avatarTools{
    width:100%;
    margin-left:0;
    justify-content:flex-start;
  }

  /* hide only the "mark all" text on small screens */
  .notifAction .muted{
    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;
  }
}

/* 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; }