/* ===========================
   Smart Aral – Design System
   Mobile-first, accessible, dark/light
   =========================== */

:root {
  /* Light mode */
  --bg: #f1f5f9;
  --bg-card: #ffffff;
  --bg-elevated: #f8fafc;
  --text: #0f172a;
  --text-secondary: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #dbeafe;
  --success: #16a34a;
  --success-bg: #dcfce7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --warning: #d97706;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 56px;
  --nav-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme="dark"] {
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-elevated: #334155;
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-light: #1e3a5f;
  --success: #22c55e;
  --success-bg: #14532d;
  --danger: #ef4444;
  --danger-bg: #450a0a;
  --warning: #f59e0b;
  --border: #334155;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

img, svg { display: block; max-width: 100%; }

/* App shell */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  background-color: var(--bg);
  background-image:
    linear-gradient(
      color-mix(in srgb, var(--bg) 55%, transparent),
      color-mix(in srgb, var(--bg) 55%, transparent)
    ),
    url("../assets/ict-network-background.svg");
  background-size: 100% auto;
  background-repeat: repeat-y;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 16px;
  background: color-mix(in srgb, var(--bg-card) 82%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary);
}

.connection-status {
  padding: 8px 16px;
  background: var(--warning);
  color: #0f172a;
  text-align: center;
  font-size: 0.875rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: background 0.2s, color 0.2s;
}

.btn-icon:hover,
.btn-icon:focus-visible {
  background: var(--bg-elevated);
  color: var(--text);
  outline: none;
}

.btn-icon:focus-visible {
  box-shadow: 0 0 0 3px var(--primary-light);
}

[data-theme="dark"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon,
:root:not([data-theme]) .icon-moon { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* Main */
.main {
  flex: 1;
  padding: 20px 16px calc(var(--nav-h) + var(--safe-bottom) + 20px);
  overflow-y: auto;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex;
  background: color-mix(in srgb, var(--bg-card) 82%, transparent);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  z-index: 50;
  box-shadow: 0 -4px 12px rgb(0 0 0 / 0.05);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-item svg {
  transition: transform 0.25s ease, filter 0.25s ease;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item.active svg {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--primary) 45%, transparent));
}

.nav-item:focus-visible {
  outline: none;
  background: var(--primary-light);
}

/* ===== Components ===== */

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card + .card { margin-top: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  min-height: 48px;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  width: 100%;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--primary-hover);
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-light);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  width: 100%;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--border);
  outline: none;
}

.btn-success {
  background: var(--success);
  color: #fff;
  width: 100%;
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  width: 100%;
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  padding: 10px 16px;
}

.btn-sm {
  padding: 10px 14px;
  font-size: 0.875rem;
  min-height: 40px;
}

/* Form elements */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Progress bar */
.progress-bar {
  position: relative;
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  position: relative;
  overflow: hidden;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #22d3ee);
  border-radius: 99px;
  transition: width 0.3s ease;
}

.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.55), transparent);
  transform: translateX(-100%);
  animation: signal-sweep 2.4s ease-in-out infinite;
}

/* Toast */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: 99px;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  max-width: 90%;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Views ===== */

.main > * {
  animation: interface-arrive 0.42s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.main > :nth-child(2) { animation-delay: 60ms; }
.main > :nth-child(3) { animation-delay: 110ms; }
.main > :nth-child(4) { animation-delay: 160ms; }

.view-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.view-subtitle {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

/* Home */
.home-hero {
  text-align: center;
  padding: 12px 0 28px;
}

.home-hero .emoji {
  font-size: 3rem;
  margin-bottom: 12px;
  display: inline-block;
  animation: icon-float 3.2s ease-in-out infinite;
}

.action-grid {
  display: grid;
  gap: 12px;
}

.action-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-align: left;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.25s, border-color 0.25s;
  animation: interface-arrive 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.action-card:nth-child(2) { animation-delay: 70ms; }
.action-card:nth-child(3) { animation-delay: 140ms; }
.action-card:nth-child(4) { animation-delay: 210ms; }

.action-card:hover,
.action-card:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--primary) 48%, var(--border));
  box-shadow: var(--shadow-lg), 0 0 18px color-mix(in srgb, var(--primary) 12%, transparent);
  outline: none;
}

.action-card:active {
  transform: translateY(-1px) scale(0.99);
}

.action-card .icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1.5rem;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), border-radius 0.2s ease;
}

.action-card:hover .icon-wrap,
.action-card:focus-visible .icon-wrap {
  transform: scale(1.08) rotate(-4deg);
}

.action-card .icon-wrap.blue { background: var(--primary-light); color: var(--primary); }
.action-card .icon-wrap.green { background: var(--success-bg); color: var(--success); }
.action-card .icon-wrap.orange { background: #ffedd5; color: #ea580c; }
[data-theme="dark"] .action-card .icon-wrap.orange { background: #431407; color: #fb923c; }

.action-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.action-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Library */
.deck-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.deck-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.deck-item:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 38%, var(--border));
  box-shadow: var(--shadow-lg);
}

.deck-item .info h3 {
  font-size: 1rem;
  font-weight: 600;
}

.deck-item .info p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.deck-item .actions {
  display: flex;
  gap: 8px;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-secondary);
}

.empty-state .emoji {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

/* Flashcard */
.flashcard-container {
  perspective: 1000px;
  margin: 20px 0;
}

.flashcard {
  position: relative;
  width: 100%;
  min-height: 280px;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.2, 0.75, 0.25, 1);
}

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

.flashcard-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.flashcard-face.back {
  transform: rotateY(180deg);
  background: var(--primary-light);
}

.flashcard-face .label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.flashcard-face .content {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.4;
  word-break: break-word;
}

.flashcard-controls {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.flashcard-controls .btn {
  flex: 1;
}

.card-counter {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* Multiple Choice */
.question-card {
  margin-bottom: 20px;
}

.question-text {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 20px;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.choice-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: left;
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
  min-height: 52px;
}

.choice-btn:hover,
.choice-btn:focus-visible {
  border-color: var(--primary);
  transform: translateX(3px);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent);
  outline: none;
}

.choice-btn:nth-child(2) { animation-delay: 45ms; }
.choice-btn:nth-child(3) { animation-delay: 90ms; }
.choice-btn:nth-child(4) { animation-delay: 135ms; }

.choice-btn.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.choice-btn.correct {
  border-color: var(--success);
  background: var(--success-bg);
}

.choice-btn.wrong {
  border-color: var(--danger);
  background: var(--danger-bg);
}

.choice-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.choice-btn.selected .choice-letter {
  background: var(--primary);
  color: #fff;
}

.choice-btn.correct .choice-letter {
  background: var(--success);
  color: #fff;
}

.choice-btn.wrong .choice-letter {
  background: var(--danger);
  color: #fff;
}

.timer-display {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--warning);
  margin-bottom: 12px;
}

.explanation-box {
  margin-top: 16px;
  padding: 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  border-left: 4px solid var(--primary);
}

/* Results */
.score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--primary-light);
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary);
  animation: score-arrive 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--primary) 7%, transparent), 0 0 32px color-mix(in srgb, var(--primary) 16%, transparent);
}

.score-label {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 24px;
}

/* Settings */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.setting-row:last-child {
  border-bottom: none;
}

.setting-label {
  font-weight: 500;
}

.setting-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.timer-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.timer-duration {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.timer-duration .form-control {
  width: 82px;
  padding: 8px 10px;
  text-align: center;
}

/* Toggle switch */
.toggle {
  position: relative;
  width: 48px;
  height: 28px;
  background: var(--border);
  border-radius: 99px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
}

.toggle.on {
  background: var(--primary);
}

.toggle.on::after {
  transform: translateX(20px);
}

/* Modal / Overlay for create forms */
.overlay {
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 0.5);
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg-card);
  width: 100%;
  max-width: 480px;
  max-height: 90dvh;
  border-radius: 20px 20px 0 0;
  padding: 24px 20px calc(24px + var(--safe-bottom));
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.overlay.show .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

/* History */
.history-item {
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.history-item .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-item .score {
  font-weight: 700;
  color: var(--primary);
}

.history-item .date {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Utility */
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .flashcard { transition: none; }
}

@keyframes interface-arrive {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes icon-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes signal-sweep {
  55%, 100% { transform: translateX(100%); }
}

@keyframes score-arrive {
  from {
    opacity: 0;
    transform: scale(0.78) rotate(-8deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

/* Desktop enhancements */
@media (min-width: 481px) {
  #app {
    box-shadow: 0 0 40px rgb(0 0 0 / 0.08);
    min-height: 100dvh;
  }
  .bottom-nav {
    border-radius: 0;
  }
}

@media (min-width: 1024px) {
  body {
    background: linear-gradient(180deg, #eef4ff 0%, var(--bg) 30%, var(--bg) 100%);
    padding: 20px;
  }

  #app {
    max-width: 1480px;
    min-height: calc(100dvh - 40px);
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 26px 70px rgb(15 23 42 / 0.12);
    background: var(--bg);
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    grid-template-rows: 78px minmax(0, 1fr);
  }

  .header {
    grid-column: 1 / -1;
    height: 78px;
    padding: 0 24px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: none;
  }

  .logo {
    font-size: 1.5rem;
  }

  .main {
    grid-column: 2;
    grid-row: 2;
    padding: 30px 32px 32px;
    max-width: none;
    width: 100%;
    margin: 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 90%, white 10%), var(--bg));
  }

  .bottom-nav {
    grid-column: 1;
    grid-row: 2;
    position: static;
    transform: none;
    left: auto;
    bottom: auto;
    width: 100%;
    max-width: none;
    height: 100%;
    border: none;
    border-right: 1px solid var(--border);
    border-top: none;
    padding: 16px 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-card);
    box-shadow: none;
  }

  .nav-item {
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: left;
  }

  .nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
  }

  .nav-item svg {
    width: 20px;
    height: 20px;
  }

  .home-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    max-width: 980px;
    margin: 0 auto 18px;
    padding: 20px 0 12px;
    text-align: left;
  }

  .home-hero .emoji {
    font-size: 5rem;
    margin-bottom: 0;
  }

  .action-grid {
    max-width: 980px;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 18px;
    margin: 0 auto;
  }

  .action-card {
    min-height: 140px;
    padding: 22px 20px;
  }

  .deck-list,
  #history-list {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 16px;
  }

  .deck-item {
    min-height: 120px;
  }

  .card {
    padding: 24px;
  }

  .flashcard-container {
    max-width: 820px;
    margin: 24px auto;
  }

  .flashcard {
    min-height: 380px;
  }

  .question-card,
  .score-card {
    max-width: 820px;
    margin: 0 auto 24px;
  }

  .history-item {
    min-height: 112px;
  }
}
