/* Modern Design System - Variables */
:root {
  /* Colors */
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-900: #0c4a6e;
  
  --secondary-50: #f0fdf4;
  --secondary-100: #dcfce7;
  --secondary-500: #22c55e;
  --secondary-600: #16a34a;
  --secondary-700: #15803d;
  
  --neutral-50: #f8fafc;
  --neutral-100: #f1f5f9;
  --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1;
  --neutral-400: #94a3b8;
  --neutral-500: #64748b;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1e293b;
  --neutral-900: #0f172a;
  
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  /* Background */
  --bg-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  --bg-secondary: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  --bg-glass: rgba(255, 255, 255, 0.1);
  --bg-glass-hover: rgba(255, 255, 255, 0.15);
  
  /* Text */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  --font-size-6xl: 3.75rem;
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  /* Mobile optimizations */
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Allow text selection for input fields */
input, textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  background: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-weight: 700;
  font-size: var(--font-size-lg);
  color: var(--text-primary);
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
}

.badge {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-glass);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  backdrop-filter: blur(10px);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--primary-500), var(--secondary-500));
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

.shape-1 {
  width: 300px;
  height: 300px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 200px;
  height: 200px;
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.shape-3 {
  width: 150px;
  height: 150px;
  bottom: 20%;
  left: 60%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

/* Mobile performance optimizations */
@media (max-width: 768px) {
  /* Reduce animations for better performance on mobile */
  .shape {
    animation-duration: 8s; /* Slower animation */
  }
  
  /* Use transform3d for hardware acceleration */
  .feature-card:hover {
    transform: translate3d(0, -4px, 0);
  }
  
  .btn-primary:hover {
    transform: translate3d(0, -2px, 0);
  }
  
  /* Optimize backdrop filters for mobile */
  header {
    backdrop-filter: blur(10px); /* Reduce blur for performance */
  }
  
  .analysis-card,
  .feature-card,
  .sheet {
    backdrop-filter: blur(10px); /* Reduce blur for performance */
  }
  
  /* Reduce shadow complexity on mobile */
  .analysis-card {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  }
  
  .feature-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: var(--space-xl);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg-glass);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  backdrop-filter: blur(10px);
}

.badge-icon {
  font-size: var(--font-size-lg);
}

.hero-title {
  font-size: clamp(var(--font-size-2xl), 6vw, var(--font-size-4xl));
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-xl);
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-description {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.7;
}

/* Features Section */
.features-section {
  padding: var(--space-3xl) var(--space-lg);
  background: var(--bg-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: var(--bg-glass);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  text-align: center;
  backdrop-filter: blur(10px);
  transition: var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-xl);
}

.feature-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto var(--space-lg);
  background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Analysis Section */
.analysis-section {
  padding: var(--space-3xl) var(--space-lg);
  background: var(--bg-primary);
}

.analysis-container {
  max-width: 600px;
  margin: 0 auto;
}

.analysis-card {
  background: var(--bg-glass);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-2xl);
}

.analysis-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.analysis-header h2 {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.analysis-header p {
  color: var(--text-secondary);
  font-size: var(--font-size-lg);
}

.analysis-form {
  width: 100%;
}

.input-group {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.input-group input {
  flex: 1;
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-size: var(--font-size-lg);
  transition: var(--transition-normal);
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary-500);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.input-group input::placeholder {
  color: var(--text-muted);
}

.btn-primary {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg) var(--space-xl);
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  border: none;
  border-radius: var(--radius-xl);
  color: white;
  font-weight: 600;
  font-size: var(--font-size-lg);
  cursor: pointer;
  transition: var(--transition-normal);
  min-width: 200px;
  justify-content: center;
  /* Mobile touch optimizations */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  /* Better touch target */
  min-height: 44px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-icon {
  transition: var(--transition-fast);
}

.btn-primary:hover .btn-icon {
  transform: translateX(4px);
}

.form-note {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

/* Progress Overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: var(--space-lg);
}

.progress-box {
  background: var(--bg-glass);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  max-width: 500px;
  width: 100%;
  backdrop-filter: blur(20px);
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.progress-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--text-primary);
}

.pill {
  padding: var(--space-sm) var(--space-md);
  background: linear-gradient(135deg, var(--secondary-500), var(--secondary-600));
  color: white;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-500), var(--secondary-500));
  border-radius: var(--radius-full);
  transition: width var(--transition-normal);
  width: 0%;
}

.progressPercent {
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-lg);
}

.log {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  max-height: 150px;
  overflow-y: auto;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 110;
  padding: var(--space-lg);
}

.sheet {
  background: var(--bg-glass);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-2xl);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-2xl);
  display: flex;
  flex-direction: column;
}

.sheet .hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.sheet .hd div:first-child {
  flex: 1;
}

.sheet .hd h3 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.sheet .hd p {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

.ghost {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
}

.ghost:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.sheet .bd {
  padding: var(--space-xl);
  flex: 1;
  overflow-y: auto;
}

.keygrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.kv {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
}

.kv .k {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.kv .v {
  font-weight: 700;
  font-size: var(--font-size-lg);
  color: var(--text-primary);
}

.sheet .ft {
  padding: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cta {
  margin-bottom: var(--space-lg);
}

.wbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: var(--space-lg);
  background: linear-gradient(135deg, #25D366, #36e07a);
  color: #04120a;
  text-decoration: none;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: var(--font-size-lg);
  transition: var(--transition-normal);
}

.wbtn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.benefits {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0;
}

.benefits li {
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

/* Footer */
footer {
  background: var(--bg-secondary);
  padding: var(--space-4xl) var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer .cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-2xl);
  max-width: 1200px;
  margin: 0 auto;
}

footer h4 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

footer p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: var(--font-size-sm);
}

footer .links a {
  display: inline-block;
  margin-right: var(--space-lg);
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
}

footer .links a:hover {
  color: var(--primary-500);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-glass);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  z-index: 200;
  display: none;
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.cookie-content p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: var(--font-size-sm);
}

.cookie-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.cookie-actions .btn {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
  border: none;
  font-size: var(--font-size-sm);
}

.cookie-actions .btn:first-child {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: white;
}

.cookie-actions .btn:first-child:hover {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
}

.cookie-actions .ghost {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.cookie-actions .ghost:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

/* Mobile-First Responsive Design */

/* Base styles are mobile-first, then enhance for larger screens */

/* Small Mobile (320px - 480px) */
@media (max-width: 480px) {
  /* Header optimizations */
  .nav {
    padding: var(--space-xs) var(--space-sm);
    flex-wrap: wrap;
    gap: var(--space-xs);
  }
  
  .logo {
    font-size: var(--font-size-xs);
    gap: var(--space-xs);
  }
  
  .logo img {
    width: 24px;
    height: 24px;
  }
  
  .badge {
    font-size: 10px;
    padding: 2px var(--space-xs);
  }
  
  /* Hero section optimizations */
  .hero-section {
    min-height: 100vh;
    padding: var(--space-md) var(--space-sm);
  }
  
  .hero-content {
    padding: 0;
    max-width: 100%;
  }
  
  .hero-badge {
    font-size: 10px;
    padding: 4px var(--space-sm);
    margin-bottom: var(--space-md);
  }
  
  .hero-title {
    font-size: var(--font-size-xl);
    line-height: 1.2;
    margin-bottom: var(--space-md);
    padding: 0 var(--space-xs);
  }
  
  .hero-description {
    font-size: var(--font-size-sm);
    line-height: 1.5;
    margin-bottom: var(--space-lg);
    padding: 0 var(--space-xs);
  }
  
  /* Features section optimizations */
  .features-section {
    padding: var(--space-lg) var(--space-sm);
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
  
  .feature-card {
    padding: var(--space-md);
    margin: 0;
  }
  
  .feature-icon {
    width: 36px;
    height: 36px;
    margin-bottom: var(--space-sm);
  }
  
  .feature-icon svg {
    width: 16px;
    height: 16px;
  }
  
  .feature-card h3 {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-xs);
  }
  
  .feature-card p {
    font-size: var(--font-size-xs);
    line-height: 1.4;
  }
  
  /* Analysis section optimizations */
  .analysis-section {
    padding: var(--space-lg) var(--space-sm);
  }
  
  .analysis-container {
    max-width: 100%;
  }
  
  .analysis-card {
    padding: var(--space-md);
    margin: 0;
  }
  
  .analysis-header h2 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-xs);
  }
  
  .analysis-header p {
    font-size: var(--font-size-sm);
  }
  
  .input-group {
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
  }
  
  .input-group input {
    padding: var(--space-sm);
    font-size: var(--font-size-sm);
    border-radius: var(--radius-md);
    min-height: 40px; /* Better touch target */
  }
  
  .btn-primary {
    width: 100%;
    padding: var(--space-sm);
    font-size: var(--font-size-sm);
    min-height: 40px; /* Better touch target */
    border-radius: var(--radius-md);
  }
  
  .form-note {
    font-size: 10px;
    padding: 0 var(--space-xs);
  }
  
  /* Modal optimizations */
  .sheet {
    margin: var(--space-sm);
    max-height: 95vh;
    border-radius: var(--radius-lg);
  }
  
  .sheet .hd,
  .sheet .bd,
  .sheet .ft {
    padding: var(--space-md);
  }
  
  .sheet .hd h3 {
    font-size: var(--font-size-lg);
  }
  
  .keygrid {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }
  
  .kv {
    padding: var(--space-sm);
  }
  
  .kv .k {
    font-size: 10px;
  }
  
  .kv .v {
    font-size: var(--font-size-sm);
  }
  
  .wbtn {
    padding: var(--space-sm);
    font-size: var(--font-size-sm);
    min-height: 40px;
  }
  
  .benefits {
    margin: var(--space-xs) 0;
  }
  
  .benefits li {
    font-size: 10px;
    margin-bottom: 2px;
  }
  
  /* Progress overlay optimizations */
  .progress-box {
    margin: var(--space-sm);
    padding: var(--space-md);
    border-radius: var(--radius-lg);
  }
  
  .progress-title {
    font-size: var(--font-size-sm);
  }
  
  .log {
    max-height: 100px;
    font-size: 10px;
    padding: var(--space-sm);
  }
  
  /* Footer optimizations */
  footer {
    padding: var(--space-lg) var(--space-sm);
  }
  
  footer .cols {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    text-align: center;
  }
  
  footer h4 {
    font-size: var(--font-size-sm);
  }
  
  footer p {
    font-size: 10px;
  }
  
  footer .links a {
    display: block;
    margin: 2px 0;
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    font-size: 10px;
  }
  
  /* Cookie banner optimizations */
  .cookie-content {
    padding: var(--space-sm);
  }
  
  .cookie-content p {
    font-size: 10px;
    margin-bottom: var(--space-sm);
  }
  
  .cookie-actions {
    flex-direction: column;
    gap: var(--space-xs);
  }
  
  .cookie-actions .btn {
    width: 100%;
    padding: var(--space-sm);
    font-size: var(--font-size-xs);
    min-height: 36px; /* Better touch target */
  }
  
  /* Shape animations - reduce for mobile performance */
  .shape-1 {
    width: 150px;
    height: 150px;
  }
  
  .shape-2 {
    width: 100px;
    height: 100px;
  }
  
  .shape-3 {
    width: 80px;
    height: 80px;
  }
  
  /* Mobile touch feedback */
  .btn-primary:active,
  .wbtn:active,
  .ghost:active {
    transform: translate3d(0, 1px, 0);
    transition: transform 0.1s ease;
  }
  
  /* Improved touch targets for all interactive elements */
  .feature-card,
  .analysis-card {
    min-height: 44px; /* Ensure touch targets are large enough */
  }
  
  /* Better scrolling on mobile */
  .log,
  .sheet .bd {
    -webkit-overflow-scrolling: touch;
  }
  
  /* Prevent zoom on input focus */
  input[type="text"] {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  /* Mobile-specific hover states */
  .feature-card:hover {
    transform: none; /* Disable hover transforms on mobile */
  }
  
  /* Optimize for mobile viewport */
  .hero-section {
    padding-bottom: env(safe-area-inset-bottom);
  }
  
  /* Better spacing for mobile keyboards */
  .analysis-card {
    margin-bottom: 20vh; /* Space for mobile keyboard */
  }
}

/* Medium Mobile (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .nav {
    padding: var(--space-sm) var(--space-md);
  }
  
  .logo img {
    width: 32px;
    height: 32px;
  }
  
  .hero-section {
    min-height: 100vh;
    padding: var(--space-lg) var(--space-md);
  }
  
  .hero-title {
    font-size: var(--font-size-2xl);
  }
  
  .hero-description {
    font-size: var(--font-size-base);
  }
  
  .features-section {
    padding: var(--space-xl) var(--space-md);
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .analysis-section {
    padding: var(--space-xl) var(--space-md);
  }
  
  .input-group {
    flex-direction: row;
    gap: var(--space-sm);
  }
  
  .btn-primary {
    min-width: 140px;
    width: auto;
  }
  
  .keygrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }
  
  .analysis-container {
    max-width: 500px;
  }
}

/* Desktop (1025px+) */
@media (min-width: 1025px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .analysis-container {
    max-width: 600px;
  }
  
  .keygrid {
    grid-template-columns: repeat(2, 1fr);
  }
}
