*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #030408;
  --surface: #0b0f1a;
  --surface-2: #0f1420;
  --border: rgba(255,255,255,0.07);
  --border-blue: rgba(61,111,255,0.2);
  --blue: #3d6fff;
  --blue-dim: #2a4db5;
  --glow: #5c8aff;
  --purple: #a78bfa;
  --text: #e8eaf0;
  --muted: #6b7280;
  --muted-2: #4b5563;
  --pill-bg: rgba(61,111,255,0.1);
  --red: #ef4444;
  --red-dim: rgba(239,68,68,0.12);
  --red-border: rgba(239,68,68,0.25);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

#hexCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 60px;
  background: rgba(3,4,8,0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo svg {
  flex-shrink: 0;
}

.logo-dot {
  color: var(--blue);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-auth-out {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-auth-in {
  position: relative;
  display: none;
  align-items: center;
}

.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 12px 6px 6px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  color: var(--text);
  font-family: 'Inter', sans-serif;
}

.nav-user-btn:hover {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
}

.nav-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border-blue);
}

.nav-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-chevron {
  color: var(--muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.nav-auth-in.open .nav-chevron {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 300;
}

.nav-auth-in.open .nav-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.nav-dropdown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.nav-dropdown-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-blue);
  flex-shrink: 0;
}

.nav-dropdown-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.nav-dropdown-tag {
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  background: none;
  border: none;
  width: 100%;
  font-family: 'Inter', sans-serif;
  text-align: left;
}

.nav-dropdown-item:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}

.nav-dropdown-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-dropdown-item.signout {
  color: var(--red);
  margin-top: 4px;
  border-top: 1px solid var(--border);
  padding-top: 11px;
  border-radius: 0 0 8px 8px;
}

.nav-dropdown-item.signout:hover {
  background: var(--red-dim);
  color: #f87171;
}

.nav-dropdown-item.signout svg {
  opacity: 1;
}

.btn-login {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.btn-login:hover {
  background: var(--glow);
  box-shadow: 0 0 20px rgba(92,138,255,0.4);
  transform: translateY(-1px);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
  pointer-events: none;
}

.btn-primary:hover {
  background: var(--glow);
  box-shadow: 0 0 32px rgba(92,138,255,0.5), 0 4px 20px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.04);
}

.stats-row {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(11,15,26,0.8);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.stat-item {
  padding: 16px 32px;
  text-align: center;
  border-right: 1px solid var(--border);
}

.stat-item:last-child {
  border-right: none;
}

.stat-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 80px;
}

.pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--pill-bg);
  border: 1px solid var(--border-blue);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #a8b4d4;
}

.pill svg {
  color: var(--blue);
}

footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--border);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

footer .logo {
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  color: var(--muted);
  font-size: 12px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 700px) {
  nav {
    padding: 0 16px;
  }

  .nav-links {
    display: none;
  }

  .stats-row {
    flex-direction: column;
  }

  .stat-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .stat-item:last-child {
    border-bottom: none;
  }

  footer {
    flex-direction: column;
    text-align: center;
  }

  .nav-dropdown {
    right: -8px;
    min-width: 180px;
  }
}