:root {
    --primary: #5E17EB;
    --secondary: #8A2BE2;
    --accent: #4B0082;
    --light: #f5f5f5;
    --light-blue: #a5d8ff;
    --light-green: #3CB371;
    --text: #333333;
    --light-gray: #f5f5f5;
    --card-bg: #ffffff;
    --nav-bg: #ffffff;
    --sidebar-bg: #f5f5f5;
    --footer-bg: var(--secondary);
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 5px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 16px;
    --post-bg: #ffffff;
    --gold: #FFD700;
    --silver: #C0C0C0;
    --bronze: #CD7F32;
    --rose-400: #C71585;
    --cyan-500: #4169E1;
    --purple-500: #9370DB;
    --yellow-500: #FFF8DC;
    --success: #28a745;
    --danger: #dc3545;
    --scrollbar-thumb: var(--primary);
    --scrollbar-track: #f1f1f1;
    --medium-gray: #e9ecef;
    --dark-gray: #6c757d;
    --card-shadow: 0 10px 30px rgba(94, 23, 235, 0.15);
    --gradient-1: linear-gradient(135deg, #5E17EB, #8A2BE2);
    --gradient-2: linear-gradient(135deg, #8A2BE2, #4B0082);
    --gradient-3: linear-gradient(135deg, #4B0082, #5E17EB);
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.1);
}

.dark-theme {
    --primary: #8A2BE2;
    --secondary: #5E17EB;
    --accent: #4B0082;
    --light: #1E1E1E;
    --text: #f8f9fa;
    --light-gray: #2b2b2b;
    --card-bg: #242526;
    --nav-bg: #242526;
    --sidebar-bg: #1E1E1E;
    --footer-bg: #4B0082;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 5px 15px rgba(0, 0, 0, 0.4);
    --post-bg: #3a3b3c;
    --success: #2ecc71;
    --danger: #e74c3c;
    --scrollbar-thumb: var(--secondary);
    --scrollbar-track: #333;
    --medium-gray: #4d4d4d;
    --dark-gray: #adb5bd;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --glass-bg: rgba(0, 0, 0, 0.2);
    --glass-border: rgba(255, 255, 255, 0.05);
}

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Tajawal', sans-serif;
            transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            background-color: var(--light-gray);
            color: var(--text);
            transition: all 0.3s ease;
            overflow-x: hidden;
        }

        ::-webkit-scrollbar {
            width: 10px;
        }

        ::-webkit-scrollbar-track {
            background: var(--scrollbar-track);
        }

        ::-webkit-scrollbar-thumb {
            background: var(--scrollbar-thumb);
            border-radius: 5px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: var(--accent);
        }

        header {
            background-color: var(--nav-bg);
            box-shadow: var(--shadow);
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
            transition: all 0.3s ease;
        }

        .navbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 5%;
            max-width: 1400px;
            margin: 0 auto;
        }

        .logo {
            display: flex;
            align-items: center;
            overflow: hidden;
            height: 60px;
        }

        .logo a {
            display: flex;
            align-items: center;
            text-decoration: none;
        }

        .logo img {
            max-height: 100px;
            object-fit: contain;
        }

        .nav-controls {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .nav-icons {
            display: flex;
            gap: 15px;
        }

        .nav-icon {
            font-size: 1.2rem;
            color: var(--text);
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
        }

        .nav-icon:hover {
            color: var(--primary);
            transform: translateY(-2px);
            background: var(--light-gray);
        }

        .notification-badge {
            position: absolute;
            top: -5px;
            right: -5px;
            background: var(--accent);
            color: white;
            font-size: 0.7rem;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .user-profile {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 5px;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
        }

        .user-profile:hover {
            background: var(--light-gray);
            transform: translateY(-2px);
        }

        .user-profile img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid transparent;
            transition: all 0.3s ease;
        }

        .user-profile:hover img {
            border-color: var(--primary);
        }

        .popup {
            position: fixed;
            top: 70px;
            right: 20px;
            width: 350px;
            max-height: 80vh;
            overflow-y: auto;
            background: var(--card-bg);
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-hover);
            z-index: 1100;
            padding: 15px;
            display: none;
            opacity: 0;
            transform: translateY(-20px);
            transition: opacity 0.3s ease, transform 0.3s ease;
            border: 1px solid var(--medium-gray);
        }

        .popup.active {
            display: block;
            opacity: 1;
            transform: translateY(0);
            animation: popup-appear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        @keyframes popup-appear {
            0% {
                opacity: 0;
                transform: translateY(-20px);
            }
            100% {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .notifications-popup {
            width: 380px;
        }

        .popup-title {
            font-size: 1.2rem;
            font-weight: 700;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 1px solid var(--medium-gray);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .popup-title i {
            cursor: pointer;
            transition: all 0.3s ease;
            padding: 5px;
            border-radius: 50%;
        }

        .popup-title i:hover {
            background: var(--light-gray);
            color: var(--accent);
        }

        .popup-content {
            padding: 10px 0;
        }

        .popup-item {
            padding: 12px;
            border-radius: 8px;
            margin-bottom: 8px;
            background: var(--light-gray);
            display: flex;
            align-items: center;
            gap: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            border-left: 3px solid transparent;
        }

        .popup-item:hover {
            background: rgba(139, 90, 43, 0.1);
            transform: translateX(-3px);
            border-left: 3px solid var(--primary);
        }

        .popup-item.unread {
            background: rgba(139, 90, 43, 0.15);
            border-left: 3px solid var(--accent);
        }

        .popup-item img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
            flex-shrink: 0;
        }

        .popup-text {
            flex: 1;
            min-width: 0;
        }

        .popup-text h4 {
            font-size: 1rem;
            margin-bottom: 3px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .popup-text p {
            font-size: 0.85rem;
            color: var(--dark-gray);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .popup-time {
            font-size: 0.75rem;
            color: var(--dark-gray);
            white-space: nowrap;
        }

        .no-notifications {
            text-align: center;
            padding: 30px 0;
        }

        .no-notifications i {
            font-size: 3rem;
            color: var(--medium-gray);
            margin-bottom: 15px;
        }

        .no-notifications p {
            color: var(--dark-gray);
        }

        .user-menu-popup .popup-item {
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .user-menu-popup .popup-item:hover {
            background: var(--primary);
            color: white;
        }

        .user-menu-popup .popup-item:hover p {
            color: white;
        }

        .course-detail-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 30px;
            margin-top: 20px;
            width: 100%;
            padding: 0 5%;
            max-width: 1400px;
            margin-left: auto;
            margin-right: auto;
        }

        .profile-card {
            background: var(--card-bg);
            border-radius: var(--border-radius);
            padding: 30px;
            box-shadow: var(--shadow);
            width: 100%;
            position: relative;
            overflow: hidden;
        }

        .profile-card::before {
            content: "";
            position: absolute;
            top: 0;
            right: 0;
            width: 100%;
            height: 6px;
            background: linear-gradient(to right, var(--primary), var(--accent));
            border-radius: var(--border-radius) var(--border-radius) 0 0;
        }

        .section-title {
            font-size: 1.4rem;
            font-weight: 700;
            margin-bottom: 25px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--medium-gray);
            display: flex;
            align-items: center;
            gap: 12px;
            color: var(--primary);
        }

        .section-title i {
            color: var(--accent);
            font-size: 1.1rem;
            background: var(--light-gray);
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .course-hero {
            display: flex;
            flex-direction: column;
            gap: 20px;
            margin-top: 100px;
            margin-bottom: 30px;
            padding: 0 5%;
            max-width: 1400px;
            margin-left: auto;
            margin-right: auto;
        }

        .course-image-container {
            position: relative;
            height: 380px;
            border-radius: var(--border-radius);
            overflow: hidden;
            box-shadow: var(--shadow-hover);
            border: 1px solid var(--medium-gray);
            background-color: var(--light-gray);
        }

        .course-image-container img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            transition: transform 0.5s ease, filter 0.5s ease;
            filter: brightness(0.95);
        }

        .course-image-container:hover img {
            transform: scale(1.03);
            filter: brightness(1);
        }

        .course-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
            padding: 30px 25px 25px;
            color: white;
            pointer-events: none;
        }

        .course-overlay h1 {
            font-size: 2.2rem;
            margin-bottom: 10px;
            font-weight: 800;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        }

        .course-overlay h1 .highlight {
            color: var(--secondary);
            position: relative;
            display: inline-block;
        }

        .course-overlay h1 .highlight::after {
            content: "";
            position: absolute;
            bottom: -3px;
            left: 0;
            width: 100%;
            height: 2px;
            background: var(--accent);
            border-radius: 2px;
        }

        .course-overlay .course-tagline {
            font-size: 1.2rem;
            opacity: 0.9;
            max-width: 80%;
        }

        .course-dates {
            position: absolute;
            bottom: 20px;
            right: 20px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            text-align: right;
        }

        .course-date {
            background: rgba(0, 0, 0, 0.6);
            color: white;
            padding: 8px 15px;
            border-radius: 20px;
            font-size: 0.9rem;
            backdrop-filter: blur(5px);
            z-index: 2;
        }

        .date-label {
            font-weight: 600;
            color: var(--secondary);
            margin-left: 5px;
        }

        .course-details {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-top: 20px;
        }

        .course-detail-card {
            background: var(--light-gray);
            border-radius: 15px;
            padding: 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            transition: all 0.3s ease;
            border: 1px solid var(--medium-gray);
        }

        .course-detail-card:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-hover);
            border-color: var(--primary);
        }

        .detail-icon {
            font-size: 2rem;
            color: var(--primary);
            margin-bottom: 15px;
        }

        .detail-label {
            font-size: 0.9rem;
            color: var(--text);
            opacity: 0.8;
            margin-bottom: 5px;
        }

        .detail-value {
            font-size: 1.4rem;
            font-weight: 700;
            color: var(--text);
        }

        .coupon-section {
            background: linear-gradient(135deg, var(--light-gray), var(--card-bg));
            border-radius: var(--border-radius);
            padding: 25px;
            margin: 30px 0;
            border: 1px solid var(--medium-gray);
            box-shadow: var(--shadow);
        }

        .coupon-title {
            font-weight: 700;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 1.2rem;
            color: var(--primary);
        }

        .coupon-title i {
            font-size: 1.4rem;
            color: var(--accent);
        }

        .coupon-form {
            display: flex;
            gap: 15px;
            margin-top: 15px;
        }

        .coupon-form input {
            flex: 1;
            padding: 15px 20px;
            border-radius: 10px;
            border: 2px solid var(--medium-gray);
            font-size: 1.1rem;
            background: var(--card-bg);
            color: var(--text);
            transition: all 0.3s;
        }

        .coupon-form input:focus {
            border-color: var(--primary);
            outline: none;
            box-shadow: 0 0 0 3px rgba(139, 90, 43, 0.2);
        }

        .coupon-form button {
            background: linear-gradient(to right, var(--primary), var(--secondary));
            color: white;
            border: none;
            padding: 0 30px;
            border-radius: 10px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 1.1rem;
            box-shadow: 0 3px 8px rgba(139, 90, 43, 0.3);
        }

        .coupon-form button:hover {
            background: linear-gradient(to right, var(--accent), var(--primary));
            transform: translateY(-2px);
        }

        .coupon-success {
            color: var(--success);
            font-weight: 700;
            margin-top: 15px;
            display: none;
            padding: 12px 15px;
            background: rgba(40, 167, 69, 0.1);
            border-radius: 10px;
            text-align: center;
            font-size: 1.1rem;
        }

        .coupon-success i {
            margin-left: 8px;
        }

        .payment-section {
            margin: 30px 0;
            padding: 25px;
            background: var(--light-gray);
            border-radius: var(--border-radius);
            border: 1px solid var(--medium-gray);
        }

        .payment-methods {
            display: flex;
            gap: 15px;
            margin: 20px 0;
            flex-wrap: wrap;
        }

        .payment-method {
            flex: 1;
            min-width: 120px;
            background: var(--card-bg);
            border-radius: 10px;
            padding: 20px 15px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
            border: 2px solid var(--medium-gray);
            box-shadow: var(--shadow);
        }

        .payment-method.active {
            border-color: var(--primary);
            background: rgba(139, 90, 43, 0.1);
            box-shadow: 0 4px 12px rgba(139, 90, 43, 0.2);
        }

        .payment-method:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-hover);
        }

        .payment-icon {
            font-size: 2.5rem;
            margin-bottom: 15px;
            color: var(--primary);
        }

        .payment-name {
            font-weight: 700;
            color: var(--text);
            font-size: 1.1rem;
        }

        .buy-button {
            display: block;
            width: 100%;
            padding: 18px;
            background: linear-gradient(to right, var(--primary), var(--secondary));
            color: white;
            font-size: 1.3rem;
            font-weight: 700;
            border: none;
            border-radius: 15px;
            cursor: pointer;
            margin-top: 20px;
            transition: all 0.3s;
            box-shadow: 0 4px 15px rgba(139, 90, 43, 0.4);
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 12px;
        }

        .buy-button:hover {
            background: linear-gradient(to right, var(--accent), var(--primary));
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(139, 90, 43, 0.6);
        }

        .security-note {
            text-align: center;
            margin-top: 25px;
            color: var(--dark-gray);
            font-size: 0.95rem;
            padding: 10px;
            background: var(--light-gray);
            border-radius: 10px;
        }

        .security-note i {
            color: var(--primary);
            margin-left: 8px;
        }

        .course-description {
            background: var(--light-gray);
            padding: 25px;
            border-radius: var(--border-radius);
            margin: 30px 0;
            border: 1px solid var(--medium-gray);
            line-height: 1.8;
            font-size: 1.1rem;
        }

        .course-description p {
            margin-bottom: 15px;
        }

        .theme-toggle-wrapper {
            display: flex;
            align-items: center;
        }

        .theme-switch {
            position: relative;
            display: inline-block;
            width: 60px;
            height: 34px;
        }

        .theme-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 34px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 8px;
        }

        .slider:before {
            position: absolute;
            content: "";
            height: 26px;
            width: 26px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }

        input:checked + .slider {
            background-color: var(--primary);
        }

        input:checked + .slider:before {
            transform: translateX(26px);
        }

        .sun-icon, .moon-icon {
            color: white;
            font-size: 14px;
        }

        .sun-icon {
            opacity: 1;
        }

        .moon-icon {
            opacity: 0;
        }

        input:checked + .slider .sun-icon {
            opacity: 0;
        }

        input:checked + .slider .moon-icon {
            opacity: 1;
        }

        @media (max-width: 1200px) {
            .course-overlay h1 {
                font-size: 2rem;
            }
        }

        @media (max-width: 992px) {
            .course-detail-container {
                grid-template-columns: 1fr;
            }
            
            .course-overlay h1 {
                font-size: 1.8rem;
            }
            
            .course-overlay .course-tagline {
                font-size: 1.1rem;
            }
            
            .detail-value {
                font-size: 1.3rem;
            }
            
            .buy-button {
                font-size: 1.2rem;
            }
            
            .section-title {
                font-size: 1.3rem;
            }
        }

        @media (max-width: 768px) {
            .navbar {
                padding: 15px 10px;
            }
            
            .nav-controls {
                gap: 10px;
            }
            
            .nav-icons {
                gap: 0.3rem;
            }
            
            .nav-icon {
                width: 35px;
                height: 35px;
                font-size: 0.9rem;
            }
            
            .popup {
                width: 300px;
                right: 10px;
            }
            
            .notifications-popup {
                width: 320px;
            }
            
            .section-title {
                font-size: 1.2rem;
            }
            
            .course-image-container {
                height: 300px;
            }
            
            .course-overlay h1 {
                font-size: 1.6rem;
            }
            
            .course-overlay .course-tagline {
                max-width: 90%;
            }
            
            .course-details {
                grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            }
            
            .coupon-form {
                flex-direction: column;
            }
            
            .coupon-form button {
                padding: 15px;
            }
            
            .course-dates {
                bottom: 15px;
                right: 15px;
            }
            
            .course-date {
                padding: 6px 12px;
                font-size: 0.85rem;
            }
        }

        @media (max-width: 576px) {
            .nav-icons {
                display: flex;
            }
            
            .theme-toggle-wrapper {
                transform: scale(0.8);
            }
            
            .user-profile img {
                width: 35px;
                height: 35px;
            }
            
            .popup {
                width: calc(100% - 40px);
                right: 20px;
                max-height: 70vh;
            }
            
            .notifications-popup {
                width: calc(100% - 40px);
            }
            
            .course-image-container {
                height: 250px;
            }
            
            .course-overlay h1 {
                font-size: 1.4rem;
            }
            
            .course-overlay .course-tagline {
                font-size: 1rem;
            }
            
            .course-details {
                grid-template-columns: 1fr;
            }
            
            .payment-methods {
                flex-direction: column;
            }
            
            .payment-method {
                min-width: 100%;
            }
            
            .buy-button {
                font-size: 1.1rem;
                padding: 16px;
            }
            
            .section-title {
                font-size: 1.1rem;
            }
            
            .section-title i {
                width: 35px;
                height: 35px;
            }
            
            .course-dates {
                bottom: 10px;
                right: 10px;
            }
            
            .course-date {
                padding: 5px 10px;
                font-size: 0.8rem;
            }
        }

        @media (max-width: 480px) {
            .course-detail-container {
                padding: 0 15px;
            }
            
            .profile-card {
                padding: 20px 15px;
            }
            
            .course-hero {
                margin-top: 80px;
                padding: 0 15px;
            }
            
            .course-overlay h1 {
                font-size: 1.3rem;
            }
            
            .detail-value {
                font-size: 1.2rem;
            }
            
            .coupon-title {
                font-size: 1.1rem;
            }
            
            .coupon-form input {
                padding: 12px 15px;
                font-size: 1rem;
            }
            
            .course-dates {
                gap: 5px;
            }
            
            .course-date {
                font-size: 0.75rem;
            }
        }

        @media (max-width: 380px) {
            .navbar {
                flex-wrap: wrap;
                padding: 10px;
            }
            
            .logo {
                order: 1;
                margin-bottom: 10px;
                width: 100%;
                justify-content: center;
            }
            
            .nav-controls {
                order: 2;
                width: 100%;
                justify-content: center;
            }
            
            header {
                padding: 0;
                height: auto;
                padding: 5px 0;
            }
            
            .section-title {
                font-size: 1rem;
            }
            
            .course-image-container {
                height: 220px;
            }
            
            .course-overlay {
                padding: 20px 15px 15px;
            }
            
            .course-overlay h1 {
                font-size: 1.2rem;
            }
            
            .course-overlay .course-tagline {
                font-size: 0.9rem;
            }
            
            .detail-icon {
                font-size: 1.8rem;
            }
            
            .detail-value {
                font-size: 1.1rem;
            }
            
            .course-date {
                padding: 4px 8px;
                font-size: 0.7rem;
            }
        }
