:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
    overflow-x: hidden;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-light); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

.main-nav {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 2rem;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a.active, .nav-links a:hover {
    color: var(--primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -28px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 10px 10px 0 0;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 200px;
    box-shadow: var(--shadow-lg);
    display: none;
    padding: 0.5rem;
}

.user-menu-dropdown.active { display: block; }

.menu-header { padding: 0.8rem 1rem; display: flex; flex-direction: column; }
.menu-header strong { font-size: 0.9rem; }
.menu-header span { font-size: 0.75rem; color: var(--text-muted); }

.user-menu-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.8rem 1rem;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.9rem;
    border-radius: 8px;
    transition: var(--transition);
}

.user-menu-dropdown a:hover { background: var(--bg-light); }

.view-section {
    display: none;
    min-height: calc(100vh - 80px);
    padding: 3rem 0;
}

.view-section.active { display: block; animation: fadeIn 0.4s ease; }

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

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-section {
    text-align: center;
    padding: 6rem 2rem;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.05), transparent),
                radial-gradient(circle at bottom left, rgba(236, 72, 153, 0.05), transparent);
}

.hero-section h1 { font-size: 3.5rem; margin-bottom: 1rem; color: var(--text-dark); }
.hero-section p { font-size: 1.25rem; color: var(--text-muted); margin-bottom: 2.5rem; }

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 2rem;
}

.breadcrumbs .current { color: var(--text-dark); }

.filter-bar {
    background: var(--bg-white);
    border: 1px solid var(--border);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.filter-group { display: flex; gap: 10px; }

.filter-group select {
    border: 1px solid var(--border);
    padding: 0.6rem 1rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    background: #fdfdfd;
    cursor: pointer;
}

.filter-options {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.grid-toggles { display: flex; gap: 10px; font-size: 1.2rem; }
.grid-toggles i { cursor: pointer; }
.grid-toggles i.active { color: var(--primary); }

.course-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.catalog-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.catalog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.card-image { position: relative; height: 180px; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-badge {
    position: absolute;
    top: 10px; left: 10px;
    background: #ef4444;
    color: white;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 4px;
}

.card-content { padding: 1.2rem; }
.card-category { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); display: block; margin-bottom: 0.5rem; }
.card-title { font-size: 0.95rem; font-weight: 600; line-height: 1.4; height: 2.8rem; overflow: hidden; margin-bottom: 1rem; }
.card-price { font-size: 1.1rem; font-weight: 800; color: var(--text-dark); margin-bottom: 1.2rem; }

.card-actions { display: flex; gap: 8px; }

.btn-cart {
    flex: 1;
    background: #f1f5f9;
    border: 1px solid var(--border);
    color: var(--text-dark);
    padding: 0.7rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-cart:hover { background: var(--primary); color: white; border-color: var(--primary); }

.btn-wish {
    width: 40px;
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.centered-view { max-width: 1000px; }
.header-center { text-align: center; margin-bottom: 3rem; }
.header-center h2 { font-size: 2.2rem; margin-bottom: 0.5rem; }

.my-courses-grid { display: flex; flex-direction: column; gap: 1.5rem; align-items: center; }

.my-course-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    display: grid;
    grid-template-columns: 240px 1fr;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.my-course-card:hover { transform: scale(1.01); box-shadow: var(--shadow-lg); }

.my-course-img { position: relative; }
.my-course-img img { width: 100%; height: 100%; object-fit: cover; }
.play-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}
.my-course-card:hover .play-overlay { opacity: 1; }
.play-overlay i { color: white; width: 40px; height: 40px; }

.my-course-info { padding: 2rem; display: flex; flex-direction: column; justify-content: center; }
.progress-wrapper { margin: 1.5rem 0; }
.progress-info { display: flex; justify-content: space-between; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; }
.progress-bar-bg { height: 8px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--primary); border-radius: 4px; }

.btn-continue {
    width: fit-content;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

.full-player { padding: 0 !important; }
.player-container { display: flex; height: calc(100vh - 80px); overflow: hidden; }

.player-sidebar {
    width: 350px;
    background: var(--bg-white);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.sidebar-header { padding: 1.5rem; border-bottom: 1px solid var(--border); }
.btn-back { background: none; border: none; color: var(--primary); cursor: pointer; display: flex; align-items: center; gap: 5px; font-weight: 600; margin-bottom: 1rem; }

.player-accordion { flex: 1; overflow-y: auto; }
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-header {
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    background: #fafafa;
}
.accordion-content { display: none; padding: 0.5rem; background: white; }
.accordion-item.active .accordion-content { display: block; }
.accordion-item.active .accordion-header i { transform: rotate(180deg); }

.section-row {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.section-row:hover { background: var(--bg-light); color: var(--text-dark); }
.section-row.completed { color: var(--primary); }
.check-icon { width: 18px; }

.player-main { flex: 1; overflow-y: auto; background: #000; display: flex; flex-direction: column; }
.video-container { width: 100%; aspect-ratio: 16/9; background: #000; display: flex; align-items: center; justify-content: center; }
.video-placeholder { color: white; opacity: 0.5; font-size: 5rem; }

.player-content-info { background: var(--bg-white); padding: 3rem; flex: 1; }
.player-content-info h2 { margin-bottom: 1.5rem; }
.player-content-info p { color: var(--text-muted); line-height: 1.8; margin-bottom: 2rem; }

.player-nav-btns { display: flex; gap: 15px; }
.btn-primary { background: var(--primary); color: white; border: none; padding: 0.8rem 2rem; border-radius: 8px; font-weight: 600; cursor: pointer; }
.btn-secondary { background: #f1f5f9; color: var(--text-dark); border: none; padding: 0.8rem 2rem; border-radius: 8px; font-weight: 600; cursor: pointer; }

.fab-switch {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--text-dark);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    z-index: 9999;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.1);
}

.fab-switch:hover {
    transform: translateY(-5px) scale(1.05);
    background: var(--primary);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.4);
}

.fab-switch i {
    width: 18px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5rem 2rem;
    gap: 1.5rem;
    color: var(--text-muted);
}

.empty-state i {
    opacity: 0.5;
}
