:root {
    /* Color system */
    --primary-color: #3a6186;
    --primary-color-dark: #3f37c9;
    --primary-color-light: #4cc9f0;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #ced4da;
    --gray-600: #6c757d;
    --gray-900: #212529;
    --secondary-color: #89253e;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-radius: 8px;
    
    /* Spacing */
    --section-spacing: 6rem 0;
    
    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.1);
    --shadow-primary: 0 4px 6px rgba(67, 97, 238, 0.3);
    --shadow-primary-hover: 0 6px 8px rgba(67, 97, 238, 0.4);
    
    /* Animation */
    --transition-standard: all 0.3s ease;
  }
  
  /* Base styles */
  body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.7;
    background-color: #ffffff;
  }
  
  /* Button styles */
  .btn {
    font-weight: 600;
    transition: var(--transition-standard);
  }
  
  .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    box-shadow: var(--shadow-primary);
  }
  
  .btn-primary:hover, 
  .btn-primary:focus {
    background-color: var(--primary-color-dark);
    border-color: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary-hover);
  }
  
  .btn-outline-secondary {
    color: var(--gray-900);
    border-color: var(--gray-300);
  }
  
  .btn-outline-secondary:hover,
  .btn-outline-secondary:focus {
    background-color: var(--gray-100);
    color: var(--primary-color);
    border-color: var(--primary-color);
  }
  
  /* Header */
  .site-header {
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    background-color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
  }
  
  .site-header .navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
  }
  
  .site-header .nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    position: relative;
    transition: var(--transition-standard);
  }
  
  .site-header .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    bottom: -2px;
    left: 0;
    transition: width 0.3s ease;
  }
  
  .site-header .nav-link:hover::after,
  .site-header .nav-link:focus::after,
  .site-header .nav-link.active::after {
    width: 100%;
  }
  
  .site-header .nav-link.active {
    color: var(--primary-color) !important;
    background-color: transparent !important;
  }
  
  /* Hero section */
  .hero-section {
    padding: 5rem 0 3rem;
    background: linear-gradient(135deg, var(--gray-100) 0%, #e4e8ef 100%);
  }
  
  .hero-section h1 {
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
  }
  
  .hero-section .lead {
    font-size: 1.25rem;
    margin-bottom: 2rem;
  }
  
  .hero-image {
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.5s ease;
    max-width: 100%;
    height: auto;
  }
  
  .hero-image:hover {
    transform: translateY(-10px);
  }
  
  /* Features section */
  .features-section {
    padding: var(--section-spacing);
  }
  
  .section-title {
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
  }
  
  .section-title::after {
    content: '';
    position: absolute;
    width: 70px;
    height: 3px;
    background: var(--primary-color);
    bottom: -10px;
    left: 0;
  }
  
  .icon-square {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    background: var(--primary-color);
    margin-right: 1.25rem;
    box-shadow: 0 4px 6px rgba(67, 97, 238, 0.2);
    transition: var(--transition-standard);
  }
  
  .feature-card {
    transition: var(--transition-standard);
    padding: 1.5rem;
    border-radius: 12px;
    height: 100%;
    border: 1px solid transparent;
  }
  
  .feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--gray-200);
  }
  
  .feature-card:hover .icon-square {
    transform: rotate(10deg);
    background: var(--primary-color-dark);
  }
  
  .feature-card h3 {
    font-weight: 700;
    margin-bottom: 1rem;
  }
  
  .feature-card .btn {
    margin-top: 1rem;
    padding: 0.5rem 1.25rem;
  }
  
  /* Footer */
  .site-footer {
    background-color: var(--gray-100);
    padding: 3rem 0;
    border-top: 1px solid var(--gray-200);
  }
  
  .site-footer .social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid var(--gray-200);
    transition: var(--transition-standard);
  }
  
  .site-footer .social-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
  }
  
  .site-footer .social-link i,
  .site-footer .social-link svg {
    color: var(--gray-600);
    transition: color 0.3s;
  }
  
  .site-footer .social-link:hover i,
  .site-footer .social-link:hover svg {
    color: white;
  }
  
  /* Media queries for responsiveness */
  @media (max-width: 768px) {
    :root {
      --section-spacing: 4rem 0;
    }
    
    .hero-section {
      padding: 3rem 0 2rem;
    }
    
    .hero-image {
      margin-top: 2rem;
    }
    
    .feature-card {
      margin-bottom: 1.5rem;
    }
  }
  
  /* Accessibility improvements */
  @media (prefers-reduced-motion: reduce) {
    * {
      transition: none !important;
      animation: none !important;
    }
  }

  /* Responsive styles */
  @media (max-width: 768px) {
    /* General mobile adjustments */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Header adjustments */
    .site-header {
        padding: 10px 0;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    .navbar-toggler {
        padding: 0.25rem 0.5rem;
    }

    /* Hero section adjustments */
    .hero-section {
        padding: 2rem 0;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section .lead {
        font-size: 1rem;
    }

    .hero-image {
        max-width: 100%;
        height: auto;
    }

    /* Feature cards adjustments */
    .feature-card {
        margin-bottom: 1rem;
    }

    .icon-square {
        width: 40px;
        height: 40px;
    }

    .feature-card h3 {
        font-size: 1.25rem;
    }

    /* Dashboard adjustments */
    .sidebar {
        position: fixed;
        width: 100%;
        height: 100vh;
        margin-left: -100%;
        transition: margin-left 0.3s ease;
    }

    .sidebar.show {
        margin-left: 0;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }

    /* Chart adjustments */
    .chart-container {
        height: 250px;
    }

    /* Form adjustments */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Button adjustments */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    /* User profile adjustments */
    .user-profile {
        padding: 0.5rem 1rem;
    }

    .user-initials {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    /* Feature sections */
    .feature-section {
        padding: 1rem 0;
    }

    .feature-placeholder {
        padding: 1rem;
    }

    /* Video container */
    .video-container {
        position: relative;
        padding-bottom: 56.25%; /* 16:9 aspect ratio */
        height: 0;
        overflow: hidden;
    }

    .video-container iframe,
    .video-container video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    /* Gesture recognition adjustments */
    #gestureOutput {
        font-size: 1rem;
        padding: 0.5rem;
    }

    /* Text-to-speech adjustments */
    .voice-select {
        width: 100%;
        margin-bottom: 1rem;
    }

    /* Speech-to-text adjustments */
    .transcript-container {
        height: 200px;
    }

    /* Community page adjustments */
    .discussion-card,
    .topic-card,
    .event-card {
        margin-bottom: 1rem;
    }

    /* Footer adjustments */
    .site-footer {
        padding: 1rem 0;
    }

    .social-links {
        justify-content: center;
        margin-top: 1rem;
    }
  }

  /* Tablet adjustments */
  @media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
    }

    .feature-card {
        margin-bottom: 1.5rem;
    }

    .chart-container {
        height: 300px;
    }
  }

  /* Small mobile devices */
  @media (max-width: 480px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }

    .feature-card h3 {
        font-size: 1.1rem;
    }

    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .chart-container {
        height: 200px;
    }
  }

  /* Landscape mode adjustments */
  @media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 1rem 0;
    }

    .feature-card {
        margin-bottom: 0.5rem;
    }

    .chart-container {
        height: 200px;
    }
  }

  /* High DPI screens */
  @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .icon-square i {
        font-size: 1.2em;
    }
  }

  /* Dark mode support - Only apply if user explicitly prefers dark mode */
  @media (prefers-color-scheme: dark) {
    /* Override dark mode for the main content */
    body {
        background-color: #ffffff !important;
        color: var(--text-color) !important;
    }

    .card {
        background-color: #ffffff !important;
        border-color: #dee2e6 !important;
    }

    .text-muted {
        color: #6c757d !important;
    }

    /* Only apply dark mode to specific elements that need it */
    .dark-mode-only {
        background-color: #121212;
        color: #f8f9fa;
    }
  }