/* ==========================================================================
   iVLink Design System - Production-Grade Web3 dApp Styles
   ========================================================================== */

/* Import Modern Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ==========================================================================
   CSS Custom Properties - Design Tokens
   ========================================================================== */

:root {
  /* Colors - Metallic & Neon Palette */
  --color-bg-primary: #0a0a0a;
  --color-bg-secondary: #121212;
  --color-bg-tertiary: #1a1a1a;
  --color-bg-elevated: #1f1f1f;

  --color-metallic-light: #e8e8e8;
  --color-metallic: #c0c0c0;
  --color-metallic-dark: #808080;
  --color-metallic-darker: #505050;

  --color-neon-cyan: #00ffff;
  --color-neon-magenta: #ff00ff;
  --color-neon-cyan-dim: rgba(0, 255, 255, 0.3);
  --color-neon-magenta-dim: rgba(255, 0, 255, 0.3);

  --color-text-primary: #ffffff;
  --color-text-secondary: #c0c0c0;
  --color-text-tertiary: #808080;

  --color-success: #00ff88;
  --color-warning: #ffaa00;
  --color-error: #ff3366;
  --color-info: #00ffff;

  /* Badge & State Colors */
  --color-locked: #ff6b6b;
  --color-vesting: #ffd93d;
  --color-unlocked: #51cf66;
  --color-neon-green: #39ff14;

  /* Spacing System */
  --space-2xs: 0.125rem;
  /* 2px */
  --space-xs: 0.25rem;
  /* 4px */
  --space-sm: 0.5rem;
  /* 8px */
  --space-md: 1rem;
  /* 16px */
  --space-lg: 1.5rem;
  /* 24px */
  --space-xl: 2rem;
  /* 32px */
  --space-2xl: 3rem;
  /* 48px */
  --space-3xl: 4rem;
  /* 64px */
  --space-4xl: 6rem;
  /* 96px */

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: 0.75rem;
  /* 12px */
  --font-size-sm: 0.875rem;
  /* 14px */
  --font-size-base: 1rem;
  /* 16px */
  --font-size-lg: 1.125rem;
  /* 18px */
  --font-size-xl: 1.25rem;
  /* 20px */
  --font-size-2xl: 1.5rem;
  /* 24px */
  --font-size-3xl: 2rem;
  /* 32px */
  --font-size-4xl: 2.5rem;
  /* 40px */
  --font-size-5xl: 3rem;
  /* 48px */

  /* Borders & Radius */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;
  --border-radius-full: 9999px;

  --border-width-thin: 1px;
  --border-width-medium: 2px;
  --border-width-thick: 3px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.7);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.8);
  --shadow-neon-cyan: 0 0 20px rgba(0, 255, 255, 0.4);
  --shadow-neon-magenta: 0 0 20px rgba(255, 0, 255, 0.4);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;

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

/* ==========================================================================
   Base & Reset
   ========================================================================== */

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

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

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  background-image:
    linear-gradient(135deg, transparent 0%, rgba(0, 255, 255, 0.02) 100%),
    radial-gradient(circle at 20% 50%, rgba(0, 255, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 0, 255, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
}

h1 {
  font-size: var(--font-size-5xl);
}

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

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

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

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

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

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

a {
  color: var(--color-neon-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-metallic-light);
}

/* ==========================================================================
   Layout & Container
   ========================================================================== */

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

.container-narrow {
  max-width: 900px;
}

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

/* ==========================================================================
   Page Visibility & Transitions (Fixed)
   ========================================================================== */

.page {
  display: none;
  animation: fadeIn 0.5s ease-out;
  padding-top: var(--space-xl);
  width: 100%;
}

.page.active {
  display: block;
}

/* ==========================================================================
   Hero Section (Fixed Alignment)
   ========================================================================== */

/* Hero Section Removed */

/* ==========================================================================
   Grid System (Fixed Responsiveness)
   ========================================================================== */

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

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

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

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

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text {
    order: 2;
  }

  .hero-visual {
    order: 1;
    margin-bottom: var(--space-xl);
  }

  .hero-tagline {
    margin-left: auto;
    margin-right: auto;
  }

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

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

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

/* Mobile (<768px) */
@media (max-width: 768px) {

  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: var(--font-size-3xl);
  }

  .hero-logo {
    width: 180px;
    height: 180px;
  }

  .nav-menu {
    display: none;
    /* Hidden by default on mobile */
  }
}

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

.header {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(192, 192, 192, 0.1);
  z-index: var(--z-sticky);
  transition: all var(--transition-normal);
}

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

.header-logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  text-decoration: none;
}

.header-logo img {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-md);
}

.header-logo-text {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-metallic-light);
  letter-spacing: -0.5px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-menu {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.nav-link {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--color-text-primary);
  background: rgba(192, 192, 192, 0.1);
}

.nav-link.active {
  color: var(--color-neon-cyan);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: var(--space-md);
  right: var(--space-md);
  height: 2px;
  background: var(--color-neon-cyan);
  border-radius: 2px;
}

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

.network-pill {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(192, 192, 192, 0.1);
  border: 1px solid rgba(192, 192, 192, 0.2);
  border-radius: var(--border-radius-full);
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}

.network-pill.connected {
  border-color: var(--color-success);
}

.network-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-metallic-dark);
}

.network-pill.connected .network-pill-dot {
  background: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text-primary);
  font-size: var(--font-size-2xl);
  cursor: pointer;
  padding: var(--space-sm);
}

/* ==========================================================================
   Button Component
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-neon-cyan) 0%, var(--color-neon-magenta) 100%);
  color: var(--color-bg-primary);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-neon-cyan);
}

.btn-secondary {
  background: rgba(192, 192, 192, 0.1);
  border: 1px solid rgba(192, 192, 192, 0.3);
  color: var(--color-text-primary);
}

.btn-secondary:hover {
  background: rgba(192, 192, 192, 0.2);
  border-color: var(--color-metallic);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-neon-cyan);
  color: var(--color-neon-cyan);
}

.btn-outline:hover {
  background: rgba(0, 255, 255, 0.1);
  box-shadow: var(--shadow-neon-cyan);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

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

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

/* ==========================================================================
   Card Component
   ========================================================================== */

.card {
  background: rgba(31, 31, 31, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(192, 192, 192, 0.1);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: rgba(192, 192, 192, 0.2);
  box-shadow: var(--shadow-lg);
}

.card-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
}

.card-content {
  color: var(--color-text-secondary);
}

/* Card Variants */
.card-glass-light {
  background: rgba(31, 31, 31, 0.4);
  backdrop-filter: blur(8px);
}

.card-glass-heavy {
  background: rgba(31, 31, 31, 0.8);
  backdrop-filter: blur(15px);
}

.card-neon-cyan {
  border-color: rgba(0, 255, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.card-neon-cyan:hover {
  border-color: rgba(0, 255, 255, 0.5);
  box-shadow: var(--shadow-neon-cyan);
}

.card-neon-magenta {
  border-color: rgba(255, 0, 255, 0.3);
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.2);
}

.card-success {
  border-color: rgba(0, 255, 136, 0.3);
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.card-clickable {
  cursor: pointer;
}

.card-clickable:hover {
  transform: translateY(-5px);
}

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

/* Hero Section Duplicate Removed */

/* ==========================================================================
   How It Works Section
   ========================================================================== */

.how-it-works {
  background: rgba(18, 18, 18, 0.5);
}

.section-title {
  text-align: center;
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-2xl);
}

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

.step-card {
  text-align: center;
  padding: var(--space-xl);
  background: rgba(31, 31, 31, 0.4);
  border: 1px solid rgba(192, 192, 192, 0.1);
  border-radius: var(--border-radius-lg);
  transition: all var(--transition-normal);
  position: relative;
}

.step-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-neon-cyan);
  box-shadow: var(--shadow-neon-cyan);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-bottom: var(--space-lg);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(255, 0, 255, 0.2) 100%);
  border: 2px solid var(--color-neon-cyan);
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-neon-cyan);
}

.step-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.step-description {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
}

.key-notes {
  background: rgba(0, 255, 255, 0.05);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl);
}

.key-notes h3 {
  color: var(--color-neon-cyan);
  margin-bottom: var(--space-lg);
}

.key-notes ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.key-notes li {
  padding-left: var(--space-lg);
  position: relative;
  color: var(--color-text-secondary);
}

.key-notes li::before {
  content: '►';
  position: absolute;
  left: 0;
  color: var(--color-neon-cyan);
}

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

.footer {
  background: rgba(18, 18, 18, 0.8);
  border-top: 1px solid rgba(192, 192, 192, 0.1);
  padding: var(--space-2xl) 0 var(--space-lg);
  margin-top: var(--space-3xl);
}

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

.footer-section h4 {
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
}

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

.footer-links a {
  color: var(--color-text-tertiary);
  font-size: var(--font-size-sm);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-neon-cyan);
}

.footer-disclaimer {
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(192, 192, 192, 0.1);
  text-align: center;
  font-size: var(--font-size-xs);
  color: var(--color-text-tertiary);
  line-height: 1.6;
}

/* ==========================================================================
   Modal Component
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--color-bg-secondary);
  border: 1px solid rgba(192, 192, 192, 0.2);
  border-radius: var(--border-radius-xl);
  padding: var(--space-2xl);
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  transform: scale(0.9);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.modal-title {
  font-size: var(--font-size-2xl);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: var(--font-size-2xl);
  cursor: pointer;
  padding: var(--space-sm);
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--color-text-primary);
}

.modal-content {
  margin-bottom: var(--space-lg);
}

/* ==========================================================================
   Toast Component
   ========================================================================== */

.toast-container {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 400px;
}

.toast {
  background: var(--color-bg-elevated);
  border: 1px solid rgba(192, 192, 192, 0.2);
  border-radius: var(--border-radius-md);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

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

.toast-icon {
  font-size: var(--font-size-xl);
}

.toast-success {
  border-left: 4px solid var(--color-success);
}

.toast-error {
  border-left: 4px solid var(--color-error);
}

.toast-warning {
  border-left: 4px solid var(--color-warning);
}

.toast-info {
  border-left: 4px solid var(--color-info);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.hidden {
  display: none !important;
}

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

.text-gradient {
  background: linear-gradient(135deg, var(--color-neon-cyan) 0%, var(--color-neon-magenta) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mt-0 {
  margin-top: 0;
}

.mt-1 {
  margin-top: var(--space-sm);
}

.mt-2 {
  margin-top: var(--space-md);
}

.mt-3 {
  margin-top: var(--space-lg);
}

.mt-4 {
  margin-top: var(--space-xl);
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: var(--space-sm);
}

.mb-2 {
  margin-bottom: var(--space-md);
}

.mb-3 {
  margin-bottom: var(--space-lg);
}

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

/* Badge Component */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-locked {
  background: rgba(255, 107, 107, 0.2);
  color: var(--color-locked);
  border: 1px solid rgba(255, 107, 107, 0.4);
}

.badge-vesting {
  background: rgba(255, 217, 61, 0.2);
  color: var(--color-vesting);
  border: 1px solid rgba(255, 217, 61, 0.4);
}

.badge-unlocked {
  background: rgba(81, 207, 102, 0.2);
  color: var(--color-unlocked);
  border: 1px solid rgba(81, 207, 102, 0.4);
}

.badge-success {
  background: rgba(0, 255, 136, 0.2);
  color: var(--color-success);
  border: 1px solid rgba(0, 255, 136, 0.4);
}

/* Copy Button Component */
.copy-button {
  background: rgba(192, 192, 192, 0.1);
  border: 1px solid rgba(192, 192, 192, 0.2);
  border-radius: var(--border-radius-sm);
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.copy-button:hover {
  background: rgba(192, 192, 192, 0.2);
  color: var(--color-neon-cyan);
  border-color: var(--color-neon-cyan);
}

.copy-button.copied {
  background: rgba(0, 255, 136, 0.2);
  color: var(--color-success);
  border-color: var(--color-success);
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-lg);
}

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

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

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

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 768px) {

  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Animation Utilities */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

.slide-up {
  animation: slideUp 0.4s ease;
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

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

@media (max-width: 1024px) {
  :root {
    --font-size-5xl: 2.5rem;
    --font-size-4xl: 2rem;
    --font-size-3xl: 1.75rem;
  }

  .hero {
    min-height: 70vh;
  }

  .hero-logo {
    width: 140px;
    height: 140px;
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-wrap: wrap;
  }

  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: var(--space-sm);
  }

  .nav-menu.active {
    display: flex;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .header-nav {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-title {
    font-size: var(--font-size-3xl);
  }

  .hero-tagline {
    font-size: var(--font-size-lg);
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .toast-container {
    left: var(--space-md);
    right: var(--space-md);
    max-width: none;
  }
}

@media (max-width: 480px) {
  :root {
    --font-size-5xl: 2rem;
    --font-size-4xl: 1.75rem;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .hero-logo {
    width: 100px;
    height: 100px;
  }

  .card {
    padding: var(--space-lg);
  }

  .modal {
    padding: var(--space-lg);
  }
}

/* ==========================================================================
   New Components (Production Update)
   ========================================================================== */

/* Website/dApp Toggle */
.view-toggle-container {
  display: flex;
  align-items: center;
}

.view-toggle {
  display: flex;
  background: rgba(192, 192, 192, 0.1);
  border: 1px solid rgba(192, 192, 192, 0.2);
  border-radius: var(--border-radius-full);
  padding: 4px;
}

.toggle-btn {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  padding: 6px 16px;
  border-radius: var(--border-radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.toggle-btn:hover {
  color: var(--color-text-primary);
}

.toggle-btn.active {
  background: var(--color-neon-cyan);
  color: var(--color-bg-primary);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

/* Chain Selector */
.chain-selector {
  appearance: none;
  cursor: pointer;
  outline: none;
}

.chain-selector:hover {
  border-color: var(--color-neon-cyan);
}

/* Fee Board */
.fee-board-container {
  animation: fadeIn 1s ease-out;
}

/* Grid Layouts */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.grid-3-1 {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: var(--space-lg);
}

@media (max-width: 992px) {

  .grid-3,
  .grid-3-1 {
    grid-template-columns: 1fr;
  }
}

/* Governance */
.badge-success {
  background: rgba(0, 255, 136, 0.2);
  color: var(--color-success);
  border: 1px solid var(--color-success);
  padding: 2px 8px;
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 600;
}

/* ==========================================================================
   Solitaire Game Styles (Redesign - Production Grade)
   ========================================================================== */

/* Wrapper for centering and spacing */
.solitaire-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: var(--space-xl) 0;
}

/* Main game board */
.solitaire-container {
  position: relative;
  width: 85vw;
  max-width: 1200px;
  margin: 0 auto;
  background: linear-gradient(180deg, #8B0000 0%, #660000 100%);
  border-radius: var(--border-radius-xl);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  padding-bottom: 80px;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(255, 255, 255, 0.15);

  /* Prevent text selection */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;

  /* Prevent touch actions that interfere with drag */
  touch-action: none;
}

@media (min-width: 1024px) {
  .solitaire-card {
    width: 70px;
    height: 98px;
  }
}

/* Top Bar */
.solitaire-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--space-md);
  color: white;
}

.status-icon {
  width: 40px;
  height: 40px;
}

.status-check {
  width: 32px;
  height: 32px;
  background: #00C853;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.game-stats-center {
  display: flex;
  gap: var(--space-lg);
  text-align: center;
}

.stat-box {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 12px;
  opacity: 0.8;
  font-weight: 500;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.solitaire-deck-area {
  display: flex;
  gap: 8px;
}

/* Play Area */
.solitaire-play-area {
  padding: var(--space-sm);
}

.solitaire-foundation-row {
  display: flex;
  justify-content: flex-end;
  /* Align to right as per screenshot? Or spread? Screenshot has deck right. Foundation usually top right too. */
  /* Actually, let's put Foundation on the left of the top row if we want standard, but the screenshot shows deck on right. 
     I'll put Foundation in a row above Tableau, aligned right next to deck? 
     Let's try a dedicated row for Foundation + Waste/Stock. */
  gap: 8px;
  margin-bottom: var(--space-lg);
  padding: 0 var(--space-sm);
}

/* Cards & Piles */
.solitaire-card,
.solitaire-foundation,
.solitaire-stock,
.solitaire-waste,
.tableau-pile {
  width: 13vw;
  /* Responsive width */
  max-width: 60px;
  height: 18vw;
  /* Aspect ratio */
  max-height: 84px;
  border-radius: 4px;
  position: relative;
}

.solitaire-foundation,
.solitaire-stock,
.tableau-pile {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-pile-icon {
  font-size: 24px;
  opacity: 0.3;
  color: white;
}

.solitaire-card {
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: serif;
  user-select: none;
  transition: transform 0.1s;
}

.solitaire-card.face-down {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  /* Blue back like screenshot */
  border: 2px solid white;
}

.card-back {
  width: 100%;
  height: 100%;
  background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255, 255, 255, 0.1) 5px, rgba(255, 255, 255, 0.1) 10px);
}

.solitaire-card[data-color="red"] {
  color: #d32f2f;
}

.solitaire-card[data-color="black"] {
  color: #212121;
}

.card-rank {
  font-size: 14px;
  font-weight: bold;
  position: absolute;
  top: 2px;
  left: 4px;
}

.card-suit {
  font-size: 24px;
}

/* Tableau Layout */
.solitaire-tableau {
  display: flex;
  justify-content: space-between;
  padding: 0 var(--space-sm);
}

.tableau-pile {
  border: none;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Card Overlap in Tableau */
.tableau-pile .solitaire-card {
  margin-top: -65px;
  /* Negative margin for overlap */
}

.tableau-pile .solitaire-card:first-child {
  margin-top: 0;
}

/* Bottom Toolbar */
.solitaire-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 100%);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-bottom: 10px;
  /* Safe area */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tool-btn {
  background: none;
  border: none;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  opacity: 0.8;
  cursor: pointer;
  transition: opacity 0.2s;
}

.tool-btn:hover {
  opacity: 1;
}

.tool-icon {
  font-size: 20px;
  margin-bottom: 2px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .solitaire-wrapper {
    padding: 0;
  }

  .solitaire-container {
    width: 100vw;
    max-width: 100%;
    min-height: 90vh;
    aspect-ratio: 1 / 1.1;
    border-radius: 0;
  }

  .solitaire-top-bar {
    padding: var(--space-sm);
  }

  .status-check {
    width: 24px;
    height: 24px;
  }

  .stat-value {
    font-size: 16px;
  }

  .solitaire-tableau {
    overflow-y: auto;
    max-height: 65vh;
  }

  .solitaire-card,
  .solitaire-foundation,
  .solitaire-stock {
    width: 11vw;
    height: 15.4vw;
  }
}

@media (max-width: 480px) {
  .solitaire-container {
    height: 100vh;
    max-height: none;
  }

  .status-icon {
    width: 32px;
    height: 32px;
  }

  .stat-label {
    font-size: 10px;
  }

  .stat-value {
    font-size: 14px;
  }
}

/* ==========================================================================
   Stats Panel for Play Page
   ========================================================================== */

.stat-item {
  text-align: center;
  padding: var(--space-md);
  background: rgba(31, 31, 31, 0.4);
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(192, 192, 192, 0.1);
}

.stat-item .stat-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-xs);
}

.stat-item .stat-value {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-neon-cyan);
}

@media (max-width: 768px) {
  .stat-item .stat-value {
    font-size: var(--font-size-xl);
  }
}

/* ==========================================================================
   Utility Bar (Minimal Footer for dApp)
   ========================================================================== */

.utility-bar {
  width: 100%;
  background: rgba(10, 10, 10, 0.95);
  border-top: 1px solid rgba(192, 192, 192, 0.05);
  padding: var(--space-md) 0;
  margin-top: var(--space-3xl);
}

.utility-bar .container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.utility-bar a {
  font-size: var(--font-size-xs);
  color: var(--color-text-tertiary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.utility-bar a:hover {
  color: var(--color-neon-cyan);
}

.utility-bar .separator {
  color: var(--color-text-tertiary);
  opacity: 0.5;
  font-size: var(--font-size-xs);
}

@media (max-width: 768px) {
  .utility-bar .container {
    justify-content: center;
    text-align: center;
  }
}

/* ==========================================================================
   Reflex Flip Game Styles
   ========================================================================== */

.reflex-game-container {
  background: linear-gradient(180deg, #8B0000 0%, #4a0000 100%);
  border-radius: var(--border-radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  user-select: none;
  -webkit-user-select: none;
}

.reflex-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  background: rgba(0, 0, 0, 0.3);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius-md);
}

.reflex-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reflex-stat .label {
  font-size: 10px;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.reflex-stat .value {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text-primary);
  font-family: monospace;
}

.reflex-stat.timer .value {
  color: var(--color-warning);
}

.reflex-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  aspect-ratio: 1;
  /* Keep it square */
  max-width: 500px;
  /* Limit max size on desktop */
  margin-left: auto;
  margin-right: auto;
}

.reflex-tile {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.1s ease;
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
}

.reflex-tile:hover {
  background: rgba(255, 255, 255, 0.1);
}

.reflex-tile:active,
.reflex-tile.tapped {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.2);
}

/* Flashing State */
.reflex-tile.flash {
  background: rgba(0, 255, 255, 0.2);
  border-color: var(--color-neon-cyan);
  box-shadow: 0 0 15px var(--color-neon-cyan);
  animation: pulse 0.5s infinite alternate;
}

@keyframes pulse {
  from {
    box-shadow: 0 0 10px var(--color-neon-cyan);
  }

  to {
    box-shadow: 0 0 25px var(--color-neon-cyan), inset 0 0 10px var(--color-neon-cyan);
  }
}

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

/* Mobile Adjustments */
@media (max-width: 768px) {
  .reflex-game-container {
    border-radius: 0;
    max-width: 100%;
    aspect-ratio: auto;
    min-height: auto;
  }

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

  .reflex-tile {
    min-height: 80px;
    /* Ensure tap target size */
  }
}