/* CSS Custom Properties for Theme Management */
:root {
    /* Light theme colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #e2e8f0;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --accent-primary: #3b82f6;
    --accent-secondary: #1e40af;
    --accent-hover: #2563eb;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, Inconsolata, 'Roboto Mono', 'Courier New', monospace;
    
    /* Spacing and sizing */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  /* Dark theme colors */
  [data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent-primary: #60a5fa;
    --accent-secondary: #3b82f6;
    --accent-hover: #2563eb;
    --border-color: #334155;
    --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.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
  }
  
  /* Base styles and reset */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  html {
    scroll-behavior: smooth;
  }
  
  body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: var(--transition);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  /* Container utility */
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
  }
  
  /* Navigation */
  .navbar {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  
  .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
  }
  
  .nav-brand h2 {
    color: var(--accent-primary);
    font-size: 1.5rem;
    font-weight: 700;
  }
  
  .theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1rem;
  }
  
  .theme-toggle:hover {
    background-color: var(--bg-secondary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: scale(1.05);
  }
  
  /* Hero Section */
  .hero {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  
  .hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
  }
  
  .hero-content {
    position: relative;
    z-index: 2;
  }
  
  .hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.1;
  }
  
  .hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
  }
  
  .hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  /* Buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
  }
  
  .btn-primary {
    background-color: var(--accent-primary);
    color: white;
  }
  
  .btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
  }
  
  .btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
  }
  
  .btn-secondary:hover {
    background-color: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
  }
  
  .btn-outline {
    background-color: transparent;
    color: var(--accent-primary);
    border-color: var(--accent-primary);
  }
  
  .btn-outline:hover {
    background-color: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
  }
  
  /* Features Section */
  .features {
    padding: 6rem 0;
    background-color: var(--bg-secondary);
  }
  
  .section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3rem;
  }
  
  .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
  }
  
  .feature-card {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
  }
  
  .feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
  }
  
  .feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    color: white;
  }
  
  .feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
  }
  
  .feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
  }
  
  /* API Info Section */
  .api-info {
    padding: 6rem 0;
    background-color: var(--bg-primary);
  }
  
  .info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
  }
  
  .info-content h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
  }
  
  .info-content p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 2rem;
  }
  
  .info-list {
    list-style: none;
    space-y: 1rem;
  }
  
  .info-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 1rem;
  }
  
  .info-list li i {
    color: var(--accent-primary);
    font-size: 1rem;
  }
  
  /* Code Preview */
  .code-preview {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
  }
  
  .code-header {
    background-color: var(--bg-tertiary);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
  }
  
  .code-dots {
    display: flex;
    gap: 0.5rem;
  }
  
  .code-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--text-muted);
  }
  
  .code-dots span:nth-child(1) { background-color: #ef4444; }
  .code-dots span:nth-child(2) { background-color: #f59e0b; }
  .code-dots span:nth-child(3) { background-color: #10b981; }
  
  .code-title {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
  }
  
  .code-content {
    padding: 1.5rem;
  }
  
  .code-content pre {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-primary);
    overflow-x: auto;
  }
  
  .code-content code {
    color: var(--text-primary);
  }
  
  /* CTA Section */
  .cta {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    text-align: center;
    color: white;
  }
  
  .cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
  }
  
  .cta-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
  }
  
  .cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .cta .btn-primary {
    background-color: white;
    color: var(--accent-primary);
  }
  
  .cta .btn-primary:hover {
    background-color: var(--bg-secondary);
    transform: translateY(-2px);
  }
  
  .cta .btn-outline {
    background-color: transparent;
    color: white;
    border-color: white;
  }
  
  .cta .btn-outline:hover {
    background-color: white;
    color: var(--accent-primary);
  }
  
  /* Footer */
  .footer {
    background-color: var(--bg-secondary);
    padding: 3rem 0 1.5rem;
  }
  
  .footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
  }
  
  .footer-brand h3 {
    color: var(--accent-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
  }
  
  .footer-brand p {
    color: var(--text-secondary);
    line-height: 1.6;
  }
  
  .footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
  }
  
  .footer-section h4 {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
  }
  
  .footer-section ul {
    list-style: none;
  }
  
  .footer-section ul li {
    margin-bottom: 0.5rem;
  }
  
  .footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .footer-section ul li a:hover {
    color: var(--accent-primary);
  }
  
  .footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    .container {
      padding: 0 1rem;
    }
    
    .nav-container {
      padding: 1rem;
    }
    
    .hero {
      padding: 4rem 0;
    }
    
    .hero-title {
      font-size: 2.5rem;
    }
    
    .hero-description {
      font-size: 1.125rem;
    }
    
    .hero-buttons {
      flex-direction: column;
      align-items: center;
    }
    
    .btn {
      width: 100%;
      max-width: 300px;
      justify-content: center;
    }
    
    .features {
      padding: 4rem 0;
    }
    
    .section-title {
      font-size: 2rem;
    }
    
    .features-grid {
      grid-template-columns: 1fr;
      gap: 1.5rem;
    }
    
    .api-info {
      padding: 4rem 0;
    }
    
    .info-grid {
      grid-template-columns: 1fr;
      gap: 2rem;
      text-align: center;
    }
    
    .info-content h2 {
      font-size: 1.875rem;
    }
    
    .cta {
      padding: 4rem 0;
    }
    
    .cta-content h2 {
      font-size: 2rem;
    }
    
    .cta-buttons {
      flex-direction: column;
      align-items: center;
    }
    
    .footer-content {
      grid-template-columns: 1fr;
      gap: 2rem;
      text-align: center;
    }
    
    .footer-links {
      grid-template-columns: 1fr;
      gap: 1.5rem;
    }
  }
  
  @media (max-width: 480px) {
    .hero-title {
      font-size: 2rem;
    }
    
    .hero-description {
      font-size: 1rem;
    }
    
    .section-title {
      font-size: 1.75rem;
    }
    
    .info-content h2 {
      font-size: 1.5rem;
    }
    
    .cta-content h2 {
      font-size: 1.75rem;
    }
    
    .feature-card {
      padding: 1.5rem;
    }
    
    .code-content {
      padding: 1rem;
    }
    
    .code-content pre {
      font-size: 0.75rem;
    }
  }
  
  /* Smooth animations for theme transitions */
  * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  }
  
  /* Focus styles for accessibility */
  .btn:focus,
  .theme-toggle:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
  }
  
  /* Improve link hover states */
  @media (hover: hover) {
    .feature-card:hover .feature-icon {
      transform: scale(1.1);
    }
    
    .footer-section ul li a:hover i {
      transform: scale(1.1);
    }
  }