@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Nunito', sans-serif;
  background: #eef2f7;
  color: #1f2937;
}

.top-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #f43f5e, #fb7185);
  color: white;
  padding: 12px 16px;
  font-weight: 700;
}

.back-link {
  color: white;
  text-decoration: none;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.hero-card,
.info-card,
.card {
  background: white;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  padding: 20px;
  margin-bottom: 16px;
}

.chip {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

h1 {
  margin: 10px 0 8px;
  font-size: 2rem;
}

.subtitle {
  margin-top: 0;
  color: #6b7280;
}

.tip {
  margin-top: 8px;
  color: #475569;
  font-size: 0.95rem;
}

.hint-toggle {
  margin-top: 10px;
}

.hint-toggle summary {
  cursor: pointer;
  color: #2563eb;
  font-weight: 700;
  list-style: none;
}

.hint-toggle summary::-webkit-details-marker {
  display: none;
}

.hint-text {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef2ff;
  color: #334155;
}

ul {
  padding-left: 18px;
}

li {
  margin: 8px 0;
}

.role-badge {
  display: inline-block;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 12px;
  border-radius: 999px;
  padding: 6px 12px;
}

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

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

.prompt {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

.task-vocab {
  display: inline-block;
  margin: 0 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.95rem;
  font-weight: 800;
  vertical-align: middle;
}

.card {
  display: none;
  border-left: 6px solid #f43f5e;
}

.card.active {
  display: block;
}

.challenge-box {
  border-left: 6px solid #2563eb;
}

.step-indicator {
  font-weight: 700;
  color: #334155;
  margin: 6px 0 12px;
}

.progress-wrap {
  margin-bottom: 14px;
}

.progress-bar {
  background: #e5e7eb;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #f43f5e, #fb7185);
  transition: width 0.3s ease;
}

.button-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn.student {
  background: #db2777;
  color: white;
}

.btn.teacher {
  background: #2563eb;
  color: white;
}

.btn.ghost {
  background: #e5e7eb;
  color: #111827;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.quiz-item {
  border-bottom: 1px solid #e5e7eb;
  padding: 14px 0;
}

.quiz-item:last-of-type {
  border-bottom: 0;
}

.quiz-item label {
  display: block;
  margin: 6px 0;
  color: #334155;
}

.quiz-result {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: #eef2ff;
  color: #1e293b;
  font-weight: 700;
}

.flashcard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.match-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.match-column h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: #1e3a8a;
}

.match-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  font-weight: 700;
  color: #0f172a;
}

.match-option {
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.match-option:hover {
  transform: translateY(-1px);
  border-color: #93c5fd;
}

.match-option.selected {
  background: #dbeafe;
  border-color: #2563eb;
  color: #1e3a8a;
}

.match-option.matched {
  background: #dcfce7;
  border-color: #22c55e;
  color: #166534;
  cursor: default;
}

.match-option.wrong {
  background: #ffe4e6;
  border-color: #f43f5e;
  color: #9f1239;
}

.flashcard {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
}

.flashcard summary {
  cursor: pointer;
  font-weight: 700;
  color: #0f172a;
  list-style: none;
}

.flashcard summary::-webkit-details-marker {
  display: none;
}

.flash-emoji {
  margin-right: 6px;
}

.flash-vi {
  margin: 8px 0 0;
  color: #334155;
}

@media (max-width: 640px) {
  .flashcard-grid,
  .match-grid {
    grid-template-columns: 1fr;
  }
}
