/**
 * B1 Sprint — Stylesheet
 * Modern dark theme, mobile-first
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,500;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;600&display=swap');

/* ═══════════════════════════
   RESET & VARIABLES
   ═══════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1c1c1e;
  --surface-3: #2c2c2e;
  --border: #2a2a2a;
  --border-hover: #3a3a3a;

  --text: #f5f5f5;
  --text-2: #8e8e93;
  --text-3: #636366;

  --accent: #30d158;
  --accent-dim: rgba(48, 209, 88, 0.12);
  --blue: #0a84ff;
  --blue-dim: rgba(10, 132, 255, 0.12);
  --purple: #bf5af2;
  --purple-dim: rgba(191, 90, 242, 0.12);
  --amber: #ff9f0a;
  --amber-dim: rgba(255, 159, 10, 0.12);
  --red: #ff453a;
  --red-dim: rgba(255, 69, 58, 0.12);
  --pink: #ff375f;
  --pink-dim: rgba(255, 55, 95, 0.12);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;

  --nav-height: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html { height: 100%; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* ═══════════════════════════
   APP SHELL
   ═══════════════════════════ */

.app {
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 8px);
  min-height: 100vh;
}

/* ═══════════════════════════
   SYNC INDICATOR
   ═══════════════════════════ */

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
  transition: background 0.3s;
  cursor: pointer;
  flex-shrink: 0;
}
.sync-dot.ok      { background: var(--accent); box-shadow: 0 0 8px rgba(48, 209, 88, 0.5); }
.sync-dot.pending { background: var(--amber); animation: pulse 1.5s infinite; }
.sync-dot.error   { background: var(--red); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ═══════════════════════════
   BOTTOM NAV
   ═══════════════════════════ */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--nav-height) + var(--safe-bottom));
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  padding-top: 6px;
  padding-bottom: var(--safe-bottom);
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px 4px;
  gap: 3px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
  border: none;
  background: none;
  -webkit-tap-highlight-color: transparent;
}
.nav-item:active { transform: scale(0.92); }
.nav-item.active { color: var(--accent); }
.nav-item svg { width: 22px; height: 22px; }

/* ═══════════════════════════
   HEADER
   ═══════════════════════════ */

.header {
  padding: 20px 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}
.badge-streak {
  background: linear-gradient(135deg, #2d1a00, #1a1200);
  border: 1px solid #3d2800;
  color: var(--amber);
}
.badge-xp {
  background: linear-gradient(135deg, #0a1a2d, #0a1220);
  border: 1px solid #1a2d4d;
  color: var(--blue);
}

.header-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ═══════════════════════════
   PROGRESS RING
   ═══════════════════════════ */

.day-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px 20px;
}

.progress-ring-wrap {
  position: relative;
  width: 160px;
  height: 160px;
}

.progress-ring { transform: rotate(-90deg); }
.progress-ring circle { fill: none; stroke-width: 6; }
.ring-bg { stroke: var(--surface-2); }
.ring-fill {
  stroke: var(--accent);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 6px rgba(48, 209, 88, 0.3));
}

.ring-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.ring-day {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1;
}
.ring-label {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
}
.ring-phase {
  margin-top: 12px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Day navigation */
.day-nav-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.day-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.day-nav-btn:active { transform: scale(0.9); }
.day-nav-btn:disabled {
  opacity: 0.2;
  cursor: default;
  pointer-events: none;
}
.day-nav-btn svg { width: 20px; height: 20px; }
.day-nav-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--amber);
  font-weight: 500;
}

/* ═══════════════════════════
   SECTIONS & CARDS
   ═══════════════════════════ */

.section {
  padding: 0 16px;
  margin-top: 20px;
}

.section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-left: 4px;
}

/* ── Task Cards ── */

.task-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 14px;
  -webkit-tap-highlight-color: transparent;
}
.task-card:active:not(.completed) {
  transform: scale(0.98);
  border-color: var(--border-hover);
}
.task-card.completed {
  opacity: 0.45;
  cursor: default;
}
.task-card.completed .task-icon {
  background: var(--accent) !important;
  color: #000;
}

.task-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.task-icon.vocab   { background: var(--accent-dim); color: var(--accent); }
.task-icon.grammar { background: var(--blue-dim);   color: var(--blue); }
.task-icon.shadow  { background: var(--purple-dim); color: var(--purple); }
.task-icon.input   { background: var(--amber-dim);  color: var(--amber); }
.task-icon.speak   { background: var(--red-dim);    color: var(--red); }
.task-icon.werte   { background: rgba(255, 255, 255, 0.08); color: #ff453a; }

.task-info { flex: 1; min-width: 0; }
.task-name { font-size: 15px; font-weight: 600; }
.task-desc {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-xp {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--blue);
  font-weight: 600;
  flex-shrink: 0;
}

/* ═══════════════════════════
   SCREENS
   ═══════════════════════════ */

.screen { display: none; }
.screen.active {
  display: block;
  animation: screenIn 0.3s ease;
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Back Bar ── */

.back-bar {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  gap: 12px;
}

.back-btn {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.back-btn:active { opacity: 0.6; }
.back-btn svg { width: 20px; height: 20px; }

/* ═══════════════════════════
   VOCAB PRACTICE
   ═══════════════════════════ */

.vocab-card-area {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 70vh;
  justify-content: center;
}

.vocab-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 380px;
  margin-bottom: 16px;
}

.vocab-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-2);
}

.vocab-review-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--amber);
  background: var(--amber-dim);
  padding: 3px 8px;
  border-radius: 6px;
}

.vocab-progress-bar {
  width: 100%;
  max-width: 380px;
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  margin-bottom: 24px;
  overflow: hidden;
}
.vocab-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.vocab-flashcard {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s, border-color 0.2s;
}
.vocab-flashcard:active {
  transform: scale(0.97);
}

.card-enter {
  animation: cardEnter 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes cardEnter {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.vocab-article {
  font-size: 14px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 8px;
  letter-spacing: 1px;
  text-transform: lowercase;
}
.vocab-word {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 8px;
  word-break: break-word;
}
.vocab-example {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
  font-style: italic;
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  width: 100%;
}
.vocab-translation {
  font-size: 20px;
  color: var(--amber);
  font-weight: 700;
  margin-top: 20px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}
.vocab-translation.show {
  opacity: 1;
  transform: translateY(0);
}
.vocab-hint {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 20px;
}

/* ── Rating Buttons ── */

.vocab-buttons {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  width: 100%;
  max-width: 380px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s 0.1s, transform 0.3s 0.1s;
  pointer-events: none;
}
.vocab-buttons.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.vocab-btn {
  flex: 1;
  padding: 14px 8px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.vocab-btn:active { transform: scale(0.95); }
.vocab-btn.hard  { border-color: var(--red-dim);    color: var(--red); }
.vocab-btn.good  { border-color: var(--accent-dim); color: var(--accent); }
.vocab-btn.easy  { border-color: var(--blue-dim);   color: var(--blue); }

.vocab-btn.hard:active  { background: var(--red-dim); }
.vocab-btn.good:active  { background: var(--accent-dim); }
.vocab-btn.easy:active  { background: var(--blue-dim); }

/* ═══════════════════════════
   GRAMMAR
   ═══════════════════════════ */

.grammar-content { padding: 0 16px 20px; }

.grammar-topic {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
}
.grammar-topic-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.grammar-topic-phase {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 10px;
}
.grammar-example {
  background: var(--surface-2);
  padding: 14px;
  border-radius: var(--radius-sm);
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
}
.grammar-example em {
  color: var(--accent);
  font-style: normal;
  font-weight: 600;
}

/* ═══════════════════════════
   PLAN
   ═══════════════════════════ */

.plan-content { padding: 0 16px 20px; }

.phase-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}
.phase-card.current { border-color: var(--accent); }

.phase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.phase-name { font-size: 16px; font-weight: 700; }
.phase-days {
  font-size: 11px;
  color: var(--text-2);
  font-family: 'JetBrains Mono', monospace;
}
.phase-desc {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 6px;
  line-height: 1.5;
}
.phase-focus {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.phase-tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 600;
}
.phase-tag.green  { background: var(--accent-dim); color: var(--accent); }
.phase-tag.blue   { background: var(--blue-dim);   color: var(--blue); }
.phase-tag.purple { background: var(--purple-dim); color: var(--purple); }
.phase-tag.orange { background: var(--amber-dim);  color: var(--amber); }

/* ═══════════════════════════
   INFO CARDS (Methods, etc.)
   ═══════════════════════════ */

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
}
.info-card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-card-body {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
}
.info-card-body strong { color: var(--text); }

.method-content { padding: 0 16px 20px; }

/* ═══════════════════════════
   STATS
   ═══════════════════════════ */

.stats-content { padding: 0 16px 20px; }

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
}
.stat-number {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -2px;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1;
}
.stat-number.accent { color: var(--accent); }
.stat-number.blue   { color: var(--blue); }
.stat-number.amber  { color: var(--amber); }
.stat-number.purple { color: var(--purple); }

.stat-label {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 6px;
}

/* ── Heatmap ── */

.heatmap {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 3px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.heat-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--surface-2);
}
.heat-cell.l1 { background: rgba(48, 209, 88, 0.15); }
.heat-cell.l2 { background: rgba(48, 209, 88, 0.35); }
.heat-cell.l3 { background: rgba(48, 209, 88, 0.6); }
.heat-cell.l4 { background: var(--accent); }

/* ── Progress Bars ── */

.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.progress-row:last-child { margin-bottom: 0; }
.progress-label {
  font-size: 13px;
  font-weight: 600;
  width: 48px;
  flex-shrink: 0;
}
.progress-track {
  flex: 1;
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-fill.accent { background: var(--accent); }
.progress-fill.blue   { background: var(--blue); }
.progress-fill.purple { background: var(--purple); }
.progress-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-2);
  width: 40px;
  text-align: right;
  flex-shrink: 0;
}

/* ═══════════════════════════
   LOGIN OVERLAY
   ═══════════════════════════ */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.overlay-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  width: 100%;
  max-width: 380px;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.overlay.show .overlay-card {
  transform: scale(1) translateY(0);
}

.overlay-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ── Form Elements ── */

.form-field { margin-bottom: 14px; }
.form-label {
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 6px;
  display: block;
  font-weight: 500;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text-3); }

.form-error {
  color: var(--red);
  font-size: 12px;
  margin-bottom: 8px;
  display: none;
}
.form-error.show { display: block; }

/* ── Buttons ── */

.btn {
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:active { transform: scale(0.97); }
.btn-block { width: 100%; }

.btn-accent  { background: var(--accent); color: #000; }
.btn-surface {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(255, 69, 58, 0.2);
}

.btn + .btn { margin-top: 8px; }

/* ═══════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════ */

#toast-container {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  padding: 0 20px;
  z-index: 500;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}
.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.toast-success { border-color: rgba(48, 209, 88, 0.4);  color: var(--accent); }
.toast-error   { border-color: rgba(255, 69, 58, 0.4);  color: var(--red); }
.toast-info    { border-color: rgba(10, 132, 255, 0.4);  color: var(--blue); }

/* ═══════════════════════════
   CONFIRM MODAL
   ═══════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s;
}
.modal-overlay.show { opacity: 1; }

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 340px;
  transform: scale(0.9);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-overlay.show .modal-card { transform: scale(1); }

.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.modal-message { font-size: 14px; color: var(--text-2); line-height: 1.5; margin-bottom: 20px; }

.modal-actions { display: flex; gap: 10px; }
.modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.modal-btn:active { transform: scale(0.96); }
.modal-btn-cancel { background: var(--surface-2); color: var(--text); }
.modal-btn-confirm { background: var(--accent); color: #000; }

/* ═══════════════════════════
   SCROLLBAR
   ═══════════════════════════ */

::-webkit-scrollbar { width: 0; height: 0; }

/* ═══════════════════════════
   UTILITY
   ═══════════════════════════ */

.hidden { display: none !important; }

/* ═══════════════════════════
   LEARN CARD (Vocab Learn Phase)
   ═══════════════════════════ */

.vocab-phase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 380px;
  margin-bottom: 12px;
}

.vocab-phase-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}
.vocab-phase-badge.learn  { background: var(--accent-dim); color: var(--accent); }
.vocab-phase-badge.quiz   { background: var(--blue-dim);   color: var(--blue); }
.vocab-phase-badge.review { background: var(--amber-dim);  color: var(--amber); }

.learn-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  text-align: center;
}

.learn-article {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  padding: 4px 14px;
  border-radius: 8px;
  margin-bottom: 8px;
}
.learn-word {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 6px;
  word-break: break-word;
}
.learn-translation {
  font-size: 18px;
  color: var(--amber);
  font-weight: 600;
  margin-bottom: 16px;
}
.learn-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}
.learn-section {
  text-align: left;
  margin-bottom: 14px;
}
.learn-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.learn-example-de {
  font-size: 15px;
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
  padding: 10px 14px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}
.learn-example-tr {
  font-size: 13px;
  color: var(--text-2);
  padding: 0 14px;
  line-height: 1.5;
}
.learn-tip {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  padding: 10px 14px;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

/* ═══════════════════════════
   QUIZ
   ═══════════════════════════ */

.quiz-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 22px;
  text-align: center;
}
.quiz-article {
  font-size: 13px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 4px;
}
.quiz-question {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  word-break: break-word;
}
.quiz-label {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 24px;
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quiz-option {
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.quiz-option:active:not(:disabled) { transform: scale(0.98); }
.quiz-option.correct {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}
.quiz-option.wrong {
  border-color: var(--red);
  background: var(--red-dim);
  color: var(--red);
}
.quiz-option:disabled { cursor: default; opacity: 0.7; }
.quiz-option.correct:disabled { opacity: 1; }

.quiz-feedback {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  animation: screenIn 0.2s ease;
}
.quiz-feedback.correct { background: var(--accent-dim); color: var(--accent); }
.quiz-feedback.wrong   { background: var(--red-dim);    color: var(--red); }

.quiz-score {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
}

/* ── Quiz Result ── */

.quiz-result {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
}
.quiz-result-emoji { font-size: 56px; margin-bottom: 12px; }
.quiz-result-score {
  font-size: 36px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
}
.quiz-result-pct {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 4px;
}
.quiz-result-msg {
  font-size: 15px;
  color: var(--text-2);
  margin-top: 16px;
  line-height: 1.5;
}

/* ═══════════════════════════
   GRAMMAR EXERCISES
   ═══════════════════════════ */

.grammar-explanation {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 14px;
  padding: 14px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}
.grammar-explanation em {
  color: var(--accent);
  font-style: normal;
  font-weight: 600;
}
.grammar-explanation strong {
  color: var(--text);
}

.exercise-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  text-align: center;
}
.exercise-sentence {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 8px;
}
.exercise-blank {
  color: var(--accent);
  font-weight: 700;
  border-bottom: 2px dashed var(--accent);
  padding: 0 4px;
}
.exercise-hint {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 20px;
  font-style: italic;
}
.exercise-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.exercise-option {
  padding: 12px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.exercise-option:active:not(:disabled) { transform: scale(0.96); }
.exercise-option.correct {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}
.exercise-option.wrong {
  border-color: var(--red);
  background: var(--red-dim);
  color: var(--red);
}
.exercise-option:disabled { cursor: default; }

/* ═══════════════════════════
   CONTENT SCREENS (Shadow, Input, Speak)
   ═══════════════════════════ */

.content-screen-body {
  padding: 0 16px 20px;
}

.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
}
.content-card.highlight {
  border-color: var(--accent);
}

.content-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.content-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.content-meta {
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 10px;
  font-family: 'JetBrains Mono', monospace;
}
.content-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 16px;
}

.content-steps {
  margin-bottom: 16px;
}
.content-steps-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.content-step {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.content-step:last-child { border-bottom: none; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.content-focus {
  margin-bottom: 16px;
}
.content-focus-text {
  font-size: 14px;
  color: var(--text);
  padding: 10px 14px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  line-height: 1.5;
}

.content-search {
  font-size: 13px;
  color: var(--text-2);
  padding: 12px 14px;
  background: var(--blue-dim);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--blue);
}
.content-search strong {
  color: var(--blue);
}

/* ═══════════════════════════
   DIALOGUE (Speaking)
   ═══════════════════════════ */

.scenario-situation {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 20px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-style: italic;
}

.dialogue-container {
  margin-bottom: 20px;
}

.dialogue-line {
  padding: 12px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
}
.dialogue-line.other {
  background: var(--surface-2);
  border-left: 3px solid var(--text-3);
}
.dialogue-line.you {
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
}

.dialogue-speaker {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.dialogue-line.you .dialogue-speaker { color: var(--accent); }

.dialogue-text-de {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 2px;
}
.dialogue-text-tr {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.4;
}

.key-phrases {
  margin-bottom: 16px;
}
.key-phrase {
  font-size: 13px;
  color: var(--text);
  padding: 8px 12px;
  background: var(--surface-2);
  border-radius: 8px;
  margin-bottom: 6px;
  line-height: 1.4;
}

.challenge-box {
  font-size: 14px;
  color: var(--amber);
  padding: 14px;
  background: var(--amber-dim);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--amber);
  line-height: 1.5;
}
.challenge-box strong {
  color: var(--amber);
}
