/* ===========================================
   Educational Platform - Main Stylesheet
   =========================================== */

@import url('variables.css');
@import url('base.css');
@import url('components.css');
@import url('layout.css');

/* Custom Page Styles */

/* Gradient Text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Icon Boxes */
.icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
}

.icon-box-sm {
    width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
}

.icon-box-md {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
}

.icon-box-lg {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
}

.icon-box-xl {
    width: 4rem;
    height: 4rem;
    font-size: 1.5rem;
}

.icon-box-primary {
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary-400);
}

.icon-box-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-400);
}

.icon-box-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-400);
}

.icon-box-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-400);
}

.icon-box-purple {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

/* Activity Item */
.activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.activity-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Task Item */
.task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

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

.task-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 0.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.task-checkbox.checked {
    background: var(--success-500);
    border-color: var(--success-500);
    color: white;
}

.task-content {
    flex: 1;
}

.task-title {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Subject Card */
.subject-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s;
    cursor: pointer;
}

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

.subject-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.subject-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

.subject-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* Lesson Item */
.lesson-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    transition: all 0.2s;
    cursor: pointer;
}

.lesson-item:hover {
    background: var(--bg-hover);
    border-color: var(--primary-500);
}

.lesson-number {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-secondary);
}

.lesson-item.completed .lesson-number {
    background: var(--success-500);
    color: white;
}

.lesson-item.locked .lesson-number {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.lesson-info {
    flex: 1;
}

.lesson-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.lesson-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Quiz Card */
.quiz-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
}

.quiz-header {
    padding: 1rem 1.5rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.quiz-body {
    padding: 1.5rem;
}

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

/* Result Card */
.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
}

.result-score {
    width: 6rem;
    height: 6rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.result-score.excellent {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-400);
}

.result-score.good {
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary-400);
}

.result-score.average {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-400);
}

.result-score.poor {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-400);
}

/* Chat Interface */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height) - 3rem);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.chat-message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.chat-message.assistant .chat-bubble {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-bottom-right: 0.25rem;
}

[dir="ltr"] .chat-message.assistant .chat-bubble {
    border-bottom-left-radius: 0.25rem;
    border-bottom-right-radius: 1rem;
}

.chat-message.user .chat-bubble {
    background: var(--primary-500);
    color: white;
    border-bottom-left-radius: 0.25rem;
}

[dir="ltr"] .chat-message.user .chat-bubble {
    border-bottom-right-radius: 0.25rem;
    border-bottom-left-radius: 1rem;
}

.chat-input-container {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    color: var(--text-primary);
    resize: none;
}

.chat-input:focus {
    border-color: var(--primary-500);
}

/* Calendar */
.calendar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
}

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

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day-header {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.calendar-day {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day:hover {
    background: var(--bg-hover);
}

.calendar-day.today {
    background: var(--primary-500);
    color: white;
    border-radius: 50%;
}

.calendar-day.other-month {
    color: var(--text-muted);
}

.calendar-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 0.25rem;
    width: 0.25rem;
    height: 0.25rem;
    background: var(--primary-500);
    border-radius: 50%;
}

/* Timeline */
.timeline {
    position: relative;
    padding-right: 2rem;
}

[dir="ltr"] .timeline {
    padding-right: 0;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    right: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

[dir="ltr"] .timeline::before {
    right: auto;
    left: 0.5rem;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-marker {
    position: absolute;
    right: -2rem;
    top: 0;
    width: 1rem;
    height: 1rem;
    background: var(--primary-500);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
}

[dir="ltr"] .timeline-marker {
    right: auto;
    left: -2rem;
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
}

/* Notification Item */
.notification-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    transition: background 0.2s;
    cursor: pointer;
}

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

.notification-item.unread {
    background: rgba(59, 130, 246, 0.05);
}

.notification-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Skill Radar Chart Container */
.skill-chart-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Student Card */
.student-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.student-card:hover {
    border-color: var(--primary-500);
}

.student-card.active {
    border-color: var(--primary-500);
    background: rgba(59, 130, 246, 0.05);
}

.student-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--gradient-purple-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.student-info {
    flex: 1;
}

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

.student-grade {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Circular Progress */
.circular-progress {
    position: relative;
    width: 120px;
    height: 120px;
}

.circular-progress svg {
    transform: rotate(-90deg);
}

.circular-progress-track {
    fill: none;
    stroke: var(--bg-tertiary);
    stroke-width: 8;
}

.circular-progress-bar {
    fill: none;
    stroke: var(--primary-500);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.circular-progress-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Video Player */
.video-player {
    position: relative;
    background: #000;
    border-radius: 1rem;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.video-player video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    display: flex;
    align-items: center;
    gap: 1rem;
}

.video-progress {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
}

.video-progress-bar {
    height: 100%;
    background: var(--primary-500);
    border-radius: 2px;
    width: 30%;
}

.video-btn {
    color: white;
    cursor: pointer;
    font-size: 1.25rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.video-btn:hover {
    opacity: 1;
}