@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Playfair+Display:wght@400;600;700&family=Source+Sans+3:wght@400;500;600&display=swap');

:root {
  --bg: #FAF7F2;
  --card: #FFFFFF;
  --warm: #F0EBE0;
  --red: #C0392B;
  --gold: #B8860B;
  --blue: #2C5F8A;
  --green: #27764E;
  --purple: #8E44AD;
  --text: #1A1A1A;
  --text-secondary: #666;
  --text-dim: #999;
  --border: #E0DCD4;
}

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

html { scroll-behavior: smooth; }

[id] { scroll-margin-top: 70px; }

body {
  font-family: 'Source Sans 3', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Navigation */
nav {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 12px 0;
}

nav .container {
  display: flex;
  gap: 24px;
  justify-content: center;
}

nav a {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

nav a:hover { color: var(--text); }
nav a.active { color: var(--red); border-bottom-color: var(--red); }

/* Typography */
h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 6vw, 42px);
  font-weight: 700;
  line-height: 1.2;
}

h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 600;
  margin-bottom: 16px;
}

h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--red);
}

.highlight { color: var(--red); }

/* Header */
header {
  text-align: center;
  padding: 48px 0 32px;
}

header .label { margin-bottom: 12px; }

header p {
  font-style: italic;
  color: var(--text-secondary);
  margin-top: 16px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.divider {
  border: none;
  border-top: 1px solid var(--text);
  margin: 24px 0;
}

.divider.double {
  border-top: 3px double var(--text);
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 16px;
  animation: fadeIn 0.4s ease;
}

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

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.card-grid .card {
  text-align: center;
  margin-bottom: 0;
}

.card-grid .card h3 { font-size: 18px; }
.card-grid .card p { font-size: 14px; color: var(--text-secondary); margin: 12px 0 16px; }

/* Buttons */
.btn {
  display: inline-block;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border: 2px solid var(--text);
  background: transparent;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn:hover {
  background: var(--text);
  color: var(--bg);
}

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

.btn.primary:hover {
  background: #a33325;
  border-color: #a33325;
}

/* Quote */
blockquote {
  border-left: 3px solid var(--red);
  padding-left: 20px;
  margin: 24px 0;
  font-style: italic;
  color: var(--text-secondary);
}

blockquote strong { color: var(--text); font-style: normal; }

/* Stats */
.stats {
  text-align: center;
  padding: 24px;
  background: var(--warm);
  margin: 32px 0;
}

.stats-number {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--red);
}

/* Quiz Styles */
.quiz-container { padding: 32px 0; }

.progress-bar {
  height: 4px;
  background: var(--border);
  margin-bottom: 32px;
}

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

.question-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 32px 24px;
  animation: fadeIn 0.4s ease;
}

.question-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.question-type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 2px;
  display: inline-block;
  margin-bottom: 16px;
}

.question-type.knowledge { background: var(--blue); color: white; }
.question-type.opinion { background: var(--purple); color: white; }

.question-text {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 24px;
  line-height: 1.4;
}

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

.answer-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  background: white;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 15px;
}

.answer-btn:hover { border-color: var(--text); }

.answer-btn.selected {
  border-color: var(--red);
  background: rgba(192, 57, 43, 0.05);
}

.answer-btn.correct {
  border-color: var(--green);
  background: rgba(39, 118, 78, 0.1);
}

.answer-btn.incorrect {
  border-color: var(--red);
  background: rgba(192, 57, 43, 0.1);
}

.answer-btn.disabled { pointer-events: none; opacity: 0.7; }

.answer-letter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.explanation {
  margin-top: 24px;
  padding: 20px;
  background: var(--warm);
  border-left: 3px solid var(--green);
  display: none;
  animation: fadeIn 0.3s ease;
}

.explanation.show { display: block; }
.explanation h4 { font-size: 14px; margin-bottom: 8px; color: var(--green); }
.explanation p { font-size: 14px; color: var(--text-secondary); }

/* Live Results */
.live-results {
  margin-top: 24px;
  padding: 20px;
  background: var(--warm);
  display: none;
  animation: fadeIn 0.3s ease;
}

.live-results.show { display: block; }

.live-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.live-header span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--red);
}

.result-bar {
  margin-bottom: 12px;
}

.result-bar-label {
  font-size: 13px;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}

.result-bar-track {
  height: 8px;
  background: var(--border);
}

.result-bar-fill {
  height: 100%;
  background: var(--red);
  transition: width 0.5s ease;
}

.quiz-nav {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

/* Results */
.results-card {
  text-align: center;
  padding: 48px 24px;
}

.score {
  font-family: 'Playfair Display', serif;
  font-size: 64px;
  font-weight: 700;
  color: var(--red);
}

.score-label {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.group-summary {
  text-align: left;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.group-member {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.group-member .name { font-weight: 600; }
.group-member .position { color: var(--text-secondary); }
.group-member .contra { color: var(--green); }
.group-member .pro { color: var(--gold); }

/* Table of Contents */
.toc {
  background: var(--warm);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 32px;
}

.toc h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.toc ol {
  list-style: none;
  counter-reset: toc;
}

.toc > ol > li {
  counter-increment: toc;
  margin-bottom: 8px;
}

.toc > ol > li::before {
  content: counter(toc) ".";
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--red);
  margin-right: 8px;
}

.toc a {
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}

.toc a:hover {
  color: var(--red);
}

.toc ul {
  list-style: none;
  margin: 8px 0 8px 24px;
}

.toc ul li {
  margin-bottom: 4px;
}

.toc ul a {
  font-size: 14px;
  color: var(--text-secondary);
}

.toc ul a:hover {
  color: var(--red);
}

/* Vertiefung Page */
.vertiefung-content {
  padding: 32px 0 64px;
}

.vertiefung-content p {
  margin-bottom: 16px;
  font-size: 17px;
  line-height: 1.8;
}

.philosopher-card {
  margin: 32px 0;
  border: 1px solid var(--border);
  background: var(--card);
}

.philosopher-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
}

.philosopher-color {
  width: 4px;
  height: 48px;
  flex-shrink: 0;
}

.philosopher-color.kant { background: var(--gold); }
.philosopher-color.camus { background: var(--red); }
.philosopher-color.schreiber { background: var(--blue); }
.philosopher-color.beccaria { background: var(--green); }

.philosopher-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

.philosopher-body {
  padding: 24px;
}

.philosopher-body h4 {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 24px 0 12px;
}

.philosopher-body h4:first-child { margin-top: 0; }

.philosopher-body p {
  font-size: 15px;
  line-height: 1.7;
}

.assessment {
  margin-top: 24px;
  padding: 16px;
  background: var(--warm);
  border-left: 3px solid var(--green);
}

.assessment h4 {
  color: var(--green);
  margin: 0 0 8px 0;
}

.assessment p { margin: 0; font-size: 14px; }

/* Arguments Grid */
.arguments-section {
  margin: 48px 0;
}

.arguments-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

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

.arguments-col h3 {
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid;
}

.arguments-col.pro h3 { border-color: var(--gold); color: var(--gold); }
.arguments-col.contra h3 { border-color: var(--green); color: var(--green); }

.arguments-col ul {
  list-style: none;
}

.arguments-col li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.6;
}

.arguments-col li strong {
  display: block;
  margin-bottom: 4px;
}

/* Table */
.table-wrapper {
  overflow-x: auto;
  margin: 24px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

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

th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--warm);
}

/* Plakat Page */
.plakat-content {
  padding: 32px 0;
  text-align: center;
}

.pdf-container {
  margin: 24px 0;
  border: 1px solid var(--border);
  background: var(--card);
}

.pdf-container embed,
.pdf-container iframe {
  display: block;
  width: 100%;
  height: 70vh;
  min-height: 500px;
}

.plakat-note {
  font-size: 14px;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 24px;
}

/* Footer */
footer {
  text-align: center;
  padding: 32px 16px;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

footer p {
  font-size: 13px;
  color: var(--text-dim);
}
