/* ============================================
   FAIR AND SQUARE FOOTBALL - DESIGN SYSTEM
   ============================================ */

/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */

:root {
  /* Color Palette - Dark Mode Theme */
  --color-bg-primary: #0a0e27;
  --color-bg-secondary: #1a1f3a;
  --color-bg-tertiary: #252b4a;

  /* Gradient Accents */
  --color-accent-start: #4f46e5;
  --color-accent-end: #7c3aed;
  --gradient-primary: linear-gradient(135deg, var(--color-accent-start), var(--color-accent-end));
  --gradient-hero: linear-gradient(180deg, #0a0e27 0%, #1a1f3a 50%, #252b4a 100%);

  /* Semantic Colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #3b82f6;

  /* Text Colors */
  --color-text-primary: #ffffff;
  --color-text-secondary: #cbd5e1;
  --color-text-muted: #94a3b8;

  /* Typography Scale (Fluid) */
  --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --font-size-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --font-size-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --font-size-lg: clamp(1.125rem, 1rem + 0.625vw, 1.5rem);
  --font-size-xl: clamp(1.5rem, 1.25rem + 1.25vw, 2.25rem);
  --font-size-2xl: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
  --font-size-3xl: clamp(2.5rem, 2rem + 2.5vw, 4.5rem);

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* Spacing Scale */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.4);

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Animation Timings */
  --transition-fast: 150ms;
  --transition-base: 250ms;
  --transition-slow: 350ms;
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Z-index Scale */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal: 400;
  --z-tooltip: 500;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  overflow-x: hidden;
  width: 100%;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-md);
}

h1 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-extrabold);
}

h2 {
  font-size: var(--font-size-2xl);
}

h3 {
  font-size: var(--font-size-xl);
}

h4 {
  font-size: var(--font-size-lg);
}

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-4xl) 0;
}

.section-sm {
  padding: var(--space-3xl) 0;
}

.section-lg {
  padding: var(--space-5xl) 0;
}

/* ============================================
   BUTTON COMPONENTS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base) var(--ease-in-out);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width var(--transition-slow) var(--ease-out),
    height var(--transition-slow) var(--ease-out);
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--color-success);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

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

.btn-secondary {
  background: transparent;
  color: var(--color-text-primary);
  border: 2px solid var(--color-accent-start);
}

.btn-secondary:hover {
  background: var(--gradient-primary);
  border-color: transparent;
}

.btn-lg {
  padding: var(--space-lg) var(--space-2xl);
  font-size: var(--font-size-lg);
}

/* ============================================
   CARD COMPONENTS
   ============================================ */

.card {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base) var(--ease-in-out);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base) var(--ease-out);
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.card-glass {
  background: rgba(26, 31, 58, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-floating {
  animation: float 6s ease-in-out infinite;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

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

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s var(--ease-out) forwards;
}

.fade-in {
  animation: fadeIn 0.6s var(--ease-out) forwards;
}

/* Scroll-triggered animations (applied via JS) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s var(--ease-out);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus styles */
:focus-visible {
  outline: 3px solid var(--color-accent-start);
  outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Mobile-first approach */
@media (min-width: 640px) {
  .container {
    padding: 0 var(--space-xl);
  }
}

@media (min-width: 768px) {
  .section {
    padding: var(--space-5xl) 0;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 var(--space-2xl);
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

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

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

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

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

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

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

.justify-between {
  justify-content: space-between;
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

.gap-lg {
  gap: var(--space-lg);
}

.gap-xl {
  gap: var(--space-xl);
}

.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.overflow-hidden {
  overflow: hidden;
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  background: rgba(10, 14, 39, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-base) var(--ease-in-out);
}

.nav.scrolled {
  background: rgba(10, 14, 39, 0.95);
  box-shadow: var(--shadow-md);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  text-decoration: none;
  color: var(--color-text-primary);
}

.nav-logo-icon {
  font-size: 1.75rem;
}

.nav-menu {
  display: none;
  list-style: none;
  gap: var(--space-xl);
  align-items: center;
}

.nav-link {
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
  transition: color var(--transition-base) var(--ease-in-out);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-base) var(--ease-out);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.btn-sm {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--font-size-sm);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text-primary);
  transition: all var(--transition-base) var(--ease-in-out);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

@media (min-width: 768px) {
  .nav-menu {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }
}

@media (max-width: 767px) {
  .nav-menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 14, 39, 0.98);
    padding: var(--space-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
  }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-hero);
  z-index: -1;
}

.hero-background::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(79, 70, 229, 0.2), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(124, 58, 237, 0.2), transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.hero-title {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-lg);
  line-height: 1.1;
}

.hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-4xl);
}

.floating-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-4xl);
}

.floating-card {
  text-align: center;
  padding: var(--space-xl);
  cursor: default;
}

.floating-card-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

.floating-card h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-sm);
}

.floating-card p {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin: 0;
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.section-header {
  margin-bottom: var(--space-3xl);
}

.section-header h2 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-md);
}

.section-header p {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

.features-grid {
  margin-top: var(--space-3xl);
}

.feature-card {
  text-align: center;
  padding: var(--space-2xl);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: var(--space-lg);
}

.feature-card h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-md);
}

.feature-card p {
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
  margin: 0;
}

/* ============================================
   HOW IT WORKS SECTION
   ============================================ */

.section-dark {
  background: var(--color-bg-secondary);
  position: relative;
}

.section-dark::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
}

.steps-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.step {
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
  margin-bottom: var(--space-3xl);
}

.step-number {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  box-shadow: var(--shadow-glow);
}

.step-content h3 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-sm);
}

.step-content p {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  margin: 0;
}

.step-connector {
  width: 2px;
  height: 40px;
  background: linear-gradient(180deg, var(--color-accent-start), transparent);
  margin: -20px auto;
  position: relative;
  left: 30px;
}

.how-it-works-example {
  margin-top: var(--space-3xl);
  padding: var(--space-2xl);
  text-align: left;
}

.how-it-works-example h3 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-lg);
}

.how-it-works-example p {
  margin-bottom: var(--space-md);
  line-height: var(--line-height-relaxed);
}

/* ============================================
   TESTIMONIALS SECTION
   ============================================ */

.testimonials-carousel {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
}

.testimonials-track {
  display: flex;
  transition: transform var(--transition-slow) var(--ease-in-out);
}

.testimonial-card {
  flex: 0 0 100%;
  padding: var(--space-2xl);
  text-align: center;
}

.testimonial-stars {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-lg);
}

.testimonial-text {
  font-size: var(--font-size-lg);
  font-style: italic;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
  line-height: var(--line-height-relaxed);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  justify-content: center;
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
}

.testimonial-name {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.testimonial-title {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base) var(--ease-in-out);
  color: var(--color-text-primary);
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn-prev {
  left: -60px;
}

.carousel-btn-next {
  right: -60px;
}

@media (max-width: 1024px) {
  .carousel-btn-prev {
    left: 10px;
  }

  .carousel-btn-next {
    right: 10px;
  }
}

.carousel-dots {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-xl);
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base) var(--ease-in-out);
}

.carousel-dot.active {
  background: var(--color-accent-start);
  width: 30px;
  border-radius: var(--radius-full);
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta-section {
  background: var(--gradient-primary);
  padding: var(--space-5xl) 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1), transparent 50%);
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-content h2 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-lg);
}

.cta-content p {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: var(--color-bg-primary);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-4xl) 0 var(--space-xl);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.footer-brand p {
  color: var(--color-text-muted);
  margin-top: var(--space-md);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-md);
}

.footer-links h4,
.footer-social h4 {
  font-size: var(--font-size-base);
  margin-bottom: var(--space-lg);
  color: var(--color-text-primary);
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  color: var(--color-text-muted);
  transition: color var(--transition-base) var(--ease-in-out);
}

.footer-links a:hover {
  color: var(--color-text-primary);
}

.social-links {
  display: flex;
  gap: var(--space-md);
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: all var(--transition-base) var(--ease-in-out);
}

.social-links a:hover {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-3px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-bottom p {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  margin: 0;
}

.footer-legal {
  display: flex;
  gap: var(--space-lg);
}

.footer-legal a {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  transition: color var(--transition-base) var(--ease-in-out);
}

.footer-legal a:hover {
  color: var(--color-text-primary);
}

/* ============================================
   GAME DEMO SECTION
   ============================================ */

#game-demo {
  background: var(--color-bg-primary);
  position: relative;
}

.game-container {
  padding: var(--space-md);
  margin-top: var(--space-xl);
}

@media (min-width: 768px) {
  .game-container {
    padding: var(--space-2xl);
  }
}

.game-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: start;
}

@media (min-width: 1024px) {
  .game-layout {
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-3xl);
  }
}

/* Axis Labels */
.game-grid-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  overflow-x: auto;
  padding: var(--space-sm);
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar for grid wrapper but keep functionality */
.game-grid-wrapper::-webkit-scrollbar {
  height: 6px;
}

.game-grid-wrapper::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.game-grid-wrapper::-webkit-scrollbar-thumb {
  background: var(--color-accent-start);
  border-radius: 3px;
}

.axis-label {
  font-weight: var(--font-weight-bold);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: clamp(0.5rem, 2vw, 0.75rem);
  text-align: center;
  white-space: nowrap;
}

.axis-top {
  margin-left: 55px;
  /* Aligned with grid */
}

.axis-left {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  margin-right: 2px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  order: 1;
}

.game-grid-content {
  display: flex;
  align-items: stretch;
  min-width: fit-content;
}

.grid-layout-container {
  display: flex;
  flex-direction: column;
}

.grid-col-labels {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  margin-left: 55px;
  /* Match axis and row labels width */
  margin-bottom: 4px;
}

.grid-row-labels {
  display: grid;
  grid-template-rows: repeat(10, 1fr);
  margin-right: 8px;
  order: 2;
}

.grid-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-accent-start);
  text-shadow: 0 0 10px rgba(79, 70, 229, 0.3);
}

.squares-grid {
  order: 3;
}

/* Squares Grid */
.squares-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  flex-grow: 1;
  aspect-ratio: 1/1;
  width: 100%;
  max-width: 380px;
  /* Fits fully visible on most screens */
}

@media (max-width: 767px) {
  .squares-grid {
    max-width: 320px;
    /* Smaller on mobile to fit without scrolling */
  }

  .axis-top {
    margin-left: 20px;
  }
}

.grid-square {
  background: var(--color-bg-secondary);
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast) var(--ease-in-out);
  position: relative;
  font-size: 0.7rem;
}

.grid-square:hover {
  background: var(--color-bg-tertiary);
  z-index: 2;
  box-shadow: inset 0 0 0 2px var(--color-accent-start);
}

.grid-square.selected {
  background: var(--gradient-primary);
  color: white;
  font-weight: var(--font-weight-bold);
  box-shadow: var(--shadow-glow);
}

.square-odds {
  font-size: 0.5rem;
  opacity: 0.7;
  position: absolute;
  bottom: 1px;
  right: 1px;
}

.square-wager {
  font-size: 0.7rem;
  font-weight: 700;
}

/* Premium squares (0, 3, 7) */
.grid-square.premium {
  position: relative;
}

.grid-square.premium::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 2px solid #ef4444;
  pointer-events: none;
  box-shadow: inset 0 0 4px rgba(239, 68, 68, 0.4);
}

/* Access Code Modal */
#accessCodeModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
}

#accessCodeModal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

#accessCodeModal .modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

#accessCodeModal .modal-content {
  position: relative;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

#accessCodeModal .modal-content h3 {
  font-size: 1.5rem;
  color: white;
  margin-bottom: 1rem;
}

#accessCodeModal .modal-content p {
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

#accessCodeModal .modal-content .btn {
  margin-top: 1.5rem;
}

@media (max-width: 480px) {
  .square-odds {
    display: none;
    /* Hide odd multipliers on very small screens to avoid clutter */
  }

  .grid-square {
    font-size: 0.6rem;
  }
}

/* Controls */
.game-controls {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .game-controls {
    gap: var(--space-xl);
  }
}

.control-card,
.pool-stats {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

@media (min-width: 768px) {

  .control-card,
  .pool-stats {
    padding: var(--space-xl);
  }
}

.control-card h3,
.pool-stats h3 {
  font-size: var(--font-size-base);
  margin-bottom: var(--space-md);
  color: var(--color-text-primary);
}

@media (min-width: 768px) {

  .control-card h3,
  .pool-stats h3 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-lg);
  }
}

.selection-info {
  margin-bottom: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: rgba(79, 70, 229, 0.1);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-accent-start);
}

.demo-instructions {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
  font-style: italic;
  padding: 0 var(--space-xs);
}

.selection-info p {
  margin: 0;
  font-size: var(--font-size-xs);
  color: var(--color-text-primary);
}

.selection-info span {
  font-weight: var(--font-weight-bold);
  color: var(--color-accent-start);
}

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

.input-group label {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.input-group input {
  width: 100%;
  background: var(--color-bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  color: white;
  transition: border-color var(--transition-base);
}

.input-group input:focus {
  outline: none;
  border-color: var(--color-accent-start);
}

.potential-payout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: var(--space-md) 0;
  padding: var(--space-sm) var(--space-md);
  background: rgba(16, 185, 129, 0.1);
  border-radius: var(--radius-md);
}

.potential-payout span:last-child {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-success);
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.stat-item {
  text-align: center;
  padding: var(--space-sm);
  background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
}

.stat-label {
  display: block;
  font-size: 0.6rem;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.stat-value {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}

.current-bets-list h4 {
  font-size: 0.7rem;
  margin-bottom: var(--space-sm);
  color: var(--color-text-secondary);
}

.current-bets-list ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bet-entry {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
}

.bet-entry .name {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-medium);
}

.bet-entry .square {
  color: var(--color-text-muted);
}

.bet-entry .amount {
  color: var(--color-success);
}

/* Step Connector Mobile Fix */
@media (max-width: 767px) {
  .step-connector {
    width: 2px;
    height: 40px;
    margin: -10px auto 10px;
    background: var(--gradient-primary);
    opacity: 0.3;
  }

  .steps-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .step {
    text-align: center;
    max-width: 400px;
  }
}