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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f0f2f5;
  height: 100vh;
  overflow: hidden;
}

/* ── App shell ── */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ── Navbar ── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 48px;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  font-size: 13px;
  flex-shrink: 0;
}

.navbar-brand {
  font-weight: 600;
  font-size: 14px;
  color: #111;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.navbar-nav button {
  background: none;
  border: none;
  padding: 6px 12px;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  border-radius: 6px;
}

.navbar-nav button:hover { background: #f3f4f6; color: #111; }
.navbar-nav button.active { color: #111; font-weight: 500; }

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #374151;
}

.score-badge { font-weight: 600; }

.gear-icon {
  color: #9ca3af;
  cursor: pointer;
  font-size: 16px;
}

/* ── Main layout ── */
.main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
  width: 160px;
  background: white;
  border-right: 1px solid #e5e7eb;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar-item:hover { background: #f3f4f6; color: #111; }
.sidebar-item.active { background: #f3f4f6; color: #111; font-weight: 500; }

.sidebar-icon { font-size: 15px; width: 18px; }

/* ── Content area ── */
.content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 24px;
  overflow-y: auto;
}

/* ── Pages ── */
.page { display: none; width: 100%; flex-direction: column; align-items: center; justify-content: center; }
.page.active { display: flex; }

/* ── Progress bar ── */
.progress-bar-container {
  width: 100%;
  max-width: 480px;
  margin-bottom: 12px;
}

.progress-bar-track {
  background: #e5e7eb;
  border-radius: 99px;
  height: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  background: #1f2937;
  height: 100%;
  border-radius: 99px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 11px;
  color: #9ca3af;
  text-align: right;
  margin-top: 4px;
}

/* ── Practice card ── */
.practice-card {
  background: white;
  border-radius: 12px;
  padding: 48px 56px;
  width: 100%;
  max-width: 480px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.entry-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin-bottom: 32px;
}

/* ── Status indicator ── */
.status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  margin-bottom: 12px;
  min-height: 24px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.green  { background: #22c55e; }
.status-dot.red    { background: #ef4444; }
.status-dot.orange { background: #f97316; }

.status-text.green  { color: #16a34a; }
.status-text.red    { color: #dc2626; }
.status-text.orange { color: #ea580c; }

/* ── Invalid label ── */
.invalid-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ef4444;
  margin-bottom: 8px;
}

/* ── Word display ── */
.word-display {
  font-size: 48px;
  font-weight: 300;
  color: #111;
  margin: 16px 0;
  letter-spacing: -1px;
}

.word-invalid { color: #ef4444; }

/* ── Definition ── */
.definition {
  font-size: 13px;
  color: #6b7280;
  font-style: italic;
  margin-bottom: 28px;
  min-height: 20px;
}

.definition-invalid {
  color: #ef4444;
  font-style: normal;
}

/* ── Buttons ── */
.btn-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 28px;
}

.btn {
  padding: 10px 28px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
}

.btn-primary { background: #1f2937; color: white; }
.btn-primary:hover { background: #111827; }

.btn-secondary { background: white; color: #374151; border: 1px solid #d1d5db; }
.btn-secondary:hover { background: #f9fafb; }

/* ── Results card ── */
.results-card {
  background: white;
  border-radius: 12px;
  padding: 48px 56px;
  width: 100%;
  max-width: 480px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.results-title {
  font-size: 22px;
  font-weight: 600;
  color: #111;
  margin-bottom: 4px;
}

.results-subtitle {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 8px;
}

.results-score {
  font-size: 56px;
  font-weight: 300;
  color: #111;
  margin: 16px 0 4px;
}

.results-score-label {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 32px;
}

.results-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.stat-box {
  background: #f9fafb;
  border-radius: 8px;
  padding: 16px 8px;
}

.stat-value {
  font-size: 24px;
  font-weight: 600;
  color: #111;
}

.stat-green { color: #16a34a; }
.stat-red   { color: #dc2626; }

.stat-label {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Stub pages ── */
.stub-page { text-align: center; color: #9ca3af; }
.stub-page h2 { font-size: 20px; font-weight: 500; color: #374151; margin-bottom: 8px; }
.stub-page p  { font-size: 14px; }
