/* ===== RESPONSIVE IMPROVEMENTS ===== */

/* Mobile-first approach improvements */
@media (max-width: 768px) {
  .vp-container {
    width: 95%;
    padding: 0 var(--space-sm);
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .vp-nav-inner {
    padding: var(--space-sm) 0;
  }

  .vp-main {
    padding: var(--space-lg) 0;
  }

  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .card {
    padding: var(--space-md);
    margin-bottom: var(--space-md);
  }

  .btn {
    width: 100%;
    justify-content: center;
    padding: var(--space-md) var(--space-lg);
  }

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

  /* Enhanced drag & drop for mobile */
  .enhanced-file-input {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .drop-overlay {
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  :root {
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
  }

  .vp-container {
    width: 98%;
    padding: 0 var(--space-xs);
  }

  .card {
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
  }

  .btn {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
  }

  .hero-card {
    flex-direction: column;
    text-align: center;
  }
}

/* ===== TABLET IMPROVEMENTS ===== */
@media (min-width: 769px) and (max-width: 1024px) {
  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .vp-container {
    width: min(1000px, 90%);
  }
}

/* ===== LARGE SCREEN OPTIMIZATIONS ===== */
@media (min-width: 1200px) {
  .form-row {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .card {
    padding: var(--space-xl);
  }
  
  .enhanced-file-input {
    min-height: 120px;
  }
}

/* ===== HIGH DPI DISPLAY IMPROVEMENTS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .btn {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  .card {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  }
}

/* ===== DARK MODE RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) and (prefers-color-scheme: dark) {
  [data-theme="dark"] .card {
    border-color: #374151;
  }
  
  [data-theme="dark"] .btn:hover {
    background: rgba(255, 255, 255, 0.1);
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .vp-navbar,
  .vp-footer,
  .btn,
  .enhanced-file-input {
    display: none !important;
  }
  
  .card {
    border: 1px solid #000;
    box-shadow: none;
    break-inside: avoid;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
    color: #000;
    background: #fff;
  }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
  .hover-lift:hover {
    transform: none;
  }
  
  .btn:hover {
    transform: none;
  }
  
  .card:hover {
    transform: none;
  }
}

/* Focus improvements for keyboard navigation */
@media (prefers-reduced-motion: no-preference) {
  .focus-ring:focus {
    animation: focus-pulse 2s infinite;
  }
}

@keyframes focus-pulse {
  0%, 100% { 
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); 
  }
  50% { 
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); 
  }
}

/* ===== ENHANCED LOADING STATES FOR MOBILE ===== */
@media (max-width: 768px) {
  .loading-spinner {
    width: 24px;
    height: 24px;
  }
  
  .toast {
    right: var(--space-sm);
    left: var(--space-sm);
    max-width: none;
  }
  
  .upload-progress {
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    background: var(--card);
    border: 1px solid var(--line);
  }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
/* Use GPU acceleration for smooth animations */
.hover-lift,
.btn,
.card {
  will-change: transform, box-shadow;
}

/* Optimize rendering for smooth scrolling */
.vp-navbar {
  will-change: transform;
}

/* ===== GRID LAYOUT IMPROVEMENTS ===== */
.stats-strip,
.features-strip {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

@media (max-width: 768px) {
  .stats-strip,
  .features-strip {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
}

/* ===== ENHANCED FORM LAYOUT FOR DIFFERENT SCREEN SIZES ===== */
.form-section {
  max-width: 100%;
}

@media (min-width: 769px) {
  .form-section {
    max-width: 880px;
  }
}

/* ===== UTILITY CLASSES FOR RESPONSIVE DESIGN ===== */
.hide-mobile {
  display: block;
}

.show-mobile {
  display: none;
}

@media (max-width: 768px) {
  .hide-mobile {
    display: none;
  }
  
  .show-mobile {
    display: block;
  }
}

/* ===== ENHANCED INTERACTION STATES ===== */
.interactive-element {
  transition: all var(--transition-fast);
  cursor: pointer;
}

.interactive-element:hover {
  transform: translateY(-1px);
}

.interactive-element:active {
  transform: translateY(0);
}

/* ===== IMPROVED SPACING UTILITIES ===== */
.space-y-sm > * + * {
  margin-top: var(--space-sm);
}

.space-y-md > * + * {
  margin-top: var(--space-md);
}

.space-y-lg > * + * {
  margin-top: var(--space-lg);
}