:root {
  --bg: #06080f;
  --bg2: #0d1220;
  --card: #0f1624;
  --card2: #161f30;
  --border: rgba(0, 212, 255, 0.12);
  --border2: rgba(255, 255, 255, 0.06);
  --cyan: #00d4ff;
  --cyan-glow: rgba(0, 212, 255, 0.15);
  --gold: #f0a500;
  --text: #e8edf5;
  --muted: rgba(232, 237, 245, 0.45);
  --success: #00c896;
  --error: #ff4d6d;
  --nav-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(rgba(0, 212, 255, 0.055) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Scanlines overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px, transparent 3px,
    rgba(0, 0, 0, 0.022) 3px, rgba(0, 0, 0, 0.022) 4px
  );
  pointer-events: none;
  z-index: 9998;
}

/* ── BACKGROUND SCENE ── */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}

.orb-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.07) 0%, transparent 70%);
  top: -250px; right: -150px;
  animation: orbDrift 18s ease-in-out infinite alternate;
}

.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(240, 165, 0, 0.05) 0%, transparent 70%);
  bottom: 100px; left: -150px;
  animation: orbDrift 24s ease-in-out infinite alternate-reverse;
}

.orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.04) 0%, transparent 70%);
  top: 50%; left: 40%;
  transform: translate(-50%, -50%);
  animation: orbDrift 20s ease-in-out infinite alternate;
}

@keyframes orbDrift {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(40px, 30px); }
}

.sil {
  position: absolute;
  color: var(--cyan);
}

.sil-1 {
  width: 360px;
  right: -40px;
  top: 8vh;
  opacity: 0.045;
  transform: rotate(4deg);
  animation: silFloat 12s ease-in-out infinite alternate;
}

.sil-2 {
  width: 260px;
  left: -50px;
  top: 45vh;
  opacity: 0.025;
  transform: rotate(-6deg) scaleX(-1);
  animation: silFloat 16s ease-in-out infinite alternate-reverse;
}

.sil-3 {
  width: 200px;
  right: 8%;
  bottom: 6vh;
  opacity: 0.02;
  transform: rotate(-3deg);
  animation: silFloat 14s ease-in-out infinite alternate;
}

@keyframes silFloat {
  0%   { transform: translateY(0) rotate(var(--r, 4deg)); }
  100% { transform: translateY(-20px) rotate(var(--r, 4deg)); }
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(6, 8, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border2);
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo {
  height: 36px;
  width: 36px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.nav-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text);
}

#nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  object-fit: cover;
}

.nav-handle {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.btn-logout {
  font-size: 12px;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border2);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-logout:hover {
  color: var(--text);
  border-color: var(--border);
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  padding-top: var(--nav-h);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(240, 165, 0, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  width: 100%;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--cyan);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--cyan-glow);
  margin-bottom: 24px;
}

.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

h1 {
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.accent { color: var(--cyan); }

.hero-desc {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 40px;
}

.stats-row {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 40px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.stat-lbl {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border2);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--cyan);
  color: #000;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.25);
}

.btn-primary:hover {
  background: #fff;
  box-shadow: 0 0 50px rgba(0, 212, 255, 0.4);
  transform: translateY(-1px);
}

.hero-image-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-glow {
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Mystery grid */
.mystery-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
  width: 100%;
  max-width: 480px;
  animation: float 6s ease-in-out infinite;
}

.mystery-card {
  background: linear-gradient(135deg, var(--card2) 0%, rgba(0,212,255,0.03) 100%);
  border: 1px solid var(--border2);
  border-radius: 14px;
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.3s;
  position: relative;
}

.mystery-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,212,255,0.04) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.mystery-card:hover {
  border-color: rgba(0, 212, 255, 0.25);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.06);
}

.mystery-card:hover::after {
  opacity: 1;
}

.mystery-card.large {
  grid-row: span 2;
  aspect-ratio: unset;
  border-color: rgba(0, 212, 255, 0.1);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.05);
}

.mystery-card img {
  width: 38%;
  opacity: 0.07;
  filter: brightness(0) invert(1);
  user-select: none;
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.mystery-card.large img {
  width: 50%;
  opacity: 0.1;
  animation: logoPulse 4s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { opacity: 0.1; }
  50% { opacity: 0.18; }
}

/* ── TRAITS ── */
.traits-section {
  padding: 100px 40px;
  border-top: 1px solid var(--border2);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--cyan);
  text-align: center;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 16px;
  color: var(--muted);
  text-align: center;
  max-width: 540px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

.trait-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.trait-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
}

.trait-card:hover {
  border-color: var(--border);
  background: var(--card2);
  transform: translateY(-4px);
}

.trait-icon {
  font-size: 32px;
}

.trait-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── WHITELIST SECTION ── */
.whitelist-section {
  padding: 100px 40px;
  border-top: 1px solid var(--border2);
}

.app-wrap {
  max-width: 580px;
  margin: 0 auto;
}

/* Connect card */
.connect-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
}

.connect-card h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}

.connect-card p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 32px;
}

.btn-twitter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-twitter:hover {
  background: #111;
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-1px);
}

.btn-twitter svg {
  width: 18px; height: 18px;
  fill: #fff;
}

/* Whitelist form */
.wl-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 40px;
}

.wl-user {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border2);
}

.wl-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  object-fit: cover;
}

.wl-user-info h4 {
  font-size: 16px;
  font-weight: 600;
}

.wl-user-info span {
  font-size: 13px;
  color: var(--muted);
}

.wl-tasks-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  cursor: pointer;
}

.task-item:hover {
  border-color: var(--border);
  background: rgba(0, 212, 255, 0.04);
}

.task-item.done {
  border-color: rgba(0, 200, 150, 0.3);
  background: rgba(0, 200, 150, 0.05);
}

.task-item.failed {
  border-color: rgba(255, 77, 109, 0.3);
  background: rgba(255, 77, 109, 0.05);
}

.task-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}

.task-status {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
  transition: all 0.2s;
}

.task-status .task-num {
  width: auto; height: auto;
  border: none;
  background: transparent;
}

.task-status.checking {
  border-color: var(--border);
  position: relative;
  color: transparent;
}

.task-status.checking::after {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  border: 2px solid var(--border2);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.task-status.pass {
  background: var(--success);
  border-color: var(--success);
  color: #000;
}

.task-status.fail {
  background: var(--error);
  border-color: var(--error);
  color: #fff;
}

.btn-recheck {
  width: 100%;
  padding: 11px;
  margin-bottom: 22px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--cyan);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-recheck:hover:not(:disabled) {
  background: rgba(0, 212, 255, 0.06);
  border-color: var(--cyan);
}

.btn-recheck:disabled {
  opacity: 0.6;
  cursor: default;
}

.task-item.done .task-num {
  background: var(--success);
  border-color: var(--success);
  color: #000;
}

.task-item.failed .task-num {
  background: var(--error);
  border-color: var(--error);
  color: #fff;
}

.task-text {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.task-link-icon {
  font-size: 14px;
  color: var(--muted);
  flex-shrink: 0;
}

.wallet-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  display: block;
}

.wallet-input {
  width: 100%;
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 20px;
}

.wallet-input:focus {
  border-color: var(--border);
}

.wallet-input::placeholder {
  color: var(--muted);
}

.btn-submit {
  width: 100%;
  background: var(--cyan);
  color: #000;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.2);
}

.btn-submit:hover:not(:disabled) {
  background: #fff;
  box-shadow: 0 0 50px rgba(0, 212, 255, 0.35);
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Success */
.success-card {
  background: var(--card);
  border: 1px solid rgba(0, 200, 150, 0.3);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
}

.success-icon {
  font-size: 56px;
  margin-bottom: 20px;
}

.success-card h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 12px;
}

.success-card p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.task-results {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.task-result-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-result-badge.pass {
  background: rgba(0, 200, 150, 0.1);
  color: var(--success);
  border: 1px solid rgba(0, 200, 150, 0.3);
}

.task-result-badge.fail {
  background: rgba(255, 77, 109, 0.1);
  color: var(--error);
  border: 1px solid rgba(255, 77, 109, 0.3);
}

/* Already registered */
.already-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
}

.already-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 12px;
}

.already-card p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}

/* Error msg */
.error-msg {
  background: rgba(255, 77, 109, 0.08);
  border: 1px solid rgba(255, 77, 109, 0.25);
  color: var(--error);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 16px;
  text-align: center;
}

/* Loading */
.loading-wrap {
  text-align: center;
  padding: 60px;
}

.spinner {
  width: 40px; height: 40px;
  border: 2px solid var(--border2);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border2);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}

.footer-logo {
  height: 32px;
  opacity: 0.3;
  filter: brightness(0) invert(1);
}

.footer-text {
  font-size: 13px;
  color: var(--muted);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 0 20px; }
  .nav-title { display: none; }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 60px 20px;
    gap: 48px;
    text-align: center;
  }

  .hero-desc { margin: 0 auto 32px; }
  .stats-row { justify-content: center; }
  .hero-image-wrap { order: -1; }

  .traits-section,
  .whitelist-section { padding: 60px 20px; }

  .trait-cards { grid-template-columns: repeat(2, 1fr); }

  .wl-card { padding: 28px 20px; }
  .connect-card { padding: 32px 20px; }
  .success-card { padding: 32px 20px; }
}
