/* ═══════════════════════════════════════════════════════════
   LotokMarket — Design System
   Palette: Full dark + Electric Blue + Neon Cyan
   ═══════════════════════════════════════════════════════════ */

:root {
  /* ── Backgrounds (lifted charcoal, not pitch black) ─ */
  --c-bg:        #222838;
  --c-surface:   #212430;
  --c-surface-2: #2b2e3c;
  --c-card:      rgba(34, 37, 50, 0.92);
  --c-card-h:    rgba(42, 46, 60, 0.96);

  /* ── Brand colors ────────────────────────────────────── */
  --c-blue:      #5B8CFF;   /* electric blue (PRIMARY) */
  --c-blue-l:    #8BAAFF;   /* lighter blue */
  --c-cyan:      #00E0FF;   /* neon cyan (ACCENT) */
  --c-cyan-l:    #60EEFF;   /* lighter cyan */
  --c-purple:    #9B72FF;   /* purple (tertiary) */

  /* Alias for backward compat */
  --c-violet:    #5B8CFF;
  --c-violet-l:  #8BAAFF;

  /* ── Semantic ────────────────────────────────────────── */
  --c-success:   #22C55E;
  --c-warning:   #F59E0B;
  --c-error:     #EF4444;

  /* ── Text (tuned for dark bg) ────────────────────────── */
  --c-text:   #f2f2f6;
  --c-text-2: #b4b4c0;
  --c-text-3: #9a9aac;
  --c-text-4: #767688;

  /* ── Gradients ───────────────────────────────────────── */
  --gem-hi: #fff1c9;
  --gem-mid: #e8a04a;
  --gem-lo: #b85c1e;
  --gem-fill: linear-gradient(160deg, var(--gem-hi) 0%, var(--gem-mid) 46%, var(--gem-lo) 100%);
  --gem-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 1.2 23.6 7l5 5.4L16 30.8 3.4 12.4 8.4 7 16 1.2z'/%3E%3C/svg%3E");

  --g-brand:       linear-gradient(135deg, #5B8CFF 0%, #00E0FF 100%);
  --g-brand-r:     linear-gradient(135deg, #00E0FF 0%, #5B8CFF 100%);
  --g-blue-purple: linear-gradient(135deg, #5B8CFF 0%, #9B72FF 100%);
  --g-card:        linear-gradient(135deg, rgba(34,37,50,0.95) 0%, rgba(42,46,60,0.9) 100%);
  --g-glass:       linear-gradient(135deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.03) 100%);

  /* ── Borders ─────────────────────────────────────────── */
  --border:        rgba(255, 255, 255, 0.12);
  --border-hover:  rgba(91, 140, 255, 0.35);
  --border-active: rgba(91, 140, 255, 0.55);
  --border-cyan:   rgba(0, 224, 255, 0.22);

  /* ── Radius ──────────────────────────────────────────── */
  --r-xs:   5px;
  --r-sm:   9px;
  --r-md:   13px;
  --r-lg:   18px;
  --r-xl:   24px;
  --r-2xl:  32px;
  --r-full: 9999px;

  /* ── Shadows ─────────────────────────────────────────── */
  --s-sm:   0 2px 8px rgba(0,0,0,0.28);
  --s-md:   0 8px 30px rgba(0,0,0,0.34);
  --s-lg:   0 20px 50px rgba(0,0,0,0.42);
  --s-blue: 0 0 30px rgba(91,140,255,0.28), 0 0 60px rgba(91,140,255,0.1);
  --s-cyan: 0 0 30px rgba(0,224,255,0.28), 0 0 60px rgba(0,224,255,0.1);

  /* ── Misc ────────────────────────────────────────────── */
  --nav-h: 64px;
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.18) transparent;
}
html::-webkit-scrollbar { width: 5px; }
html::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 3px; }
html::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.24); }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: var(--nav-h);
  font-size: 14px;
  line-height: 1.6;
}

@view-transition {
  navigation: none;
}

::view-transition-old(root) {
  animation: 180ms ease both vt-out;
}

::view-transition-new(root) {
  animation: 180ms ease both vt-in;
}

::view-transition-group(site-nav) {
  animation-duration: 1ms;
}

@keyframes vt-out {
  to { opacity: 0; }
}

@keyframes vt-in {
  from { opacity: 0; }
}

/* ── Navbar ─────────────────────────────────────────────── */
.navbar {
  view-transition-name: site-nav;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  background: rgba(24, 26, 34, 0.82);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}

.navbar.scrolled {
  background: rgba(24, 26, 34, 0.94);
  border-bottom-color: rgba(91,140,255,0.22);
  box-shadow: 0 1px 0 rgba(91,140,255,0.15), 0 4px 24px rgba(0,0,0,0.28);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  overflow: visible;
  transition: transform 0.35s var(--ease-smooth);
}

.logo:hover .logo-icon { transform: scale(1.06); }

.logo-tray {
  fill: rgba(91, 140, 255, 0.08);
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo-rim {
  stroke: #dbe4ff;
  stroke-width: 2.15;
  stroke-linecap: round;
  animation: lotokRim 4.8s ease infinite;
}

.logo-glow {
  fill: #5B8CFF;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: lotokGlow 4.8s ease-out infinite;
}

.logo-token {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: lotokDrop 4.8s cubic-bezier(0.22, 0.82, 0.24, 1) infinite;
}

@keyframes lotokDrop {
  0%   { transform: translateY(0); opacity: 0; }
  16%  { transform: translateY(0); opacity: 1; }
  36%  { transform: translateY(108%); opacity: 1; }
  44%  { transform: translateY(84%); }
  52%  { transform: translateY(96%); }
  82%  { transform: translateY(96%); opacity: 1; }
  94%  { transform: translateY(96%); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

@keyframes lotokGlow {
  0%, 30% { opacity: 0; transform: scale(0.55); }
  44%     { opacity: 0.55; transform: scale(1); }
  68%     { opacity: 0; transform: scale(1.45); }
  100%    { opacity: 0; }
}

@keyframes lotokRim {
  0%, 32% { stroke-opacity: 0.4; }
  46%     { stroke-opacity: 1; }
  72%, 100% { stroke-opacity: 0.4; }
}

.logo-icon--still .logo-token {
  animation: none;
  transform: translateY(96%);
  opacity: 1;
}

.logo-icon--still .logo-glow {
  animation: none;
  opacity: 0.28;
  transform: none;
}

.logo-icon--still .logo-rim { animation: none; stroke-opacity: 0.85; }

@media (prefers-reduced-motion: reduce) {
  .logo-token {
    animation: none;
    transform: translateY(96%);
    opacity: 1;
  }
  .logo-glow,
  .logo-rim { animation: none; }
  .logo-glow { opacity: 0.28; }
  .logo-rim { stroke-opacity: 0.85; }
}

.logo-text {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--c-text);
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: baseline;
}

.logo-wave {
  display: inline-flex;
}

.logo-wave i {
  font-style: normal;
  display: inline-block;
  animation: logoWave 2.6s ease-in-out infinite;
}

.logo-wave i:nth-child(2) { animation-delay: 0.12s; }
.logo-wave i:nth-child(3) { animation-delay: 0.24s; }
.logo-wave i:nth-child(4) { animation-delay: 0.36s; }
.logo-wave i:nth-child(5) { animation-delay: 0.48s; }
.logo-wave i:nth-child(6) { animation-delay: 0.6s; }

.logo-wave i.logo-hop {
  animation: logoHop 3.4s ease-in-out infinite;
}

@keyframes logoWave {
  0%, 70%, 100% { transform: translateY(0); }
  35% { transform: translateY(-3px); }
}

@keyframes logoHop {
  0%, 62%, 100% { transform: translate(0, 0) rotate(0); }
  74% { transform: translate(7px, -8px) rotate(14deg); }
  86% { transform: translate(2px, -2px) rotate(-6deg); }
}

@media (prefers-reduced-motion: reduce) {
  .logo-wave i, .logo-hop { animation: none; }
}

.logo-accent {
  color: #9eb6ff;
  background: none;
  -webkit-text-fill-color: #9eb6ff;
}

/* Nav links */
.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  margin: 0; padding: 0;
  flex: 1;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-text-3);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: var(--r-sm);
  transition: color 0.2s, background 0.2s;
  display: block;
}

.nav-link:hover { color: var(--c-text); background: rgba(91,140,255,0.08); }
.nav-link.active { color: var(--c-blue-l); background: rgba(91,140,255,0.1); }

/* Notification bell */
.notifications-icon,
.notifications-btn {
  position: relative;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(91,140,255,0.08);
  border: 1px solid rgba(91,140,255,0.18);
  border-radius: 50%;
  cursor: pointer;
  color: var(--c-text-3);
  transition: all 0.2s;
  flex-shrink: 0;
}

.notifications-icon:hover,
.notifications-btn:hover {
  background: rgba(91,140,255,0.16);
  border-color: rgba(91,140,255,0.38);
  color: var(--c-text);
  transform: scale(1.05);
}

.bell-icon,
.notifications-btn svg { width: 15px; height: 15px; }

.badge,
.notif-badge {
  position: absolute;
  top: -3px; right: -3px;
  background: var(--c-error);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--c-bg);
}

.badge.is-ready {
  animation: badgePulse 2.5s ease-in-out infinite;
}

@keyframes badgePulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.2)} }

/* Nav actions (right side) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-left: auto;
}

.nav-user-menu {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.nav-profile-avatar {
  height: 40px;
  padding: 0 1.15rem 0 0.28rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #3d6ef5;
  color: #fff;
  text-decoration: none;
  border: 0;
  transition: transform 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 2px 10px rgba(40, 70, 180, 0.28);
  max-width: 22rem;
  overflow: hidden;
}

.nav-profile-name {
  font-size: 0.84rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1;
  max-width: 9.5rem;
  padding-right: 0.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html:not(.nick-known) .nav-profile-avatar {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}

html:not(.nick-known) .nav-profile-name {
  display: none;
}

#localeBtnCode:empty::before {
  content: var(--nav-lang, "EN");
}

html.nick-known .nav-profile-name:empty::before {
  content: var(--nav-nick, "");
}

.nav-profile-balance {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

html:not(.nick-known) .nav-profile-balance {
  display: none;
}

html.nick-known .nav-profile-balance:empty::before {
  content: var(--nav-bal, none);
  margin-left: 0.45rem;
  padding-left: 0.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.35);
}

html.nick-known .nav-profile-balance:not(:empty) {
  display: inline-flex;
  align-items: center;
  margin-left: 0.45rem;
  padding-left: 0.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.35);
}

.gem-mark {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  background: var(--gem-fill);
  -webkit-mask: var(--gem-shape) center / contain no-repeat;
  mask: var(--gem-shape) center / contain no-repeat;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.28));
  vertical-align: -0.12em;
}

.nav-profile-avatar-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  flex-shrink: 0;
}

.nav-profile-avatar-icon svg {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35));
}

.nav-profile-avatar:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 16px rgba(91, 140, 255, 0.4);
}

.nav-profile-avatar.is-active {
  border-color: rgba(0, 224, 255, 0.65);
  box-shadow: 0 0 0 2px rgba(0, 224, 255, 0.2);
}

.nav-avatar-initial {
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -0.5px;
}

.notifications-icon {
  padding: 0;
  border: none;
  font: inherit;
}

.nav-login-btn {
  display: inline-flex;
}

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.nav-mobile-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: var(--c-text-3);
  border-radius: 2px;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 1.125rem;
  border-radius: var(--r-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.18s var(--ease-smooth);
  white-space: nowrap;
  letter-spacing: 0.1px;
  -webkit-appearance: none;
}

.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn:active { transform: scale(0.97) !important; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: var(--g-brand);
  color: white;
  box-shadow: 0 4px 18px rgba(91,140,255,0.35);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 6px 24px rgba(91,140,255,0.55);
  transform: translateY(-1px);
  filter: brightness(1.07);
}

.btn-ghost {
  background: rgba(91,140,255,0.08);
  border: 1px solid rgba(91,140,255,0.2);
  color: var(--c-text-2);
}
.btn-ghost:hover:not(:disabled) {
  background: rgba(91,140,255,0.14);
  border-color: rgba(91,140,255,0.38);
  color: var(--c-text);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(91,140,255,0.35);
  color: var(--c-blue-l);
}
.btn-outline:hover:not(:disabled) {
  background: rgba(91,140,255,0.08);
  border-color: rgba(91,140,255,0.6);
  transform: translateY(-1px);
}

.btn-lg { padding: 0.7rem 1.6rem; font-size: 0.9375rem; border-radius: var(--r-md); }
.btn-lg svg { width: 17px; height: 17px; }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8125rem; }
.btn-full { width: 100%; }

/* Auth btn (legacy compat) */
.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 1.125rem;
  border-radius: var(--r-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: var(--g-brand);
  color: white;
  box-shadow: 0 4px 16px rgba(91,140,255,0.32);
  transition: all 0.18s;
}
.auth-btn:hover:not(:disabled) { box-shadow: 0 6px 22px rgba(91,140,255,0.52); transform: translateY(-1px); filter: brightness(1.07); }
.auth-btn:active { transform: scale(0.97); }
.auth-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ── Form inputs ─────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label { font-size: 0.8125rem; font-weight: 500; color: var(--c-text-3); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: rgba(30, 33, 44, 0.92);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--c-text);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  transition: all 0.18s;
  outline: none;
  -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(91,140,255,0.58);
  box-shadow: 0 0 0 3px rgba(91,140,255,0.1);
  background: rgba(36, 39, 52, 0.96);
}

input::placeholder, textarea::placeholder { color: var(--c-text-4); }

/* ── Modals ─────────────────────────────────────────────── */
.modal { display: none; position: fixed; inset: 0; z-index: 2000; }

.modal[style*="block"] {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 18, 28, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-content {
  position: relative;
  z-index: 1;
  background: rgba(32, 35, 48, 0.98);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2.25rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--s-lg), 0 0 50px rgba(91,140,255,0.14);
  animation: modalIn 0.3s var(--ease-bounce);
  overflow: hidden;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--g-brand);
  opacity: 0.5;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.93) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close, .close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(91,140,255,0.14);
  border-radius: 50%;
  cursor: pointer;
  color: var(--c-text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  text-align: center;
}

.modal-close:hover, .close:hover {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.25);
  color: #EF4444;
  transform: rotate(90deg);
}
.modal-close svg { width: 12px; height: 12px; }

.modal-icon {
  width: 50px; height: 50px;
  background: rgba(91,140,255,0.12);
  border: 1px solid rgba(91,140,255,0.25);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.375rem;
  color: var(--c-blue-l);
}
.modal-icon.success { background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.25); color: #22C55E; }
.modal-icon svg { width: 24px; height: 24px; }

.modal-content h2 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--c-text);
  text-align: center;
  margin-bottom: 0.3rem;
  letter-spacing: -0.3px;
}

.modal-subtitle {
  font-size: 0.875rem;
  color: var(--c-text-3);
  text-align: center;
  margin-bottom: 1.5rem;
}

.modal-form { display: flex; flex-direction: column; gap: 0.875rem; }

.modal-switch {
  margin-top: 1.125rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--c-text-3);
}

.link-btn {
  background: none; border: none;
  color: var(--c-blue-l);
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0;
  transition: color 0.18s;
}
.link-btn:hover { color: var(--c-cyan-l); }

.code-input {
  text-align: center;
  font-size: 1.875rem !important;
  letter-spacing: 0.5rem !important;
  font-weight: 700 !important;
  font-family: 'Space Grotesk', monospace !important;
}

/* ── Notifications dropdown ─────────────────────────────── */
.notifications-dropdown,
.notif-dropdown {
  position: fixed;
  top: calc(var(--nav-h) + 8px);
  right: 1.25rem;
  width: 340px;
  max-height: 460px;
  background: rgba(30, 33, 46, 0.98);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--s-lg), 0 0 30px rgba(91,140,255,0.14);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  overflow: hidden;
  z-index: 1001;
  animation: dropIn 0.22s var(--ease-smooth);
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.notifications-header,
.notif-header {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(91,140,255,0.1);
  background: rgba(91,140,255,0.04);
}

.notifications-header h3,
.notif-header h3 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c-text);
}

.notifications-header button,
.notif-mark-btn {
  background: none; border: none;
  color: var(--c-blue-l);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.2rem 0.45rem;
  border-radius: var(--r-xs);
  transition: background 0.18s;
  font-family: 'Inter', sans-serif;
}
.notifications-header button:hover, .notif-mark-btn:hover { background: rgba(91,140,255,0.12); }

.notifications-list,
.notif-list {
  overflow-y: auto;
  max-height: 360px;
  padding: 0.375rem;
}

.notification-item {
  padding: 0.6875rem 0.875rem;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.18s;
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-bottom: 0.2rem;
  color: var(--c-text-2);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.notification-item:hover { background: rgba(91,140,255,0.07); }
.notification-item.notif-clickable { cursor: pointer; }
.notification-item.notif-clickable:hover {
  border-color: rgba(91, 140, 255, 0.2);
  background: rgba(91, 140, 255, 0.1);
}
.notification-item.unread {
  background: rgba(91,140,255,0.1);
  border-left: 2px solid var(--c-blue);
  color: var(--c-text);
}

.notification-item svg,
.notification-item .notif-item-icon {
  width: 14px; height: 14px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--c-blue-l);
  stroke: var(--c-blue-l);
}

.notif-item-body {
  flex: 1;
  min-width: 0;
}

.notif-item-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 0.2rem;
  line-height: 1.35;
}

.notif-item-message {
  font-size: 0.8125rem;
  color: var(--c-text-2);
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.notif-empty {
  text-align: center;
  color: var(--c-text-4);
  font-size: 0.8125rem;
  padding: 2rem 1rem;
}

/* ── Toast messages (popup alerts, not bell dropdown) ─────── */
.toast-container {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  pointer-events: none;
  max-width: min(380px, calc(100vw - 2rem));
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  max-width: 360px;
  padding: 0.75rem 0.85rem 0.75rem 0.75rem;
  background: rgba(32, 35, 48, 0.96);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: toastIn 0.32s var(--ease-bounce);
  color: var(--c-text);
}

.toast-success { border-color: rgba(34, 197, 94, 0.4); }
.toast-error   { border-color: rgba(239, 68, 68, 0.45); }
.toast-warning { border-color: rgba(245, 158, 11, 0.4); }
.toast-info    { border-color: rgba(91, 140, 255, 0.35); }
.toast-deposit { border-color: rgba(245, 158, 11, 0.35); }

.toast-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--r-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-success .toast-icon { background: rgba(34, 197, 94, 0.14); color: #22c55e; }
.toast-error   .toast-icon { background: rgba(239, 68, 68, 0.14); color: #ef4444; }
.toast-warning .toast-icon { background: rgba(245, 158, 11, 0.14); color: #f59e0b; }
.toast-info    .toast-icon { background: rgba(91, 140, 255, 0.12); color: var(--c-blue-l); }
.toast-deposit .toast-icon { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.toast-icon svg { width: 15px; height: 15px; }

.toast-message {
  flex: 1;
  margin: 0;
  padding: 0.2rem 0 0;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
  word-break: break-word;
}

.toast-close {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin: -2px -4px 0 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--c-text-4);
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--r-xs);
  transition: color 0.15s, background 0.15s;
}

.toast-close:hover {
  color: var(--c-text);
  background: rgba(255, 255, 255, 0.06);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(24px) scale(0.96); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(24px); }
}

.toast-hide { animation: toastOut 0.22s var(--ease-smooth) forwards; }

/* ── Loading ─────────────────────────────────────────────── */
.loading {
  display: inline-block;
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.65s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Domain verification text (visually hidden, still in HTML for crawlers) */
.domain-verify-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── Page animation ─────────────────────────────────────── */
.main-content { animation: pageLoad 0.45s var(--ease-smooth); }
@keyframes pageLoad { from { opacity: 0; } to { opacity: 1; } }

/* ── Scroll animations ──────────────────────────────────── */
.animate-target {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s var(--ease-smooth), transform 0.55s var(--ease-smooth);
}
.animate-target.animate-in { opacity: 1; transform: translateY(0); }
.animate-target:nth-child(2) { transition-delay: 0.07s; }
.animate-target:nth-child(3) { transition-delay: 0.14s; }
.animate-target:nth-child(4) { transition-delay: 0.21s; }

/* ── Gradient text utility ──────────────────────────────── */
.gradient-text {
  background: var(--g-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-login-btn { padding: 0.5rem 0.875rem; font-size: 0.8125rem; }

  .notifications-dropdown, .notif-dropdown {
    width: calc(100vw - 1.5rem);
    right: 0.75rem;
  }

  .modal-content { padding: 1.75rem 1.25rem; border-radius: var(--r-lg); }

  .toast-container {
    right: 0.75rem;
    left: 0.75rem;
    max-width: none;
    align-items: stretch;
  }

  .toast { max-width: none; }
}
