/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  :root {
    /* Professional Color Palette */
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    
    --secondary-600: #7c3aed;
    --secondary-700: #6d28d9;
    
    --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-500: #10b981;
    --success-100: #d1fae5;
    --warning-500: #f59e0b;
    --error-500: #ef4444;
    --error-100: #fee2e2;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', monospace;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    
    /* 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);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
  }
  
  body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--neutral-700);
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--neutral-50) 100%);
    min-height: 100vh;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-6);
  }
  
  /* Header Styles */
  .header {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    margin-bottom: var(--space-8);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--neutral-200);
  }
  
  .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-8);
  }
  
  .logo-section {
    display: flex;
    align-items: center;
    gap: var(--space-4);
  }
  
  .logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    box-shadow: var(--shadow-md);
  }
  
  .logo-text h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: var(--space-1);
    letter-spacing: -0.025em;
  }
  
  .tagline {
    font-size: 1rem;
    color: var(--neutral-500);
    font-weight: 400;
  }
  
  .header-stats {
    display: flex;
    gap: var(--space-8);
  }
  
  .stat-item {
    text-align: center;
  }
  
  .stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-600);
    font-family: var(--font-mono);
  }
  
  .stat-label {
    font-size: 0.875rem;
    color: var(--neutral-500);
    font-weight: 500;
  }
  
  /* Main Content */
  .main-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
  }
  
  .content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
  
  /* Section Styles */
  .input-section,
  .results-section,
  .info-section {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--neutral-200);
  }
  
  .section-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
  }
  
  .section-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-100);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-600);
    font-size: 1.25rem;
  }
  
  .section-title h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: var(--space-1);
    letter-spacing: -0.025em;
  }
  
  .section-title p {
    font-size: 0.875rem;
    color: var(--neutral-500);
  }
  
  /* Form Styles */
  .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-8);
  }
  
  .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
  }
  
  .form-group label {
    font-weight: 500;
    color: var(--neutral-700);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: var(--space-2);
  }
  
  .form-group label i {
    color: var(--neutral-400);
    width: 16px;
  }
  
  .form-group input {
    padding: var(--space-3) var(--space-4);
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-family: var(--font-mono);
    transition: all 0.2s ease;
    background: var(--neutral-50);
  }
  
  .form-group input:focus {
    outline: none;
    border-color: var(--primary-600);
    background: white;
    box-shadow: 0 0 0 3px var(--primary-100);
  }
  
  .form-group input:hover {
    border-color: var(--neutral-300);
  }
  
  /* Button Styles */
  .form-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .btn {
    padding: var(--space-3) var(--space-6);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    font-family: var(--font-primary);
  }
  
  .btn-primary {
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
    color: white;
    box-shadow: var(--shadow-md);
  }
  
  .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
  }
  
  .btn-secondary {
    background: var(--neutral-600);
    color: white;
    box-shadow: var(--shadow-sm);
  }
  
  .btn-secondary:hover {
    background: var(--neutral-700);
    transform: translateY(-1px);
  }
  
  .btn-outline {
    background: transparent;
    color: var(--neutral-600);
    border: 2px solid var(--neutral-300);
  }
  
  .btn-outline:hover {
    background: var(--neutral-100);
    border-color: var(--neutral-400);
  }
  
  /* Loading Styles */
  .loading {
    text-align: center;
    padding: var(--space-12);
  }
  
  .spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
  }
  
  .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--neutral-200);
    border-top: 4px solid var(--primary-600);
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  .loading-text h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: var(--space-1);
  }
  
  .loading-text p {
    color: var(--neutral-500);
    font-size: 0.875rem;
  }
  
  /* Results Styles */
  .results-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
  }
  
  .result-card {
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
    color: white;
    padding: var(--space-8);
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  
  .result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    pointer-events: none;
  }
  
  .result-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
  }
  
  .result-header i {
    font-size: 1.25rem;
  }
  
  .result-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
  }
  
  .result-value {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: var(--space-4);
    font-family: var(--font-mono);
    position: relative;
    z-index: 1;
  }
  
  .unit {
    font-size: 1.5rem;
    opacity: 0.8;
    font-weight: 400;
  }
  
  .result-details p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: var(--space-4);
  }
  
  .confidence-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
  }
  
  .confidence-bar {
    width: 120px;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    overflow: hidden;
  }
  
  .confidence-fill {
    width: 85%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    border-radius: 3px;
  }
  
  .confidence-text {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 500;
  }
  
  /* Input Summary */
  .input-summary {
    background: var(--neutral-50);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    border: 1px solid var(--neutral-200);
  }
  
  .input-summary h4 {
    color: var(--neutral-900);
    margin-bottom: var(--space-4);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-2);
  }
  
  .summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-2);
  }
  
  .summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) var(--space-3);
    background: white;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    border: 1px solid var(--neutral-200);
  }
  
  .summary-item span:last-child {
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--primary-600);
  }
  
  /* Error Styles */
  .error-container {
    text-align: center;
    padding: var(--space-8);
  }
  
  .error-message {
    background: var(--error-100);
    color: var(--error-500);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    border: 1px solid var(--error-500);
  }
  
  .error-message i {
    font-size: 1.5rem;
    margin-bottom: var(--space-2);
  }
  
  .error-message h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-2);
  }
  
  /* Info Section */
  .info-section {
    grid-column: 1 / -1;
  }
  
  .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
  }
  
  .info-card {
    background: var(--neutral-50);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    border: 1px solid var(--neutral-200);
    transition: all 0.2s ease;
  }
  
  .info-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
  
  .info-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-100);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-600);
    font-size: 1.25rem;
    margin-bottom: var(--space-4);
  }
  
  .info-card h3 {
    color: var(--neutral-900);
    margin-bottom: var(--space-2);
    font-size: 1.125rem;
    font-weight: 600;
  }
  
  .info-card p {
    color: var(--neutral-600);
    margin-bottom: var(--space-2);
    font-weight: 500;
  }
  
  .info-detail {
    font-size: 0.875rem;
    color: var(--neutral-500);
    font-family: var(--font-mono);
  }
  
  /* Footer */
  .footer {
    margin-top: var(--space-12);
    padding: var(--space-8);
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--neutral-200);
  }
  
  .footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .footer-left p {
    color: var(--neutral-600);
    margin-bottom: var(--space-1);
  }
  
  .footer-brand {
    font-size: 0.875rem;
    color: var(--neutral-500);
  }
  
  .footer-brand strong {
    color: var(--primary-600);
    font-weight: 600;
  }
  
  .footer-links {
    display: flex;
    gap: var(--space-6);
  }
  
  .footer-link {
    color: var(--neutral-500);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
  }
  
  .footer-link:hover {
    color: var(--primary-600);
  }
  
  /* Utility Classes */
  .hidden {
    display: none;
  }
  
  /* Responsive Design */
  @media (max-width: 1024px) {
    .content-grid {
      grid-template-columns: 1fr;
    }
    
    .header-content {
      flex-direction: column;
      text-align: center;
      gap: var(--space-6);
    }
  }
  
  @media (max-width: 768px) {
    .container {
      padding: var(--space-4);
    }
  
    .header {
      padding: var(--space-6);
    }
  
    .logo-text h1 {
      font-size: 1.5rem;
    }
  
    .tagline {
      font-size: 0.875rem;
    }
  
    .form-grid {
      grid-template-columns: 1fr;
    }
  
    .form-actions {
      flex-direction: column;
    }
  
    .result-value {
      font-size: 2.5rem;
    }
  
    .info-grid {
      grid-template-columns: 1fr;
    }
  
    .footer-content {
      flex-direction: column;
      gap: var(--space-4);
      text-align: center;
    }
  
    .footer-links {
      justify-content: center;
    }
  }
  
  @media (max-width: 480px) {
    .header-stats {
      flex-direction: column;
      gap: var(--space-4);
    }
  
    .summary-grid {
      grid-template-columns: 1fr;
    }
  }