/* SATify - Modern CSS Styles */

/* CSS Variables for theming */
:root {
  --primary-color: #0369a1;
  --primary-dark: #025a85;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --bg-color: #f8fafc;
  --surface-color: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #1e293b;
  background-color: var(--bg-color);
  min-height: 100vh;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-content {
  text-align: center;
  color: white;
}

.logo-large {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: pulse 2s infinite;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-left-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 1rem auto;
}

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

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

/* Navigation */
.navbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: #0369a1;
  text-decoration: none;
}

.logo {
  font-size: 1.5rem;
}

.brand-content {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-text {
  font-size: 1.8rem;
  line-height: 1.2;
}

.brand-tagline {
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.85;
  line-height: 1;
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  gap: 1rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: #64748b;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: var(--transition);
  font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
  color: #0369a1;
  background-color: #f1f5f9;
}

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

.nav-user {
  position: relative;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: var(--transition);
  color: var(--text-primary);
}

.user-info:hover {
  background-color: #f1f5f9;
}

.btn-user-menu {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: #64748b;
}

.user-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  min-width: 150px;
  z-index: 200;
}

.user-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: #1e293b;
  text-decoration: none;
  transition: var(--transition);
}

.user-menu a:hover {
  background-color: #f1f5f9;
}

/* Role Toggle Styles */
.role-toggle-container {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.role-toggle-btn {
    padding: 8px 16px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.role-toggle-btn:hover {
    background: #0369a1;
    transform: translateY(-1px);
}

.role-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.role-badge.instructor {
    background: #4f46e5;
    color: white;
}

.role-badge.student {
    background: #059669;
    color: white;
}

/* Role indicator in user menu */
.role-indicator {
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    margin: 4px 8px;
    border-bottom: 1px solid var(--border-color);
}

/* Settings Page Styles */
.settings-header {
    text-align: center;
    margin-bottom: 3rem;
}

.settings-grid {
    display: grid;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.settings-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.settings-section h2 {
    margin: 0 0 20px 0;
    color: #0369a1;
    font-size: 18px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.setting-item label {
    font-weight: 500;
    color: #1e293b;
}

.setting-item select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    min-width: 150px;
}

.setting-item input[type="checkbox"] {
    margin-left: 8px;
    transform: scale(1.2);
}

.settings-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 2rem;
}

/* Main Content */
.main-content {
  min-height: calc(100vh - 64px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

/* Dashboard */
.welcome-section {
  text-align: center;
  margin-bottom: 3rem;
}

.welcome-section h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #0369a1;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.1rem;
  color: #64748b;
}

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

.stat-card {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

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

.stat-icon {
  font-size: 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 50%;
  color: white;
}

.stat-content h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #0369a1;
  margin-bottom: 0.25rem;
}

.stat-content p {
  color: #64748b;
  font-size: 0.9rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.dashboard-section {
  background: #ffffff;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.dashboard-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #1e293b;
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.action-btn:hover {
  border-color: #0369a1;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.action-icon {
  font-size: 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 50%;
  color: white;
}

.action-btn h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #1e293b;
}

.action-btn p {
  color: #64748b;
  font-size: 0.9rem;
}

/* Practice Mode */
.practice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.practice-controls {
  display: flex;
  gap: 1rem;
}

.practice-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.question-panel {
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.question-header {
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.question-number {
  font-weight: 600;
}

.question-type,
.difficulty-badge {
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2rem;
  font-size: 0.8rem;
}

.question-controls {
  display: flex;
  gap: 0.5rem;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 0.5rem;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.3);
}

.question-content {
  padding: 2rem;
  font-size: 1.1rem;
  line-height: 1.7;
}

.answer-choices {
  padding: 0 2rem 2rem;
}

.choice {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
  /* Mobile touch improvements */
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.choice:hover {
  border-color: #0369a1;
  background-color: #f8fafc;
}

.choice.selected {
  border-color: #0369a1;
  background-color: #eff6ff;
}

.choice.correct {
  border-color: #10b981;
  background-color: #ecfdf5;
}

.choice.incorrect {
  border-color: #ef4444;
  background-color: #fef2f2;
}

.choice-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--border-color);
  border-radius: 50%;
  font-weight: 600;
  color: #1e293b;
  margin-right: 1rem;
  flex-shrink: 0;
}

.choice {
  display: flex;
  align-items: center;
}

.choice-content {
  flex: 1;
  line-height: 1.5;
  padding: 0;
  margin: 0;
}

.choice-content p {
  margin: 0;
  padding: 0;
}

.choice.selected .choice-letter {
  background: #0369a1;
  color: white;
}

.choice.correct .choice-letter {
  background: #10b981;
  color: white;
}

.choice.incorrect .choice-letter {
  background: #ef4444;
  color: white;
}

.question-actions {
  padding: 1.5rem 2rem;
  background: #f8fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.btn-primary {
  background: #0369a1;
  color: white;
}

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

.btn-secondary {
  background: #ffffff;
  color: #1e293b;
  border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
  border-color: #0369a1;
  color: #0369a1;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 700;
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: var(--transition);
}

.modal.hidden {
  opacity: 0;
  visibility: hidden;
}

.modal-content {
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

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

.modal-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #64748b;
  padding: 0.25rem;
}

.modal-close:hover {
  color: #1e293b;
}

.modal-body {
  padding: 2rem;
}

/* Authentication Modal - ensure higher z-index than strategy modal */
#authModal {
  z-index: 2000; /* Higher than strategy modal */
}

/* Forms */
.auth-form {
  transition: var(--transition);
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #1e293b;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #0369a1;
  box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.1);
}

.auth-switch {
  text-align: center;
  margin-top: 1rem;
  color: #64748b;
}

.auth-switch a {
  color: #0369a1;
  text-decoration: none;
  font-weight: 600;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2000;
}

.toast {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  padding: 1rem;
  margin-bottom: 0.5rem;
  min-width: 300px;
  opacity: 0;
  transform: translateX(100%);
  transition: var(--transition);
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

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

.toast.error {
  border-left: 4px solid var(--danger-color);
}

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

/* Utility Classes */
.hidden {
  display: none !important;
}

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

.text-primary {
  color: #0369a1;
}

.text-secondary {
  color: #64748b;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    padding: 1rem 0;
    transform: translateY(-100vh);
    transition: transform 0.3s ease;
    z-index: 100;
  }

  .nav-menu.open {
    transform: translateY(0);
  }

  .nav-link {
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  /* Mobile hamburger button */
  .hamburger-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #1e293b;
    padding: 0.5rem;
    border-radius: 4px;
    transition: var(--transition);
    margin-left: auto;
  }

  .hamburger-btn:hover {
    background: var(--border-color);
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .practice-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .question-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .question-actions {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .welcome-section h1 {
    font-size: 2rem;
  }
  
  .stat-card {
    padding: 1rem;
  }
}

/* Words in Context Styles */
.wic-choice {
  cursor: pointer;
  transition: var(--transition);
}

.wic-choice:hover {
  background-color: #f1f5f9;
  border-color: #0369a1;
}

.wic-choice.selected {
  background-color: #dbeafe;
  border-color: #0369a1;
}

.wic-choice.correct {
  background-color: #dcfce7;
  border-color: #10b981;
}

.wic-choice.incorrect {
  background-color: #fee2e2;
  border-color: #ef4444;
}

/* Strategy Panel Styles - Side Panel Design */
.strategy-modal {
  position: fixed;
  top: 0;
  right: 0;
  width: 450px;
  height: 100vh;
  background: #ffffff;
  border-left: 1px solid var(--border-color);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
  overflow-y: auto;
  /* Override default modal styles */
  opacity: 1;
  visibility: visible;
}

.strategy-modal.show {
  transform: translateX(0);
}

.strategy-modal.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateX(100%);
}

.strategy-modal .modal-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: none;
  box-shadow: none;
  border-radius: 0;
  max-width: none;
  max-height: none;
  margin: 0;
  width: 100%;
  position: relative;
}

.strategy-content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

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

.strategy-modal .modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: #1e293b;
}

.strategy-modal .modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #64748b;
  padding: 0.25rem;
  border-radius: 4px;
  transition: var(--transition);
}

.strategy-modal .modal-close:hover {
  background: var(--border-color);
  color: #1e293b;
}

.strategy-pattern {
  background: #f8fafc;
  padding: 1.25rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--primary-color);
}

.strategy-pattern h3 {
  color: #0369a1;
  margin-bottom: 0.5rem;
}

.strategy-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.strategy-step {
  background: white;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  margin-bottom: 1rem;
}

.strategy-step:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.strategy-step h4 {
  color: #1e293b;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.strategy-step h4::before {
  content: "🎯";
  font-size: 1rem;
}

.strategy-step:nth-child(1) h4::before { content: "🔍"; }
.strategy-step:nth-child(2) h4::before { content: "🌉"; }
.strategy-step:nth-child(3) h4::before { content: "🎯"; }
.strategy-step:nth-child(4) h4::before { content: "❌"; }
.strategy-step:nth-child(5) h4::before { content: "✅"; }

.strategy-step p {
  color: #64748b;
  line-height: 1.6;
}

.strategy-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-color);
  position: sticky;
  bottom: 0;
}

/* Answer result styles */
.answer-result {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.answer-result.correct {
  background-color: #dcfce7;
  border: 1px solid var(--success-color);
  color: #166534;
}

.answer-result.incorrect {
  background-color: #fee2e2;
  border: 1px solid var(--danger-color);
  color: #991b1b;
}

.answer-result h4 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

/* Difficulty badge enhancements */
.difficulty-badge.e {
  background-color: var(--success-color);
  color: white;
}

.difficulty-badge.m {
  background-color: var(--warning-color);
  color: white;
}

.difficulty-badge.h {
  background-color: var(--danger-color);
  color: white;
}

/* Toast notifications */
.toast {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin: 0.5rem 0;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 400px;
}

.toast.show {
  transform: translateX(0);
}

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

.toast-error {
  border-left: 4px solid var(--danger-color);
}

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

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

#toastContainer {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10000;
}

/* Strategy button styling */
#wicStrategyBtn {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#wicStrategyBtn:hover {
  background: linear-gradient(135deg, #6d28d9, #9333ea);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* Responsive strategy panel */
@media (max-width: 768px) {
  .strategy-modal {
    width: 100%;
    transform: translateY(100%);
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    height: 70vh;
    border-left: none;
    border-top: 1px solid var(--border-color);
    border-radius: 16px 16px 0 0;
  }

  .strategy-modal.show {
    transform: translateY(0);
  }

  .strategy-modal.hidden {
    transform: translateY(100%);
  }

  .strategy-steps {
    gap: 0.75rem;
  }

  .strategy-step {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .strategy-step h4 {
    font-size: 0.9rem;
  }

  .strategy-actions {
    flex-direction: row;
    padding: 1rem 1.5rem;
  }

  .strategy-content {
    padding: 1rem;
  }

  .modal-header {
    padding: 1rem 1.5rem;
  }

  .modal-header::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin: 0 auto 1rem auto;
  }

  /* Mobile choice improvements */
  .choice {
    padding: 1.25rem !important;
    margin-bottom: 0.75rem !important;
    min-height: 60px !important;
  }

  .choice-letter {
    width: 2.5rem !important;
    height: 2.5rem !important;
    font-size: 1.1rem !important;
    margin-right: 1.25rem !important;
  }

  .choice-content {
    font-size: 1rem !important;
    line-height: 1.4 !important;
  }

  /* Mobile button improvements */
  .question-actions .btn {
    padding: 0.875rem 1.5rem !important;
    font-size: 1rem !important;
    min-height: 48px !important;
  }
}

/* Learn Page Styles */
.learn-header {
  margin-bottom: 2rem;
  text-align: center;
}

.learn-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.learn-header .subtitle {
  font-size: 1.1rem;
  color: #64748b;
}

.skill-categories {
  margin-bottom: 3rem;
}

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

.category-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.category-header p {
  font-size: 1rem;
  color: #64748b;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.skill-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.skill-card.clickable {
  cursor: pointer;
}

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

.skill-card.coming-soon {
  opacity: 0.6;
  cursor: not-allowed;
}

.skill-card.coming-soon:hover {
  transform: none;
  box-shadow: var(--shadow);
}

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

.skill-icon {
  font-size: 2.5rem;
}

.skill-badge {
  background: #0369a1;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.skill-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #1e293b;
}

.skill-card p {
  color: #64748b;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.skill-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: #64748b;
}

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

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

.progress-fill {
  background: #10b981;
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
}

/* Lesson Content Styles */
.lesson-content {
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 500px;
  display: flex;
  flex-direction: column;
}

.lesson-header {
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lesson-progress-header h2 {
  margin: 0;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
}

.lesson-progress-bar {
  background: rgba(255, 255, 255, 0.2);
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.lesson-progress-fill {
  background: white;
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

.lesson-step {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
}

.lesson-slides {
  position: relative;
  flex: 1;
  min-height: 400px;
  background: #ffffff;
}

.lesson-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px);
  transition: all 0.3s ease;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
}

.lesson-slide.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  z-index: 10;
}

/* Reduce padding on first slide for better spacing */
.lesson-slide[data-slide="0"] {
  padding: 1rem 2rem;
}

.slide-content {
  text-align: center;
  color: #1e293b;
}

.slide-content.centered {
  padding: 1rem 0;
}

/* Improve spacing for lesson selection screen */
.published-lesson-list {
  margin: 1.5rem auto !important;
  max-width: 700px !important;
}

.slide-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #1e293b;
}

.slide-content p {
  font-size: 1rem;
  line-height: 1.6;
  color: #1e293b;
  margin-bottom: 1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

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

.slide-indicators {
  display: none;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.indicator.active {
  background: #0369a1;
  transform: scale(1.2);
}

.indicator:hover {
  background: #0369a1;
  opacity: 0.7;
}

.lesson-complete {
  text-align: center;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .skill-card {
    padding: 1.5rem;
  }

  .lesson-slide {
    padding: 1rem;
  }

  /* Reduce padding on first slide for mobile */
  .lesson-slide[data-slide="0"] {
    padding: 0.5rem 1rem;
  }

  .slide-content h3 {
    font-size: 1.2rem;
  }

  .slide-content p {
    font-size: 0.9rem;
  }
}

/* Creator Studio Styles - Professional Design */
.studio-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    background: #fafbfc;
    min-height: calc(100vh - 64px);
}

.studio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e1e5e9;
}

.header-content {
    flex: 1;
}

.studio-title {
    font-size: 28px;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 4px 0;
    letter-spacing: -0.5px;
}

.studio-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    font-weight: 400;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.studio-main {
    display: grid;
    gap: 24px;
}

.studio-section {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
}

.section-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 4px 0;
}

.section-header p {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

.editor-controls {
    display: flex;
    gap: 8px;
}

/* Professional Form Styles */
.creation-form {
    display: grid;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin: 0;
}

.form-select,
.form-input,
.form-textarea {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    background: white;
}

.form-select:focus,
.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-select-small {
    padding: 6px 8px;
    font-size: 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
}

.info-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    margin: 8px 0;
}

.info-panel h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #1e293b;
}

.info-panel p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

/* Professional Button Styles */
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-small,
.btn-success {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.btn-primary:hover:not(:disabled) {
    background: #0369a1;
    border-color: #0369a1;
}

.btn-secondary {
    background: #6b7280;
    color: white;
    border-color: #6b7280;
}

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

.btn-outline {
    background: white;
    color: #374151;
    border-color: #d1d5db;
}

.btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-success {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.btn-success:hover {
    background: #059669;
    border-color: #059669;
}

.btn-small {
    padding: 4px 8px;
    font-size: 11px;
    background: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}

.btn-small:hover {
    background: #e5e7eb;
}

.icon {
    font-size: 12px;
}

.form-actions {
    display: flex;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
    margin-top: 20px;
}

/* Domain Grid */
.domains-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.domain-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s;
}

.domain-card:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.domain-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.domain-card p {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.skills-count {
    font-size: 11px;
    color: #3b82f6;
    font-weight: 500;
    background: #dbeafe;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

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

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #374151;
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0369a1;
    box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input.valid,
.form-group textarea.valid {
    border-color: #10b981;
}

.form-group input.invalid,
.form-group textarea.invalid {
    border-color: var(--error-color);
}

.validation-message {
    font-size: 12px;
    margin-top: 4px;
}

.validation-message.valid {
    color: var(--success-color);
}

.validation-message.invalid {
    color: var(--error-color);
}

.domain-skill-info {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 8px;
    margin-top: 15px;
}

.domain-skill-info h4 {
    margin: 0 0 8px 0;
    color: #0369a1;
}

.domain-skill-info p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.btn-primary {
    background: #0369a1;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: #1e293b;
    border: 2px solid #e2e8f0;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-1px);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-small:hover {
    transform: translateY(-1px);
}

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

.btn-danger:hover {
    background: #dc2626;
}

.lesson-editor {
    display: grid;
    gap: 20px;
}

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

.lesson-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.slides-container {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    min-height: 200px;
}

.slides-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

.slide-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.slide-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.slide-number {
    background: #0369a1;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.slide-title {
    font-weight: 600;
    color: #1e293b;
}

.slide-type {
    background: var(--accent-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 500;
}

.slide-actions {
    display: flex;
    gap: 6px;
}

.slide-editor {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    border: 2px solid #e2e8f0;
}

.slide-edit-form {
    display: grid;
    gap: 16px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.preview-panel {
    max-height: 600px;
    overflow-y: auto;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
}

.lesson-preview h3 {
    color: #0369a1;
    margin: 0 0 16px 0;
}

.lesson-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.lesson-meta span {
    background: var(--bg-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #64748b;
}

.learning-objectives {
    margin-bottom: 24px;
}

.learning-objectives h4 {
    margin: 0 0 8px 0;
    color: #1e293b;
}

.learning-objectives ul {
    margin: 0;
    padding-left: 20px;
}

.learning-objectives li {
    margin-bottom: 4px;
    color: #64748b;
}

.slide-preview {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.slide-preview h4 {
    margin: 0 0 12px 0;
    color: #0369a1;
    font-size: 16px;
}

.slide-content {
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.concept-content p {
    margin: 8px 0;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: #10b981;
}

.notification-error {
    background: var(--error-color);
}

.notification-warning {
    background: #f59e0b;
}

.notification-info {
    background: #0369a1;
}

/* Responsive Design for Creator Studio */
@media (max-width: 768px) {
    .creator-studio-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 16px;
    }

    .studio-section {
        padding: 16px;
    }

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

    .lesson-actions {
        width: 100%;
        justify-content: center;
    }

    .slide-item {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .slide-header {
        width: 100%;
    }

    .slide-actions {
        align-self: flex-end;
    }

    .form-actions {
        flex-direction: column;
    }

    .notification {
        position: fixed;
        top: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
        transform: translateY(-100%);
    }

    .notification.show {
        transform: translateY(0);
    }
}

/* Dark mode support (future enhancement) */

/* ============================================================================
   SKILL PRACTICE STYLES
   ============================================================================ */

/* Skill Practice Page Layout */
.skill-practice-header {
    text-align: center;
    margin-bottom: 2rem;
}

.skill-practice-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.skill-practice-header .subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Practice Mode Selector */
.practice-mode-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.mode-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface-color);
    cursor: pointer;
    transition: var(--transition);
    min-width: 200px;
}

.mode-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.mode-btn.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.mode-icon {
    font-size: 2rem;
}

.mode-info h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
}

.mode-info p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Domains Grid */
.domains-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.domain-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition);
}

.domain-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.domain-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.domain-icon {
    font-size: 2rem;
}

.domain-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.domain-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.domain-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.question-count,
.skill-count {
    background: var(--bg-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    color: var(--text-secondary);
}

/* Skills List (Individual Mode) */
.skills-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-btn {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.skill-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(4px);
}

.skill-title {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.skill-description {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.4;
}

/* Topic Practice Button */
.topic-practice-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
}

.topic-practice-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-arrow {
    font-size: 1.2rem;
    transition: var(--transition);
}

.topic-practice-btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* Practice Session Views */
.practice-session {
    max-width: 800px;
    margin: 0 auto;
}

/* Strategy Phase */
.strategy-phase {
    text-align: center;
    padding: 2rem;
}

.strategy-header {
    margin-bottom: 2rem;
}

.strategy-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.strategy-content {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: left;
}

.strategy-slide {
    margin-bottom: 2rem;
}

.strategy-slide:last-child {
    margin-bottom: 0;
}

.slide-header h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.strategy-steps,
.strategy-points {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.strategy-steps li,
.strategy-points li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.strategy-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Question Phase */
.question-phase .practice-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.session-info h2 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.session-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Question Panel */
.question-panel {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1rem;
}

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

.question-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.question-number {
    font-weight: 600;
    color: var(--text-primary);
}

.question-type {
    background: var(--bg-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    color: var(--text-secondary);
}

.difficulty-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
}

.difficulty-easy {
    background: #dcfce7;
    color: #166534;
}

.difficulty-medium {
    background: #fef3c7;
    color: #92400e;
}

.difficulty-hard {
    background: #fee2e2;
    color: #dc2626;
}

.difficulty-mixed {
    background: #e0e7ff;
    color: #3730a3;
}

.question-controls {
    display: flex;
    gap: 0.5rem;
}

.difficulty-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    align-self: center;
}

.difficulty-select {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    background: #fff;
    font-size: 0.9rem;
}

.btn-icon {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-icon:hover {
    background: var(--bg-color);
    border-color: var(--primary-color);
}

/* Question Content */
.question-content {
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 1rem;
}

.question-content p {
    margin-bottom: 1rem;
}

/* Answer Choices */
.answer-choices {
    margin-bottom: 2rem;
}

.answer-choice {
    margin-bottom: 0.75rem;
    cursor: pointer;
}

.choice-label {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-color);
    cursor: pointer;
    transition: var(--transition);
}

.choice-label:hover {
    border-color: var(--primary-color);
    background: var(--bg-color);
}

.answer-choice.correct .choice-label {
    border-color: var(--success-color);
    background: #f0fdf4;
}

.answer-choice.incorrect .choice-label {
    border-color: var(--danger-color);
    background: #fef2f2;
}

.choice-letter {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.answer-choice.correct .choice-letter {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.answer-choice.incorrect .choice-letter {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

.choice-text {
    flex: 1;
    line-height: 1.5;
}

/* Hide radio buttons */
.answer-choice input[type="radio"] {
    display: none;
}

/* Question Actions */
.question-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Results Phase */
.results-phase {
    text-align: center;
    padding: 2rem;
}

.results-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.results-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.result-stat {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

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

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

.skill-breakdown {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: left;
}

.skill-breakdown h3 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-primary);
}

.skill-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 8px;
}

.skill-info {
    flex: 1;
}

.skill-name {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

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

.skill-progress {
    width: 120px;
    margin-left: 1rem;
}

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

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

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

/* Settings Description */
.setting-description {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {
    .practice-mode-selector {
        flex-direction: column;
        align-items: center;
    }

    .mode-btn {
        width: 100%;
        max-width: 300px;
    }

    .domains-grid {
        grid-template-columns: 1fr;
    }

    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .question-info {
        flex-wrap: wrap;
    }

    .question-actions {
        flex-direction: column;
    }

    .results-overview {
        grid-template-columns: 1fr;
    }

    .skill-result {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .skill-progress {
        width: 100%;
        margin-left: 0;
    }

    .practice-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .session-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ============================================================================
   MODERN LESSON RENDERER STYLES
   ============================================================================ */

.lesson-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--surface-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.lesson-progress .progress-bar {
    width: 200px;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.lesson-progress .progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 60px;
}

.lesson-exit {
    margin-left: 20px;
}

/* Slide Content Styles */
.lesson-content {
    flex: 1;
    margin-bottom: 30px;
}

.lesson-slide {
    background: var(--surface-color);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 23, 42, 0.08);
    min-height: 460px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
}

.slide-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0369a1;
    margin: 0;
    flex: 1;
}

.duration-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    /* White text is safe here - has colored background */
}

.practice-transition-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 240px;
    gap: 16px;
}

.practice-transition-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.practice-transition-action .practice-btn {
    min-width: 220px;
}

.example-hub-content .content-subtitle {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.example-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.example-card {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    padding: 16px;
    text-align: left;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.example-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.example-card.active {
    border-color: var(--primary-color);
    box-shadow: 0 10px 24px rgba(3, 105, 161, 0.2);
}

.example-card-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.example-card-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.example-detail {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 20px;
    background: #fff;
}

.example-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.example-tab {
    border: 1px solid var(--border-color);
    background: transparent;
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.example-tab.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.example-panel {
    display: none;
}

.example-panel.active {
    display: block;
}

.example-stem {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.example-choices {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.example-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.example-choice .choice-letter {
    font-weight: 600;
    color: var(--primary-color);
}

.example-choice.selected {
    border-color: var(--primary-color);
}

.example-choice.correct {
    border-color: var(--success-color);
    box-shadow: 0 0 0 1px var(--success-color);
}

.example-choice.incorrect {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 1px var(--danger-color);
}

.example-feedback {
    margin-top: 16px;
    font-weight: 600;
}

.example-feedback.correct {
    color: var(--success-color);
}

.example-feedback.incorrect {
    color: var(--danger-color);
}

.example-walkthrough .walkthrough-step {
    border-left: 3px solid var(--primary-color);
    padding-left: 15px;
    margin-bottom: 16px;
}

.example-walkthrough ul {
    margin: 10px 0;
    padding-left: 20px;
}

.example-explanation .why-incorrect ul {
    padding-left: 20px;
}

/* Content Type Specific Styles */
.content-heading {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.content-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.objective-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.objective-list li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.5;
}

.objective-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.lesson-overview {
    display: flex;
    gap: 30px;
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color)10, var(--primary-color)20);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

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

.overview-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.overview-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Concept Box */
.concept-box {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.concept-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.concept-points {
    list-style: none;
    padding: 0;
    margin: 0;
}

.concept-points li {
    padding: 8px 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Strategy Steps */
.strategy-steps {
    margin: 25px 0;
}

.strategy-step {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.strategy-step:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.125rem;
    flex-shrink: 0;
    /* White text is safe here - has colored background */
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.step-description {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 10px;
}

.step-example {
    background: #f1f5f9;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
    font-style: italic;
    color: var(--text-secondary);
}

.memory-aid {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    color: #92400e;
}

/* Guided Example Styles */
.passage-container {
    margin: 20px 0;
}

.passage-text {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    line-height: 1.6;
    font-family: Georgia, serif;
    color: var(--text-primary);
}

.guided-questions {
    margin-top: 30px;
}

.guided-question {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.question-header {
    margin-bottom: 15px;
}

.question-step {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-right: 10px;
    /* White text is safe here - has colored background */
}

.question-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: inline;
}

.question-hint {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 12px;
    margin: 10px 0;
    color: #92400e;
}

.question-answer {
    background: #f0fdf4;
    border: 1px solid #10b981;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.answer-explanation {
    margin-top: 10px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Trap Examples */
.trap-examples {
    margin: 20px 0;
}

.trap-example {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.trap-type {
    color: #dc2626;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.trap-description {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.trap-example-text {
    background: rgba(220, 38, 38, 0.1);
    padding: 10px;
    border-radius: 4px;
    border-left: 3px solid #dc2626;
    font-style: italic;
}

/* Summary and Wrap-up */
.summary-points {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.summary-points li {
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.summary-points li::before {
    content: attr(data-emoji);
    position: absolute;
    left: 0;
    font-size: 1.25rem;
}

.next-steps {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #0ea5e9;
    border-radius: 8px;
}

.practice-suggestion {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.confidence-builder {
    color: var(--text-secondary);
    font-style: italic;
}

/* Interactive Elements */
.reveal-trigger, .reveal-answer-btn, .step-reveal-btn {
    margin: 15px 0;
    transition: all 0.2s ease;
}

.reveal-trigger:hover, .reveal-answer-btn:hover, .step-reveal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.2);
}

.reveal-content {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Completion and Celebration */
.completion-celebration {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid var(--success-color);
    border-radius: 12px;
    margin: 20px 0;
}

.celebration-emoji {
    font-size: 3rem;
    margin-bottom: 15px;
}

.celebration-text {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
}

.lesson-completion {
    text-align: center;
    padding: 50px 30px;
}

.completion-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.completion-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
}

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

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Navigation */
.lesson-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: auto;
    padding: 20px;
    background: var(--surface-color);
    border-radius: 12px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.lesson-navigation .btn {
    flex: 1;
    max-width: 200px;
}

/* Error States */
.lesson-error {
    text-align: center;
    padding: 50px 30px;
    color: var(--text-secondary);
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lesson-wrapper {
        padding: 15px;
    }

    .lesson-slide {
        padding: 20px;
    }

    .lesson-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .lesson-progress {
        justify-content: center;
    }

    .overview-item, .completion-stats {
        flex-direction: column;
        gap: 20px;
    }

    .strategy-step {
        flex-direction: column;
        text-align: center;
    }

    .step-number {
        align-self: center;
    }
}

/* Modern Learn Page Enhancements */
.skill-card.has-lessons {
    border-color: var(--success-color);
    background: linear-gradient(135deg, var(--surface-color), #f0fdf4);
}

.skill-card.has-lessons .skill-badge {
    background: var(--success-color);
    color: white;
}

.skill-card.no-lessons {
    opacity: 0.7;
}

.skill-card.no-lessons .skill-badge {
    background: var(--secondary-color);
}

.start-lesson-btn {
    margin-top: 10px;
    width: 100%;
    font-size: 0.875rem;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

.toast-info {
    background: var(--primary-color);
}

.toast-success {
    background: var(--success-color);
}

.toast-error {
    background: var(--danger-color);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================================================
   STRATEGY HINT MODAL
   ============================================================================ */

.strategy-hint-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.strategy-hint-modal:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.strategy-hint-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.strategy-hint-modal .modal-content {
    position: relative;
    background: var(--surface-color);
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 70vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.strategy-hint-modal:not(.hidden) .modal-content {
    transform: scale(1);
}

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

.strategy-hint-modal .modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.strategy-hint-modal .modal-body {
    padding: 1.5rem;
    max-height: 50vh;
    overflow-y: auto;
}

.strategy-hint-modal .modal-body h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.strategy-hint-modal .modal-body ol,
.strategy-hint-modal .modal-body ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.strategy-hint-modal .modal-body li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

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

.strategy-hint-modal .btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    padding: 0.25rem;
}

.strategy-hint-modal .btn-close:hover {
    color: var(--text-primary);
}

/* Lesson Navigation Button */
.lesson-navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lesson-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.lesson-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.lesson-btn .btn-icon {
    font-size: 1rem;
}

/* Enhanced Practice Header */
.practice-header.enhanced {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.practice-header.enhanced .session-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 768px) {
    .strategy-hint-modal .modal-content {
        width: 95%;
        max-height: 80vh;
    }

    .practice-header.enhanced {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .practice-header.enhanced .session-controls {
        width: 100%;
        justify-content: space-between;
    }
}

/* ========================================
   HOMEPAGE COMPACT STYLES
   ======================================== */

/* Compact spacing for homepage to fit single screen */
.welcome-section.compact {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
}

.welcome-section.compact h1 {
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.welcome-section.compact .subtitle {
    margin-bottom: 0;
    font-size: 1rem;
}

.dashboard-grid.compact {
    gap: 1.5rem;
    margin-top: 0;
}

.dashboard-section.compact {
    padding: 1rem;
    margin-bottom: 0;
}

.dashboard-section.compact h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.stats-grid.compact {
    gap: 1rem;
    margin-top: 0;
}

.stat-card.compact {
    padding: 1rem;
}

.stat-card.compact .stat-content h3 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.stat-card.compact .stat-content p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.3;
}

.quick-actions.compact {
    gap: 1rem;
}

.action-btn.compact {
    padding: 1rem;
}

.action-btn.compact h3 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.action-btn.compact p {
    margin: 0;
    font-size: 0.875rem;
}

/* Mobile-specific adjustments for homepage */
@media (max-width: 768px) {
    .welcome-section.compact {
        margin-bottom: 1rem;
        text-align: center;
    }

    .welcome-section.compact h1 {
        font-size: 1.5rem;
    }

    .welcome-section.compact .subtitle {
        font-size: 0.875rem;
        padding: 0 1rem;
    }

    .dashboard-grid.compact {
        gap: 1rem;
        grid-template-columns: 1fr;
    }

    .dashboard-section.compact {
        padding: 0.75rem;
    }

    .stats-grid.compact {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .stat-card.compact {
        padding: 0.75rem;
        text-align: center;
    }

    .quick-actions.compact {
        flex-direction: column;
        gap: 0.75rem;
    }

    .action-btn.compact {
        padding: 0.75rem;
        text-align: left;
    }
}

/* Ensure homepage fits in viewport */
@media (max-height: 800px) {
    .welcome-section.compact {
        margin-bottom: 1rem;
    }

    .dashboard-grid.compact {
        gap: 1rem;
    }

    .dashboard-section.compact {
        padding: 0.75rem;
    }
}

/* Interactive Lessons Styles */
.interactive-lessons-header {
    text-align: center;
    margin-bottom: 2rem;
}

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

.skill-lesson-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition);
    cursor: pointer;
}

.skill-lesson-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

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

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

.skill-level {
    background: var(--bg-color);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.skill-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.skill-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.skill-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.start-lesson-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

@media (max-width: 768px) {
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Worked Example Styles for Lesson Renderer */
.worked-example-container {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--surface-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.worked-example-container .passage-container {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.worked-example-container .passage-text {
    line-height: 1.8;
    color: var(--text-primary);
    font-size: 1rem;
}

.worked-example-container .question-text {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.05rem;
}

/* Choice Items - Base Styles */
.choice-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-color);
    transition: var(--transition);
}

.choice-item .choice-letter {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-primary);
}

.choice-item .choice-text {
    flex: 1;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Interactive Choice Items */
.choice-item.interactive {
    cursor: pointer;
}

.choice-item.interactive:hover {
    border-color: var(--primary-color);
    background: var(--bg-color);
    transform: translateX(2px);
}

.choice-item.interactive:hover .choice-letter {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Non-Interactive (Display Only) Choice Items */
.choice-item.display-only {
    cursor: default;
    opacity: 1;
}

.choice-item.display-only:hover {
    border-color: var(--border-color);
    background: var(--surface-color);
    transform: none;
}

.answer-choices.non-interactive .choice-item {
    cursor: default;
}

.answer-choices.non-interactive .choice-item:hover {
    border-color: var(--border-color);
    background: var(--surface-color);
    transform: none;
}

.answer-choices.non-interactive .choice-letter {
    pointer-events: none;
}

/* Choice States */
.choice-item.correct-choice {
    border-color: var(--success-color);
    background: #f0fdf4;
}

.choice-item.correct-choice .choice-letter {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.choice-item.viewed-choice {
    opacity: 0.7;
}

/* Choice Analysis */
.choice-analysis {
    margin-top: 0.75rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
    font-size: 0.95rem;
}

.choice-analysis .choice-category {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.choice-analysis .choice-flaw {
    margin-bottom: 0.5rem;
    color: var(--danger-color);
}

.choice-analysis .choice-validation {
    color: var(--success-color);
    font-weight: 500;
}

/* Content Subtitle */
.content-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

/* Key Insight */
.key-insight {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    color: #92400e;
    font-weight: 500;
}

/* Guided Practice Styles */
.guided-practice-content .instructions {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 8px;
    font-style: italic;
    color: var(--text-secondary);
}
.form-error {
    display: none;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.6);
    border-radius: 10px;
    color: #b91c1c;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.form-error.visible {
    display: block;
}

/* =====================================================
   ADMIN PANEL STYLES
   ===================================================== */

.admin-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.admin-header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

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

.admin-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

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

.section-header h2 {
    margin: 0;
}

.search-box {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    min-width: 250px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.users-table {
    overflow-x: auto;
}

.users-table table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th,
.users-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.users-table th {
    background: var(--bg-color);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.users-table tbody tr:hover {
    background: #f9fafb;
}

.subscription-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.subscription-badge.free {
    background: #e5e7eb;
    color: #4b5563;
}

.subscription-badge.pro {
    background: #dbeafe;
    color: #1e40af;
}

.subscription-badge.premium {
    background: #fef3c7;
    color: #92400e;
}

.btn-admin-action {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    margin-right: 0.5rem;
    transition: all 0.2s;
}

.btn-view {
    background: #e0e7ff;
    color: #3730a3;
}

.btn-view:hover {
    background: #c7d2fe;
}

.btn-delete {
    background: #fee2e2;
    color: #991b1b;
}

.btn-delete:hover {
    background: #fecaca;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.danger-warning {
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    padding: 1rem;
    border-radius: 6px;
    color: #991b1b;
    font-weight: 500;
}

.role-badge.admin {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        flex-direction: column;
    }

    .search-input {
        min-width: 100%;
    }

    .users-table {
        font-size: 0.9rem;
    }

    .users-table th,
    .users-table td {
        padding: 0.75rem 0.5rem;
    }

    .btn-admin-action {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
}
