:root {
  --primary-color: #2563eb;
  --secondary-color: #7c3aed;
  --accent-color: #10b981;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-color: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

nav {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 1rem 2rem;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

nav h1 {
  font-size: 1.5rem;
}

nav .nav-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

nav a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s;
}

nav a:hover {
  opacity: 0.8;
}

.role-toggle {
  background: rgba(255,255,255,0.2);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid white;
  color: white;
  font-weight: 600;
}

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

.card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.card h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.card h3 {
  color: var(--secondary-color);
  margin: 1.5rem 0 1rem;
  font-size: 1.4rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s;
}

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

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.quiz-container {
  background: var(--bg-color);
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1rem 0;
}

.quiz-question {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

.quiz-options label {
  display: block;
  padding: 0.75rem;
  margin: 0.5rem 0;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

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

.quiz-options input[type="radio"] {
  margin-right: 0.5rem;
}

.feedback {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  font-weight: 600;
}

.feedback.correct {
  background: #d1fae5;
  color: #065f46;
  border-left: 4px solid var(--accent-color);
}

.feedback.incorrect {
  background: #fee2e2;
  color: #991b1b;
  border-left: 4px solid #ef4444;
}

.activity-card {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  padding: 1.5rem;
  border-radius: 12px;
  margin: 1rem 0;
  border-left: 5px solid var(--primary-color);
}

.tool-instructions {
  background: #fef3c7;
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1rem 0;
  border-left: 5px solid #f59e0b;
}

.tool-instructions h4 {
  color: #92400e;
  margin-bottom: 0.5rem;
}

.tool-instructions ol {
  margin-left: 1.5rem;
}

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

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

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

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

.badge-student {
  background: #fce7f3;
  color: #9f1239;
}

.collapsible {
  cursor: pointer;
  padding: 1rem;
  background: var(--bg-color);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  margin: 0.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.collapsible:hover {
  background: #e0e7ff;
}

.collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 1rem;
}

.collapsible-content.active {
  max-height: 2000px;
  padding: 1rem;
}

.teacher-only {
  border: 2px dashed #3b82f6;
  background: #eff6ff;
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

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

th {
  background: var(--primary-color);
  color: white;
  font-weight: 600;
}

@media (max-width: 768px) {
  nav .nav-container {
    flex-direction: column;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .container {
    padding: 0 1rem;
  }
}
