:root {
  /* Light theme */
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;
  --primary: 24 95% 53%;  /* More vibrant orange */
  --primary-foreground: 210 40% 98%;
  --secondary: 210 100% 50%;  /* Brighter blue */
  --secondary-foreground: 210 40% 98%;
  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --accent: 24 90% 95%;  /* Subtle accent */
  --accent-foreground: 222.2 47.4% 11.2%;
  --border: 214.3 31.8% 91.4%;

  /* Computed colors for easier use */
  --background-color: hsl(0, 0%, 100%);
  --foreground-color: hsl(222.2, 84%, 4.9%);
  --card-color: hsl(0, 0%, 100%);
  --card-foreground-color: hsl(222.2, 84%, 4.9%);
  --primary-color: hsl(24, 95%, 53%);
  --primary-foreground-color: hsl(24, 95%, 53%);
  --secondary-color: hsl(210, 100%, 50%);
  --secondary-foreground-color: hsl(24, 95%, 53%);
  --muted-color: hsl(210, 40%, 96.1%);
  --muted-foreground-color: hsl(215.4, 16.3%, 46.9%);
  --accent-color: hsl(24, 90%, 95%);
  --accent-foreground-color: hsl(222.2, 47.4%, 11.2%);
  --border-color: hsl(214.3, 31.8%, 91.4%);

  /* Animation duration */
  --animation-duration: 0.3s;
}

.dark {
  /* Dark theme */
  --background: 222.2 84% 4.9%;
  --foreground: 210 40% 98%;
  --card: 222.2 84% 4.9%;
  --card-foreground: 210 40% 98%;
  --primary: 30 95% 65%;  /* Brighter orange for dark mode */
  --primary-foreground: 222.2 84% 4.9%;
  --secondary: 199 95% 60%;  /* Vibrant cyan */
  --secondary-foreground: 222.2 84% 4.9%;
  --muted: 217.2 32.6% 17.5%;
  --muted-foreground: 215 20.2% 65.1%;
  --accent: 30 90% 20%;  /* Subtle accent */
  --accent-foreground: 210 40% 98%;
  --border: 217.2 32.6% 17.5%;

  /* Computed colors for easier use */
  --background-color: hsl(222.2, 84%, 4.9%);
  --foreground-color: hsl(210, 40%, 98%);
  --card-color: hsl(222.2, 84%, 4.9%);
  --card-foreground-color: hsl(210, 40%, 98%);
  --primary-color: hsl(30, 95%, 65%);
  --primary-foreground-color: hsl(222.2, 84%, 100%);
  --secondary-color: hsl(199, 95%, 60%);
  --secondary-foreground-color: hsl(222.2, 84%, 100%);
  --muted-color: hsl(217.2, 32.6%, 17.5%);
  --muted-foreground-color: hsl(215, 20.2%, 65.1%);
  --accent-color: hsl(30, 90%, 20%);
  --accent-foreground-color: hsl(210, 40%, 98%);
  --border-color: hsl(217.2, 32.6%, 17.5%);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(circle at top right, hsla(var(--primary) / 0.1), transparent 800px),
    radial-gradient(circle at bottom left, hsla(var(--secondary) / 0.1), transparent 800px),
    linear-gradient(to bottom, var(--background-color), hsl(var(--muted) / 0.5));
  color: var(--foreground-color);
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Accessibility - Skip to content */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: var(--primary-foreground-color);
  padding: 8px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-to-content:focus {
  top: 0;
}

:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 4px;
}

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

header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid var(--border-color);
  background-color: hsla(var(--background) / 0.95);
  backdrop-filter: blur(8px);
}

.header-content {
  display: flex;
  height: 4rem;
  align-items: center;
  justify-content: space-between;
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.theme-button {
  background: transparent;
  border: none;
  border-radius: 9999px;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--foreground-color);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-button:hover {
  background-color: hsla(var(--muted) / 0.8);
  transform: rotate(15deg);
}

section {
  padding: 5rem 1.25rem;
  position: relative;
  overflow: hidden;
}

/* Background patterns for sections */
.section-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.05;
  pointer-events: none;
  background-image: radial-gradient(var(--foreground-color) 0.5px, transparent 0.5px);
  background-size: 16px 16px;
}

.hero {
  text-align: center;
  padding-top: 7rem;
  padding-bottom: 7rem;
  position: relative;
}

.hero-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 30%, hsla(var(--primary) / 0.15), transparent 40%),
    radial-gradient(circle at 80% 70%, hsla(var(--secondary) / 0.15), transparent 40%);
  z-index: -1;
}

h2 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

@media (min-width: 640px) {
  h2 {
    font-size: 3rem;
  }
}

@media (min-width: 768px) {
  h2 {
    font-size: 3.75rem;
  }
}

.hero p {
  font-size: 1.125rem;
  color: var(--muted-foreground-color);
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .hero p {
    font-size: 1.25rem;
  }
}

.highlight {
  color: var(--primary-color);
}

.font-semibold {
  font-weight: 600;
}

.button-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

@media (min-width: 640px) {
  .button-container {
    flex-direction: row;
  }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-weight: 600;
  padding: 0.75rem 2rem;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
}

.button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.1), rgba(255,255,255,0));
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.button:hover::before {
  transform: translateX(100%);
}

.button-lg {
  padding: 0.875rem 2rem;
  font-size: 1.125rem;
}

.button-primary {
  background: linear-gradient(to right, var(--primary-color), hsl(calc(var(--primary) + 10), 95%, 53%));
  color: var(--primary-foreground-color);
  box-shadow: 0 4px 12px hsla(var(--primary) / 0.5);
}

.button-secondary {
  background: linear-gradient(to right, var(--secondary-color), hsl(calc(var(--secondary) + 10), 100%, 50%));
  color: var(--secondary-foreground-color);
  box-shadow: 0 4px 12px hsla(var(--secondary) / 0.5);
}

.button:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  filter: brightness(1.05);
}

/* Enhanced Referral Code Styling */
.referral-code {
  display: inline-block;
  border-radius: 8px;
  border: 2px solid var(--primary-color);
  background: linear-gradient(to right, hsla(var(--primary) / 0.05), hsla(var(--primary) / 0.15));
  padding: 0.4rem 0.8rem;
  font-family: 'Inter', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
  box-shadow:
    0 0 0 4px hsla(var(--primary) / 0.1),
    0 10px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  transform: translateY(0);
  animation: pulse-border 2s infinite;
}

.referral-code:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 4px hsla(var(--primary) / 0.15),
    0 15px 20px rgba(0, 0, 0, 0.15);
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 0 4px hsla(var(--primary) / 0.1), 0 10px 15px rgba(0, 0, 0, 0.1); }
  50% { box-shadow: 0 0 0 6px hsla(var(--primary) / 0.15), 0 10px 15px rgba(0, 0, 0, 0.1); }
  100% { box-shadow: 0 0 0 4px hsla(var(--primary) / 0.1), 0 10px 15px rgba(0, 0, 0, 0.1); }
}

.dark .referral-code {
  border-color: hsla(var(--primary) / 0.7);
  background: linear-gradient(to right, hsla(var(--primary) / 0.1), hsla(var(--primary) / 0.25));
  color: var(--primary-foreground-color);
  box-shadow:
    0 0 0 4px hsla(var(--primary) / 0.2),
    0 10px 15px rgba(0, 0, 0, 0.3);
}

.dark .referral-code:hover {
  box-shadow:
    0 0 0 6px hsla(var(--primary) / 0.25),
    0 15px 20px rgba(0, 0, 0, 0.35);
}

/* Floating Referral Element */
.floating-referral {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  background: linear-gradient(135deg, var(--primary-color), hsl(222, 84%, 5%));
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  text-align: center;
  max-width: 180px;
  transition: all 0.3s ease;
  transform: translateY(0);
  animation: float 4s ease-in-out infinite;
}

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

.floating-referral:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  animation-play-state: paused;
}

.referral-label {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.9);
}

.referral-code-enhanced {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin: 10px 0;
  padding: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.copy-button {
  background: rgba(255, 255, 255, 0.25);
  color: white;
  border: none;
  border-radius: 9999px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.copy-button:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

.copy-button.copied {
  background: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
  .floating-referral {
    right: 10px;
    bottom: 10px;
    max-width: 150px;
    padding: 10px;
  }

  .referral-code-enhanced {
    font-size: 1rem;
    padding: 6px;
  }
}

/* Referral Banner Section */
.referral-banner {
  background: linear-gradient(135deg, hsla(var(--primary) / 0.1), hsla(var(--secondary) / 0.1));
  padding: 3rem 1rem;
  text-align: center;
}

.referral-banner-content {
  padding: 2rem;
  background: var(--card-color);
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--primary-color);
}

.referral-banner-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shine 2.5s infinite;
}

@keyframes shine {
  100% {
    left: 150%;
  }
}

.dark .referral-banner-content {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.referral-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.referral-heading {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--foreground-color);
}

.referral-code-large {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 2px;
  margin: 1.5rem auto;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(to right, hsla(var(--primary) / 0.1), hsla(var(--primary) / 0.2));
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 12px;
  display: inline-block;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 5px var(--primary-color), 0 5px 15px rgba(0, 0, 0, 0.1); }
  50% { box-shadow: 0 0 20px var(--primary-color), 0 5px 15px rgba(0, 0, 0, 0.1); }
  100% { box-shadow: 0 0 5px var(--primary-color), 0 5px 15px rgba(0, 0, 0, 0.1); }
}

.dark .referral-code-large {
  background: linear-gradient(to right, hsla(var(--primary) / 0.15), hsla(var(--primary) / 0.25));
  color: var(--primary-foreground-color);
}

.referral-description {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.referral-copy-button {
  background: var(--primary-color);
  color: var(--primary-foreground-color);
  border: none;
  border-radius: 9999px;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.referral-copy-button:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-3px);
}

.referral-copy-button.copied {
  background: var(--secondary-color);
}

.alternate-bg {
  background-color: var(--muted-color);
  position: relative;
}

.dark .alternate-bg {
  background-color: hsla(var(--muted) / 0.2);
}

.section-title {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px;
}

@media (min-width: 640px) {
  .section-title {
    font-size: 2.25rem;
  }
}

.card {
  background-color: var(--card-color);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
}

.dark .card:hover {
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
}

.card-transparent {
  background-color: hsla(var(--background) / 0.5);
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(4px);
}

.dark .card-transparent {
  background-color: hsla(var(--background) / 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.card-content {
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .card-content {
    padding: 2rem;
  }
}

.text-pretty {
  text-wrap: pretty;
  line-height: 1.6;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.step-card {
  border: 1px solid var(--border-color);
}

.step-card.highlight {
  border-color: hsla(var(--primary) / 0.5);
  background-color: hsla(var(--primary) / 0.05);
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.dark .step-card.highlight {
  border-color: hsla(var(--primary) / 0.3);
  background-color: hsla(var(--primary) / 0.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.card-header {
  padding: 1.25rem 1.25rem 0.5rem 1.25rem;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background-color: var(--primary-color);
  color: var(--primary-foreground-color);
  font-size: 1rem;
  font-weight: 700;
  margin-right: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.step-title {
  font-weight: 700;
  font-size: 1.125rem;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mt-10 {
  margin-top: 2.5rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mb-10 {
  margin-bottom: 2.5rem;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.bg-muted {
  background-color: var(--muted-color);
}

.dark .bg-muted {
  background-color: hsla(var(--muted) / 0.2);
}

.p-4 {
  padding: 1rem;
}

.text-center {
  text-align: center;
}

.text-lg {
  font-size: 1.125rem;
}

.text-sm {
  font-size: 0.875rem;
}

.font-bold {
  font-weight: 700;
}

.feature-card .check-icon {
  color: var(--secondary-color);
  margin-right: 0.75rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
  transition: transform 0.3s ease;
}

.feature-card:hover .check-icon {
  transform: scale(1.2) rotate(5deg);
}

.feature-title {
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.feature-description {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--muted-foreground-color);
}

.max-w-2xl {
  max-width: 42rem;
}

.max-w-3xl {
  max-width: 48rem;
}

.max-w-4xl {
  max-width: 56rem;
}

.max-w-5xl {
  max-width: 64rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

footer {
  border-top: 1px solid var(--border-color);
  background-color: var(--background-color);
  padding: 1.5rem 0;
}

.text-muted {
  color: var(--muted-foreground-color);
}

.link {
  color: var(--primary-color);
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Animation for sections on scroll */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  section {
    padding: 3rem 1rem;
  }

  .referral-banner-content {
    padding: 1.5rem;
  }

  .referral-code-large {
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
  }

  .referral-icon {
    font-size: 2rem;
  }

  .referral-heading {
    font-size: 1.5rem;
  }

  .step-card.highlight {
    transform: none;
  }
}
