/* Vexa Educational Platform - Modern Clean Design */

:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary-color: #10b981;
  --secondary-dark: #059669;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --background: #f9fafb;
  --surface: #ffffff;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --border-color: #e5e7eb;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 0.5rem;
  --radius-lg: 1rem;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

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

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

/* Header */
header {
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.logo span {
  font-size: 1.8rem;
}

nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Dashboard Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.dashboard-header h1 {
  margin-bottom: 0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
  box-sizing: border-box;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

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

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

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

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

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

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

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

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

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-block {
  display: block;
  width: 100%;
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

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

.card-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.card-title {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card-subtitle {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

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

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  font-family: inherit;
  transition: border-color 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* Grid */
.grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  border-radius: var(--radius-lg);
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: white;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Role Selection */
.role-selection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.role-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 3px solid transparent;
}

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

.role-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.role-card h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.role-card p {
  margin-bottom: 1.5rem;
}

/* Dashboard */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.stat-card {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary-color);
}

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

.stat-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Quiz/Assignment List */
.assignment-list {
  list-style: none;
}

.assignment-item {
  background: var(--surface);
  padding: 1.5rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.assignment-info h4 {
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

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

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

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

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

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

.options-list {
  list-style: none;
  margin-top: 1rem;
}

.option-item {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

.option-item input[type="text"] {
  flex: 1;
}

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
  width: auto;
}

/* Video Player Container */
.video-container {
  position: relative;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
}

.video-container video {
  width: 100%;
  display: block;
}

.video-question-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.video-question-overlay.active {
  display: flex;
}

.video-question-content {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
}

/* Quiz Taking Interface */
.quiz-container {
  max-width: 800px;
  margin: 0 auto;
}

.quiz-progress {
  background: var(--surface);
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

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

.timer {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.125rem;
}

.question-card {
  background: var(--surface);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin-bottom: 2rem;
}

.question-text {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.answer-options {
  list-style: none;
}

.answer-option {
  background: var(--background);
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.answer-option:hover {
  border-color: var(--primary-color);
  background: var(--surface);
}

.answer-option.selected {
  background: var(--primary-light);
  border-color: var(--primary-color);
  color: white;
}

.answer-option.correct {
  background: var(--secondary-color);
  border-color: var(--secondary-dark);
  color: white;
}

.answer-option.incorrect {
  background: var(--danger-color);
  border-color: #dc2626;
  color: white;
}

/* Results */
.results-summary {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.score-display {
  font-size: 4rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 1rem 0;
}

.score-message {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.badge-success {
  background: #d1fae5;
  color: var(--secondary-dark);
}

.badge-warning {
  background: #fef3c7;
  color: #d97706;
}

/* Alerts */
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border-left: 4px solid;
}

.alert-info {
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1e40af;
}

.alert-success {
  background: #d1fae5;
  border-color: var(--secondary-color);
  color: var(--secondary-dark);
}

.alert-warning {
  background: #fef3c7;
  border-color: var(--warning-color);
  color: #d97706;
}

.alert-danger {
  background: #fee2e2;
  border-color: var(--danger-color);
  color: #dc2626;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none; }

/* Teacher Dashboard Specific Styles */
.dashboard {
  margin-bottom: 3rem;
}

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

.class-card,
.quiz-card,
.video-card {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  border-left: 4px solid var(--primary-color);
}

.class-card:hover,
.quiz-card:hover,
.video-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.class-card h3,
.quiz-card h3,
.video-card h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.class-card p,
.quiz-card p,
.video-card p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.button-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.form-group-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Results Table */
.results-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.results-table thead {
  background: var(--primary-color);
  color: white;
}

.results-table th,
.results-table td {
  padding: 1rem;
  text-align: left;
}

.results-table tbody tr:nth-child(even) {
  background: var(--background);
}

.results-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .assignment-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .container,
  .container-narrow {
    padding: 1rem;
  }
  
  .form-group-inline {
    grid-template-columns: 1fr;
  }
  
  .results-table {
    font-size: 0.875rem;
  }
  
  .results-table th,
  .results-table td {
    padding: 0.75rem 0.5rem;
  }
}