/* ============================================================
   css/student.css — Student Portal Styles (Light Theme)
   ============================================================ */

/* ── Layout ── */
.student-body { background: var(--bg-primary); min-height: 100vh; }

.student-layout {
  display: flex; min-height: 100vh;
}

/* ── Student Sidebar ── */
.student-sidebar {
  width: 240px; flex-shrink: 0;
  background: #ffffff;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  overflow-y: auto; z-index: 50;
  box-shadow: 2px 0 12px rgba(0,0,0,0.05);
}

.student-sidebar .sidebar-header {
  padding: 20px 18px;
  border-bottom: 1px solid var(--border);
}
.student-sidebar .logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1rem;
  color: var(--text-primary);
}
.student-sidebar .logo-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.student-info {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #faf9ff;
}
.student-avatar-lg {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: white;
  margin-bottom: 10px;
}
.student-info-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.student-info-uid  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.student-eval-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; margin-top: 8px;
  background: rgba(124,58,237,0.08); border: 1px solid rgba(124,58,237,0.2);
  color: #6d28d9; border-radius: 99px; padding: 3px 10px;
}

.student-nav { flex: 1; padding: 10px 12px; }
.student-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 500;
  color: var(--text-secondary); transition: all var(--transition);
  margin-bottom: 2px; text-decoration: none;
}
.student-nav-link i { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }
.student-nav-link:hover { background: rgba(124,58,237,0.05); color: var(--text-primary); }
.student-nav-link.active {
  background: rgba(124,58,237,0.1); color: #6d28d9;
  border: 1px solid rgba(124,58,237,0.2);
}
.student-nav-link.active i { color: var(--accent); }
.student-sidebar-footer {
  padding: 12px; border-top: 1px solid var(--border);
}
.student-sidebar-footer .student-nav-link { color: #dc2626; }
.student-sidebar-footer .student-nav-link:hover { background: rgba(220,38,38,0.06); color: #b91c1c; }

/* ── Student Main Content ── */
.student-main { margin-left: 240px; flex: 1; min-height: 100vh; display: flex; flex-direction: column; }

.student-topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}
.student-topbar-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.student-content { padding: 24px; display: flex; flex-direction: column; gap: 20px; flex: 1; }

/* ── Dashboard ── */
.dashboard-grid {
  display: grid; grid-template-columns: 2fr 1fr; gap: 20px;
}
.student-stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
.student-stat-card {
  background: #ffffff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; text-align: center;
  transition: all var(--transition);
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.student-stat-card:hover { transform: translateY(-2px); border-color: rgba(124,58,237,0.25); box-shadow: 0 4px 16px rgba(124,58,237,0.1); }
.student-stat-value { font-family: 'Outfit', sans-serif; font-size: 2.2rem; font-weight: 800; color: var(--text-primary); }
.student-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.student-stat-card .stat-icon { margin: 0 auto 10px; }

/* ── Section Radar ── */
.radar-container { position: relative; max-width: 300px; margin: 0 auto; }

/* ── Today's Task Panel ── */
.today-task-banner {
  background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(79,70,229,0.05));
  border: 1px solid rgba(124,58,237,0.2); border-radius: var(--radius);
  padding: 20px 24px; display: flex; align-items: center; gap: 16px;
}
.today-task-info { flex: 1; }
.today-task-info h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; color: var(--text-primary); }
.today-task-info p  { font-size: 13px; color: var(--text-secondary); }

/* ── Timer ── */
.timer-display {
  display: flex; align-items: center; gap: 8px;
  background: #ffffff; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.timer-display i { color: var(--warning); }
.timer-digits { font-family: 'Outfit', sans-serif; font-size: 1.3rem; font-weight: 700; letter-spacing: 2px; color: var(--text-primary); }
.timer-digits.urgent { color: var(--danger); animation: pulse 1s ease infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ── Task Cards ── */
.task-progress-bar { margin-bottom: 20px; }
.task-progress-text {
  display: flex; justify-content: space-between; font-size: 13px;
  color: var(--text-secondary); margin-bottom: 8px;
}
.task-progress-text strong { color: var(--text-primary); }

.question-card {
  background: #ffffff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  animation: slideIn 0.35s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.question-card-header {
  padding: 16px 22px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  background: #faf9ff;
}
.question-meta { display: flex; gap: 8px; align-items: center; flex: 1; }
.q-number {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-grad); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.carry-tag {
  font-size: 11px; color: #92400e;
  background: rgba(217,119,6,0.1); border: 1px solid rgba(217,119,6,0.25);
  border-radius: 99px; padding: 2px 8px;
}
.question-card-body { padding: 22px; }
.question-text { font-size: 1rem; font-weight: 500; line-height: 1.6; margin-bottom: 20px; color: var(--text-primary); }

/* MCQ Options */
.mcq-options { display: flex; flex-direction: column; gap: 10px; }
.mcq-option {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); cursor: pointer;
  transition: all var(--transition); font-size: 14px; color: var(--text-secondary);
  background: #fafafa;
}
.mcq-option:hover { border-color: rgba(124,58,237,0.3); background: rgba(124,58,237,0.04); color: var(--text-primary); }
.mcq-option.selected { border-color: var(--accent); background: rgba(124,58,237,0.07); color: var(--text-primary); }
.mcq-option.correct  { border-color: #059669; background: rgba(5,150,105,0.07); color: #065f46; }
.mcq-option.wrong    { border-color: #dc2626; background: rgba(220,38,38,0.07); color: #991b1b; }
.option-letter {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,0,0,0.05); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
  transition: all var(--transition);
}
.mcq-option.selected .option-letter { background: var(--accent); border-color: var(--accent); color: white; }
.mcq-option.correct .option-letter  { background: #059669; border-color: #059669; color: white; }
.mcq-option.wrong .option-letter    { background: #dc2626; border-color: #dc2626; color: white; }

/* Fill in the Blank */
.fill-blank-input {
  width: 100%;
  padding: 13px 16px;
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: 15px; font-family: inherit;
  outline: none; transition: border-color var(--transition), box-shadow var(--transition);
}
.fill-blank-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.fill-blank-input.correct { border-color: #059669; box-shadow: 0 0 0 3px rgba(5,150,105,0.15); }
.fill-blank-input.wrong   { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,0.15); }

/* Explanation box */
.explanation-box {
  margin-top: 16px; padding: 14px 16px;
  background: rgba(79,70,229,0.05); border: 1px solid rgba(79,70,229,0.2);
  border-radius: var(--radius-sm); font-size: 13px; color: var(--text-secondary);
  display: none;
}
.explanation-box.show { display: block; animation: fadeIn 0.3s ease; }
.explanation-box strong { color: #4f46e5; }

/* Answer result overlay */
.answer-result {
  text-align: center; padding: 20px;
}
.answer-result .result-icon { font-size: 3rem; margin-bottom: 12px; }
.answer-result h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); }
.answer-result p  { font-size: 14px; color: var(--text-secondary); }

/* Card footer */
.question-card-footer {
  padding: 16px 22px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: #faf9ff;
}

/* ── Task List (history) ── */
.task-list { display: flex; flex-direction: column; gap: 8px; }
.task-list-item {
  background: #ffffff; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  transition: all var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.task-list-item:hover { border-color: rgba(124,58,237,0.25); box-shadow: 0 3px 12px rgba(0,0,0,0.07); }
.task-section-icon {
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.task-text { flex: 1; font-size: 13px; color: var(--text-secondary); }
.task-text strong { display: block; font-size: 14px; color: var(--text-primary); margin-bottom: 2px; }

/* ── Performance Calendar ── */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day {
  aspect-ratio: 1; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600;
  background: rgba(0,0,0,0.04); cursor: default;
  transition: transform var(--transition);
  position: relative;
}
.cal-day:hover { transform: scale(1.2); z-index: 10; }
.cal-day.level-0 { background: rgba(0,0,0,0.04); }
.cal-day.level-1 { background: rgba(5,150,105,0.15); }
.cal-day.level-2 { background: rgba(5,150,105,0.35); }
.cal-day.level-3 { background: rgba(5,150,105,0.6); }
.cal-day.today   { border: 2px solid var(--accent); }

/* ── Completion Screen ── */
.completion-screen {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 3rem 2rem;
  min-height: 400px;
}
.completion-trophy { font-size: 5rem; margin-bottom: 1.5rem; animation: bounceIn 0.6s ease; }
@keyframes bounceIn { 0% { transform: scale(0); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }
.completion-screen h2 { font-family: 'Outfit', sans-serif; font-size: 1.8rem; font-weight: 800; margin-bottom: 0.5rem; color: var(--text-primary); }
.completion-screen p  { color: var(--text-secondary); font-size: 15px; max-width: 400px; }
.completion-stats { display: flex; gap: 2rem; margin: 2rem 0; flex-wrap: wrap; justify-content: center; }
.comp-stat { text-align: center; }
.comp-stat .number { font-family: 'Outfit', sans-serif; font-size: 2rem; font-weight: 800; color: var(--text-primary); }
.comp-stat .label  { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Responsive ── */
@media (max-width: 900px) {
  .student-sidebar { width: 60px; }
  .student-sidebar .logo span,
  .student-info-name, .student-info-uid, .student-eval-badge,
  .student-nav-link span { display: none; }
  .student-nav-link { justify-content: center; }
  .student-main { margin-left: 60px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .student-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .student-main { margin-left: 0; }
  .student-sidebar { display: none; }
  .student-content { padding: 16px; }
}