/* ============================================
   GitAux Waitlist - Underground Rave Edition
   ============================================ */

:root {
  /* Core colors - dark with neon accents */
  --bg-primary: #050505;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #111111;
  
  /* Neon palette */
  --neon-purple: #a855f7;
  --neon-pink: #ec4899;
  --neon-cyan: #22d3ee;
  --neon-green: #4ade80;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-pink) 100%);
  --gradient-glow: linear-gradient(135deg, rgba(168,85,247,0.4) 0%, rgba(236,72,153,0.4) 100%);
  
  /* Text */
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;
  
  /* Borders */
  --border-subtle: rgba(255,255,255,0.06);
  --border-glow: rgba(168,85,247,0.3);
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  
  /* Typography */
  --font-mono: 'Space Mono', 'SF Mono', 'Fira Code', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ============================================
   Atmospheric Overlays
   ============================================ */

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.15) 2px,
    rgba(0,0,0,0.15) 4px
  );
  opacity: 0.4;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.glitch-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 998;
  opacity: 0;
  background: var(--gradient-primary);
  mix-blend-mode: overlay;
  animation: glitch-flash 8s infinite;
}

@keyframes glitch-flash {
  0%, 100% { opacity: 0; }
  49% { opacity: 0; }
  50% { opacity: 0.03; transform: translateX(-2px); }
  51% { opacity: 0; }
  52% { opacity: 0.02; transform: translateX(2px); }
  53% { opacity: 0; }
}

/* ============================================
   Layout
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-lg);
  position: relative;
  z-index: 10;
}

/* ============================================
   Header
   ============================================ */

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  margin-bottom: var(--space-2xl);
}

.logo-mark {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.logo-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  position: relative;
  z-index: 2;
}

.logo-glow {
  position: absolute;
  inset: -8px;
  background: var(--gradient-primary);
  border-radius: 16px;
  z-index: 1;
  opacity: 0.6;
  filter: blur(16px);
  animation: logo-glow-pulse 3s ease-in-out infinite;
}

@keyframes logo-glow-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

.logo-g {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  color: white;
  text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-name {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--neon-cyan);
  text-transform: uppercase;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--neon-green);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
  box-shadow: 0 0 8px var(--neon-green);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}

.status-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
  min-height: calc(100vh - 200px);
}

.hero-content {
  position: relative;
  z-index: 10;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--neon-cyan);
  margin-bottom: var(--space-lg);
}

.eyebrow-icon {
  animation: rotate 4s linear infinite;
}

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

.headline {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

.headline-line {
  display: block;
}

.headline-line.accent {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
}

.subhead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: var(--space-xl);
}

/* ============================================
   Counter
   ============================================ */

.counter-block {
  display: inline-flex;
  flex-direction: column;
  padding: var(--space-lg) var(--space-xl);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  margin-bottom: var(--space-xl);
  position: relative;
  overflow: hidden;
}

.counter-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  opacity: 0.1;
}

.counter-num {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}

.counter-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

/* ============================================
   Form
   ============================================ */

.form {
  margin-bottom: var(--space-xl);
}

.input-group {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.form input[type="email"] {
  flex: 1;
  padding: var(--space-md) var(--space-lg);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  transition: all 0.2s var(--ease-out-expo);
}

.form input[type="email"]:focus {
  outline: none;
  border-color: var(--neon-purple);
  box-shadow: 0 0 0 3px rgba(168,85,247,0.1);
}

.form input[type="email"]::placeholder {
  color: var(--text-muted);
}

.btn-primary {
  padding: var(--space-md) var(--space-xl);
  background: var(--gradient-primary);
  border: none;
  border-radius: 12px;
  color: white;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.2s var(--ease-out-expo);
  white-space: nowrap;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 10px 30px rgba(168,85,247,0.3),
    0 0 50px rgba(236,72,153,0.2);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary .btn-loader {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-primary.loading .btn-text {
  display: none;
}

.btn-primary.loading .btn-loader {
  display: inline-block;
}

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

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

.form-message {
  margin-top: var(--space-md);
  font-size: 14px;
  min-height: 20px;
}

.form-message.success {
  color: var(--neon-green);
}

.form-message.error {
  color: var(--neon-pink);
}

/* ============================================
   Referral Card
   ============================================ */

.referral-card {
  display: none;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  animation: slide-up 0.4s var(--ease-out-expo);
}

.referral-card.show {
  display: block;
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.referral-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.referral-check {
  width: 24px;
  height: 24px;
  background: var(--neon-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: black;
  font-weight: 700;
}

.referral-title {
  font-weight: 600;
  font-size: 16px;
}

.referral-body {
  display: flex;
  gap: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.referral-code-wrap {
  flex: 1;
}

.referral-label,
.position-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  display: block;
  margin-bottom: var(--space-xs);
}

.referral-code-row {
  display: flex;
  gap: var(--space-sm);
}

.referral-code {
  flex: 1;
  padding: var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--neon-purple);
  text-align: center;
}

.btn-ghost {
  padding: var(--space-md) var(--space-lg);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.referral-position {
  text-align: center;
  min-width: 100px;
}

.position-num {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--neon-cyan);
}

.share-section {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-lg);
}

.share-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.share-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--text-muted);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.share-btn svg {
  flex-shrink: 0;
}

/* ============================================
   Features
   ============================================ */

.features {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md);
  background: rgba(255,255,255,0.01);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  transition: all 0.2s;
}

.feature:hover {
  background: rgba(255,255,255,0.02);
  border-color: var(--border-glow);
}

.feature-icon {
  font-size: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  flex-shrink: 0;
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feature-text strong {
  font-size: 14px;
  font-weight: 600;
}

.feature-text span {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ============================================
   Orb Visual - 3D Rotating Sphere with Covers
   ============================================ */

.orb-container {
  position: relative;
  width: clamp(320px, 70vw, 600px);
  height: clamp(320px, 70vw, 600px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  perspective: 1400px;
  pointer-events: none;
}

.orb-glow {
  position: absolute;
  inset: -15%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 40%,
    rgba(168,85,247,0.25) 0%,
    rgba(236,72,153,0.15) 35%,
    transparent 60%
  );
  filter: blur(40px);
  z-index: 1;
  animation: orb-pulse 4s ease-in-out infinite;
}

@keyframes orb-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transform-style: preserve-3d;
  z-index: 3;
  animation: orb-rotate 40s linear infinite;
}

@keyframes orb-rotate {
  from { transform: rotateX(12deg) rotateY(0deg); }
  to { transform: rotateX(12deg) rotateY(360deg); }
}

.orb-center {
  position: absolute;
  width: clamp(120px, 20vw, 180px);
  height: clamp(120px, 20vw, 180px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.orb-logo-img {
  width: clamp(90px, 16vw, 140px);
  height: clamp(90px, 16vw, 140px);
  object-fit: contain;
  opacity: 0.7;
  filter: drop-shadow(0 20px 50px rgba(168,85,247,0.3));
  transition: transform 0.3s ease;
}

/* Album covers in the orb */
.orb .cover {
  position: absolute;
  width: clamp(60px, 11vw, 100px);
  height: clamp(60px, 11vw, 100px);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 16px 40px rgba(0,0,0,0.6);
  transform-origin: center center;
  will-change: transform;
  opacity: 0.9;
  left: 50%;
  top: 50%;
  backface-visibility: visible;
}

.orb .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) brightness(0.95);
}

.orb .cover.is-loading {
  background: linear-gradient(
    110deg,
    rgba(255,255,255,0.06) 8%,
    rgba(255,255,255,0.14) 18%,
    rgba(255,255,255,0.06) 33%
  );
  background-size: 200% 100%;
  animation: cover-shimmer 1.3s linear infinite;
}

@keyframes cover-shimmer {
  to { background-position-x: -200%; }
}

.orb-ring {
  position: absolute;
  inset: -20px;
  border: 1px solid rgba(168,85,247,0.15);
  border-radius: 50%;
  animation: ring-pulse 3s ease-in-out infinite;
  pointer-events: none;
}

.orb-ring-2 {
  inset: -40px;
  animation-delay: 1.5s;
  border-color: rgba(236,72,153,0.1);
}

@keyframes ring-pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.02); }
}

/* ============================================
   Footer
   ============================================ */

.footer {
  margin-top: var(--space-3xl);
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-subtle);
}

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

/* ============================================
   Floating Notes
   ============================================ */

.notes-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
}

.note {
  position: fixed;
  font-size: 24px;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

/* ============================================
   Toast Notification
   ============================================ */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 20px;
  background: var(--gradient-primary);
  border-radius: 12px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 40px rgba(168,85,247,0.3);
  z-index: 2000;
  animation: toast-in 0.3s var(--ease-out-back);
}

.toast.hide {
  animation: toast-out 0.2s var(--ease-out-expo) forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  
  .orb-container {
    order: -1;
    max-width: 300px;
  }
  
  .headline {
    font-size: clamp(28px, 7vw, 40px);
  }
  
  .referral-body {
    flex-direction: column;
    gap: var(--space-lg);
  }
  
  .referral-position {
    text-align: left;
  }
}

@media (max-width: 600px) {
  .container {
    padding: var(--space-md);
  }
  
  .header {
    flex-direction: column;
    gap: var(--space-md);
    align-items: flex-start;
  }
  
  .input-group {
    flex-direction: column;
  }
  
  .btn-primary {
    width: 100%;
  }
  
  .counter-num {
    font-size: 36px;
  }
  
  .orb-logo {
    font-size: 32px;
  }
  
  .share-buttons {
    flex-direction: column;
  }
  
  .share-btn {
    justify-content: center;
  }
}

/* ============================================
   Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .scanlines,
  .glitch-layer {
    display: none;
  }
}
