        /* ... (all styles remain the same as previous version) ... */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
            background: #eef3f9;
            color: #1e2a3a;
            padding: 20px;
            line-height: 1.7;
            padding-top: 20px;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .container {
            max-width: 1100px;
            margin: 0 auto;
            background: white;
            border-radius: 32px;
            box-shadow: 0 20px 60px rgba(0, 20, 40, 0.12);
            overflow: hidden;
            padding: 30px 40px 50px;
            width: 100%;
        }

        .audio-player-fixed {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 9999;
            background: linear-gradient(145deg, #ffffff, #f0f6fe);
            box-shadow: 0 4px 24px rgba(0, 20, 40, 0.15);
            padding: 12px 24px;
            border-bottom: 2px solid rgba(26, 107, 196, 0.15);
            display: none;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 10px;
            backdrop-filter: blur(16px);
            background: rgba(255, 255, 255, 0.95);
            min-height: 80px;
        }

        .audio-player-fixed.show {
            display: flex;
        }

        .audio-player-fixed .player-left {
            display: flex;
            align-items: center;
            gap: 14px;
            flex-wrap: wrap;
        }

        .audio-player-fixed .player-icon {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: linear-gradient(135deg, #1a6bc4, #4a8fd8);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 18px;
            box-shadow: 0 4px 12px rgba(26, 107, 196, 0.3);
            transition: transform 0.2s, box-shadow 0.2s;
            cursor: pointer;
            flex-shrink: 0;
            border: none;
        }

        .audio-player-fixed .player-icon:hover {
            transform: scale(1.08);
            box-shadow: 0 6px 20px rgba(26, 107, 196, 0.4);
        }

        .audio-player-fixed .player-icon.playing {
            background: linear-gradient(135deg, #e67e22, #f39c12);
            box-shadow: 0 4px 12px rgba(230, 126, 34, 0.4);
        }

        .audio-player-fixed .player-info {
            display: flex;
            flex-direction: column;
            min-width: 100px;
        }

        .audio-player-fixed .player-title {
            font-size: 14px;
            font-weight: 700;
            color: #0a2942;
            line-height: 1.2;
        }

        .audio-player-fixed .player-title i {
            color: #1a6bc4;
            margin-right: 6px;
        }

        .audio-player-fixed .player-sub {
            font-size: 11px;
            color: #5d7a9a;
            font-weight: 500;
        }

        .audio-player-fixed audio {
            height: 44px;
            width: 100%;
            min-width: 200px;
            max-width: 450px;
            outline: none;
            border-radius: 30px;
            background: #eef4fa;
        }

        .audio-player-fixed .time-display {
            font-size: 13px;
            font-weight: 600;
            color: #1a4f7a;
            background: #eaf1fa;
            padding: 2px 12px;
            border-radius: 30px;
            white-space: nowrap;
            font-variant-numeric: tabular-nums;
            min-width: 80px;
            text-align: center;
        }

        .audio-player-fixed .status-badge {
            font-size: 11px;
            font-weight: 600;
            color: #1a6bc4;
            background: #dbeafe;
            padding: 2px 14px;
            border-radius: 30px;
            white-space: nowrap;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .audio-player-fixed .status-badge.playing {
            background: #fdebd0;
            color: #b9770e;
        }

        .audio-player-fixed .status-badge.error {
            background: #fde8e8;
            color: #c0392b;
        }

        .audio-instruction {
            font-size: 14px;
            font-weight: 600;
            color: #1a5f7a;
            background: #eaf4fa;
            padding: 4px 16px;
            border-radius: 30px;
            border: 1px solid #b8d4e8;
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .audio-instruction i {
            color: #1a6bc4;
            font-size: 16px;
        }

        #mainContent {
            display: none;
            padding-top: 90px;
        }

        #mainContent.show {
            display: block;
        }

        /* ===== HOMEPAGE STYLES ===== */
        .homepage {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 70vh;
            padding: 40px 20px;
            animation: fadeSlideDown 0.6s ease;
            width: 100%;
        }

        .homepage .logo-icon {
            font-size: 72px;
            color: #1a6bc4;
            background: linear-gradient(145deg, #eaf1fa, #d5e5f5);
            width: 130px;
            height: 130px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 10px 40px rgba(26, 107, 196, 0.15);
            margin-bottom: 20px;
            border: 3px solid rgba(26, 107, 196, 0.15);
        }

        .homepage h1 {
            font-size: 40px;
            font-weight: 800;
            color: #0a2942;
            margin-bottom: 6px;
            text-align: center;
            line-height: 1.2;
        }

        .homepage h1 .ar-title {
            display: block;
            font-size: 30px;
            font-weight: 700;
            color: #1a5f7a;
            margin-top: 4px;
            direction: rtl;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
        }

        .homepage .subtitle {
            font-size: 18px;
            color: #5d7a9a;
            margin-bottom: 40px;
            text-align: center;
            font-weight: 500;
        }

        .homepage .subtitle i {
            color: #1a6bc4;
            margin-right: 6px;
        }

        /* ===== HOME BUTTONS ===== */
        .home-buttons {
            display: flex;
            gap: 40px;
            flex-wrap: wrap;
            justify-content: center;
            width: 100%;
            max-width: 820px;
        }

        .home-btn {
            display: flex;
            align-items: center;
            gap: 20px;
            padding: 28px 36px;
            border-radius: 24px;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            flex: 1;
            min-width: 260px;
            max-width: 380px;
            border: 3px solid transparent;
            text-decoration: none;
            position: relative;
            overflow: hidden;
        }

        .home-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            opacity: 0;
            transition: opacity 0.3s ease;
            border-radius: 21px;
        }

        .home-btn:hover::before {
            opacity: 0.08;
        }

        .home-btn:hover {
            transform: translateY(-8px) scale(1.02);
        }

        .home-btn:active {
            transform: scale(0.96);
        }

        .home-btn .btn-icon {
            width: 64px;
            height: 64px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 30px;
            flex-shrink: 0;
            transition: transform 0.3s ease;
        }

        .home-btn:hover .btn-icon {
            transform: scale(1.1) rotate(-5deg);
        }

        .home-btn .btn-text {
            flex: 1;
            text-align: left;
        }

        .home-btn .btn-text .en {
            display: block;
            font-size: 22px;
            font-weight: 700;
            line-height: 1.2;
        }

        .home-btn .btn-text .ar {
            display: block;
            font-size: 18px;
            font-weight: 600;
            direction: rtl;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
            line-height: 1.3;
        }

        .home-btn .btn-arrow {
            font-size: 26px;
            transition: transform 0.3s ease;
            flex-shrink: 0;
            opacity: 0.7;
        }

        .home-btn:hover .btn-arrow {
            transform: translateX(8px);
            opacity: 1;
        }

        /* ===== READING BUTTON ===== */
        .reading-btn {
            background: linear-gradient(145deg, #eaf1fa, #dce8f5);
            border-color: #b8d4e8;
            box-shadow: 0 8px 30px rgba(26, 107, 196, 0.12);
        }

        .reading-btn::before {
            background: linear-gradient(135deg, #1a6bc4, #4a8fd8);
        }

        .reading-btn .btn-icon {
            background: linear-gradient(135deg, #1a6bc4, #4a8fd8);
            color: white;
            box-shadow: 0 4px 20px rgba(26, 107, 196, 0.35);
        }

        .reading-btn .btn-text .en {
            color: #0a3d7a;
        }

        .reading-btn .btn-text .ar {
            color: #1a5f7a;
        }

        .reading-btn .btn-arrow {
            color: #1a6bc4;
        }

        .reading-btn:hover {
            border-color: #1a6bc4;
            box-shadow: 0 16px 50px rgba(26, 107, 196, 0.25);
            background: linear-gradient(145deg, #dce8f5, #c8dcee);
        }

        /* ===== VOCABULARY BUTTON ===== */
        .vocab-btn {
            background: linear-gradient(145deg, #f0e8f5, #e4d8ee);
            border-color: #d5b8e8;
            box-shadow: 0 8px 30px rgba(142, 68, 173, 0.12);
        }

        .vocab-btn::before {
            background: linear-gradient(135deg, #8e44ad, #a569bd);
        }

        .vocab-btn .btn-icon {
            background: linear-gradient(135deg, #8e44ad, #a569bd);
            color: white;
            box-shadow: 0 4px 20px rgba(142, 68, 173, 0.35);
        }

        .vocab-btn .btn-text .en {
            color: #6c3483;
        }

        .vocab-btn .btn-text .ar {
            color: #6c3483;
        }

        .vocab-btn .btn-arrow {
            color: #8e44ad;
        }

        .vocab-btn:hover {
            border-color: #8e44ad;
            box-shadow: 0 16px 50px rgba(142, 68, 173, 0.25);
            background: linear-gradient(145deg, #e4d8ee, #d4c4e2);
        }

        /* ===== GRAMMAR BUTTON ===== */
        .grammar-btn {
            background: linear-gradient(145deg, #e8f7ef, #d7efdf);
            border-color: #b7dfc6;
            box-shadow: 0 8px 30px rgba(39, 174, 96, 0.12);
        }

        .grammar-btn::before {
            background: linear-gradient(135deg, #27ae60, #58c985);
        }

        .grammar-btn .btn-icon {
            background: linear-gradient(135deg, #27ae60, #58c985);
            color: white;
            box-shadow: 0 4px 20px rgba(39, 174, 96, 0.35);
        }

        .grammar-btn .btn-text .en {
            color: #1e874b;
        }

        .grammar-btn .btn-text .ar {
            color: #1e874b;
        }

        .grammar-btn .btn-arrow {
            color: #27ae60;
        }

        .grammar-btn:hover {
            border-color: #27ae60;
            box-shadow: 0 16px 50px rgba(39, 174, 96, 0.25);
            background: linear-gradient(145deg, #d7efdf, #c6e7d0);
        }

        /* ===== GRAMMAR SELECTION ===== */
        .grammar-selection {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 50vh;
            padding: 40px 20px;
            animation: fadeSlideDown 0.5s ease;
        }

        .grammar-selection.show {
            display: flex;
        }

        .grammar-selection h1 {
            font-size: clamp(26px, 4vw, 34px);
            font-weight: 800;
            color: #0a2942;
            margin-bottom: 40px;
            text-align: center;
            line-height: 1.4;
        }

        .grammar-selection h1 .ar-title {
            display: block;
            font-size: clamp(22px, 3.4vw, 26px);
            font-weight: 700;
            color: #1e874b;
            margin-top: 10px;
            direction: rtl;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
        }

        .grammar-selection .grammar-subtitle {
            font-size: 18px;
            color: #5d7a9a;
            margin-bottom: 30px;
            text-align: center;
        }

        .grammar-selection .grammar-subtitle i {
            color: #27ae60;
        }

        .grammar-card {
            background: linear-gradient(145deg, #ffffff, #f8fbff);
            border: 2px solid #d5e2f0;
            border-radius: 28px;
            padding: 40px 30px;
            width: 340px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            box-shadow: 0 10px 30px rgba(0, 20, 40, 0.06);
            position: relative;
            overflow: hidden;
            text-decoration: none;
            color: inherit;
            display: block;
        }

        .grammar-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 6px;
            background: linear-gradient(90deg, #27ae60, #58c985);
            transform: scaleX(0);
            transition: transform 0.3s ease;
        }

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

        .grammar-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 20px 40px rgba(39, 174, 96, 0.15);
            border-color: #27ae60;
        }

        .grammar-card i {
            font-size: 52px;
            color: #27ae60;
            margin-bottom: 20px;
            transition: transform 0.3s ease;
        }

        .grammar-card:hover i {
            transform: scale(1.1);
        }

        .grammar-card h2 {
            font-size: 26px;
            font-weight: 800;
            color: #0a2942;
            margin-bottom: 8px;
        }

        .grammar-card .ar-title {
            font-size: 24px;
            font-weight: 700;
            color: #1e874b;
            direction: rtl;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
            margin-bottom: 12px;
        }

        .grammar-card .sub-title {
            font-size: 16px;
            color: #5d7a9a;
            line-height: 1.6;
            font-weight: 500;
            min-height: 26px;
        }

        .grammar-card .module-badge {
            display: inline-block;
            margin-top: 12px;
            padding: 4px 16px;
            background: #e8f7ef;
            color: #1e874b;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 600;
        }

        .grammar-card .module-badge i {
            font-size: 13px;
            color: #1e874b;
            margin-right: 4px;
        }

        .back-btn.grammar-back {
            background: #e8f7ef;
            color: #27ae60;
            border-color: #b7dfc6;
        }

        .back-btn.grammar-back:hover {
            background: #27ae60;
            color: white;
            border-color: #27ae60;
        }

        /* ===== SEMESTER LANDING ===== */
        .semester-landing {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 70vh;
            padding: 40px 20px;
            animation: fadeSlideDown 0.6s ease;
            width: 100%;
        }

        .semester-landing h1 {
            font-size: 40px;
            font-weight: 800;
            color: #0a2942;
            margin-bottom: 38px;
            text-align: center;
            line-height: 1.25;
        }

        .semester-landing h1 .ar-title {
            display: block;
            font-size: 30px;
            font-weight: 700;
            color: #1a5f7a;
            margin-top: 8px;
            direction: rtl;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
        }

        .semester-buttons {
            display: flex;
            gap: 36px;
            flex-wrap: wrap;
            justify-content: center;
            width: 100%;
            max-width: 860px;
        }

        .semester-btn {
            border: 3px solid transparent;
            min-height: 210px;
            max-width: 380px;
            justify-content: center;
            flex-direction: column;
            text-align: center;
        }

        .semester-btn .btn-icon {
            width: 88px;
            height: 88px;
            font-size: 40px;
        }

        .semester-btn .btn-text {
            text-align: center;
        }

        .semester-btn .btn-text .en {
            font-size: 24px;
        }

        .semester-btn .btn-text .ar {
            font-size: 20px;
            margin-top: 4px;
        }

        .semester-btn .btn-arrow {
            display: none;
        }

        .semester-btn.disabled {
            opacity: 0.45;
            filter: grayscale(0.75);
        }

        .semester-btn.disabled:hover {
            transform: translateY(-4px);
            border-color: #b8c3cf;
            box-shadow: 0 10px 32px rgba(60, 70, 80, 0.14);
            background: linear-gradient(145deg, #edf1f5, #e0e6ec);
        }

        .semester-btn.disabled .btn-icon {
            background: linear-gradient(135deg, #8b98a8, #a7b2bf);
            box-shadow: 0 4px 20px rgba(80, 90, 100, 0.22);
        }

        .coming-soon-message {
            display: none;
            margin-top: 28px;
            padding: 12px 24px;
            border-radius: 18px;
            background: #fff7e6;
            color: #9a5b00;
            border: 2px solid #ffd999;
            font-size: 18px;
            font-weight: 700;
            text-align: center;
            box-shadow: 0 8px 24px rgba(154, 91, 0, 0.12);
        }

        .coming-soon-message.show {
            display: block;
        }

        /* ===== MODULE SELECTION ===== */
        .home-selection {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 50vh;
            padding: 40px 20px;
            animation: fadeSlideDown 0.5s ease;
        }

        .home-selection.show {
            display: flex;
        }

        .home-selection h1 {
            font-size: 34px;
            font-weight: 800;
            color: #0a2942;
            margin-bottom: 40px;
            text-align: center;
            line-height: 1.4;
        }

        .home-selection h1 .ar-title {
            display: block;
            font-size: 26px;
            font-weight: 700;
            color: #1a5f7a;
            margin-top: 10px;
            direction: rtl;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
        }

        /* ===== VOCABULARY SELECTION ===== */
        .vocab-selection {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 50vh;
            padding: 40px 20px;
            animation: fadeSlideDown 0.5s ease;
        }

        .vocab-selection.show {
            display: flex;
        }

        .vocab-selection h1 {
            font-size: 34px;
            font-weight: 800;
            color: #0a2942;
            margin-bottom: 40px;
            text-align: center;
            line-height: 1.4;
        }

        .vocab-selection h1 .ar-title {
            display: block;
            font-size: 26px;
            font-weight: 700;
            color: #1a5f7a;
            margin-top: 10px;
            direction: rtl;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
        }

        .vocab-selection .vocab-subtitle {
            font-size: 18px;
            color: #5d7a9a;
            margin-bottom: 30px;
            text-align: center;
        }

        .vocab-selection .vocab-subtitle i {
            color: #8e44ad;
        }

        .module-cards {
            display: flex;
            gap: 30px;
            flex-wrap: wrap;
            justify-content: center;
            width: 100%;
        }

        .module-card {
            background: linear-gradient(145deg, #ffffff, #f8fbff);
            border: 2px solid #d5e2f0;
            border-radius: 28px;
            padding: 40px 30px;
            width: 340px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            box-shadow: 0 10px 30px rgba(0, 20, 40, 0.06);
            position: relative;
            overflow: hidden;
            text-decoration: none;
            color: inherit;
            display: block;
        }

        .module-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 6px;
            background: linear-gradient(90deg, #1a6bc4, #4a8fd8);
            transform: scaleX(0);
            transition: transform 0.3s ease;
        }

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

        .module-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 20px 40px rgba(26, 107, 196, 0.15);
            border-color: #1a6bc4;
        }

        .module-card i {
            font-size: 52px;
            color: #1a6bc4;
            margin-bottom: 20px;
            transition: transform 0.3s ease;
        }

        .module-card:hover i {
            transform: scale(1.1);
        }

        .module-card h2 {
            font-size: 26px;
            font-weight: 800;
            color: #0a2942;
            margin-bottom: 8px;
        }

        .module-card .ar-title {
            font-size: 24px;
            font-weight: 700;
            color: #1a5f7a;
            direction: rtl;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
            margin-bottom: 20px;
        }

        .module-card .sub-title {
            font-size: 16px;
            color: #5d7a9a;
            line-height: 1.6;
            font-weight: 500;
        }

        /* ===== VOCABULARY CARD STYLES ===== */
        .vocab-card {
            background: linear-gradient(145deg, #ffffff, #f8fbff);
            border: 2px solid #d5e2f0;
            border-radius: 28px;
            padding: 40px 30px;
            width: 340px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            box-shadow: 0 10px 30px rgba(0, 20, 40, 0.06);
            position: relative;
            overflow: hidden;
            text-decoration: none;
            color: inherit;
            display: block;
        }

        .vocab-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 6px;
            background: linear-gradient(90deg, #8e44ad, #a569bd);
            transform: scaleX(0);
            transition: transform 0.3s ease;
        }

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

        .vocab-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 20px 40px rgba(142, 68, 173, 0.15);
            border-color: #8e44ad;
        }

        .vocab-card i {
            font-size: 52px;
            color: #8e44ad;
            margin-bottom: 20px;
            transition: transform 0.3s ease;
        }

        .vocab-card:hover i {
            transform: scale(1.1);
        }

        .vocab-card h2 {
            font-size: 26px;
            font-weight: 800;
            color: #0a2942;
            margin-bottom: 8px;
        }

        .vocab-card .ar-title {
            font-size: 24px;
            font-weight: 700;
            color: #6c3483;
            direction: rtl;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
            margin-bottom: 12px;
        }

        .vocab-card .sub-title {
            font-size: 16px;
            color: #5d7a9a;
            line-height: 1.6;
            font-weight: 500;
        }

        .vocab-card .module-badge {
            display: inline-block;
            margin-top: 12px;
            padding: 4px 16px;
            background: #f0e8f5;
            color: #8e44ad;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 600;
        }

        .vocab-card .module-badge i {
            font-size: 13px;
            color: #8e44ad;
            margin-right: 4px;
        }

        /* ===== BACK BUTTONS ===== */
        .back-wrapper {
            display: flex;
            justify-content: flex-start;
            width: 100%;
            max-width: 1100px;
            margin-bottom: 20px;
            padding-top: 5px;
        }

        .back-btn {
            background: #eaf1fa;
            color: #1a6bc4;
            border: 2px solid #d5e2f0;
            padding: 10px 24px;
            border-radius: 40px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 12px;
            transition: all 0.2s;
            text-decoration: none;
        }

        .back-btn:hover {
            background: #1a6bc4;
            color: white;
            border-color: #1a6bc4;
            transform: translateX(-4px);
        }

        .back-btn .ar-text {
            direction: rtl;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
        }

        .back-btn.vocab-back {
            background: #f0e8f5;
            color: #8e44ad;
            border-color: #d5b8e8;
        }

        .back-btn.vocab-back:hover {
            background: #8e44ad;
            color: white;
            border-color: #8e44ad;
        }

        .module-title {
            text-align: center;
            padding: 16px 20px 22px;
            background: linear-gradient(145deg, #f7fcff, #eaf2fa);
            border-radius: 28px;
            margin-bottom: 28px;
            border: 1px solid #d5e2f0;
            transition: all 0.3s ease;
        }

        .module-title h1 {
            font-size: 36px;
            font-weight: 800;
            color: #0a2942;
            letter-spacing: -0.5px;
            line-height: 1.2;
        }

        .module-title h1 .ar-title {
            display: block;
            font-size: 26px;
            font-weight: 700;
            color: #1a5f7a;
            margin-top: 6px;
            direction: rtl;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
        }

        .module-title h1 i {
            color: #1a6bc4;
            margin-right: 10px;
        }

        .module-title .subhead {
            font-size: 17px;
            color: #3e5f7e;
            margin-top: 6px;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            flex-wrap: wrap;
        }

        .module-title .subhead .badge {
            background: #1a5fb4;
            color: white;
            padding: 4px 18px;
            border-radius: 40px;
            font-size: 14px;
            font-weight: 600;
        }

        .module-title .subhead .badge i {
            margin-right: 6px;
        }

        .text-container {
            position: relative;
        }

        .paragraph-wrapper {
            margin-bottom: 8px;
            border-radius: 12px;
            padding: 2px 0;
            transition: background 0.2s;
        }

        .paragraph-wrapper:hover {
            background: #f5f9ff;
        }

        .paragraph-wrapper .para-label {
            display: inline-block;
            background: #dce6f2;
            color: #1a3d66;
            font-weight: 700;
            font-size: 14px;
            padding: 2px 18px;
            border-radius: 30px;
            letter-spacing: 0.5px;
            margin: 8px 0 6px 4px;
        }

        .paragraph-wrapper .para-label i {
            margin-right: 6px;
        }

        .line-group {
            padding: 6px 0;
            border-radius: 8px;
            margin: 2px 0;
            padding-left: 4px;
            padding-right: 4px;
        }

        .line-group .line-en {
            font-size: 17px;
            line-height: 1.9;
            padding: 4px 10px;
            border-radius: 4px;
            border-left: 4px solid #2a7de1;
            background: #fafcff;
            font-weight: 700;
        }

        .line-group .line-en .gap {
            display: inline-block;
            background: #fef3c7;
            padding: 0 8px;
            border-radius: 4px;
            border: 2px dashed #f59e0b;
            font-weight: 700;
            color: #92400e;
        }

        .line-group .line-en .highlight-word {
            color: #1a6bc4;
            font-weight: 700;
            text-decoration: underline;
            text-decoration-color: #f39c12;
            text-underline-offset: 3px;
        }

        .line-group .line-ar {
            font-size: 17px;
            line-height: 2;
            padding: 4px 10px;
            border-radius: 4px;
            direction: rtl;
            text-align: right;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
            background: #f6fafd;
            border-right: 4px solid #2a8e5c;
            margin-top: 2px;
        }

        .line-group .line-ar .gap-ar {
            display: inline-block;
            background: #fef3c7;
            padding: 0 8px;
            border-radius: 4px;
            border: 2px dashed #f59e0b;
            font-weight: 700;
            color: #92400e;
        }

        .line-group .line-ar .highlight-word-ar {
            color: #1a6bc4;
            font-weight: 700;
            text-decoration: underline;
            text-decoration-color: #f39c12;
            text-underline-offset: 3px;
        }

        .glossary-section {
            margin-top: 36px;
            padding: 24px 28px 28px;
            background: #f3f8ff;
            border-radius: 28px;
            border: 1px solid #d5e2f0;
        }

        .glossary-section h2 {
            font-size: 22px;
            font-weight: 700;
            color: #0a2942;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .glossary-section h2 i {
            color: #1a6bc4;
        }

        .glossary-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: 16px 30px;
        }

        .glossary-item {
            background: white;
            padding: 14px 18px;
            border-radius: 16px;
            border-left: 5px solid #1a6bc4;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
        }

        .glossary-item .en-word {
            font-weight: 700;
            color: #0a3d7a;
            font-size: 17px;
            display: block;
            margin-bottom: 4px;
        }

        .glossary-item .en-word .synonym-badge {
            font-size: 13px;
            font-weight: 600;
            color: #7a5a2a;
            background: #fef9e7;
            padding: 2px 10px;
            border-radius: 20px;
            display: inline-block;
            margin-left: 6px;
        }

        .glossary-item .en-word .synonym-badge i {
            color: #f39c12;
            margin-right: 4px;
        }

        .glossary-item .ar-meaning {
            font-weight: 600;
            color: #0f5e3a;
            font-size: 16px;
            direction: rtl;
            text-align: right;
            display: block;
            margin-bottom: 4px;
        }

        .glossary-item .example {
            font-size: 14px;
            color: #3a5a7a;
            background: #f0f6fe;
            padding: 6px 12px;
            border-radius: 8px;
            margin-top: 4px;
            display: block;
        }

        .glossary-item .example i {
            color: #1a6bc4;
            margin-right: 6px;
        }

        .glossary-item .example-ar {
            font-size: 14px;
            color: #2a5a3a;
            background: #eaf6ef;
            padding: 6px 12px;
            border-radius: 8px;
            margin-top: 3px;
            direction: rtl;
            text-align: right;
            display: block;
        }

        .glossary-item .example-ar i {
            color: #2a8e5c;
            margin-left: 6px;
        }

        .watch-out-box {
            margin-top: 18px;
            padding: 16px 20px;
            background: #fef9e7;
            border: 2px solid #f39c12;
            border-radius: 16px;
            display: flex;
            align-items: flex-start;
            gap: 14px;
            flex-wrap: wrap;
        }

        .watch-out-box .wo-icon {
            font-size: 28px;
            color: #f39c12;
            flex-shrink: 0;
        }

        .watch-out-box .wo-content {
            flex: 1;
        }

        .watch-out-box .wo-content .wo-title {
            font-weight: 700;
            font-size: 17px;
            color: #7a5800;
        }

        .watch-out-box .wo-content .wo-text {
            font-size: 15px;
            color: #4a3a1a;
            line-height: 1.8;
        }

        .watch-out-box .wo-content .wo-text strong {
            color: #c0392b;
        }

        .watch-out-box .wo-content .wo-text .highlight-conclude {
            background: #fdebd0;
            padding: 0 8px;
            border-radius: 4px;
            font-weight: 700;
            color: #b9770e;
        }

        .watch-out-box .wo-content .wo-text .highlight-deduce {
            background: #d5e8d0;
            padding: 0 8px;
            border-radius: 4px;
            font-weight: 700;
            color: #1a6b3a;
        }

        .watch-out-box .wo-content .wo-text ul {
            margin-top: 6px;
            padding-left: 20px;
        }

        .watch-out-box .wo-content .wo-text ul li {
            margin-bottom: 3px;
        }

        .questions-section {
            margin-top: 30px;
            padding: 24px 28px 32px;
            background: #f8faff;
            border-radius: 28px;
            border: 2px solid #d5e2f0;
            display: none;
        }

        .questions-section.show {
            display: block;
            animation: fadeSlideDown 0.5s ease;
        }

        .questions-section .qs-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 12px;
            border-bottom: 3px solid #1a6bc4;
            padding-bottom: 15px;
            margin-bottom: 22px;
        }

        .questions-section .qs-header h2 {
            font-size: 24px;
            font-weight: 800;
            color: #0a2942;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .questions-section .qs-header h2 i {
            color: #1a6bc4;
        }

        .questions-section .qs-header .close-qs-btn {
            background: #e74c3c;
            color: white;
            border: none;
            padding: 8px 20px;
            border-radius: 40px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .questions-section .qs-header .close-qs-btn:hover {
            background: #c0392b;
        }

        .questions-section .qs-header .ar-title-qs {
            font-size: 18px;
            font-weight: 700;
            color: #1a5f7a;
            direction: rtl;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
        }

        .question-card {
            background: white;
            border-radius: 16px;
            padding: 20px 24px;
            margin-bottom: 18px;
            border-left: 6px solid #1a6bc4;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
            transition: box-shadow 0.2s;
        }

        .question-card:hover {
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        }

        .question-card .q-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 10px;
            flex-wrap: wrap;
        }

        .question-card .q-number {
            background: #1a6bc4;
            color: white;
            font-weight: 700;
            font-size: 13px;
            padding: 0 14px;
            border-radius: 30px;
            height: 28px;
            display: flex;
            align-items: center;
        }

        .question-card .q-type {
            font-size: 12px;
            font-weight: 600;
            color: #5d7a9a;
            background: #eaf1fa;
            padding: 0 12px;
            border-radius: 30px;
            height: 26px;
            display: flex;
            align-items: center;
        }

        .question-card .q-type.critical {
            background: #fdebd0;
            color: #b9770e;
        }

        .question-card .q-type.reference {
            background: #d5e8f0;
            color: #1a5f7a;
        }

        .question-card .q-type.vocabulary {
            background: #d5f0e0;
            color: #1a6b3a;
        }

        .question-card .q-type.paraphrase {
            background: #e8d5f0;
            color: #6a1a7a;
        }

        .question-card .result-badge {
            display: inline-block;
            padding: 2px 14px;
            border-radius: 30px;
            font-size: 13px;
            font-weight: 700;
            margin-left: 10px;
        }

        .question-card .result-badge.correct {
            background: #d5f0e0;
            color: #1a6b3a;
        }

        .question-card .result-badge.wrong {
            background: #fde8e8;
            color: #c0392b;
        }

        .question-card .result-badge.unanswered {
            background: #f0f0f0;
            color: #888;
        }

        .question-card .q-text {
            font-size: 17px;
            font-weight: 600;
            color: #1a2a3a;
            margin-bottom: 10px;
        }

        .question-card .q-text-ar {
            font-size: 16px;
            color: #3a4a5a;
            direction: rtl;
            text-align: right;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
            margin-bottom: 12px;
            padding-right: 12px;
            border-right: 3px solid #d5e2f0;
        }

        .question-card .options {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px 16px;
            margin-top: 8px;
        }

        .question-card .options .option {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            background: #fafcff;
            border-radius: 10px;
            border: 2px solid #e2ebf5;
            transition: all 0.15s;
            cursor: pointer;
        }

        .question-card .options .option:hover {
            background: #f0f6fe;
            border-color: #1a6bc4;
        }

        .question-card .options .option.selected {
            border-color: #1a6bc4;
            background: #eaf1fa;
        }

        .question-card .options .option.correct-answer {
            border-color: #27ae60;
            background: #d5f0e0;
        }

        .question-card .options .option.wrong-answer {
            border-color: #e74c3c;
            background: #fde8e8;
        }

        .question-card .options .option .letter {
            font-weight: 700;
            color: #1a6bc4;
            width: 22px;
            flex-shrink: 0;
        }

        .question-card .options .option .text {
            font-size: 15px;
            color: #2a3a4a;
        }

        .question-card .answer-reveal {
            margin-top: 12px;
            padding: 12px 16px;
            background: #eaf6ef;
            border-radius: 10px;
            border-left: 4px solid #2a8e5c;
            display: none;
        }

        .question-card .answer-reveal.show {
            display: block;
        }

        .question-card .answer-reveal .ans-label {
            font-weight: 700;
            color: #1a6b3a;
        }

        .question-card .answer-reveal .ans-text {
            color: #2a5a3a;
        }

        .question-card .answer-reveal .ans-text-ar {
            color: #2a5a3a;
            direction: rtl;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
        }

        .result-summary {
            background: linear-gradient(135deg, #f8faff, #e8f0fe);
            border-radius: 16px;
            padding: 20px 24px;
            margin-bottom: 24px;
            border: 2px solid #1a6bc4;
            text-align: center;
            display: none;
        }

        .result-summary.show {
            display: block;
        }

        .result-summary .score {
            font-size: 36px;
            font-weight: 800;
            color: #1a6bc4;
        }

        .result-summary .score-details {
            font-size: 16px;
            color: #3a5a7a;
            margin-top: 4px;
        }

        .result-summary .score-details i {
            margin: 0 8px;
        }

        .result-summary .feedback {
            margin-top: 10px;
            font-size: 18px;
            font-weight: 600;
        }

        .result-summary .feedback.pass {
            color: #27ae60;
        }

        .result-summary .feedback.fail {
            color: #e74c3c;
        }

        .qs-footer-actions {
            margin-top: 25px;
            display: flex;
            justify-content: center;
            gap: 16px;
            flex-wrap: wrap;
            border-top: 2px solid #e2ebf5;
            padding-top: 22px;
        }

        .qs-footer-actions .btn {
            padding: 12px 28px;
            border-radius: 40px;
            border: none;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .qs-footer-actions .btn-success {
            background: linear-gradient(135deg, #27ae60, #2ecc71);
            color: white;
            box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
        }

        .qs-footer-actions .btn-success:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
        }

        .qs-footer-actions .btn-warning {
            background: linear-gradient(135deg, #f39c12, #e67e22);
            color: white;
            box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
        }

        .qs-footer-actions .btn-warning:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
        }

        .qs-footer-actions .btn-primary {
            background: linear-gradient(135deg, #1a6bc4, #4a8fd8);
            color: white;
            box-shadow: 0 4px 12px rgba(26, 107, 196, 0.3);
        }

        .qs-footer-actions .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(26, 107, 196, 0.4);
        }

        .questions-tab {
            margin-top: 40px;
            display: flex;
            justify-content: center;
        }

        .questions-tab .tab-btn {
            display: inline-flex;
            align-items: center;
            gap: 14px;
            padding: 14px 32px;
            background: linear-gradient(135deg, #1a6bc4, #4a8fd8);
            color: white;
            border: none;
            border-radius: 60px;
            font-size: 18px;
            font-weight: 700;
            cursor: pointer;
            box-shadow: 0 4px 16px rgba(26, 107, 196, 0.35);
            transition: all 0.3s ease;
            text-decoration: none;
        }

        .questions-tab .tab-btn:hover {
            transform: translateY(-3px) scale(1.02);
            box-shadow: 0 8px 28px rgba(26, 107, 196, 0.45);
            background: linear-gradient(135deg, #1558a8, #3a7fc8);
        }

        .questions-tab .tab-btn:active {
            transform: scale(0.95);
        }

        .questions-tab .tab-btn i {
            font-size: 22px;
        }

        .questions-tab .tab-btn .badge-count {
            background: rgba(255, 255, 255, 0.25);
            padding: 2px 12px;
            border-radius: 30px;
            font-size: 14px;
            font-weight: 600;
        }

        .questions-tab .tab-btn .ar-label {
            font-weight: 400;
            font-size: 16px;
            opacity: 0.9;
            direction: rtl;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
        }

        .footer-note {
            margin-top: 24px;
            padding-top: 18px;
            border-top: 1px solid #e2ebf5;
            font-size: 14px;
            color: #446688;
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: center;
        }

        .footer-note i {
            color: #1a5fb4;
            margin-right: 6px;
        }

        @keyframes fadeSlideDown {
            from {
                opacity: 0;
                transform: translateY(-15px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @media (max-width: 768px) {
            body {
                padding-top: 20px;
            }
            .container {
                padding: 16px;
            }
            .homepage h1 {
                font-size: 30px;
            }
            .homepage h1 .ar-title {
                font-size: 24px;
            }
            .semester-landing h1 {
                font-size: 30px;
            }
            .semester-landing h1 .ar-title {
                font-size: 24px;
            }
            .semester-buttons {
                gap: 22px;
            }
            .semester-btn {
                min-height: 180px;
                width: 100%;
            }
            .semester-btn .btn-icon {
                width: 70px;
                height: 70px;
                font-size: 32px;
            }
            .semester-btn .btn-text .en {
                font-size: 20px;
            }
            .semester-btn .btn-text .ar {
                font-size: 18px;
            }
            .homepage .logo-icon {
                width: 100px;
                height: 100px;
                font-size: 50px;
            }
            .home-buttons {
                gap: 24px;
            }
            .home-btn {
                padding: 22px 28px;
                min-width: 200px;
            }
            .home-btn .btn-icon {
                width: 50px;
                height: 50px;
                font-size: 24px;
            }
            .home-btn .btn-text .en {
                font-size: 18px;
            }
            .home-btn .btn-text .ar {
                font-size: 15px;
            }
            .home-selection h1 {
                font-size: 28px;
            }
            .home-selection h1 .ar-title {
                font-size: 22px;
            }
            .vocab-selection h1 {
                font-size: 28px;
            }
            .vocab-selection h1 .ar-title {
                font-size: 22px;
            }
            .module-cards {
                flex-direction: column;
                align-items: center;
                gap: 20px;
            }
            .module-card {
                width: 100%;
                max-width: 400px;
                padding: 30px 20px;
            }
            .module-card h2 {
                font-size: 22px;
            }
            .module-card .ar-title {
                font-size: 20px;
            }
            .vocab-card {
                width: 100%;
                max-width: 400px;
                padding: 30px 20px;
            }
            .vocab-card h2 {
                font-size: 22px;
            }
            .vocab-card .ar-title {
                font-size: 20px;
            }
            .audio-player-fixed {
                padding: 8px 12px;
                flex-direction: column;
                align-items: stretch;
                gap: 6px;
            }
            .audio-player-fixed .player-left {
                justify-content: center;
            }
            .audio-player-fixed audio {
                max-width: 100%;
            }
            .audio-instruction {
                font-size: 12px;
                padding: 2px 12px;
                white-space: normal;
            }
            #mainContent {
                padding-top: 160px;
            }
            .module-title h1 {
                font-size: 26px;
            }
            .module-title h1 .ar-title {
                font-size: 20px;
            }
            .line-group .line-en,
            .line-group .line-ar {
                font-size: 15px;
            }
            .glossary-section {
                padding: 18px;
            }
            .glossary-grid {
                grid-template-columns: 1fr;
            }
            .questions-tab .tab-btn {
                padding: 12px 24px;
                font-size: 16px;
            }
            .question-card .options {
                grid-template-columns: 1fr;
            }
            .questions-section {
                padding: 16px;
            }
        }

        /* ===== GRAMMAR MODULE CONTENT ===== */
        .grammar-content {
            display: none;
            animation: fadeSlideDown 0.5s ease;
        }
        .grammar-content.show {
            display: block;
        }
        .grammar-module-title {
            text-align: center;
            padding: 18px 20px 24px;
            background: linear-gradient(145deg, #eefaf2, #dff4e7);
            border-radius: 28px;
            margin-bottom: 24px;
            border: 1px solid #b7dfc6;
        }
        .grammar-module-title h1 {
            font-size: 32px;
            font-weight: 800;
            color: #155b33;
            line-height: 1.2;
        }
        .grammar-module-title h1 .ar-title {
            display: block;
            font-size: 22px;
            font-weight: 700;
            color: #1e874b;
            margin-top: 6px;
            direction: rtl;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
        }
        .grammar-module-title h1 i {
            color: #27ae60;
            margin-right: 10px;
        }
        .grammar-lesson-shell {
            background: linear-gradient(145deg, #f8fffb, #eefaf2);
            border: 2px solid #b7dfc6;
            border-radius: 28px;
            padding: 28px;
            box-shadow: 0 10px 30px rgba(39, 174, 96, 0.08);
        }
        .grammar-lesson-head {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 14px;
            flex-wrap: wrap;
            margin-bottom: 18px;
            padding-bottom: 14px;
            border-bottom: 2px solid #d7efdf;
        }
        .grammar-lesson-badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: #e8f7ef;
            border: 1px solid #b7dfc6;
            color: #1e874b;
            border-radius: 999px;
            padding: 6px 14px;
            font-size: 13px;
            font-weight: 700;
        }
        .grammar-slide-indicator {
            background: white;
            border: 1px solid #c9e6d4;
            color: #1e874b;
            border-radius: 999px;
            padding: 6px 14px;
            font-size: 13px;
            font-weight: 700;
        }
        .grammar-slide {
            display: none;
        }
        .grammar-slide.active {
            display: block;
        }
        .grammar-slide h2 {
            font-size: 28px;
            color: #0a2942;
            margin-bottom: 8px;
            line-height: 1.3;
        }
        .grammar-slide .ar-subtitle {
            display: block;
            font-size: 20px;
            color: #1e874b;
            direction: rtl;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
            margin-top: 6px;
            font-weight: 700;
        }
        .grammar-intro-box,
        .grammar-form-box,
        .grammar-usage-box,
        .grammar-compare-box,
        .grammar-note-box,
        .grammar-summary-box {
            background: white;
            border: 1px solid #d8eadf;
            border-radius: 22px;
            padding: 20px 22px;
            margin-bottom: 18px;
            box-shadow: 0 4px 18px rgba(39, 174, 96, 0.05);
        }
        .grammar-box-title {
            font-size: 18px;
            font-weight: 800;
            color: #155b33;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .grammar-box-title .ar-inline {
            direction: rtl;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
            color: #1e874b;
            font-size: 16px;
            font-weight: 700;
        }
        .grammar-objectives,
        .grammar-usage-list,
        .grammar-quick-list,
        .grammar-note-list {
            margin: 0;
            padding-left: 20px;
            line-height: 1.9;
            color: #24445f;
        }
        .grammar-objectives li,
        .grammar-usage-list li,
        .grammar-quick-list li,
        .grammar-note-list li {
            margin-bottom: 8px;
        }
        .grammar-usage-list li,
        .grammar-usage-list li .grammar-ar-line {
            text-decoration: underline;
            text-decoration-thickness: 2px;
            text-underline-offset: 4px;
            text-decoration-color: #88b79b;
        }
        .grammar-ar-line {
            display: block;
            direction: rtl;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
            color: #46637b;
            margin-top: 3px;
        }
        .grammar-formula {
            display: inline-block;
            background: linear-gradient(145deg, #ecfff3, #daf4e3);
            border: 2px dashed #8fd0a8;
            color: #155b33;
            padding: 12px 18px;
            border-radius: 16px;
            font-size: 20px;
            font-weight: 800;
            margin-top: 8px;
        }
        .grammar-highlight-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin: 12px 0 4px;
        }
        .grammar-legend-pill {
            font-size: 13px;
            font-weight: 700;
            border-radius: 999px;
            padding: 6px 12px;
            border: 1px solid transparent;
        }
        .g-aux,
        .grammar-legend-pill.aux {
            background: #fff4cd;
            color: #8a5b00;
            border-color: #f6df8b;
            font-weight: 800;
            padding: 2px 6px;
            border-radius: 8px;
        }
        .g-main,
        .grammar-legend-pill.main {
            background: #dff3ff;
            color: #0b5f8a;
            border-color: #9ed5ef;
            font-weight: 800;
            padding: 2px 6px;
            border-radius: 8px;
        }
        .g-key,
        .grammar-legend-pill.key {
            background: #f4e4ff;
            color: #6d2f8a;
            border-color: #d3b1ea;
            font-weight: 800;
            padding: 2px 6px;
            border-radius: 8px;
        }
        .grammar-example-card {
            background: linear-gradient(145deg, #ffffff, #f6fcf8);
            border: 1px solid #d8eadf;
            border-left: 5px solid #27ae60;
            border-radius: 18px;
            padding: 18px;
            margin-bottom: 14px;
        }
        .grammar-example-label {
            font-size: 13px;
            font-weight: 800;
            color: #1e874b;
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 0.4px;
        }
        .grammar-example-en {
            font-size: 19px;
            line-height: 1.9;
            color: #1d2f3f;
            margin-bottom: 6px;
        }
        .grammar-example-ar {
            font-size: 18px;
            line-height: 1.9;
            color: #1e874b;
            direction: rtl;
            text-align: right;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
            margin-bottom: 10px;
        }
        .grammar-comment {
            background: #eefaf2;
            border: 1px dashed #b7dfc6;
            color: #2a4d39;
            border-radius: 14px;
            padding: 12px 14px;
            line-height: 1.8;
            font-size: 15px;
        }
        .grammar-more-wrap {
            margin-top: 16px;
        }
        .grammar-more-wrap summary {
            list-style: none;
            cursor: pointer;
            background: linear-gradient(135deg, #27ae60, #0f8d73);
            color: #ffffff;
            border: 2px solid #ffffff;
            border-radius: 999px;
            padding: 14px 24px;
            font-weight: 900;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            width: fit-content;
            margin: 0 auto;
            text-align: center;
            box-shadow: 0 10px 24px rgba(39, 174, 96, 0.28), 0 0 0 4px rgba(39, 174, 96, 0.12);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }
        .grammar-more-wrap summary:hover {
            transform: translateY(-2px) scale(1.02);
            box-shadow: 0 14px 28px rgba(39, 174, 96, 0.34), 0 0 0 5px rgba(39, 174, 96, 0.14);
        }
        .grammar-more-wrap summary i {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.45);
            font-size: 16px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
        }
        .grammar-more-wrap summary::-webkit-details-marker {
            display: none;
        }
        .grammar-more-content {
            margin-top: 14px;
        }
        .grammar-mini-example {
            background: #fff;
            border: 1px solid #d8eadf;
            border-radius: 16px;
            padding: 14px;
            margin-bottom: 10px;
        }
        .grammar-mini-example .grammar-example-en {
            font-size: 17px;
            margin-bottom: 4px;
        }
        .grammar-mini-example .grammar-example-ar {
            font-size: 16px;
            margin-bottom: 8px;
        }
        .grammar-mini-note {
            font-size: 14px;
            color: #476070;
            line-height: 1.7;
        }
        .grammar-table-wrap {
            overflow-x: auto;
            margin-top: 8px;
        }
        .grammar-table {
            width: 100%;
            border-collapse: collapse;
            min-width: 640px;
        }
        .grammar-table th,
        .grammar-table td {
            border: 1px solid #cfe6d8;
            padding: 12px 14px;
            vertical-align: top;
            line-height: 1.7;
        }
        .grammar-table th {
            background: #e8f7ef;
            color: #155b33;
            text-align: left;
            font-size: 14px;
        }
        .grammar-nav-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 14px;
            flex-wrap: wrap;
            margin-top: 22px;
            padding-top: 18px;
            border-top: 2px solid #d7efdf;
        }
        .grammar-nav-btn {
            background: linear-gradient(145deg, #27ae60, #219653);
            color: white;
            border: none;
            border-radius: 999px;
            padding: 12px 20px;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            box-shadow: 0 8px 20px rgba(39, 174, 96, 0.2);
        }
        .grammar-nav-btn[disabled] {
            opacity: 0.45;
            cursor: not-allowed;
            box-shadow: none;
        }
        .grammar-dots {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: center;
        }
        .grammar-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #c8e5d2;
            border: none;
            cursor: pointer;
        }
        .grammar-dot.active {
            background: #27ae60;
            transform: scale(1.15);
        }
        .grammar-callout {
            background: linear-gradient(145deg, #fffef2, #fff8d9);
            border: 1px solid #f0df91;
            border-left: 5px solid #e0b500;
            border-radius: 18px;
            padding: 16px;
            margin-bottom: 18px;
            color: #6a5800;
            line-height: 1.8;
        }
        @media (max-width: 768px) {
            .grammar-lesson-shell {
                padding: 18px;
            }
            .grammar-slide h2 {
                font-size: 23px;
            }
            .grammar-module-title h1 {
                font-size: 27px;
            }
            .grammar-example-en {
                font-size: 17px;
            }
            .grammar-example-ar {
                font-size: 16px;
            }
            .grammar-nav-row {
                flex-direction: column;
            }
            .grammar-nav-btn {
                width: 100%;
                justify-content: center;
            }
            .grammar-table {
                min-width: 560px;
            }
        }

        /* ===== VOCAB MODULE CONTENT ===== */
        .vocab-content {
            display: none;
            animation: fadeSlideDown 0.5s ease;
        }
        .vocab-content.show {
            display: block;
        }
        .vocab-module-title {
            text-align: center;
            padding: 16px 20px 22px;
            background: linear-gradient(145deg, #f9f0ff, #f0e4fa);
            border-radius: 28px;
            margin-bottom: 28px;
            border: 1px solid #d5b8e8;
        }
        .vocab-module-title h1 {
            font-size: 32px;
            font-weight: 800;
            color: #3d1a6e;
            letter-spacing: -0.5px;
            line-height: 1.2;
        }
        .vocab-module-title h1 .ar-title {
            display: block;
            font-size: 22px;
            font-weight: 700;
            color: #6c3483;
            margin-top: 6px;
            direction: rtl;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
        }
        .vocab-module-title h1 i {
            color: #8e44ad;
            margin-right: 10px;
        }

        /* ===== VOCAB GROUP CAROUSEL ===== */
        .vocab-carousel {
            position: relative;
            background: linear-gradient(145deg, #faf5ff, #f3e8ff);
            border: 2px solid #d5b8e8;
            border-radius: 28px;
            padding: 32px 30px 28px;
            margin-bottom: 24px;
            box-shadow: 0 8px 30px rgba(142, 68, 173, 0.08);
        }
        .vocab-group-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 12px;
            margin-bottom: 22px;
            padding-bottom: 14px;
            border-bottom: 2px solid #d5b8e8;
        }
        .vocab-group-title {
            font-size: 20px;
            font-weight: 800;
            color: #3d1a6e;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .vocab-group-title i {
            color: #8e44ad;
        }
        .vocab-group-title .ar-group-title {
            font-size: 16px;
            color: #6c3483;
            direction: rtl;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
            font-weight: 600;
            display: block;
            margin-top: 3px;
        }
        .vocab-page-indicator {
            font-size: 14px;
            font-weight: 700;
            color: #8e44ad;
            background: #f0e4fa;
            padding: 4px 16px;
            border-radius: 30px;
            border: 1px solid #d5b8e8;
        }

        /* ===== VOCAB GRID - ENLARGED CARDS ===== */
        .vocab-items-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: 20px;
            margin-bottom: 8px;
        }

        .vocab-item-card {
            background: white;
            border-radius: 20px;
            border: 2px solid #e2caf5;
            padding: 24px 22px 20px;
            cursor: pointer;
            transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
            position: relative;
            overflow: hidden;
            min-height: 120px;
            box-shadow: 0 2px 8px rgba(142, 68, 173, 0.06);
        }

        .vocab-item-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 5px;
            background: linear-gradient(90deg, #8e44ad, #a569bd);
            transform: scaleX(0);
            transition: transform 0.25s ease;
        }

        .vocab-item-card:hover::before,
        .vocab-item-card.active::before {
            transform: scaleX(1);
        }

        .vocab-item-card:hover {
            border-color: #8e44ad;
            box-shadow: 0 8px 28px rgba(142, 68, 173, 0.18);
            transform: translateY(-4px);
        }

        .vocab-item-card.active {
            border-color: #8e44ad;
            background: linear-gradient(145deg, #faf5ff, #f0e4fa);
            box-shadow: 0 8px 28px rgba(142, 68, 173, 0.22);
        }

        .vocab-item-top {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 6px;
        }

        .vocab-item-num {
            font-size: 13px;
            font-weight: 700;
            color: #8e44ad;
            background: #f0e4fa;
            padding: 3px 12px;
            border-radius: 20px;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .vocab-click-hint {
            font-size: 12px;
            color: #aaa;
            display: flex;
            align-items: center;
            gap: 5px;
            flex-shrink: 0;
            transition: color 0.2s;
        }

        .vocab-item-card:hover .vocab-click-hint,
        .vocab-item-card.active .vocab-click-hint {
            color: #8e44ad;
        }

        .vocab-en-word {
            font-size: 22px;
            font-weight: 800;
            color: #2d0a4e;
            margin-bottom: 4px;
            line-height: 1.3;
            letter-spacing: -0.2px;
        }

        .vocab-ar-meaning {
            font-size: 19px;
            color: #6c3483;
            direction: rtl;
            text-align: right;
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
            font-weight: 600;
            margin-bottom: 2px;
        }

        .vocab-definition {
            margin-top: 8px;
            font-size: 14px;
            line-height: 1.6;
            color: #7a3f98;
            background: rgba(142, 68, 173, 0.08);
            border: 1px dashed rgba(142, 68, 173, 0.25);
            border-radius: 12px;
            padding: 8px 10px;
            font-weight: 700;
        }

        /* ===== EXAMPLE SENTENCE PANEL - ENLARGED ===== */
        .vocab-example-panel {
            overflow: hidden;
            max-height: 0;
            transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease, margin-top 0.35s ease;
            opacity: 0;
            margin-top: 0;
        }

        .vocab-example-panel.show {
            max-height: 400px;
            opacity: 1;
            margin-top: 14px;
        }

        .vocab-example-inner {
            background: linear-gradient(145deg, #f5eeff, #ede0ff);
            border-radius: 16px;
            padding: 16px 18px;
            border-left: 5px solid #8e44ad;
            box-shadow: inset 0 1px 4px rgba(142, 68, 173, 0.08);
        }

        .vocab-example-label {
            font-size: 13px;
            font-weight: 700;
            color: #8e44ad;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .vocab-example-sentence {
            font-size: 17px;
            color: #2d0a4e;
            line-height: 1.8;
            margin-bottom: 4px;
            padding: 2px 0;
        }

        .vocab-example-sentence .vocab-highlight {
            background: linear-gradient(135deg, #8e44ad, #a569bd);
            color: white;
            padding: 2px 10px;
            border-radius: 8px;
            font-weight: 700;
            display: inline-block;
        }

        .vocab-example-inner hr {
            border: none;
            border-top: 2px dashed #d5b8e8;
            margin: 10px 0;
        }

        /* ===== NAV BUTTONS ===== */
        .vocab-nav-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-top: 22px;
            padding-top: 18px;
            border-top: 2px solid #e2caf5;
            flex-wrap: wrap;
        }

        .vocab-nav-btn {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 11px 28px;
            border-radius: 40px;
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            border: 2px solid #8e44ad;
            transition: all 0.2s;
            text-decoration: none;
            background: white;
            color: #8e44ad;
        }

        .vocab-nav-btn:hover:not(:disabled) {
            background: #8e44ad;
            color: white;
            box-shadow: 0 6px 20px rgba(142, 68, 173, 0.3);
            transform: scale(1.04);
        }

        .vocab-nav-btn:disabled {
            opacity: 0.35;
            cursor: not-allowed;
            transform: none;
        }

        .vocab-nav-btn .ar-nav {
            font-family: 'Segoe UI', 'Tahoma', 'Arabic', sans-serif;
            font-size: 14px;
        }

        .vocab-nav-dots {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .vocab-nav-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #d5b8e8;
            transition: all 0.25s;
            cursor: pointer;
        }

        .vocab-nav-dot.active {
            background: #8e44ad;
            transform: scale(1.4);
        }

        /* ===== RESPONSIVE FOR VOCAB CARDS ===== */
        @media (max-width: 768px) {
            .vocab-items-grid {
                grid-template-columns: 1fr;
                gap: 16px;
            }
            .vocab-item-card {
                padding: 20px 18px 16px;
                min-height: 100px;
            }
            .vocab-en-word {
                font-size: 20px;
            }
            .vocab-ar-meaning {
                font-size: 17px;
            }
            .vocab-example-sentence {
                font-size: 15px;
            }
            .vocab-example-inner {
                padding: 12px 14px;
            }
            .vocab-carousel {
                padding: 20px 16px 20px;
            }
            .vocab-group-title {
                font-size: 18px;
            }
        }

        @media (max-width: 480px) {
            body {
                padding-top: 10px;
                padding-left: 8px;
                padding-right: 8px;
            }
            .container {
                padding: 12px;
                border-radius: 20px;
            }
            .homepage h1 {
                font-size: 24px;
            }
            .homepage h1 .ar-title {
                font-size: 20px;
            }
            .homepage .logo-icon {
                width: 80px;
                height: 80px;
                font-size: 40px;
            }
            .home-buttons {
                gap: 16px;
                flex-direction: column;
                align-items: center;
            }
            .home-btn {
                min-width: 100%;
                max-width: 100%;
                padding: 18px 20px;
                gap: 14px;
            }
            .home-btn .btn-icon {
                width: 44px;
                height: 44px;
                font-size: 20px;
            }
            .home-btn .btn-text .en {
                font-size: 16px;
            }
            .home-btn .btn-text .ar {
                font-size: 14px;
            }
            .home-btn .btn-arrow {
                font-size: 20px;
            }
            .audio-player-fixed {
                padding: 6px 10px;
            }
            .audio-player-fixed .player-icon {
                width: 36px;
                height: 36px;
                font-size: 14px;
            }
            .audio-player-fixed .player-title {
                font-size: 11px;
            }
            .audio-player-fixed .player-sub {
                font-size: 9px;
            }
            .audio-player-fixed .status-badge {
                font-size: 9px;
                padding: 1px 10px;
            }
            .audio-instruction {
                font-size: 11px;
                padding: 2px 10px;
            }
            #mainContent {
                padding-top: 180px;
            }
            .home-selection h1 {
                font-size: 24px;
            }
            .home-selection h1 .ar-title {
                font-size: 20px;
            }
            .vocab-selection h1 {
                font-size: 24px;
            }
            .vocab-selection h1 .ar-title {
                font-size: 20px;
            }
            .module-title h1 {
                font-size: 20px;
            }
            .module-title h1 .ar-title {
                font-size: 17px;
            }
            .questions-tab .tab-btn {
                padding: 10px 18px;
                font-size: 14px;
                gap: 10px;
            }
            .questions-tab .tab-btn i {
                font-size: 18px;
            }
            .questions-section .qs-header h2 {
                font-size: 18px;
            }
            .question-card {
                padding: 14px 16px;
            }
            .question-card .q-text {
                font-size: 15px;
            }
            .qs-footer-actions .btn {
                padding: 10px 18px;
                font-size: 14px;
            }

            .vocab-item-card {
                padding: 16px 14px 14px;
                min-height: 80px;
                border-radius: 16px;
            }
            .vocab-en-word {
                font-size: 18px;
            }
            .vocab-ar-meaning {
                font-size: 15px;
            }
            .vocab-example-sentence {
                font-size: 14px;
            }
            .vocab-example-inner {
                padding: 10px 12px;
            }
            .vocab-carousel {
                padding: 16px 12px 16px;
            }
            .vocab-group-title {
                font-size: 16px;
            }
            .vocab-nav-btn {
                padding: 8px 16px;
                font-size: 13px;
            }
        }
