@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #A78873 0%, #5E463A 100%);
    --secondary-gradient: linear-gradient(135deg, #A78873 0%, #372821 100%);
    --ai-gradient: linear-gradient(135deg, #A78873 0%, #5E463A 100%);
    --dark-gradient: linear-gradient(135deg, #171614 0%, #372821 100%);
    --primary-color: #A78873;
    --secondary-color: #5E463A;
    --accent-color: #A78873;
    --ai-color: #A78873;
    --dark-color: #171614;
    --light-color: #fff;
    --text-color: #5E463A;
    --border-color: #372821;
    --shadow-sm: 0 2px 8px rgba(167, 136, 115, 0.15);
    --shadow-md: 0 4px 16px rgba(167, 136, 115, 0.2);
    --shadow-lg: 0 10px 40px rgba(94, 70, 58, 0.25);
    --shadow-glow: 0 0 30px rgba(167, 136, 115, 0.4);
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background: 
        linear-gradient(135deg, rgba(55, 40, 33, 0.95) 0%, rgba(23, 22, 20, 0.95) 100%),
        url('assets/body-background.jpg') center center / cover no-repeat fixed;
    background-attachment: fixed;
    min-height: 100vh;
}

body[dir="ltr"] {
    direction: ltr;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Glassmorphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-lg);
}

/* Header */
.header {
    background: 
        linear-gradient(135deg, rgba(167, 136, 115, 0.95) 0%, rgba(94, 70, 58, 0.95) 100%),
        url('assets/header-background.jpg') center center / cover no-repeat;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: 
        linear-gradient(135deg, rgba(167, 136, 115, 0.98) 0%, rgba(94, 70, 58, 0.98) 100%),
        url('assets/header-background.jpg') center center / cover no-repeat;
    box-shadow: var(--shadow-md);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.logo-image {
    height: 50px;
    width: auto;
    object-fit: contain;
    margin-left: 10px;
}

.logo i {
    font-size: 2rem;
    background: var(--ai-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease-in-out infinite;
}

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

.nav {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    transition: left 0.3s ease;
    z-index: -1;
}

.nav-link:hover::before,
.nav-link.active::before {
    left: 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--light-color);
    transform: translateY(-2px);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.email {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.email i {
    color: var(--primary-color);
}

.lang-toggle,
.login-btn {
    padding: 0.7rem 1.5rem;
    border: none;
    background: var(--primary-gradient);
    color: var(--light-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: visible; /* Changed from hidden to visible to show dropdown */
    z-index: 1000; /* Ensure button is above other elements */
}

.lang-toggle::before,
.login-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.lang-toggle:hover::before,
.login-btn:hover::before {
    width: 300px;
    height: 300px;
}

.lang-toggle:hover,
.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* AI Chat Button */
.ai-chat-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--ai-gradient);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 999;
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.ai-chat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(167, 136, 115, 0.6);
}

/* AI Chat Window */
.ai-chat-window {
    position: fixed;
    bottom: 100px;
    left: 30px;
    width: 380px;
    height: 500px;
    background: var(--light-color);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    z-index: 998;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-chat-window.active {
    display: flex;
}

.ai-chat-header {
    background: var(--ai-gradient);
    color: white;
    padding: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-chat-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-status {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.ai-chat-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: #f8fafc;
}

.ai-message {
    background: var(--light-color);
    padding: 1rem;
    border-radius: 15px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-chat-input {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.ai-chat-input input {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    outline: none;
    transition: border-color 0.3s;
}

.ai-chat-input input:focus {
    border-color: var(--primary-color);
}

.ai-chat-input button {
    padding: 0.8rem 1.5rem;
    background: var(--ai-gradient);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
}

/* Hero Section */
.hero {
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

.video-container {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
    border-radius: 0 0 40px 40px;
    /* الصورة كخلفية مباشرة - ضع الصورة في assets/hero-background.jpg */
    background-image: 
        url('assets/hero-background.jpg'),
        url('./assets/hero-background.jpg'),
        url('hero-background.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #A78873; /* لون احتياطي إذا لم تكن الصورة موجودة */
}


.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* تدرج شفاف جداً لإظهار الصورة بوضوح خلف النص */
    background: linear-gradient(135deg, rgba(55, 40, 33, 0.05) 0%, rgba(23, 22, 20, 0.05) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    color: var(--light-color);
    padding: 2rem;
    padding-bottom: 8rem;
    z-index: 3;
}

.video-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.02)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.2;
    z-index: 0;
    pointer-events: none;
}

.hero-text-background {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 800px;
    height: auto;
    z-index: 1;
    opacity: 0.3;
    pointer-events: none;
}

.hero-text-bg-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: blur(2px);
}

.video-overlay h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 15px rgba(0,0,0,0.6), 0 0 30px rgba(0,0,0,0.4);
    position: relative;
    z-index: 2;
    animation: slideInDown 0.8s ease;
}

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

.video-overlay p {
    font-size: 1.4rem;
    font-weight: 300;
    position: relative;
    z-index: 2;
    text-shadow: 1px 1px 10px rgba(0,0,0,0.6), 0 0 20px rgba(0,0,0,0.4);
    animation: slideInUp 0.8s ease 0.3s both;
    margin-bottom: 1rem;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* AI Recommendations Badge */
.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1rem;
    background: rgba(167, 136, 115, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 1rem;
    position: relative;
    z-index: 2;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
    animation: glow 2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 10px rgba(167, 136, 115, 0.5); }
    50% { box-shadow: 0 0 20px rgba(167, 136, 115, 0.8); }
}

/* Courses Section */
.courses-section {
    padding: 5rem 0;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--ai-gradient);
    border-radius: 2px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
}

.course-card {
    background: var(--light-color);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    border: 1px solid transparent;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.course-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.course-card:hover::before {
    opacity: 0.05;
}

.course-media {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.course-media img,
.course-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-media img,
.course-card:hover .course-media video {
    transform: scale(1.1);
}

.course-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 2rem;
    color: var(--light-color);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
}

.course-card:hover .course-overlay {
    transform: translateY(0);
}

.course-info {
    padding: 1.8rem;
    position: relative;
    z-index: 1;
}

.course-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.8rem;
    transition: color 0.3s;
}

.course-card:hover .course-title {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.course-price {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.view-course-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary-gradient);
    color: var(--light-color);
    border: none;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.view-course-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.view-course-btn:hover::before {
    width: 300px;
    height: 300px;
}

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

/* Course Recommendations */
.recommendations-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, rgba(167, 136, 115, 0.05) 0%, rgba(94, 70, 58, 0.05) 100%);
    border-radius: 40px;
    margin: 4rem 0;
}

.recommendation-card {
    background: var(--light-color);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
    border-left: 4px solid var(--ai-color);
}

/* Footer */
.footer {
    background: var(--dark-gradient);
    color: var(--light-color);
    padding: 3rem 0;
    text-align: center;
    margin-top: 5rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--light-color);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    transform: translateY(-5px) scale(1.1);
    background: var(--ai-gradient);
    box-shadow: var(--shadow-glow);
}

/* Modal Enhancements */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

/* Payment Modal Specific Styles */
.payment-modal-content {
    max-width: 600px;
    animation: slideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.payment-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.payment-header i {
    font-size: 3rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    display: block;
}

.payment-header h2 {
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.payment-subtitle {
    color: var(--text-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.payment-summary {
    background: linear-gradient(135deg, rgba(167, 136, 115, 0.1) 0%, rgba(94, 70, 58, 0.1) 100%);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-item:last-child {
    border-bottom: none;
    font-size: 1.2rem;
    font-weight: 700;
}

.summary-item span {
    color: var(--text-color);
}

.summary-item strong {
    color: var(--dark-color);
    font-weight: 600;
}

.price-highlight {
    font-size: 1.5rem !important;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.payment-details {
    margin-bottom: 1.5rem;
}

.payment-details h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-details h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.card-input-wrapper {
    position: relative;
}

.card-input-wrapper input {
    padding-right: 3rem;
}

.payment-security {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 1.2rem;
}

.card-icons {
    display: flex;
    gap: 10px;
    margin-top: 0.5rem;
}

.card-icons i {
    font-size: 2rem;
    color: var(--text-color);
    opacity: 0.6;
}

.form-group label i {
    margin-left: 8px;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.payment-security-note {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(167, 136, 115, 0.1);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
}

.payment-security-note i {
    color: #4ade80;
    font-size: 1.2rem;
}

.payment-submit-btn {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
}

.payment-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(167, 136, 115, 0.4);
}

.payment-submit-btn i {
    font-size: 1.3rem;
}

.modal-content {
    background: var(--light-color);
    margin: 5% auto;
    padding: 2.5rem;
    border-radius: 25px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-lg);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    transition: all 0.3s;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: var(--primary-color);
    background: rgba(167, 136, 115, 0.1);
    transform: rotate(90deg);
}

.modal-content h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(167, 136, 115, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-primary {
    width: 100%;
    padding: 1.2rem;
    background: var(--primary-gradient);
    color: var(--light-color);
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

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

/* Course Page Enhancements */
.course-page {
    padding: 3rem 0;
}

.course-player {
    width: 100%;
    height: 600px;
    background: var(--dark-color);
    border-radius: 25px;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.course-player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.course-sections {
    background: var(--light-color);
    padding: 2.5rem;
    border-radius: 25px;
    box-shadow: var(--shadow-md);
}

.section-item {
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.section-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    transition: left 0.3s ease;
    z-index: 0;
}

.section-item:hover::before,
.section-item.active::before {
    left: 0;
}

.section-item:hover,
.section-item.active {
    border-color: var(--primary-color);
    transform: translateX(10px);
    color: var(--light-color);
}

.section-item.locked {
    opacity: 0.7;
    cursor: not-allowed;
}

.section-item h3,
.section-item p {
    position: relative;
    z-index: 1;
}

.payment-required {
    text-align: center;
    padding: 3rem;
    background: var(--secondary-gradient);
    border-radius: 25px;
    margin-top: 2rem;
    color: var(--light-color);
}

.btn-payment {
    padding: 1.2rem 2.5rem;
    background: var(--light-color);
    color: var(--primary-color);
    border: none;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

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

/* Loading Animation */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
    }

    .nav {
        width: 100%;
        justify-content: center;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
    }

    .video-overlay h1 {
        font-size: 2rem;
    }

    .video-overlay p {
        font-size: 1rem;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .ai-chat-window {
        width: calc(100% - 60px);
        left: 30px;
        height: 400px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 10px;
}

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

/* Animation Utilities */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* AI Loading Indicator */
.ai-loading {
    display: inline-flex;
    gap: 5px;
}

.ai-loading span {
    width: 8px;
    height: 8px;
    background: var(--ai-color);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.ai-loading span:nth-child(1) {
    animation-delay: -0.32s;
}

.ai-loading span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* User Menu Dropdown Styles */
#userMenu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: fixed !important;
    z-index: 10000 !important;
    pointer-events: auto !important;
}

#userMenu button {
    width: 100%;
    text-align: right;
    direction: rtl;
}

#userMenu button:hover {
    background: #f5f5f5 !important;
}
