:root {
    --primary-color: #FFD700;
    --secondary-color: #FFA500;
    --bg-dark: #000000;
    --bg-darker: #0a0a0a;
    --bg-light: #1a1a1a;
    --bg-card: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #999999;
    --text-muted: #666666;
    --border-color: rgba(255, 215, 0, 0.2);
    --success-color: #51cf66;
    --danger-color: #ff6b6b;
    --warning-color: #ffd43b;
    --discord-color: #5865F2;
    --discord-hover: #4752C4;
    --gradient-primary: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    --gradient-dark: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 20px 40px rgba(255, 215, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo img {
    height: 40px;
    width: auto;
}

.nav-logo h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    margin-top: 80px;
    padding: 5rem 1.5rem;
    background: var(--gradient-dark);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { text-shadow: 0 0 30px rgba(255, 215, 0, 0.3); }
    100% { text-shadow: 0 0 50px rgba(255, 215, 0, 0.5); }
}

.hero-content p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    position: relative;
    z-index: 1;
}

.stat {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    min-width: 150px;
    transition: all 0.3s ease;
}

.stat:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    animation: numberPulse 2s ease-in-out infinite;
}

@keyframes numberPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

/* Filter Section */
.filter-section {
    padding: 1.5rem;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    min-width: 350px;
    transition: all 0.3s ease;
}

.search-box:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.1);
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.search-box input {
    background: none;
    border: none;
    color: var(--text-primary);
    outline: none;
    width: 100%;
    padding: 0.25rem;
    font-size: 0.95rem;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.3s ease;
    margin-left: 0.5rem;
}

.search-btn:hover {
    color: var(--primary-color);
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--bg-dark);
    border-color: var(--primary-color);
}

.filter-dropdowns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-dropdowns select {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    outline: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 180px;
    position: relative;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23FFD700' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    padding-left: 2.5rem;
}

.filter-dropdowns select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.1);
}

.filter-dropdowns select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.filter-dropdowns select option {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 0.5rem;
}

/* Courses Section */
.courses-section {
    padding: 3rem 1.5rem;
    min-height: 60vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.8rem;
    margin-bottom: 2rem;
}

.course-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    box-shadow: var(--shadow-card);
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.course-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
}

.course-card:hover::before {
    opacity: 0.05;
}

.course-image {
    width: 100%;
    height: 220px;
    background: var(--bg-darker);
    position: relative;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.1);
}

.course-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--gradient-primary);
    color: var(--bg-dark);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.course-price {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--success-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(81, 207, 102, 0.3);
}

.course-content {
    padding: 1.2rem;
}

.course-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.course-instructor {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.course-duration,
.course-level {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.course-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.course-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.star {
    color: var(--warning-color);
    font-size: 0.9rem;
}

.course-students {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.enroll-btn {
    background: var(--primary-color);
    color: var(--bg-dark);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.enroll-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Courses */
.no-courses {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.no-courses-icon {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-courses h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-light);
    margin: 5% auto;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    left: 20px;
    color: var(--text-secondary);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    background: var(--bg-darker);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: var(--primary-color);
    background: var(--bg-dark);
}

.modal-body {
    padding: 2rem;
}

/* Footer */
footer {
    background: var(--bg-darker);
    padding: 3rem 0 1rem;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .course-card {
        border-radius: 16px;
    }
    
    .course-image {
        height: 200px;
    }
    
    .course-content {
        padding: 1.1rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-darker);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .course-stats {
        gap: 2rem;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: 100%;
        margin-bottom: 1rem;
    }

    .filter-dropdowns {
        justify-content: center;
    }

    .courses-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .filter-buttons {
        justify-content: center;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 1rem;
    }

    .hero {
        padding: 3rem 1rem;
        min-height: 50vh;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-stats {
        gap: 1rem;
        flex-direction: column;
    }

    .stat {
        min-width: auto;
        padding: 1rem;
    }

    .filter-section {
        padding: 1rem;
    }

    .filter-controls {
        gap: 1rem;
    }

    .search-box {
        padding: 0.6rem 1rem;
        min-width: 100%;
    }

    .filter-dropdowns {
        gap: 0.5rem;
    }

    .filter-dropdowns select {
        min-width: 140px;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .courses-section {
        padding: 2rem 1rem;
    }

    .courses-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .course-card {
        border-radius: 12px;
    }

    .course-image {
        height: 180px;
    }

    .course-content {
        padding: 1rem;
    }

    .course-title {
        font-size: 1.1rem;
    }

    .course-instructor {
        font-size: 0.85rem;
    }

    .course-duration,
    .course-level {
        font-size: 0.8rem;
    }

    .course-description {
        font-size: 0.85rem;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 1rem;
    }
}
