      /* CSS Variables for Design System */

      /* Dark Mode Variables */
      .dark-mode {
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --text-light: #9ca3af;
        --bg-primary: #111827;
        --bg-secondary: #1f2937;
        --bg-tertiary: #374151;
        --border-color: #374151;
      }

      /* Base Styles */


      .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 1.5rem;
      }

      /* Section Styles */
      .section {
        padding: 5rem 0;
      }

      .section-title {
        font-family: "Poppins", sans-serif;
        font-size: 2.5rem;
        font-weight: 700;
        text-align: center;
        margin-bottom: 3rem;
        color: var(--text-primary);
      }

      /* Hero Section */

      .hero-bg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 0;
        pointer-events: none;
        opacity: 0.92;
      }




      /* Statistics Dashboard */
      .stats-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
        margin-bottom: 2rem;
      }

      .stat-card {
        background: var(--bg-primary);
        border: 2px solid var(--border-color);
        border-radius: 12px;
        padding: 1.5rem;
        text-align: center;
        transition: all 0.3s ease;
      }

      .stat-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
        border-color: var(--primary-color);
      }



      /* Learning Path */
      .learning-path {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
        margin-bottom: 4rem;
      }

      .level-card {
        background: var(--bg-primary);
        border: 2px solid var(--border-color);
        border-radius: 16px;
        padding: 2rem;
        text-align: center;
        transition: all 0.3s ease;
        cursor: pointer;
        position: relative;
        overflow: hidden;
      }

      .level-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: var(--gradient-primary);
        transform: scaleX(0);
        transition: transform 0.3s ease;
      }

      .level-card:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-xl);
        border-color: var(--primary-color);
      }

      .level-card:hover::before {
        transform: scaleX(1);
      }

      .level-icon {
        width: 80px;
        height: 80px;
        margin: 0 auto 1.5rem;
        background: var(--gradient-secondary);
        border-radius: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2rem;
        color: white;
      }

      /* Interactive Phonics Tools */
      .phonics-interactive {
        background: var(--bg-secondary);
      }

      .phonics-tools {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 2rem;
      }

      .phonics-tool {
        background: var(--bg-primary);
        border-radius: 16px;
        padding: 2rem;
        box-shadow: var(--shadow-md);
        transition: all 0.3s ease;
      }

      .phonics-tool:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-xl);
      }

      .tool-header {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-bottom: 1.5rem;
      }

      .tool-icon {
        width: 60px;
        height: 60px;
        background: var(--gradient-primary);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1.5rem;
      }

      .tool-header h3 {
        font-size: 1.5rem;
        font-weight: 600;
        color: var(--text-primary);
      }

      /* Sound Cards */
      .sound-card {
        background: var(--bg-tertiary);
        border-radius: 12px;
        padding: 2rem;
        text-align: center;
        transition: all 0.3s ease;
        cursor: pointer;
        border: 2px solid transparent;
        margin-bottom: 1rem;
        position: relative;
        overflow: hidden;
      }

      .sound-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
        border-color: var(--primary-color);
      }

      .sound-card.playing {
        border-color: var(--success-color);
        background: rgba(16, 185, 129, 0.1);
        animation: pulse 1s ease-in-out;
      }

      .phoneme-symbol {
        font-size: 3rem;
        font-weight: 700;
        color: var(--primary-color);
        margin-bottom: 0.5rem;
        font-family: "Times New Roman", serif;
      }

      .phoneme-description {
        color: var(--text-secondary);
        font-size: 1rem;
        margin-bottom: 1rem;
      }

      .example-words {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
        margin-bottom: 1rem;
      }

      .example-word {
        background: rgba(79, 70, 229, 0.1);
        color: var(--primary-color);
        padding: 0.25rem 0.75rem;
        border-radius: 12px;
        font-size: 0.9rem;
        font-weight: 500;
      }

      .play-btn {
        background: var(--success-color);
        color: white;
        border: none;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 1.2rem;
      }

      .play-btn:hover {
        transform: scale(1.1);
        box-shadow: var(--shadow-md);
      }

      /* IPA Chart */
      .ipa-chart {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 0.5rem;
        margin-bottom: 2rem;
      }

      .ipa-symbol {
        background: var(--bg-secondary);
        border: 2px solid var(--border-color);
        border-radius: 8px;
        padding: 1rem;
        text-align: center;
        cursor: pointer;
        transition: all 0.3s ease;
        font-family: "Times New Roman", serif;
        font-size: 1.5rem;
        font-weight: bold;
        color: var(--text-primary);
      }

      .ipa-symbol:hover {
        border-color: var(--primary-color);
        background: rgba(79, 70, 229, 0.1);
        transform: scale(1.05);
      }

      .ipa-symbol.vowel {
        border-color: var(--phonics-vowel);
        color: var(--phonics-vowel);
      }

      .ipa-symbol.consonant {
        border-color: var(--phonics-consonant);
        color: var(--phonics-consonant);
      }

      .ipa-symbol.diphthong {
        border-color: var(--phonics-blend);
        color: var(--phonics-blend);
      }

      .ipa-symbol.selected {
        background: var(--primary-color);
        color: white;
        transform: scale(1.1);
      }

      /* Pronunciation Practice */
      .pronunciation-practice {
        background: var(--bg-tertiary);
        border-radius: 12px;
        padding: 2rem;
        margin-bottom: 2rem;
      }

      .practice-word {
        text-align: center;
        margin-bottom: 2rem;
      }

      .practice-word h3 {
        font-size: 2.5rem;
        color: var(--primary-color);
        margin-bottom: 0.5rem;
      }

      .practice-word .ipa {
        font-family: "Times New Roman", serif;
        font-size: 1.5rem;
        color: var(--text-secondary);
        margin-bottom: 0.5rem;
      }

      .practice-word .syllables {
        font-size: 1.2rem;
        color: var(--accent-color);
        font-weight: 600;
        letter-spacing: 0.1em;
      }

      .recording-controls {
        display: flex;
        justify-content: center;
        gap: 1rem;
        margin-bottom: 2rem;
        flex-wrap: wrap;
      }

      .record-btn {
        background: var(--error-color);
        color: white;
        border: none;
        border-radius: 50%;
        width: 60px;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 1.5rem;
      }

      .record-btn:hover {
        transform: scale(1.1);
        box-shadow: var(--shadow-lg);
      }

      .record-btn.recording {
        animation: recording 1s ease-in-out infinite;
        background: var(--warning-color);
      }

      @keyframes recording {
        0%,
        100% {
          transform: scale(1);
        }
        50% {
          transform: scale(1.1);
        }
      }

      /* Minimal Pairs */
      .minimal-pairs {
        display: grid;
        gap: 1rem;
        margin-bottom: 2rem;
      }

      .pair-container {
        display: flex;
        gap: 1rem;
        align-items: center;
        background: var(--bg-secondary);
        padding: 1.5rem;
        border-radius: 12px;
        border: 2px solid var(--border-color);
        transition: all 0.3s ease;
      }

      .pair-container:hover {
        border-color: var(--primary-color);
        transform: translateY(-2px);
      }

      .pair-word {
        flex: 1;
        text-align: center;
        padding: 1rem;
        background: var(--bg-primary);
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
      }

      .pair-word:hover {
        background: rgba(79, 70, 229, 0.1);
      }

      .pair-word .word {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 0.25rem;
      }

      .pair-word .phonetic {
        font-family: "Times New Roman", serif;
        color: var(--text-secondary);
        font-size: 1.1rem;
      }

      .vs-divider {
        font-size: 1.2rem;
        color: var(--text-light);
        font-weight: bold;
      }

      /* Word Stress Patterns */
      .stress-pattern {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        margin: 1rem 0;
      }

      .syllable {
        padding: 0.75rem 1rem;
        background: var(--bg-secondary);
        border-radius: 8px;
        font-weight: 600;
        position: relative;
        transition: all 0.3s ease;
        cursor: pointer;
      }

      .syllable.primary-stress {
        background: var(--primary-color);
        color: white;
        transform: scale(1.1);
      }

      .syllable.secondary-stress {
        background: var(--accent-color);
        color: white;
        transform: scale(1.05);
      }

      .syllable:hover {
        transform: scale(1.15);
      }

      /* Rhyme Recognition */
      .rhyme-exercise {
        background: var(--bg-tertiary);
        border-radius: 12px;
        padding: 2rem;
        margin-bottom: 1rem;
      }

      .rhyme-words {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 1rem;
        margin-bottom: 1.5rem;
      }

      .rhyme-word {
        background: var(--bg-primary);
        border: 2px solid var(--border-color);
        border-radius: 8px;
        padding: 1rem;
        text-align: center;
        cursor: pointer;
        transition: all 0.3s ease;
        font-weight: 600;
      }

      .rhyme-word:hover {
        border-color: var(--primary-color);
        background: rgba(79, 70, 229, 0.1);
      }

      .rhyme-word.selected {
        border-color: var(--primary-color);
        background: var(--primary-color);
        color: white;
      }

      .rhyme-word.correct {
        border-color: var(--success-color);
        background: var(--success-color);
        color: white;
      }

      .rhyme-word.incorrect {
        border-color: var(--error-color);
        background: var(--error-color);
        color: white;
      }

      /* Sound Categories */
      .sound-categories {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
        margin-bottom: 2rem;
      }

      .category-card {
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 1.5rem;
        text-align: center;
        transition: all 0.3s ease;
        cursor: pointer;
      }

      .category-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-lg);
        border-color: var(--primary-color);
      }

      .category-emoji {
        font-size: 3rem;
        margin-bottom: 1rem;
      }

      .category-card h4 {
        font-size: 1.25rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: var(--text-primary);
      }

      /* Buttons */
      .btn {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 1rem 2rem;
        background: var(--primary-color);
        color: white;
        text-decoration: none;
        font-weight: 600;
        border-radius: 8px;
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 1rem;
      }

      .btn:hover {
        background: var(--primary-hover);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
      }

      .btn-secondary {
        background: transparent;
        color: var(--primary-color);
        border: 2px solid var(--primary-color);
      }

      .btn-secondary:hover {
        background: var(--primary-color);
        color: white;
      }

      .btn-small {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
      }

      .btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none !important;
      }

      /* Progress indicators */
      .progress-container {
        background: var(--bg-tertiary);
        border-radius: 10px;
        height: 8px;
        margin-bottom: 1rem;
        overflow: hidden;
      }

      .progress-bar {
        height: 100%;
        background: var(--gradient-primary);
        transition: width 0.3s ease;
        border-radius: 10px;
      }

      .progress-text {
        font-size: 0.9rem;
        color: var(--text-secondary);
        text-align: center;
        margin-bottom: 0.5rem;
      }

      /* Notifications */
      .notification {
        position: fixed;
        top: 100px;
        right: 2rem;
        padding: 1rem 1.5rem;
        border-radius: 8px;
        color: white;
        font-weight: 500;
        box-shadow: var(--shadow-lg);
        z-index: 10000;
        transform: translateX(400px);
        transition: all 0.3s ease;
      }

      .notification.show {
        transform: translateX(0);
      }

      .notification.success {
        background: var(--success-color);
      }

      .notification.error {
        background: var(--error-color);
      }

      .notification.info {
        background: var(--primary-color);
      }

      /* Word Breakdown */
      .word-breakdown {
        background: var(--bg-secondary);
        border-radius: 12px;
        padding: 2rem;
        margin-bottom: 1rem;
      }

      .breakdown-word {
        text-align: center;
        font-size: 2.5rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 1rem;
      }

      .phoneme-breakdown {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
        flex-wrap: wrap;
      }

      .phoneme-box {
        background: var(--bg-primary);
        border: 2px solid var(--border-color);
        border-radius: 8px;
        padding: 0.75rem;
        font-family: "Times New Roman", serif;
        font-size: 1.2rem;
        font-weight: bold;
        cursor: pointer;
        transition: all 0.3s ease;
        min-width: 50px;
        text-align: center;
      }

      .phoneme-box:hover {
        border-color: var(--primary-color);
        transform: scale(1.1);
      }

      .phoneme-box.vowel {
        border-color: var(--phonics-vowel);
        color: var(--phonics-vowel);
      }

      .phoneme-box.consonant {
        border-color: var(--phonics-consonant);
        color: var(--phonics-consonant);
      }

      /* Accent Training */
      .accent-selector {
        display: flex;
        gap: 1rem;
        margin-bottom: 2rem;
        justify-content: center;
        flex-wrap: wrap;
      }

      .accent-btn {
        padding: 0.5rem 1rem;
        border: 2px solid var(--border-color);
        background: transparent;
        color: var(--text-primary);
        border-radius: 20px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 0.9rem;
      }

      .accent-btn:hover {
        border-color: var(--primary-color);
        color: var(--primary-color);
      }

      .accent-btn.active {
        border-color: var(--primary-color);
        background: var(--primary-color);
        color: white;
      }

      /* Back to Top */
      .back-to-top {
        position: fixed;
        bottom: 2rem;
        right: 2rem;
        width: 50px;
        height: 50px;
        background: var(--primary-color);
        color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        box-shadow: var(--shadow-lg);
        z-index: 1000;
      }

      .back-to-top.show {
        opacity: 1;
        visibility: visible;
      }

      .back-to-top:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-xl);
      }

      @keyframes pulse {
        0%,
        100% {
          transform: scale(1);
        }
        50% {
          transform: scale(1.05);
        }
      }

      /* Responsive Design */
      @media (max-width: 768px) {
        .phonics-tools {
          grid-template-columns: 1fr;
        }

        .ipa-chart {
          grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
          gap: 0.25rem;
        }

        .recording-controls {
          flex-direction: column;
          align-items: center;
        }

        .stress-pattern {
          flex-wrap: wrap;
        }
      }

      /* Pronunciation Plan Generator Styles */
      .pronunciation-plan-generator {
        background: white;
        border-radius: 15px;
        padding: 2rem;
        margin-top: 3rem;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        border: 1px solid #f0f0f0;
      }

      .pronunciation-plan-generator h3 {
        color: var(--text-primary);
        margin-bottom: 1.5rem;
        text-align: center;
      }

      .plan-inputs {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
        margin-bottom: 2rem;
      }

      .input-group {
        display: flex;
        flex-direction: column;
      }

      .input-group label {
        color: var(--text-primary);
        font-weight: 600;
        margin-bottom: 0.5rem;
      }

      .input-group select {
        padding: 0.75rem;
        border: 2px solid #e5e7eb;
        border-radius: 8px;
        font-size: 1rem;
        transition: all 0.3s ease;
      }

      .input-group select:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
      }

      .pronunciation-plan-result {
        margin-top: 2rem;
      }

      .pronunciation-plan-card {
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
        border-radius: 12px;
        padding: 2rem;
        border-left: 4px solid var(--primary-color);
      }

      .plan-details {
        margin: 1rem 0;
      }

      .plan-item {
        margin: 0.75rem 0;
        color: var(--text-primary);
      }

      /* Learning Tips Styles */
      .tips-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
        margin-top: 2rem;
      }

      .tip-card {
        background: white;
        border-radius: 15px;
        padding: 2rem;
        text-align: center;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
        border: 1px solid #f0f0f0;
      }

      .tip-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0,0,0,0.15);
      }

      .tip-icon {
        width: 80px;
        height: 80px;
        margin: 0 auto 1.5rem;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2rem;
        color: white;
      }

      .tip-card h4 {
        color: var(--text-primary);
        margin-bottom: 1rem;
        font-size: 1.3rem;
      }

      .tip-card p {
        color: var(--text-secondary);
        margin-bottom: 2rem;
        line-height: 1.6;
      }

      .btn-tip {
        background: var(--primary-color);
        color: white;
        border: none;
        padding: 0.8rem 1.5rem;
        border-radius: 25px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
      }

      .btn-tip:hover {
        background: var(--secondary-color);
        transform: scale(1.05);
      }

      /* Quick Resources Styles */
      .quick-resources {
        margin-top: 3rem;
        text-align: center;
      }

      .quick-resources h3 {
        color: var(--text-primary);
        margin-bottom: 2rem;
      }

      .resource-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
      }

      .resource-btn {
        background: white;
        color: var(--primary-color);
        padding: 1rem 2rem;
        border-radius: 25px;
        text-decoration: none;
        font-weight: 600;
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        border: 2px solid var(--primary-color);
      }

      .resource-btn:hover {
        background: var(--primary-color);
        color: white;
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.15);
      }

      @media (max-width: 768px) {
        .plan-inputs {
          grid-template-columns: 1fr;
        }
        
        .tips-grid {
          grid-template-columns: 1fr;
        }
        
        .resource-buttons {
          flex-direction: column;
          align-items: center;
        }
        
        .resource-btn {
          width: 100%;
          max-width: 300px;
        }
      }

      /* Ensure mobile dropdowns work properly */
      @media (max-width: 768px) {
        /* FORCE mobile menu to display full width */
        .nav-links,
        #navLinks,
        ul.nav-links {
          display: flex !important;
          position: fixed !important;
          top: 70px !important;
          left: 0 !important;
          right: 0 !important;
          bottom: 0 !important;
          width: 100vw !important;
          height: auto !important;
          min-height: calc(100vh - 70px) !important;
        }

        .nav-links.active,
        #navLinks.active,
        ul.nav-links.active {
          display: flex !important;
          max-height: calc(100vh - 70px) !important;
          height: auto !important;
        }

        /* Make sure nav links with dropdowns are clearly tappable */
        .nav-item .nav-link {
          position: relative;
          user-select: none;
          -webkit-user-select: none;
          -webkit-tap-highlight-color: rgba(70, 187, 229, 0.2);
          cursor: pointer;
        }

        /* Ensure chevron is visible and clickable */
        .nav-link .fa-chevron-down {
          transition: transform 0.3s ease !important;
          opacity: 1 !important;
          pointer-events: none; /* Let clicks go through to parent link */
        }

        /* Visual feedback when dropdown is open */
        .nav-item.mobile-open > .nav-link,
        .nav-item.mobile-dropdown-open > .nav-link {
          background: rgba(70, 187, 229, 0.15) !important;
          border-color: var(--primary-color, #46bbe5) !important;
        }

        /* Make dropdowns smoother */
        .dropdown {
          transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
            padding 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        }

        /* Ensure dropdown items are visible when parent is open */
        .nav-item.mobile-open .dropdown,
        .nav-item.mobile-dropdown-open .dropdown {
          display: block !important;
          visibility: visible !important;
          opacity: 1 !important;
          pointer-events: auto !important;
        }

        /* Ensure dropdown items are clickable */
        .dropdown-item,
        .dropdown > a {
          pointer-events: auto !important;
          touch-action: manipulation !important;
          user-select: none;
          -webkit-user-select: none;
        }
      }

