/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Styles */
.main-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.logo a {
    color: white;
    text-decoration: none;
}

.logo a:hover {
    color: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-greeting {
    font-size: 1rem;
}

.user-actions {
    display: flex;
    gap: 1rem;
}

.btn-header {
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-login:hover {
    background: #2980b9;
}

.btn-logout {
    background: transparent;
    border-color: #e74c3c;
    color: #e74c3c;
}

.btn-logout:hover {
    background: #e74c3c;
    color: white;
}

/* Courses Navigation Bar */
.courses-navbar {
    background: #1a252f;
    border-top: 1px solid #34495e;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.courses-menu {
    display: flex;
    list-style: none;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.courses-menu li {
    flex-shrink: 0;
}

.courses-menu a {
    display: block;
    padding: 0.8rem 1.5rem;
    color: #ecf0f1;
    text-decoration: none;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.courses-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.courses-menu a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Login Page Styles */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    padding: 1rem;
}

.login-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 450px;
    padding: 2.5rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.login-header h2 {
    color: #7f8c8d;
    font-size: 1.2rem;
    font-weight: normal;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert-error {
    background: #ffe6e6;
    color: #c00;
    border-left: 4px solid #c00;
}

.alert-success {
    background: #e6ffe6;
    color: #090;
    border-left: 4px solid #090;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 1rem;
}

.btn-login:hover {
    background: #45a049;
}

.login-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.login-footer a {
    color: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Dashboard Styles */
.dashboard-container {
    padding: 2rem 0;
}

.welcome-section {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.welcome-section h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.welcome-section p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.courses-section {
    margin-bottom: 2rem;
}

.courses-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.course-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.course-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.course-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.course-card p {
    color: #7f8c8d;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.btn-access {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}

.btn-access:hover {
    background: #2980b9;
}

.dashboard-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.info-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.info-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 20px;
    background: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Course Page Styles */
.course-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 2rem;
}

.course-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 1.5rem;
}

.course-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.course-description {
    color: #7f8c8d;
    font-size: 1.1rem;
    line-height: 1.6;
}

.course-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #ecf0f1;
    padding-bottom: 0.5rem;
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    background: none;
    border: none;
    border-radius: 4px 4px 0 0;
    font-size: 1rem;
    font-weight: 500;
    color: #7f8c8d;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Course Modules */
.course-modules {
    margin-top: 2rem;
}

.course-modules h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.module {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.module h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.module-content {
    margin-left: 1.5rem;
}

.module-content h4 {
    color: #2c3e50;
    margin: 1rem 0 0.5rem 0;
}

.module-content ul {
    list-style-type: none;
    padding-left: 1rem;
}

.module-content li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.module-content li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-weight: bold;
}

.video-lecture {
    margin: 1.5rem 0;
}

.video-placeholder {
    background: #ecf0f1;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    color: #7f8c8d;
}

.resources {
    margin-top: 1.5rem;
}

.resource-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: background 0.3s;
}

.resource-link:hover {
    background: #2980b9;
}

.progress-tracker {
    background: #e8f4fd;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
    border: 1px solid linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-mark-complete {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 1rem;
    transition: background 0.3s;
}

.btn-mark-complete:hover {
    background: #45a049;
}

.materials-list {
    list-style-type: none;
    padding-left: 1rem;
}

.materials-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Footer */
.main-footer {
    background: #2c3e50;
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: auto;
}

.footer-container p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .user-menu {
        width: 100%;
        justify-content: space-between;
    }
    
    .courses-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-info {
        grid-template-columns: 1fr;
    }
    
    .course-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
}

/* Utility Classes */
.no-content {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

.no-content h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}
