/* Platform Learning Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #10b981;
    --secondary-hover: #059669;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-alt: #f9fafb;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --error-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-alt);
}

/* Login Screen */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
    max-width: 450px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-light);
}

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

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

.login-form input,
.login-form select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.login-form input:focus,
.login-form select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

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

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

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

.btn-secondary:hover {
    background: #4b5563;
}

.btn-block {
    width: 100%;
}

.error-message {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fee2e2;
    color: var(--error-color);
    border-radius: 8px;
    text-align: center;
}

.login-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--text-light);
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Dashboard */
.dashboard {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dashboard-header {
    background: white;
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-left h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.user-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.user-badge.student {
    background: #dbeafe;
    color: #1e40af;
}

.user-badge.teacher {
    background: #fef3c7;
    color: #92400e;
}

.user-badge.admin {
    background: #fce7f3;
    color: #9f1239;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.points-badge {
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.dashboard-container {
    display: flex;
    flex: 1;
}

.dashboard-sidebar {
    width: 250px;
    background: white;
    box-shadow: var(--shadow);
    padding: 1.5rem 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--bg-alt);
}

.nav-item.active {
    background: #eff6ff;
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
}

.nav-icon {
    font-size: 1.25rem;
}

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

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.content-section h2 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

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

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

.course-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

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

.course-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.course-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.course-progress {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar.small {
    height: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Progress Overview */
.progress-overview {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.progress-card {
    margin-bottom: 2rem;
}

.progress-card h3 {
    margin-bottom: 1rem;
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar-container .progress-bar {
    flex: 1;
}

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

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-alt);
    border-radius: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Lesson View */
.lesson-view {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.lesson-header {
    background: white;
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.lesson-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lesson-container {
    flex: 1;
    padding: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.lesson-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.lesson-theory {
    margin-bottom: 2rem;
}

.lesson-theory h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.lesson-theory p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Assignments */
.assignment-item {
    background: var(--bg-alt);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.assignment-item h4 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.assignment-item p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.assignment-answer {
    margin-top: 1rem;
}

.assignment-answer textarea,
.assignment-answer input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.assignment-answer textarea {
    min-height: 100px;
    resize: vertical;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.quiz-option {
    padding: 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.quiz-option:hover {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.quiz-option.selected {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.quiz-option.correct {
    border-color: var(--success-color);
    background: #d1fae5;
}

.quiz-option.incorrect {
    border-color: var(--error-color);
    background: #fee2e2;
}

/* Interactive Quiz (Kahoot-like) */
.interactive-quiz {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    padding: 2rem;
    color: white;
    margin-bottom: 2rem;
}

.interactive-quiz h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.interactive-quiz .quiz-options {
    margin-top: 1.5rem;
}

.interactive-quiz .quiz-option {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 500;
}

.interactive-quiz .quiz-option:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Grades List */
.grades-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.grade-item {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grade-info h4 {
    margin-bottom: 0.5rem;
}

.grade-info p {
    color: var(--text-light);
    font-size: 0.875rem;
}

.grade-score {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Leaderboard */
.leaderboard {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.leaderboard-rank {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-light);
    min-width: 40px;
}

.leaderboard-rank.top {
    color: #f59e0b;
}

.leaderboard-name {
    flex: 1;
}

.leaderboard-points {
    font-weight: bold;
    color: var(--primary-color);
}

/* Groups Grid */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.group-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.3s;
}

.group-card:hover {
    transform: translateY(-4px);
}

.group-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.group-stats {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Assignments List (Teacher) */
.assignments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.assignment-submission {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.assignment-submission-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.student-name {
    font-weight: 500;
    color: var(--primary-color);
}

.assignment-answer-text {
    background: var(--bg-alt);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.grading-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.grading-form input,
.grading-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.grading-form textarea {
    min-height: 100px;
    resize: vertical;
}

/* Statistics */
.statistics-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

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

.stat-card {
    background: var(--bg-alt);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card-label {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-sidebar {
        width: 100%;
        position: fixed;
        left: -100%;
        top: 60px;
        height: calc(100vh - 60px);
        z-index: 100;
        transition: left 0.3s;
    }

    .dashboard-sidebar.open {
        left: 0;
    }

    .dashboard-content {
        padding: 1rem;
    }

    .courses-grid,
    .groups-grid {
        grid-template-columns: 1fr;
    }

    .lesson-header {
        flex-direction: column;
        align-items: flex-start;
    }
}


