/*
 * -------------------------------------------------------------------------------
 * Author: Mohamed Salem (Expert AI Engineer & Automation Architect)
 * Focus: AI Engineering | Automation | Agentic Systems
 * Copyright (c) 2026. All Rights Reserved.
 * -------------------------------------------------------------------------------
 * C# Weekly Study Tracker — Stylesheet
 * -------------------------------------------------------------------------------
 */

/* ===== CSS VARIABLES & RESET ===== */
:root {
  --bg-primary: #0a0c14;
  --bg-secondary: #111420;
  --bg-card: #161b2e;
  --bg-card-hover: #1c2240;
  --accent-purple: #6C63FF;
  --accent-cyan: #3ECFCF;
  --accent-gold: #f5a623;
  --accent-green: #36d399;
  --accent-red: #ff6b6b;
  --text-primary: #e8eaf6;
  --text-secondary: #8b92b8;
  --text-muted: #4a5080;
  --border-color: #1e2540;
  --border-glow: rgba(108, 99, 255, 0.3);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(108, 99, 255, 0.15);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-main: 'Cairo', sans-serif;
  --font-code: 'Fira Code', monospace;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(108, 99, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(62, 207, 207, 0.05) 0%, transparent 60%);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-purple); border-radius: 3px; }

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 2rem;
  height: 72px;
  display: flex;
  align-items: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}

.header-bg {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 20, 0.85);
  z-index: -1;
}

.header-content {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-icon {
  filter: drop-shadow(0 0 12px rgba(108, 99, 255, 0.5));
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-code);
  letter-spacing: 0.5px;
}

.logo-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.header-progress-summary {
  display: flex;
  align-items: center;
  gap: 14px;
}

.progress-ring-wrap {
  position: relative;
  width: 60px;
  height: 60px;
}

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

.ring-bg {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 4;
}

.ring-fill {
  fill: none;
  stroke: url(#ringGrad);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 150.8;
  stroke-dashoffset: 150.8;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.ring-percent {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-purple);
  font-family: var(--font-code);
}

.summary-text {
  display: flex;
  flex-direction: column;
}

.summary-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.summary-detail {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ===== DAY NAVIGATION ===== */
.day-nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0 2rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.day-nav::-webkit-scrollbar { height: 3px; }

.day-nav-inner {
  display: flex;
  gap: 4px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 0;
}

.day-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  min-width: 90px;
  color: var(--text-muted);
}

.day-btn:hover {
  background: rgba(108, 99, 255, 0.1);
  color: var(--text-secondary);
}

.day-btn.active {
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.2), rgba(62, 207, 207, 0.1));
  color: var(--accent-purple);
  border: 1px solid rgba(108, 99, 255, 0.3);
}

.day-btn.completed {
  color: var(--accent-green);
}

.day-btn.completed .day-check {
  opacity: 1;
}

.day-num {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
}

.day-label {
  font-size: 0.7rem;
  font-weight: 500;
}

.day-check {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-green);
  color: white;
  font-size: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  opacity: 0;
  transition: var(--transition);
}

/* ===== MAIN LAYOUT ===== */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 24px;
  max-width: 1400px;
  margin: 24px auto;
  padding: 0 2rem 3rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .main-layout { grid-template-columns: 1fr; }
}

/* ===== LEFT PANEL ===== */
.left-panel { display: flex; flex-direction: column; gap: 20px; }

/* Day Title Card */
.day-title-card {
  background: linear-gradient(135deg, var(--bg-card), #1a2040);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
}

.day-title-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.day-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  border-radius: 20px;
  background: linear-gradient(90deg, rgba(108, 99, 255, 0.2), rgba(62, 207, 207, 0.2));
  border: 1px solid rgba(108, 99, 255, 0.3);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.day-heading {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  line-height: 1.2;
}

.day-time-range {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Video Wrapper */
.video-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.video-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  background: rgba(255,255,255,0.02);
}

.iframe-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 0.8rem;
  color: var(--accent-gold);
  background: rgba(245, 166, 35, 0.06);
  border-top: 1px solid rgba(245, 166, 35, 0.15);
}

/* Topics Card */
.topics-card, .summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.topics-card:hover, .summary-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.topics-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.topic-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
  border: 1px solid transparent;
  transition: var(--transition);
  animation: slideInRight 0.4s ease forwards;
  opacity: 0;
}

.topic-item:nth-child(1) { animation-delay: 0.05s; }
.topic-item:nth-child(2) { animation-delay: 0.1s; }
.topic-item:nth-child(3) { animation-delay: 0.15s; }
.topic-item:nth-child(4) { animation-delay: 0.2s; }
.topic-item:nth-child(5) { animation-delay: 0.25s; }

.topic-item:hover {
  background: rgba(108, 99, 255, 0.08);
  border-color: rgba(108, 99, 255, 0.2);
}

.topic-icon {
  font-size: 1.2rem;
  min-width: 28px;
  text-align: center;
}

.topic-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  flex: 1;
}

.topic-tag {
  font-family: var(--font-code);
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(108, 99, 255, 0.12);
  color: var(--accent-purple);
  border: 1px solid rgba(108, 99, 255, 0.2);
}

/* Summary Card */
.summary-body {
  font-size: 0.9rem;
  line-height: 1.9;
  color: var(--text-secondary);
}

.summary-body p { margin-bottom: 10px; }
.summary-body code {
  font-family: var(--font-code);
  font-size: 0.82rem;
  background: rgba(108, 99, 255, 0.1);
  color: var(--accent-cyan);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(108, 99, 255, 0.15);
}

.summary-body .highlight {
  color: var(--accent-gold);
  font-weight: 600;
}

/* ===== RIGHT PANEL ===== */
.right-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 4px;
}

.right-panel::-webkit-scrollbar { width: 4px; }

/* Day Progress Card */
.day-progress-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.day-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.day-progress-bar {
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.day-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
  width: 0%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-steps {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border-color);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--font-code);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.step-dot.active {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  color: white;
}

.step-dot.done {
  background: var(--accent-green);
  color: white;
}

/* Sections */
.quiz-section, .tasks-section, .challenge-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px 22px;
  box-shadow: var(--shadow-card);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.title-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.quiz-icon { background: rgba(108, 99, 255, 0.15); }
.task-icon { background: rgba(245, 166, 35, 0.15); }
.code-icon { background: rgba(62, 207, 207, 0.15); }

/* Quiz */
.quiz-container { display: flex; flex-direction: column; gap: 22px; margin-bottom: 16px; }

.quiz-question {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  animation: fadeInUp 0.4s ease forwards;
  opacity: 0;
}

.quiz-question:nth-child(1) { animation-delay: 0.05s; }
.quiz-question:nth-child(2) { animation-delay: 0.1s; }
.quiz-question:nth-child(3) { animation-delay: 0.15s; }

.question-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
  line-height: 1.6;
}

.question-num {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-purple);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  line-height: 24px;
  margin-left: 8px;
}

.options-list { display: flex; flex-direction: column; gap: 8px; }

.option-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.option-label:hover {
  background: rgba(108, 99, 255, 0.08);
  border-color: rgba(108, 99, 255, 0.25);
  color: var(--text-primary);
}

.option-label input[type="radio"] { display: none; }

.option-label.selected {
  background: rgba(108, 99, 255, 0.12);
  border-color: var(--accent-purple);
  color: var(--text-primary);
}

.option-label.correct {
  background: rgba(54, 211, 153, 0.1);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.option-label.wrong {
  background: rgba(255, 107, 107, 0.08);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.option-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  min-width: 18px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.option-label.selected .option-indicator {
  border-color: var(--accent-purple);
  background: var(--accent-purple);
}

.option-label.selected .option-indicator::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
}

/* Quiz Result */
.quiz-result {
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  animation: fadeInUp 0.3s ease;
}

.quiz-result.success {
  background: rgba(54, 211, 153, 0.1);
  border: 1px solid rgba(54, 211, 153, 0.3);
  color: var(--accent-green);
}

.quiz-result.partial {
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.3);
  color: var(--accent-gold);
}

.quiz-result.fail {
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.25);
  color: var(--accent-red);
}

.hidden { display: none !important; }

/* Tasks */
.tasks-container { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
  animation: slideInRight 0.4s ease forwards;
  opacity: 0;
}

.task-item:nth-child(1) { animation-delay: 0.05s; }
.task-item:nth-child(2) { animation-delay: 0.1s; }
.task-item:nth-child(3) { animation-delay: 0.15s; }

.task-item:hover {
  background: rgba(245, 166, 35, 0.06);
  border-color: rgba(245, 166, 35, 0.2);
}

.task-item.done {
  background: rgba(54, 211, 153, 0.06);
  border-color: rgba(54, 211, 153, 0.2);
}

.task-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--text-muted);
  min-width: 20px;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 0.65rem;
  color: white;
}

.task-item.done .task-checkbox {
  background: var(--accent-green);
  border-color: var(--accent-green);
}

.task-item.done .task-checkbox::after { content: '✓'; }

.task-content { flex: 1; }

.task-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.4;
}

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

.task-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.task-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid;
  white-space: nowrap;
}

.badge-easy { color: var(--accent-green); border-color: rgba(54,211,153,0.3); background: rgba(54,211,153,0.08); }
.badge-medium { color: var(--accent-gold); border-color: rgba(245,166,35,0.3); background: rgba(245,166,35,0.08); }
.badge-hard { color: var(--accent-red); border-color: rgba(255,107,107,0.3); background: rgba(255,107,107,0.08); }

/* Challenge */
.challenge-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(62, 207, 207, 0.15);
  border-radius: var(--radius-md);
  padding: 16px;
}

.challenge-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.6;
}

.challenge-code {
  font-family: var(--font-code);
  font-size: 0.78rem;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--accent-cyan);
  overflow-x: auto;
  line-height: 1.7;
  white-space: pre;
}

.challenge-hint {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 24px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-purple), #8b5cf6);
  color: white;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.3);
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108, 99, 255, 0.45);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 24px;
  border: 1px solid rgba(54, 211, 153, 0.4);
  border-radius: var(--radius-md);
  background: rgba(54, 211, 153, 0.08);
  color: var(--accent-green);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: rgba(54, 211, 153, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(54, 211, 153, 0.2);
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: linear-gradient(135deg, var(--bg-card), #1a2040);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  padding: 40px 48px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  box-shadow: 0 20px 80px rgba(108, 99, 255, 0.3);
}

.modal-emoji {
  font-size: 3.5rem;
  margin-bottom: 16px;
  animation: bounce 0.6s ease 0.2s;
}

.modal-title {
  font-size: 1.6rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.modal-body {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.modal-stars {
  font-size: 1.5rem;
  margin-bottom: 24px;
  letter-spacing: 4px;
}

.modal-btn { margin-top: 0; }

/* ===== COMPLETION SCREEN ===== */
.completion-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.completion-content { text-align: center; max-width: 600px; }

.completion-emoji {
  font-size: 5rem;
  margin-bottom: 24px;
  animation: float 3s ease-in-out infinite;
}

.completion-title {
  font-size: 2.2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-purple), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  line-height: 1.3;
}

.completion-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.7;
}

.completion-stats {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 36px;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 20px 30px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-size: 2rem;
  font-weight: 900;
  font-family: var(--font-code);
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(108, 99, 255, 0.2); }
  50% { box-shadow: 0 0 40px rgba(108, 99, 255, 0.4); }
}

/* SVG gradient defs (hidden) */
body::before {
  content: '';
  position: fixed;
  pointer-events: none;
  opacity: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .main-layout { padding: 0 1rem 3rem; gap: 16px; }
  .day-heading { font-size: 1.5rem; }
  .site-header { padding: 0 1rem; }
  .day-nav { padding: 0 1rem; }
  .completion-stats { flex-direction: column; align-items: center; }
  .modal-box { padding: 28px 24px; }
  .right-panel { position: static; max-height: unset; }
}

/* ===== LTR / ENGLISH FIXES FOR RTL LAYOUT ===== */
code, pre, .challenge-code, .topic-tag, .logo-title, .logo-sub {
  direction: ltr;
  unicode-bidi: isolate;
}

code {
  display: inline-block;
}

pre, .challenge-code {
  display: block;
  text-align: left;
}
