* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Dark/Light Mode Variables */
:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #16213e;
    --bg-card: linear-gradient(135deg, rgba(13, 42, 65, 0.9), rgba(13, 27, 42, 0.9));
    --text-primary: #fff;
    --text-secondary: #e0e0e0;
    --text-muted: #808080;
    --border-color: rgba(255, 255, 255, 0.05);
    --accent: linear-gradient(135deg, #7c3aed, #a855f7);
    --accent-color: #a855f7;
}

body.light-mode {
    --bg-primary: #f9fafb;
    --bg-secondary: #ffffff;
    --bg-card: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(249, 250, 251, 0.9));
    --text-primary: #111827;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --border-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-secondary);
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

a {
    text-decoration: none;
}

li {
    list-style: none;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 200px;
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 20px 0;
    overflow-y: auto;
    z-index: 100;
    transition: background 0.3s;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-section {
    margin-top: 10px;
}

.section-title {
    padding: 10px 20px 5px;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
}

.nav-item:hover {
    background: rgba(124, 58, 237, 0.1);
    color: var(--text-secondary);
}

.nav-item.active {
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent-color);
    border-left: 3px solid var(--accent-color);
}

.nav-icon {
    width: 20px;
    font-size: 18px;
}

/* Main Content */
.main-content {
    margin-left: 200px;
    padding: 30px;
    min-height: 100vh;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.header-left h1 {
    font-size: 32px;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.header-left p {
    color: var(--text-muted);
    font-size: 14px;
}

.header-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Icon Buttons */
.icon-btn {
    width: 40px;
    height: 40px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.icon-btn:hover {
    background: rgba(124, 58, 237, 0.2);
    color: var(--accent-color);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Theme Toggle */
#theme-toggle {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
}

#theme-toggle:hover {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.user-avatar:hover {
    transform: scale(1.05);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 250px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
}

.dropdown-user-details {
    flex: 1;
}

.dropdown-user-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.dropdown-user-email {
    font-size: 13px;
    color: var(--text-muted);
}

.dropdown-item {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
}

.dropdown-item:hover {
    background: rgba(124, 58, 237, 0.1);
    color: var(--accent-color);
}

.dropdown-item.danger {
    color: #ef4444;
}

.dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 10px 0;
}

/* Notification Dropdown */
.notification-dropdown {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

/* Language Dropdown */
.language-dropdown {
    position: relative;
}

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 25px;
}

.course-card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid var(--border-color);
    height: 280px;
    display: flex;
    flex-direction: column;
}

body.light-mode .course-card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(168, 85, 247, 0.3);
}

.course-image {
    height: 230px;
    background: linear-gradient(135deg, #0d2a41, #0d1b2a);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

body.light-mode .course-image {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}

.course-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
}

.course-icon {
    font-size: 80px;
    z-index: 1;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

.course-info {
    padding: 20px;
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
}

.course-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Course specific colors */
.foundation .course-icon {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.javascript .course-icon {
    color: #f0db4f;
}

.typescript .course-icon {
    color: #3178c6;
}

.react .course-icon {
    color: #61dafb;
}

.vue .course-icon {
    color: #42b883;
}

.angular .course-icon {
    color: #dd0031;
}

.nextjs .course-icon {
    color: #fff;
}

.nodejs .course-icon {
    color: #68a063;
}

.nestjs .course-icon {
    color: #e0234e;
}

/* Status badges */
.course-status {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4caf50;
    border-radius: 20px;
    font-size: 12px;
    color: #4caf50;
    font-weight: 600;
}

.course-status.new {
    z-index: 2;
    background: rgb(131 0 255);
    border-color: #9f4aef;
    color: #fff;
}

.course-status.soon {
    background: rgba(251, 191, 36, 0.2);
    border-color: #fbbf24;
    color: #fbbf24;
}

/* Social Links */
.social-links {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    padding: 0 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.social-link {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #808080;
    text-decoration: none;
    transition: all 0.3s;
}

.social-link:hover {
    background: rgba(168, 85, 247, 0.2);
    border-color: #a855f7;
    color: #a855f7;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .mobile-menu-btn {
        display: block;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 101;
        background: rgba(124, 58, 237, 0.2);
        border: 1px solid #a855f7;
        color: #a855f7;
        padding: 10px;
        border-radius: 8px;
        cursor: pointer;
    }
}

@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none;
    }
}