* {
    box-sizing: border-box;
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
}

:root {
    --bg-main: #f4f6f8;
    --sidebar-bg: #ffffff;
    --panel-bg: rgba(255, 255, 255, 0.95);
    --panel-border: rgba(226, 232, 240, 0.8);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --primary-color: #cf982e; /* Gold */
    --primary-hover: #b8860b;
    --accent-color: #497aa7; /* Steel Blue */
    --glass-shadow: 0 10px 40px -10px rgba(0,0,0,0.1);
}

body.dark-theme {
    --bg-main: #1e1e1e;
    --sidebar-bg: #252526;
    --panel-bg: rgba(37, 37, 38, 0.95);
    --panel-border: rgba(80, 80, 80, 0.8);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --primary-color: #cf982e; /* Gold */
    --primary-hover: #b8860b;
    --accent-color: #497aa7; /* Steel Blue */
    --glass-shadow: 0 10px 40px -10px rgba(0,0,0,0.4);
}

body.dark-theme .app-container,
body.dark-theme .main-content {
    background: var(--bg-main);
}
body.dark-theme .side-nav,
body.dark-theme .profile-info-card,
body.dark-theme .filter-dropdown,
body.dark-theme .course-card {
    background: var(--sidebar-bg);
    border-color: var(--panel-border);
}
body.dark-theme input,
body.dark-theme textarea,
body.dark-theme select {
    background: #333333 !important;
    color: var(--text-primary) !important;
    border-color: var(--panel-border) !important;
}
body.dark-theme div[style*="background:white"],
body.dark-theme div[style*="background: white"] {
    background-color: var(--sidebar-bg) !important;
    border-color: var(--panel-border) !important;
}
body.dark-theme div[style*="background:#f1f5f9"],
body.dark-theme div[style*="background:#f8fafc"] {
    background-color: #2d2d30 !important;
    border-color: var(--panel-border) !important;
}
body.dark-theme h1, body.dark-theme h2, body.dark-theme h3, body.dark-theme h4, body.dark-theme h5 {
    color: var(--text-primary) !important;
}
body.dark-theme p, body.dark-theme label, body.dark-theme span {
    color: var(--text-secondary);
}
body.dark-theme [style*="color:#1e293b"], 
body.dark-theme [style*="color: #1e293b"] {
    color: var(--text-primary) !important;
}
body.dark-theme [style*="color:#475569"], 
body.dark-theme [style*="color: #475569"],
body.dark-theme [style*="color:#64748b"], 
body.dark-theme [style*="color: #64748b"] {
    color: var(--text-secondary) !important;
}
body.dark-theme table th {
    background-color: #2d2d30 !important;
    color: var(--text-primary) !important;
    border-color: var(--panel-border) !important;
}
body.dark-theme table td {
    color: var(--text-primary) !important;
    border-color: var(--panel-border) !important;
}
body.dark-theme tr {
    border-color: var(--panel-border) !important;
}
body.dark-theme .news-section {
    background-color: #2d2d30 !important;
    border-color: var(--panel-border) !important;
}



body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
    font-size: 16px;
}

.app-container {
    display: flex;
    min-height: 100vh;
    padding: 0;
    gap: 0;
    margin: 0;
    background: var(--bg-main);
}

/* Sidebar Nav */
.side-nav {
    width: 80px;
    background: #ffffff;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding-top: 30px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    z-index: 2000;
    flex-shrink: 0;
}

.nav-item {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--text-secondary);
    font-size: 22px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-item:hover {
    color: var(--primary-color);
    background: rgba(0,0,0,0.03);
}

.nav-item.active {
    background: var(--accent-color);
    color: white !important;
    box-shadow: 0 4px 12px rgba(73, 122, 167, 0.4);
}

.nav-item.logout {
    margin-top: auto;
    margin-bottom: 20px;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow-y: auto;
    position: relative;
    background: var(--bg-main);
    height: 100vh;
}

/* Top Header */
.top-header {
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    background: linear-gradient(270deg, #cf982e, #497aa7, #898d8d, #cf982e);
    background-size: 300% 300%;
    animation: rotateGradient 10s ease infinite;
    color: white;
    flex-shrink: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 1px;
}

.logo i {
    font-size: 28px;
}

.top-links {
    display: flex;
    gap: 25px;
    margin-left: auto;
    margin-right: 30px;
}

.top-links a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    font-size: 14px;
    transition: opacity 0.2s;
}

.top-links a:hover {
    opacity: 0.8;
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-outline {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.2);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.4);
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin: 40px 60px;
    background-image: url('abstract_bg.png');
    background-size: cover;
    background-position: center;
    padding: 60px 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(73, 122, 167, 0.3);
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-section h1, .hero-section p, .hero-section .hero-subtitle {
    color: white !important;
}

.hero-label {
    color: #cf982e;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-size: 14px;
}

.hero-section h1 {
    font-size: 40px;
    line-height: 1.2;
    margin: 0 0 15px 0;
    color: white;
}

.hero-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 18px;
    margin-bottom: 30px;
}

/* Content Layout (Sidebar + Grid) */
.content-layout {
    display: flex;
    gap: 30px;
    padding: 0 60px 60px 60px;
}

.filters-sidebar {
    width: 250px;
    padding: 0;
    height: fit-content;
}

.filters-sidebar h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    color: var(--text-primary);
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.filter-list li {
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    transition: all 0.2s;
    font-size: 14px;
}

.filter-list li:hover {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.filter-list li.active {
    background: white;
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.filter-dropdown {
    padding: 15px;
    background: white;
    border-radius: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    border: 1px solid #e2e8f0;
}

.courses-area {
    flex: 1;
}

.section-title {
    font-size: 16px;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-top: 0;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: 700;
}

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.course-card {
    background: white;
    border-radius: 16px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-thumb {
    width: 100%;
    height: 150px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 15px;
}

.course-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: var(--text-primary);
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 13px;
    color: var(--text-secondary);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 5px;
}

.progress-fill {
    height: 100%;
    background: var(--accent-color);
    border-radius: 3px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #f59e0b;
    font-weight: 700;
}

/* Profile Specific */
.profile-info-card {
    display: flex;
    align-items: center;
    padding: 40px 60px;
    gap: 40px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.profile-details h2 {
    font-size: 32px;
    margin: 0 0 5px 0;
    color: var(--text-primary);
}

.profile-role {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 15px;
}

.profile-bio {
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 600px;
    font-size: 15px;
}

.profile-stats {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat span {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

/* Animated Gradient Background */
@keyframes rotateGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animated-gradient {
    background: linear-gradient(270deg, #cf982e, #497aa7, #898d8d, #cf982e);
    background-size: 300% 300%;
    animation: rotateGradient 10s ease infinite;
}
