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

:root {
    --primary: #0d9488; /* Teal 600 */
    --primary-light: #14b8a6; /* Teal 500 */
    --primary-dark: #0f766e; /* Teal 700 */
    
    --secondary: #1e293b; /* Slate 800 (Dark Blue) */
    --secondary-light: #334155; /* Slate 700 */
    
    --bg-color: #ffffff;
    --surface-color: #f8fafc; /* Slate 50 */
    --surface-dark: #f1f5f9; /* Slate 100 */
    
    --text-main: #0f172a; /* Slate 900 */
    --text-muted: #64748b; /* Slate 500 */
    
    --border: #e2e8f0; /* Slate 200 */
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* === BUTTONS === */
.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff !important;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary);
    color: #fff !important;
}

.btn-secondary:hover {
    background-color: var(--secondary-light);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: #fff;
}

/* === NAVBAR === */
.navbar {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--secondary);
}

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

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

/* === DROPDOWN PROFILE === */
.profile-dropdown {
    position: relative;
    display: inline-block;
}
.header-avatar {
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    background: var(--primary); 
    color: white; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: 700; 
    cursor: pointer;
    font-size: 1.1rem;
}
.profile-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 45px;
    background-color: #fff;
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}
.profile-dropdown:hover .profile-dropdown-content {
    display: block;
}
.profile-dropdown-content a {
    color: var(--secondary);
    padding: 0.8rem 1.2rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s;
}
.profile-dropdown-content a:hover {
    background-color: var(--surface-color);
    color: var(--primary);
}
.profile-dropdown-header {
    padding: 1rem 1.2rem;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border);
}
.dropdown-name {
    font-weight: 700;
    color: var(--secondary);
    font-size: 0.95rem;
}
.dropdown-email {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* === HERO SECTION === */
.hero {
    background: linear-gradient(135deg, var(--surface-color) 0%, #ffffff 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

.hero-title span {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 90%;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

/* === STATS SECTION === */
.stats-section {
    padding: 3rem 0;
    background-color: var(--primary);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
}

/* === SECTION HEADERS === */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* === COURSE CARDS === */
.courses-section {
    padding: 5rem 0;
    background-color: var(--surface-color);
}

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

.course-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

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

.course-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.course-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.badge-free {
    background-color: #dcfce7;
    color: #166534;
}

.badge-premium {
    background-color: #fef9c3;
    color: #854d0e;
}

.course-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.course-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

/* === DASHBOARD LAYOUT === */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 70px);
    background-color: var(--surface-color);
}

.sidebar {
    width: 260px;
    background-color: #fff;
    border-right: 1px solid var(--border);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
}

.sidebar-profile {
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.profile-name {
    font-weight: 700;
    color: var(--secondary);
}

.sidebar-menu {
    flex: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    transition: all 0.2s;
}

.menu-item:hover, .menu-item.active {
    background-color: var(--surface-dark);
    color: var(--primary);
}

.dashboard-content {
    flex: 1;
    padding: 2rem 3rem;
    overflow-y: auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.dash-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.dash-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background-color: #e0f2fe;
    color: #0ea5e9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-card:nth-child(2) .dash-icon {
    background-color: #dcfce7;
    color: #22c55e;
}

.dash-card:nth-child(3) .dash-icon {
    background-color: #fef3c7;
    color: #f59e0b;
}

.dash-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary);
}

.dash-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* === FORMS === */
.auth-container {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--surface-color);
    padding: 2rem;
}

.auth-card {
    background: #fff;
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--secondary);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-danger { background: #fee2e2; color: #ef4444; border: 1px solid #fca5a5; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }

/* === FOOTER === */
.footer {
    background-color: var(--secondary);
    color: #fff;
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #fff;
}

.footer-desc {
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #cbd5e1;
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--secondary-light);
    color: #cbd5e1;
    font-size: 0.9rem;
}

/* === RESPONSIVE MEDIA QUERIES === */
@media (max-width: 992px) {
    .container {
        padding: 0 1.5rem;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Navbar Mobile */
    .nav-links {
        display: none;
    }
    .navbar .container {
        padding: 1rem 1.5rem;
    }
    
    .hero .container {
        flex-direction: column;
        text-align: center;
        padding-top: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    /* Layouts */
    .dashboard-layout, .dash-layout {
        flex-direction: column;
    }
    .sidebar, .dash-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        height: auto;
    }
    .dashboard-content, .dash-main {
        padding: 1.5rem;
    }
    
    /* Grids & Cards */
    div[style*="display: grid; grid-template-columns: 2fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    div[style*="display: grid; grid-template-columns: 1fr 300px"] {
        grid-template-columns: 1fr !important;
    }
    div[style*="grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }
}
