@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Syne:wght@700;800&display=swap');

:root {
  --bg: #0D0A1A;
  --surface: #160F2E;
  --card: #1E1245;
  --primary: #7C3AED;
  --accent: #A855F7;
  --xp: #F59E0B;
  --profit: #10B981;
  --text: #FFFFFF;
  --muted: rgba(168, 85, 247, 0.45);
  --border: rgba(168, 85, 247, 0.18);
  --error: #EF4444;
}

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

html,
body {
  min-height: 100vh;
  background: var(--bg);
  font-family: 'DM Mono', 'Courier New', monospace;
  color: var(--text);
  overflow-x: hidden;
}

/* ── Background ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 15% 10%, rgba(124, 58, 237, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 85% 90%, rgba(168, 85, 247, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* dot grid */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(168, 85, 247, 0.12) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  z-index: 0;
}

/* ── Layout ── */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Navigation ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 60px;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: 'DM Mono', monospace;
  font-size: 22px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 8px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s;
}

.logo:hover {
  opacity: 0.8;
}

.logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--xp);
}

.nav-badge {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent);
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 20px;
  opacity: 0.8;
}

.level-badge {
  font-size: 10px;
  color: var(--xp);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  padding: 4px 12px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Hero Section ── */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 60px;
  gap: 0;
}

/* Eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--accent);
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid var(--border);
  padding: 7px 18px;
  border-radius: 20px;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.1s;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--profit);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

/* Headline */
.headline {
  font-family: 'Syne', 'DM Mono', monospace;
  font-size: clamp(52px, 8vw, 96px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.25s;
}

.headline .white {
  color: #fff;
}

.headline .purple {
  color: var(--accent);
}

/* Subheading */
.sub {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 56px;
  font-family: 'DM Mono', monospace;
  font-weight: 400;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.4s;
}

/* Progress Bar */
.progress-container {
  max-width: 480px;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.45s;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--card);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  width: 24%;
  animation: progressGlow 2s ease-in-out infinite;
  transition: width 0.3s ease;
}

@keyframes progressGlow {
  0%,
  100% {
    box-shadow: 0 0 5px rgba(124, 58, 237, 0.5);
  }

  50% {
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.8);
  }
}

/* ── Form Card ── */
.form-card {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.55s;
  position: relative;
  overflow: hidden;
}

.form-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 24px 24px 0 0;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 8px;
}

.field input,
.field textarea {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  font-family: 'DM Mono', monospace;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(168, 85, 247, 0.25);
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.field textarea {
  min-height: 80px;
  line-height: 1.5;
}

/* Error Message */
.error-message {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #FCA5A5;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 12px;
  margin-top: 16px;
  animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Submit Button ── */
.btn {
  width: 100%;
  margin-top: 8px;
  padding: 18px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border: none;
  border-radius: 12px;
  font-family: 'DM Mono', monospace;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 2px;
  color: white;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  position: relative;
  overflow: hidden;
}

.btn:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

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

.btn.loading {
  animation: btnPulse 0.6s ease-in-out infinite;
}

@keyframes btnPulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

.btn-glow {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  filter: blur(18px);
  opacity: 0.35;
  z-index: -1;
  transform: translateY(6px);
}

/* ── Success State ── */
.success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 0 8px;
  text-align: center;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes popIn {
  0% {
    transform: scale(0);
  }

  100% {
    transform: scale(1);
  }
}

.success h3 {
  font-family: 'Syne', monospace;
  font-size: 22px;
  font-weight: 700;
  color: white;
}

.success p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.xp-reward {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--xp);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  padding: 6px 14px;
  border-radius: 20px;
  letter-spacing: 1px;
}

/* ── Social Proof ── */
.proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  font-size: 12px;
  color: var(--muted);
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.7s;
  flex-wrap: wrap;
}

.proof-avatars {
  display: flex;
}

.proof-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  margin-right: -8px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Stats ── */
.stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-top: 60px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.8s;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-num {
  font-family: 'Syne', monospace;
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  display: block;
}

.stat-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 2px;
  margin-top: 4px;
  display: block;
}

.stat-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
}

@media (max-width: 640px) {
  .stat-divider {
    display: none;
  }
}

/* ── Leaderboard ── */
.leaderboard {
  max-width: 480px;
  margin: 60px auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.9s;
}

.leaderboard-title {
  font-family: 'Syne', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  margin-bottom: 16px;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.leaderboard-item:last-child {
  border-bottom: none;
}

.leaderboard-rank {
  font-size: 14px;
  color: var(--xp);
  font-weight: 500;
  width: 24px;
}

.leaderboard-name {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  text-align: left;
  padding-left: 12px;
}

.leaderboard-xp {
  font-size: 12px;
  color: var(--profit);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 4px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 32px;
  font-size: 12px;
  color: rgba(168, 85, 247, 0.2);
  letter-spacing: 2px;
  border-top: 1px solid var(--border);
}

footer p {
  margin: 0;
}

/* ── Animations ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Floating Elements ── */
.floating-elements {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-element {
  position: absolute;
  font-size: 20px;
  opacity: 0.1;
  animation: float 10s linear infinite;
}

.floating-element:nth-child(1) {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.floating-element:nth-child(2) {
  top: 60%;
  left: 80%;
  animation-delay: 2s;
}

.floating-element:nth-child(3) {
  top: 40%;
  left: 70%;
  animation-delay: 4s;
}

.floating-element:nth-child(4) {
  top: 80%;
  left: 20%;
  animation-delay: 6s;
}

.floating-element:nth-child(5) {
  top: 30%;
  left: 90%;
  animation-delay: 8s;
}

@keyframes float {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  100% {
    transform: translateY(-100vh) rotate(360deg);
  }
}

/* ── Responsive Design ── */
@media (max-width: 768px) {
  nav {
    padding: 20px 24px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .hero {
    padding: 60px 20px 48px;
  }

  .form-card {
    padding: 28px 24px;
    border-radius: 20px;
  }

  .stats {
    gap: 24px;
  }

  .stat-num {
    font-size: 22px;
  }

  .headline {
    font-size: clamp(40px, 6vw, 72px);
  }

  .sub {
    font-size: 16px;
  }

  .leaderboard {
    margin: 40px 24px 0;
  }

  .floating-element {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  nav {
    padding: 16px 12px;
  }

  .logo {
    font-size: 18px;
    letter-spacing: 4px;
  }

  .hero {
    padding: 40px 16px 32px;
  }

  .headline {
    font-size: clamp(32px, 5vw, 48px);
    margin-bottom: 16px;
  }

  .eyebrow {
    font-size: 10px;
    padding: 5px 12px;
    margin-bottom: 24px;
  }

  .sub {
    font-size: 14px;
    margin-bottom: 32px;
  }

  .form-card {
    padding: 20px 16px;
    border-radius: 16px;
  }

  .field {
    margin-bottom: 12px;
  }

  .field input,
  .field textarea {
    padding: 12px 16px;
    font-size: 14px;
  }

  .btn {
    padding: 14px;
    font-size: 13px;
  }

  .proof {
    gap: 4px;
  }

  .stats {
    flex-direction: column;
    gap: 32px;
    padding-top: 32px;
    margin-top: 40px;
  }

  .progress-label {
    font-size: 11px;
  }

  .leaderboard {
    margin: 32px 16px 0;
    padding: 16px;
  }

  .leaderboard-title {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .leaderboard-item {
    padding: 6px 0;
  }

  .leaderboard-rank {
    font-size: 12px;
  }

  .leaderboard-name {
    font-size: 12px;
  }

  .leaderboard-xp {
    font-size: 11px;
    padding: 3px 6px;
  }

  footer {
    padding: 20px 16px;
    font-size: 11px;
  }
}
