/* ==========================================
   SIMANGA'S DEUTSCH TRAINER - STYLES
   ========================================== */

:root {
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --secondary: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --dark: #1e293b;
  --darker: #0f172a;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --sidebar-width: 260px;
  --german-gold: #ffcc00;
  --german-red: #dd0000;
  --german-black: #000000;
}

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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--gray-50);
  color: var(--dark);
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
#sidebar {
  width: var(--sidebar-width);
  background: var(--darker);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h1 {
  font-size: 1.3rem;
  font-weight: 800;
}

.sidebar-header h1 span {
  color: var(--german-gold);
}

.exam-date {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-top: 0.3rem;
}

.countdown {
  margin-top: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--german-gold);
}

.nav-sections {
  list-style: none;
  padding: 0.5rem 0;
  flex: 1;
}

.nav-section {
  padding: 0.8rem 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.nav-section:hover {
  background: rgba(255,255,255,0.08);
}

.nav-section.active {
  background: rgba(37, 99, 235, 0.2);
  border-left-color: var(--primary-light);
  color: var(--primary-light);
}

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

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.motivation-quote {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-style: italic;
  line-height: 1.4;
}

/* MAIN CONTENT */
#main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 2rem 2.5rem;
  max-width: 1100px;
}

.section {
  display: none;
}

.section.active {
  display: block;
}

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

.section-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark);
}

.section-header p {
  color: var(--gray-500);
  margin-top: 0.3rem;
}

/* STATS GRID */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  padding: 1.2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid var(--gray-200);
}

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

.stat-label {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 0.3rem;
}

/* EXAM OVERVIEW */
.exam-overview {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid var(--gray-200);
  margin-bottom: 2rem;
}

.exam-overview h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.exam-parts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.exam-part {
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 1rem;
  background: var(--gray-50);
}

.exam-part-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.exam-part-header h4 {
  flex: 1;
  font-size: 1rem;
}

.exam-part-icon {
  font-size: 1.3rem;
}

.exam-time {
  font-size: 0.75rem;
  background: var(--primary);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  font-weight: 600;
}

.exam-part ul {
  list-style: none;
  font-size: 0.82rem;
  color: var(--gray-600);
}

.exam-part ul li {
  padding: 0.2rem 0;
}

.exam-points {
  margin-top: 0.5rem;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--primary);
}

.pass-info {
  margin-top: 1rem;
  padding: 0.8rem;
  background: #fef3c7;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #92400e;
}

/* STUDY PLAN */
.study-plan {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid var(--gray-200);
}

.study-plan h3 {
  margin-bottom: 1rem;
}

.weeks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.week-card {
  padding: 1rem;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.week-card h4 {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.week-card p {
  font-size: 0.82rem;
  opacity: 0.9;
  line-height: 1.5;
}

/* TABS */
.exam-tabs, .vocab-tabs, .verb-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.exam-tab, .vocab-tab, .verb-tab {
  padding: 0.6rem 1.2rem;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.exam-tab:hover, .vocab-tab:hover, .verb-tab:hover {
  border-color: var(--primary-light);
}

.exam-tab.active, .vocab-tab.active, .verb-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.exam-content, .vocab-content, .verb-content {
  display: none;
}

.exam-content.active, .vocab-content.active, .verb-content.active {
  display: block;
}

/* EXAM EXERCISES */
.exam-exercise {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid var(--gray-200);
  margin-bottom: 1.5rem;
}

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

.exercise-header h3 {
  font-size: 1.1rem;
}

.difficulty {
  font-size: 0.75rem;
  background: var(--success);
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
}

.reading-text {
  background: var(--gray-50);
  padding: 1.2rem;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
  line-height: 1.7;
}

.reading-text h4 {
  margin-bottom: 0.3rem;
}

.reading-text p {
  margin-bottom: 0.5rem;
}

.reading-text.transcript {
  border-left-color: var(--secondary);
}

/* QUESTIONS */
.questions {
  margin-bottom: 1rem;
}

.question {
  padding: 0.8rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  transition: all 0.3s;
}

.question p {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.question label {
  display: block;
  padding: 0.3rem 0;
  cursor: pointer;
  font-size: 0.88rem;
}

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

.question.correct {
  background: #d1fae5;
  border-color: var(--success);
}

.question.wrong {
  background: #fee2e2;
  border-color: var(--danger);
}

/* BUTTONS */
.check-btn {
  padding: 0.7rem 1.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  margin-right: 0.5rem;
  margin-top: 0.5rem;
}

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

.check-btn.secondary {
  background: var(--gray-500);
}

.check-btn.secondary:hover {
  background: var(--gray-600);
}

.result-display {
  margin-top: 1rem;
  font-weight: 600;
  font-size: 0.95rem;
}

/* TIP BOX */
.tip-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

.tip-box h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.tip-box p, .tip-box ul {
  font-size: 0.85rem;
  color: var(--gray-700);
  line-height: 1.5;
}

.tip-box ul {
  padding-left: 1.2rem;
}

.tip-box li {
  margin-bottom: 0.3rem;
}

/* STRATEGY BOX */
.strategy-box {
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
}

.strategy-box h4 {
  color: #92400e;
  margin-bottom: 0.5rem;
}

.strategy-box ul {
  font-size: 0.85rem;
  padding-left: 1.2rem;
  color: var(--gray-700);
}

.strategy-box li {
  margin-bottom: 0.4rem;
}

/* AUDIO / HÖREN SECTION */
.audio-player-box {
  background: var(--gray-50);
  border: 2px solid var(--primary);
  border-radius: 12px;
  padding: 1.2rem;
  margin-bottom: 1.5rem;
}

.audio-player-box h4 {
  margin-bottom: 0.3rem;
  color: var(--primary);
}

.hoeren-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.hoeren-tab {
  padding: 0.6rem 1.2rem;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.hoeren-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.hoeren-tab:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

.hoeren-content {
  display: none;
}

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

.hoeren-teil {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 1.2rem;
  margin-bottom: 1.5rem;
}

.hoeren-teil h4 {
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.hoeren-teil p {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 1rem;
}

/* WRITING */
.writing-prompt {
  background: var(--gray-50);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border-left: 4px solid var(--secondary);
}

.writing-prompt ul {
  padding-left: 1.2rem;
  margin: 0.5rem 0;
}

.writing-prompt li {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.writing-rule {
  color: var(--danger);
  font-weight: 600;
  font-size: 0.85rem;
}

.writing-area {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.2s;
}

.writing-area:focus {
  outline: none;
  border-color: var(--primary);
}

.word-counter {
  text-align: right;
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 0.3rem;
}

.example-answer {
  margin-top: 1rem;
}

.example-text {
  background: #d1fae5;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.example-text.hidden {
  display: none;
}

.example-note {
  font-size: 0.82rem;
  color: var(--gray-600);
  margin-top: 0.5rem;
  font-style: italic;
}

.show-example-btn {
  padding: 0.4rem 1rem;
  background: var(--gray-200);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
}

/* SPEAKING */
.speaking-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.speaking-card {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
}

.speaking-card h4 {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 0.3rem;
}

.speaking-card .card-topic {
  font-size: 1.3rem;
  font-weight: 700;
}

.speaking-card .card-hint {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 0.5rem;
}

.speaking-topic {
  background: linear-gradient(135deg, #7c3aed, var(--primary));
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 1rem;
}

.speaking-topic h4 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.topic-prompts {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.topic-prompt {
  background: rgba(255,255,255,0.2);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
}

/* FLASHCARDS */
.flashcard-container {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
  perspective: 1000px;
}

.flashcard {
  width: 400px;
  height: 250px;
  cursor: pointer;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s;
}

.flashcard.flipped {
  transform: rotateY(180deg);
}

.flashcard-front, .flashcard-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.flashcard-front {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.flashcard-back {
  background: white;
  border: 2px solid var(--primary);
  transform: rotateY(180deg);
}

.flashcard-word {
  font-size: 1.8rem;
  font-weight: 700;
}

.flashcard-article {
  font-size: 1rem;
  opacity: 0.8;
  margin-top: 0.3rem;
}

.flashcard-hint {
  font-size: 0.8rem;
  opacity: 0.6;
  margin-top: 1rem;
}

.flashcard-translation {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.flashcard-example {
  font-size: 0.9rem;
  color: var(--gray-600);
  font-style: italic;
  text-align: center;
  line-height: 1.4;
}

.flashcard-plural {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-top: 0.5rem;
}

.flashcard-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.fc-btn {
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.fc-btn.wrong { background: #fee2e2; color: var(--danger); }
.fc-btn.ok { background: #fef3c7; color: #92400e; }
.fc-btn.good { background: #d1fae5; color: #065f46; }
.fc-btn:hover { transform: translateY(-2px); box-shadow: 0 2px 8px rgba(0,0,0,0.15); }

.flashcard-progress {
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray-500);
}

/* VOCAB CONTROLS */
.vocab-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

.vocab-controls label {
  font-size: 0.85rem;
  font-weight: 500;
}

.vocab-controls select {
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--gray-300);
  font-size: 0.85rem;
}

/* QUIZ */
.quiz-container {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid var(--gray-200);
  margin-bottom: 1rem;
}

.quiz-question h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
}

.quiz-option {
  padding: 0.8rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  text-align: center;
}

.quiz-option:hover {
  border-color: var(--primary);
  background: #eff6ff;
}

.quiz-option.selected {
  border-color: var(--primary);
  background: #dbeafe;
}

.quiz-option.correct {
  border-color: var(--success);
  background: #d1fae5;
}

.quiz-option.wrong {
  border-color: var(--danger);
  background: #fee2e2;
}

.quiz-feedback {
  margin-top: 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 1.5rem;
}

.quiz-score {
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-500);
}

/* MATCH GAME */
.match-game {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.match-card {
  padding: 1rem;
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.match-card:hover {
  border-color: var(--primary);
}

.match-card.selected {
  border-color: var(--primary);
  background: #dbeafe;
}

.match-card.matched {
  border-color: var(--success);
  background: #d1fae5;
  cursor: default;
  opacity: 0.7;
}

.match-score {
  text-align: center;
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: 1rem;
}

/* WORDLIST */
.wordlist-search input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

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

.wordlist-table {
  max-height: 600px;
  overflow-y: auto;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
}

.wordlist-entry {
  display: grid;
  grid-template-columns: 200px 1fr;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.85rem;
  align-items: center;
}

.wordlist-entry:nth-child(even) {
  background: var(--gray-50);
}

.wordlist-entry .de {
  font-weight: 600;
}

.wordlist-entry .en {
  color: var(--gray-600);
}

.wordlist-entry .article {
  color: var(--primary);
  font-weight: 400;
}

/* VERBS */
.verb-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.verb-controls label {
  font-size: 0.85rem;
  font-weight: 500;
}

.verb-controls select {
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--gray-300);
}

.conjugation-exercise {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid var(--gray-200);
}

.verb-display {
  text-align: center;
  margin-bottom: 1.5rem;
}

.verb-display h3 {
  font-size: 1.8rem;
  color: var(--primary);
}

.verb-meaning {
  color: var(--gray-500);
  font-size: 0.9rem;
}

.verb-type-badge {
  display: inline-block;
  margin-top: 0.3rem;
  padding: 0.2rem 0.6rem;
  background: var(--gray-100);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-600);
}

.conjugation-table {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.conj-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.conj-pronoun {
  font-weight: 600;
  min-width: 60px;
  font-size: 0.9rem;
}

.conj-input {
  flex: 1;
  padding: 0.4rem 0.7rem;
  border: 2px solid var(--gray-200);
  border-radius: 6px;
  font-size: 0.9rem;
}

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

.conj-input.correct {
  border-color: var(--success);
  background: #d1fae5;
}

.conj-input.wrong {
  border-color: var(--danger);
  background: #fee2e2;
}

/* TENSE CARDS */
.tense-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid var(--gray-200);
  margin-bottom: 1.5rem;
}

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

.tense-formation h4 {
  margin: 1rem 0 0.5rem;
  font-size: 0.9rem;
}

.tense-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.tense-table td {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--gray-200);
}

.tense-table tr:first-child td {
  background: var(--gray-50);
  font-weight: 600;
}

.tense-note {
  font-size: 0.82rem;
  color: var(--gray-600);
  background: #fef3c7;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  margin-top: 0.5rem;
}

/* SENTENCE BUILDER */
.sentence-rule {
  background: white;
  padding: 1.2rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  border: 1px solid var(--gray-200);
}

.sentence-rule h4 {
  margin-bottom: 0.7rem;
  font-size: 0.95rem;
}

.sentence-example {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.pos {
  padding: 0.3rem 0.6rem;
  border-radius: 5px;
  font-size: 0.88rem;
  font-weight: 500;
}

.pos1 { background: #dbeafe; color: #1e40af; }
.pos2 { background: #fecaca; color: #991b1b; font-weight: 700; }
.pos3 { background: #e2e8f0; color: var(--gray-700); }
.pos4 { background: #fde68a; color: #92400e; font-weight: 700; }

.sentence-puzzle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 60px;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.puzzle-word {
  padding: 0.5rem 1rem;
  background: white;
  border: 2px solid var(--gray-300);
  border-radius: 8px;
  cursor: grab;
  font-weight: 500;
  transition: all 0.2s;
  user-select: none;
}

.puzzle-word:hover {
  border-color: var(--primary);
  background: #eff6ff;
}

.puzzle-word.placed {
  background: #dbeafe;
  border-color: var(--primary);
}

.sentence-answer {
  min-height: 50px;
  padding: 0.8rem;
  border: 2px dashed var(--gray-300);
  border-radius: 8px;
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sentence-builder {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid var(--gray-200);
  margin-top: 1.5rem;
}

/* VERB OVERVIEW */
.verb-overview-table {
  background: white;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  overflow-x: auto;
}

.verb-overview-row {
  display: grid;
  grid-template-columns: 130px 130px 130px 130px 1fr;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.82rem;
  align-items: center;
}

.verb-overview-row:first-child {
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 0.8rem;
}

.verb-overview-row:nth-child(even) {
  background: var(--gray-50);
}

.verb-overview-row .irregular {
  color: var(--danger);
  font-weight: 600;
}

/* PHRASES */
.phrase-categories {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.phrase-cat {
  padding: 0.5rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 20px;
  background: white;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.2s;
}

.phrase-cat:hover { border-color: var(--primary-light); }
.phrase-cat.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.phrases-display {
  display: grid;
  gap: 0.7rem;
}

.phrase-item {
  background: white;
  padding: 1rem 1.2rem;
  border-radius: 10px;
  border: 1px solid var(--gray-200);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: center;
}

.phrase-de {
  font-weight: 600;
  font-size: 0.95rem;
}

.phrase-en {
  color: var(--gray-500);
  font-size: 0.88rem;
}

.phrase-context {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: var(--gray-400);
  font-style: italic;
  border-top: 1px solid var(--gray-100);
  padding-top: 0.5rem;
}

/* WRITING TASKS */
.writing-task-selector {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.writing-task-btn {
  padding: 0.6rem 1.2rem;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s;
}

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

/* SPEAKING PROMPTS */
.speaking-prompts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.speaking-prompt-card {
  background: white;
  padding: 1.2rem;
  border-radius: 10px;
  border: 1px solid var(--gray-200);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.speaking-prompt-card h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.prompt-help {
  font-size: 0.82rem;
  color: var(--gray-400);
  font-style: italic;
}

.speaking-tip {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  margin-bottom: 1.5rem;
}

.speaking-tip h3 {
  margin-bottom: 0.7rem;
}

.speaking-tip ul {
  padding-left: 1.2rem;
  font-size: 0.9rem;
  line-height: 1.8;
}

.speaking-exercise {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
}

.speaking-exercise h3 {
  margin-bottom: 0.5rem;
}

.speaking-exercise > p {
  margin-bottom: 1rem;
  color: var(--gray-500);
}

/* FUN ZONE */
.fun-content {
  display: grid;
  gap: 1.5rem;
}

.fun-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid var(--gray-200);
}

.fun-card h3 {
  margin-bottom: 1rem;
}

.song-list {
  list-style: none;
}

.song-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.song-list li strong {
  display: block;
  font-size: 0.9rem;
}

.song-list li p {
  font-size: 0.82rem;
  color: var(--gray-500);
}

.fun-facts {
  font-size: 0.95rem;
  line-height: 1.6;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.compound-game {
  margin-top: 1rem;
}

.compound-prompt {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.compound-word {
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.compound-prompt input {
  padding: 0.5rem 1rem;
  border: 2px solid var(--gray-300);
  border-radius: 8px;
  font-size: 1rem;
}

.compound-result {
  margin-top: 0.5rem;
  font-weight: 600;
}

.motivation-display {
  text-align: center;
  padding: 1.5rem;
}

.big-quote {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary);
  font-style: italic;
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* PLANNING SCENARIO */
.planning-scenario {
  background: var(--gray-50);
  padding: 1.2rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* LEVEL 2 GRAMMAR TRAINER TABS */
.gt-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.gt-tab {
  padding: 0.5rem 0.9rem;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.gt-tab:hover {
  border-color: var(--primary-light);
}

.gt-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.gt-content {
  display: none;
}

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

/* CHEAT BOXES */
.cheat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.cheat-box {
  padding: 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
}

.cheat-box h4 {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.cheat-box ul {
  padding-left: 1rem;
  margin: 0.5rem 0;
}

.cheat-box li {
  margin-bottom: 0.3rem;
}

.cheat-rule {
  margin-top: 0.5rem;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.3rem 0.6rem;
  background: rgba(255,255,255,0.5);
  border-radius: 5px;
  display: inline-block;
}

.cheat-red {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.cheat-blue {
  background: #dbeafe;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.cheat-purple {
  background: #ede9fe;
  border: 1px solid #ddd6fe;
  color: #5b21b6;
}

.cheat-green {
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

/* EXERCISE BOX */
.exercise-box {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid var(--gray-200);
  margin-top: 1.5rem;
}

.exercise-box h3 {
  margin-bottom: 1rem;
}

.exercise-feedback {
  margin-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.l2-hints {
  margin-top: 0.7rem;
  padding: 0.8rem;
  background: #fef3c7;
  border-radius: 8px;
  font-size: 0.82rem;
}

.l2-hints h4 {
  margin-bottom: 0.3rem;
  color: #92400e;
}

.l2-hints ul {
  padding-left: 1rem;
}

.l2-hints li {
  margin-bottom: 0.2rem;
  color: #78350f;
}

/* L2 EXERCISE ITEMS */
.l2-exercise-item {
  padding: 0.8rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  border: 2px solid var(--gray-200);
  background: var(--gray-50);
  transition: all 0.3s;
}

.l2-exercise-item.l2-correct {
  border-color: var(--success);
  background: #d1fae5;
}

.l2-exercise-item.l2-wrong {
  border-color: var(--danger);
  background: #fee2e2;
}

.l2-sentence {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 2;
}

.l2-select {
  padding: 0.3rem 0.6rem;
  border: 2px solid var(--primary-light);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  background: white;
  cursor: pointer;
  margin: 0 0.2rem;
}

.l2-input {
  padding: 0.3rem 0.6rem;
  border: 2px solid var(--primary-light);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.l2-input:focus, .l2-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.l2-informal-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--gray-400);
  margin-top: 0.2rem;
  font-style: italic;
}

.l2-pronunciation {
  font-size: 1.2rem !important;
  letter-spacing: 1px;
}

.l2-error-item {
  border-style: dashed;
}

/* USER VOCAB */
.user-vocab-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 1rem 0;
}

.uv-input {
  padding: 0.6rem 0.8rem;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  font-size: 0.9rem;
}

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

.user-vocab-list {
  margin-top: 1rem;
}

.uv-item {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--gray-100);
  align-items: center;
  font-size: 0.88rem;
}

.uv-de {
  font-weight: 600;
}

.uv-en {
  color: var(--gray-500);
}

.uv-ex {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: var(--gray-400);
  font-style: italic;
}

.uv-delete {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.uv-delete:hover {
  background: #fee2e2;
}

.pronunciation-list {
  list-style: none;
  padding: 0;
  columns: 2;
}

.pronunciation-list li {
  padding: 0.15rem 0;
  font-size: 0.88rem;
}

/* GRAMMAR TABS */
.grammar-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.grammar-tab {
  padding: 0.5rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.82rem;
  transition: all 0.2s;
}

.grammar-tab:hover {
  border-color: var(--primary-light);
}

.grammar-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

#grammar .grammar-content {
  display: none;
}

#grammar .grammar-content.active {
  display: block;
}

/* SPEAKING CARD EXPANSION */
.speaking-card {
  cursor: pointer;
  transition: all 0.3s;
}

.speaking-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.speaking-card.expanded {
  grid-column: span 1;
}

.card-all-hints {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255,255,255,0.3);
  text-align: left;
}

.hint-item {
  padding: 0.3rem 0;
  font-size: 0.85rem;
  opacity: 0.9;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  #sidebar {
    width: 100%;
    position: relative;
    flex-direction: row;
    overflow-x: auto;
  }

  .sidebar-header { display: none; }
  .sidebar-footer { display: none; }

  .nav-sections {
    display: flex;
    padding: 0.5rem;
    gap: 0;
  }

  .nav-section {
    padding: 0.5rem 0.8rem;
    font-size: 0.75rem;
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
  }

  .nav-section.active {
    border-bottom-color: var(--primary-light);
    border-left: none;
  }

  #main-content {
    margin-left: 0;
    padding: 1rem;
  }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .exam-parts { grid-template-columns: 1fr; }
  .weeks-grid { grid-template-columns: 1fr; }
  .quiz-options { grid-template-columns: 1fr; }
  .match-game { grid-template-columns: repeat(3, 1fr); }
  .conjugation-table { grid-template-columns: 1fr; }
  .speaking-cards { grid-template-columns: 1fr; }
  .speaking-prompts { grid-template-columns: 1fr; }
  .verb-overview-row { grid-template-columns: 100px 100px 100px 100px 1fr; font-size: 0.7rem; }

  .flashcard { width: 300px; height: 200px; }
  .flashcard-word { font-size: 1.4rem; }
  .cheat-grid { grid-template-columns: 1fr; }
  .user-vocab-form { grid-template-columns: 1fr; }
  .pronunciation-list { columns: 1; }
}
