
:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --secondary: #8b5cf6;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --background: #f8fafc;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --text: #1e293b;
  --text-secondary: #64748b;
  --border: rgba(0, 0, 0, 0.1);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --background: #0f172a;
    --surface: #1e293b;
    --surface-hover: #334155;
    --text: #f8fafc;
    --text-secondary: #cbd5e1;
    --border: rgba(255, 255, 255, 0.1);
  }
}

:root[data-theme="dark"] {
  --background: #0f172a;
  --surface: #1e293b;
  --surface-hover: #334155;
  --text: #f8fafc;
  --text-secondary: #cbd5e1;
  --border: rgba(255, 255, 255, 0.1);
}

:root[data-color="purple"] {
  --primary: #8b5cf6;
  --primary-dark: #7c3aed;
  --primary-light: #a78bfa;
}

:root[data-color="pink"] {
  --primary: #ec4899;
  --primary-dark: #db2777;
  --primary-light: #f472b6;
}

:root[data-color="green"] {
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-light: #34d399;
}

:root[data-color="orange"] {
  --primary: #f97316;
  --primary-dark: #ea580c;
  --primary-light: #fb923c;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: var(--background);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Enhanced Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-dark);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Keyframe Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

/* Navigation Styles */
nav {
  background: var(--surface);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.logo i {
  color: var(--primary);
  font-size: 1.8rem;
}

.nav-controls {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.search {
  display: flex;
  align-items: center;
  background: var(--surface-hover);
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-md);
  width: 300px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.search input {
  background: none;
  border: none;
  color: var(--text);
  width: 100%;
  padding-left: 0.8rem;
  font-size: 0.95rem;
  outline: none;
}

.search input::placeholder {
  color: var(--text-secondary);
}

.courses-btn, .tests-btn, .progress-btn, .settings-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}

.settings-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.courses-btn:hover, .tests-btn:hover, .progress-btn:hover, .settings-btn:hover {
  background: var(--surface-hover);
}

.courses-btn.active, .tests-btn.active, .progress-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Mobile Navigation */
.mobile-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--surface);
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  z-index: 99;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  display: none;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.7rem;
  gap: 5px;
  padding: 8px 0;
  width: 25%;
  transition: var(--transition);
}

.mobile-nav-item i {
  font-size: 1.2rem;
}

.mobile-nav-item.active {
  color: var(--primary);
}

/* Dashboard Styles */
main {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.dashboard-header {
  margin-bottom: 2rem;
  animation: fadeIn 0.5s ease-out;
}

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

.dashboard-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

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

.progress-stat {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
}

.progress-stat:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

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

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

/* Content Section Styles */
.content-section {
  display: none;
  animation: fadeIn 0.5s ease-out;
}

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

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

.section-header h2 {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.5rem;
}

.section-header h2 i {
  color: var(--primary);
}

/* Filter Controls */
.filter-controls {
  display: flex;
  align-items: center;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.filter-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.filter-chip:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.filter-chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Continue Learning Section */
.continue-learning {
  margin-bottom: 3rem;
}

.continue-learning h3 {
  font-size: 1.3rem;
  margin-bottom: 1.2rem;
  color: var(--text);
}

.course-progress-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.course-progress-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow);
}

.course-progress-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
}

.course-header {
  display: flex;
  align-items: center;
  background: var(--primary);
  color: white;
  padding: 1rem;
}

.course-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
}

.course-icon i {
  font-size: 1.3rem;
}

.course-info h4 {
  font-size: 1.1rem;
  font-weight: 600;
}

.course-info p {
  font-size: 0.85rem;
  opacity: 0.9;
}

.course-body {
  padding: 1.2rem;
}

.progress-indicator {
  margin-bottom: 1rem;
}

.progress-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.progress-value {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.next-lesson {
  margin-top: 1rem;
}

.next-lesson h5 {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.lesson-link {
  display: flex;
  align-items: center;
  padding: 0.8rem;
  background: var(--surface-hover);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.lesson-link:hover {
  background: var(--primary-light);
  color: white;
}

.lesson-link i {
  margin-right: 0.5rem;
}

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

.course-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
}

.course-thumbnail {
  height: 180px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}

.course-thumbnail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.course-card:hover .course-thumbnail-overlay {
  background: rgba(0, 0, 0, 0.1);
}

.course-content {
  padding: 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-subject {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: var(--surface-hover);
  border-radius: 30px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
}

.course-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.course-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  flex: 1;
}

.course-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.course-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.course-level {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 500;
}

.level-beginner {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.level-intermediate {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.level-advanced {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

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

.test-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow);
}

.test-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
}

.test-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.2rem;
}

.test-card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.test-card-subject {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.test-card-badge {
  padding: 0.4rem 0.8rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 500;
}

.badge-quiz {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.badge-exam {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.badge-practice {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.test-card-details {
  margin-bottom: 1.2rem;
}

.test-card-detail {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.test-card-detail i {
  color: var(--primary);
  font-size: 1.1rem;
}

.test-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 1.2rem;
}

.test-card-status {
  font-size: 0.85rem;
}

.status-completed {
  color: #10b981;
}

.status-not-started {
  color: var(--text-secondary);
}

.test-btn {
  padding: 0.6rem 1.2rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.test-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Progress Dashboard */
.progress-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

.progress-chart-container {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.progress-chart-container h3 {
  margin-bottom: 1.2rem;
  font-size: 1.2rem;
  color: var(--text);
}

.chart-placeholder {
  height: 250px;
  position: relative;
}

.achievements-container, .test-history-container {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.achievements-container h3, .test-history-container h3 {
  margin-bottom: 1.2rem;
  font-size: 1.2rem;
  color: var(--text);
}

.achievements-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.achievement-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: var(--surface-hover);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.achievement-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
}

.achievement-info {
  flex: 1;
}

.achievement-info h4 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.achievement-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.achievement-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.test-history-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.test-history-item {
  display: flex;
  padding: 1rem;
  background: var(--surface-hover);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.test-history-score {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin-right: 1rem;
}

.score-high {
  border-color: #10b981;
  color: #10b981;
}

.score-medium {
  border-color: #f59e0b;
  color: #f59e0b;
}

.score-low {
  border-color: #ef4444;
  color: #ef4444;
}

.test-history-info {
  flex: 1;
}

.test-history-info h4 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.test-history-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.test-history-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  z-index: 1000;
  backdrop-filter: blur(5px);
  overflow-y: auto;
  padding: 20px;
  align-items: flex-start;
  justify-content: center;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 800px;
  margin: 40px auto;
  animation: fadeIn 0.3s ease;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  max-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
}

.modal-header {
  background: var(--surface);
  padding: 1.2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-header h2 {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.3rem;
}

.modal-controls {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.test-timer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-hover);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  color: var(--text);
}

.test-timer i {
  color: var(--primary);
}

.close-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.close-btn:hover {
  background: var(--error);
  color: white;
  border-color: var(--error);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
}

/* Lesson Modal */
.lesson-modal .modal-body {
  padding: 0;
}

.video-container {
  aspect-ratio: 16 / 9;
  background: #000;
  width: 100%;
}

.video-container iframe {
  width: 100%;
  height: 100%;
}

.lesson-content {
  padding: 2rem;
}

.lesson-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.lesson-content p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.lesson-content img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}

.lesson-content ul, .lesson-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.lesson-content li {
  margin-bottom: 0.5rem;
}

.lesson-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.nav-btn {
  padding: 0.8rem 1.5rem;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

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

.lesson-progress {
  font-weight: 500;
  color: var(--text-secondary);
}

.lesson-quiz {
  padding: 2rem;
  border-top: 1px solid var(--border);
}

.lesson-quiz h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.quiz-question {
  margin-bottom: 2rem;
}

.question-text {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.question-image {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.answer-options {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.answer-option {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1rem;
  background: var(--surface-hover);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.answer-option:hover {
  background: rgba(59, 130, 246, 0.1);
}

.answer-option.selected {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid var(--primary);
}

.answer-option input {
  margin-top: 0.3rem;
}

.primary-btn {
  padding: 0.8rem 1.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.primary-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.secondary-btn {
  padding: 0.8rem 1.5rem;
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.secondary-btn:hover {
  background: var(--surface);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.warning-btn {
  padding: 0.8rem 1.5rem;
  background: var(--error);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.warning-btn:hover {
  background: #dc2626;
  transform: translateY(-2px);
}

.lesson-result {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

.result-header {
  margin-bottom: 1.5rem;
}

.result-header i {
  font-size: 3rem;
  color: var(--success);
  margin-bottom: 1rem;
}

.result-header h3 {
  font-size: 1.5rem;
  color: var(--text);
}

.result-score {
  margin-bottom: 1.5rem;
}

.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 8px solid var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--success);
  margin: 0 auto;
}

.score-circle.large {
  width: 150px;
  height: 150px;
  font-size: 2.5rem;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

/* Test Modal Styles */
.test-intro {
  padding: 2rem;
}

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

.test-detail {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.test-detail i {
  font-size: 1.5rem;
  color: var(--primary);
}

.test-detail h4 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.test-detail p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.test-description {
  background: var(--surface-hover);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
}

.test-description p {
  line-height: 1.7;
}

.test-questions {
  padding: 2rem;
}

.question-navigation {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.question-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.question-indicator {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.question-indicator.current {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.question-indicator.answered {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--success);
}

.question-indicator:hover {
  transform: scale(1.1);
}

.question-container {
  margin-bottom: 2rem;
}

.test-navigation {
  display: flex;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.score-breakdown {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1.5rem 0;
}

.score-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.score-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.score-value {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

/* Settings Modal */
.settings-modal .modal-content {
  max-width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
}

.settings-modal {
  padding: 0;
}

.settings-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.settings-tabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 72px;
  z-index: 5;
}

.settings-tabs::-webkit-scrollbar {
  height: 0;
}

.settings-tab {
  padding: 1rem 1.5rem;
  white-space: nowrap;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-tab:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.settings-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.settings-tab-content {
  display: none;
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

.settings-tab-content.active {
  display: block;
}

.settings-section {
  background: var(--surface-hover);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.settings-section h3 {
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.8rem;
}

.setting-item {
  margin-bottom: 1.5rem;
}

.setting-item:last-child {
  margin-bottom: 0;
}

.setting-item label {
  display: block;
  margin-bottom: 0.8rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.setting-item input[type="text"],
.setting-item input[type="email"],
.setting-item select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  transition: var(--transition);
}

.setting-item input[type="text"]:focus,
.setting-item input[type="email"]:focus,
.setting-item select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.theme-options, .color-options {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.theme-option {
  width: 80px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-option:hover {
  transform: translateY(-3px);
}

.theme-preview {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--border);
  position: relative;
  overflow: hidden;
  background: var(--surface);
}

.theme-option.active .theme-preview {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.theme-preview.light {
  background: #f8fafc;
}

.theme-preview.light::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 20px;
  background: #3b82f6;
}

.theme-preview.dark {
  background: #0f172a;
}

.theme-preview.dark::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 20px;
  background: #3b82f6;
}

.theme-preview.system {
  background: linear-gradient(135deg, #f8fafc 50%, #0f172a 50%);
}

.theme-preview.system::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 20px;
  background: #3b82f6;
}

.color-option {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid var(--border);
}

.color-option:hover {
  transform: scale(1.1);
}

.color-option.active {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.setting-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--surface);
  border: 1px solid var(--border);
  transition: .4s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 3px;
  background-color: var(--text-secondary);
  transition: .4s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--primary);
  border-color: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(26px);
  background-color: white;
}

.setting-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.range-slider {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.range-slider input {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--surface);
  appearance: none;
  outline: none;
}

.range-slider input::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
}

.range-slider span {
  font-size: 0.9rem;
  color: var(--text-secondary);
  min-width: 40px;
  text-align: right;
}

/* Notification System */
#notificationContainer {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 350px;
}

.notification {
  padding: 15px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fadeIn 0.3s ease-out;
  background: var(--surface);
  border: 1px solid var(--border);
}

.notification.success {
  border-left: 4px solid var(--success);
}

.notification.error {
  border-left: 4px solid var(--error);
}

.notification.info {
  border-left: 4px solid var(--primary);
}

.notification.warning {
  border-left: 4px solid var(--warning);
}

.notification-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification.success .notification-icon {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.notification.error .notification-icon {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
}

.notification.info .notification-icon {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
}

.notification.warning .notification-icon {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-weight: 600;
  margin-bottom: 3px;
  font-size: 0.95rem;
}

.notification-message {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.notification-close {
  cursor: pointer;
  color: var(--text-secondary);
  padding: 5px;
  transition: var(--transition);
}

.notification-close:hover {
  color: var(--text);
}

/* Media Section Styles */
.media-types {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.media-type-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.media-type-btn:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.media-type-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.media-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.media-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.media-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.media-thumbnail {
  height: 160px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: white;
  font-size: 3rem;
}

.media-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.media-content {
  padding: 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.media-subject {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: var(--surface-hover);
  border-radius: 30px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
}

.media-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.media-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  flex: 1;
}

.watch-btn {
  padding: 0.7rem 1.2rem;
  background: var(--primary);
  border: none;
  color: white;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.watch-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.media-modal .video-container {
  width: 100%;
  background: #000;
}

.video-container.full-width {
  aspect-ratio: 16 / 9;
  margin-bottom: 1.5rem;
}

.media-controls {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.media-action-btn {
  padding: 0.8rem 1.5rem;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.media-action-btn:hover {
  background: var(--primary-light);
  color: white;
  border-color: transparent;
}

.media-loading-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.media-loading-indicator.fade-out {
  opacity: 0;
}

.loading-animation {
  margin-bottom: 1.5rem;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
}

.loading-text {
  text-align: center;
}

.loading-text h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Enhanced Mobile Responsive Styles */
@media (max-width: 768px) {
  nav {
    display: none !important;
  }
  
  .mobile-nav-bar {
    display: flex;
  }
  
  main {
    padding: 1rem;
    padding-bottom: 80px; /* Space for mobile nav */
  }
  
  .progress-overview {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
  }
  
  .stat-value {
    font-size: 1.8rem;
  }
  
  .course-grid, .course-progress-cards, .tests-grid {
    grid-template-columns: 1fr;
  }
  
  .progress-dashboard {
    grid-template-columns: 1fr;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .filter-chips {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }
  
  .filter-chip {
    white-space: nowrap;
  }
  
  .modal-content {
    width: 95%;
    margin: 20px auto;
  }
  
  .settings-tabs {
    overflow-x: auto;
  }
  
  .result-actions {
    flex-direction: column;
  }
  
  .test-info {
    grid-template-columns: 1fr;
  }
  
  .score-breakdown {
    flex-direction: column;
    gap: 1rem;
  }
  
  .media-container {
    grid-template-columns: 1fr;
  }
  
  .media-card {
    max-height: none;
  }
  
  .media-controls {
    flex-direction: column;
  }
  
  .media-action-btn {
    width: 100%;
    justify-content: center;
  }
  
  .media-types {
    flex-wrap: wrap;
  }
  
  .media-type-btn {
    flex: 1;
    min-width: 120px;
  }
  
  .settings-tab-content {
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .mobile-nav-bar {
    display: flex;
  }
  
  #closeMediaBtn, #closeLessonBtn, #closeTestBtn, #closeSettingsBtn {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 480px) {
  .dashboard-header h1 {
    font-size: 1.5rem;
  }
  
  .dashboard-header p {
    font-size: 0.9rem;
  }
  
  .settings-tab-content {
    padding: 1rem;
  }
  
  .setting-actions {
    flex-direction: column;
  }
  
  .modal-header h2 {
    font-size: 1.1rem;
  }
  
  .primary-btn, .secondary-btn, .warning-btn {
    width: 100%;
  }
}

/* Custom Video Player Styles */
.custom-video-player {
  width: 100%;
  position: relative;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: none;
}

.custom-video-container {
  position: relative;
  width: 100%;
}

.custom-video-container video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
}

.custom-video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.custom-video-container:hover .custom-video-controls {
  opacity: 1;
}

.custom-play-btn, .custom-volume-btn, .custom-fullscreen-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.3s ease;
}

.custom-play-btn:hover, .custom-volume-btn:hover, .custom-fullscreen-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.custom-progress {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  cursor: pointer;
  position: relative;
}

.custom-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 5px;
  width: 0%;
  position: relative;
}

.custom-progress-bar::after {
  content: '';
  position: absolute;
  right: -6px;
  top: -3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.custom-progress:hover .custom-progress-bar::after {
  opacity: 1;
}

.custom-time {
  color: white;
  font-size: 0.9rem;
  min-width: 100px;
  text-align: center;
}

.custom-video-info {
  padding: 15px;
  background: var(--surface);
}

.custom-video-info h3 {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 1.2rem;
}

.custom-video-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Netflix-style movie player */
.netflix-controls {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 60%, rgba(0, 0, 0, 0.7) 100%);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  z-index: 5;
  transition: opacity 0.5s ease;
}

.netflix-info {
  margin-bottom: 30px;
}

.netflix-info h3 {
  color: white;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.netflix-metadata {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.netflix-year, .netflix-duration, .netflix-subject {
  color: #ccc;
  font-size: 0.9rem;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.netflix-description {
  color: #ccc;
  font-size: 1rem;
  max-width: 60%;
  line-height: 1.5;
}

.netflix-buttons {
  display: flex;
  gap: 15px;
}

.netflix-play-btn, .netflix-info-btn {
  padding: 12px 25px;
  border-radius: 5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  transition: transform 0.3s ease, background 0.3s ease;
}

.netflix-play-btn {
  background: white;
  color: black;
}

.netflix-info-btn {
  background: rgba(255, 255, 255, 0.3);
  color: white;
}

.netflix-play-btn:hover, .netflix-info-btn:hover {
  transform: scale(1.05);
}

/* Share Dialog Styles */
.share-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(5px);
}

.share-dialog-content {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 30px;
  width: 90%;
  max-width: 500px;
  animation: fadeIn 0.3s ease;
}

.share-dialog-content h3 {
  margin-bottom: 15px;
  color: var(--text);
  font-size: 1.3rem;
}

.share-dialog-content p {
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.share-options {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.share-option {
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.share-option:hover {
  transform: translateY(-3px);
}

.share-option.email {
  background: #ea4335;
  color: white;
}

.share-option.twitter {
  background: #1da1f2;
  color: white;
}

.share-option.facebook {
  background: #1877f2;
  color: white;
}

.share-option.copy {
  background: var(--primary);
  color: white;
}

.share-link {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-hover);
  color: var(--text);
  margin-bottom: 20px;
}

.share-close-btn {
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s ease;
}

.share-close-btn:hover {
  background: var(--surface);
}

/* Enhanced lesson content styles */
.concept-card, .interactive-example, .resources-section {
  background: var(--surface-hover);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid var(--primary);
}

.concept-card h4, .interactive-example h4 {
  color: var(--primary);
  margin-bottom: 0.8rem;
}

.interactive-example {
  border-left-color: var(--success);
}

.interactive-example h4 {
  color: var(--success);
}

.resources-section {
  border-left-color: var(--warning);
  margin-bottom: 2rem;
}

/* Make settings scrollable on mobile */
@media (max-width: 768px) {
  .settings-tab-content {
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Footer Styles */
.site-footer {
  background: var(--surface);
  padding: 2rem 0 1rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding: 0 2rem 2rem;
}

.footer-section h3 {
  color: var(--text);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-section p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.footer-section ul {
  padding: 0;
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-section ul li a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
    padding: 0 1rem 1rem;
  }
  
  .site-footer {
    margin-bottom: 60px; /* Space for mobile nav */
  }
}

/* YouTube-like Video Cards */
.youtube-video-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: var(--transition);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
}

.youtube-video-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--surface-hover);
  overflow: hidden;
}

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

.video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.video-info {
  padding: 12px;
  display: flex;
  gap: 12px;
}

.video-channel-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.video-details {
  flex: 1;
}

.video-title {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.channel-name {
  display: block;
  margin-bottom: 2px;
}

.video-stats {
  display: flex;
  gap: 6px;
}

/* YouTube Video Player Page Styles */
.youtube-video-info {
  padding: 20px;
  background: var(--surface);
  border-radius: var(--radius-md);
  margin-top: 20px;
}

.video-header {
  margin-bottom: 16px;
}

.video-header h2 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.video-channel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.channel-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.channel-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.channel-details h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.channel-details p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.subscribe-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

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

.video-description {
  padding: 16px 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Media Grid Layout */
.media-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

@media (max-width: 768px) {
  .media-container {
    grid-template-columns: 1fr;
  }
  
  .youtube-video-info {
    padding: 16px;
  }
  
  .video-header h2 {
    font-size: 1.1rem;
  }
}

/* Teacher Assignment Styles */
.teacher-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--surface-hover);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.teacher-welcome {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 500;
}

.teacher-welcome i {
  color: var(--primary);
  font-size: 1.3rem;
}

.assignment-action {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.assignment-action:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.assignment-action i {
  font-size: 1rem;
}

.video-assign-btn {
  margin-top: 0.5rem;
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
}

.class-option:hover {
  background: var(--surface-hover);
}

@media (max-width: 768px) {
  .teacher-controls {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .assignment-action {
    font-size: 0.9rem;
    padding: 0.4rem 0.7rem;
  }
  
  .assignments-tabs {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
}

/* Class Code Styles */
.class-code-display {
  background: var(--surface-hover);
  border: 2px dashed var(--primary);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  font-size: 2rem;
  text-align: center;
  letter-spacing: 5px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
  position: relative;
}

.class-code-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.class-code-copy:hover {
  background: var(--primary);
  color: white;
}

.lesson-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.lesson-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  transition: var(--transition);
}

.lesson-item:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

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

.lesson-actions {
  display: flex;
  gap: 0.5rem;
}

.lesson-action-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-hover);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

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

.lesson-action-btn.delete {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
}

.lesson-action-btn.delete:hover {
  background: var(--error);
  color: white;
}

.class-code-input {
  width: 100%;
  padding: 1.2rem;
  font-size: 1.2rem;
  text-align: center;
  letter-spacing: 3px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  margin-bottom: 1rem;
  transition: var(--transition);
}

.class-code-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.student-lesson-item {
  transition: var(--transition);
}

.student-lesson-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.teacher-badge {
  background: var(--primary);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 30px;
  font-size: 0.9rem;
  display: inline-block;
}

/* Mobile-friendly adjustments */
@media (max-width: 768px) {
  .teacher-controls {
    flex-direction: column;
    gap: 1rem;
  }
  
  .teacher-controls > div {
    width: 100%;
  }
  
  .teacher-controls button {
    width: 100%;
  }
  
  .class-code-display {
    font-size: 1.5rem;
    padding: 1rem;
  }
  
  .lesson-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .lesson-actions {
    align-self: flex-end;
  }
}
