:root {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color-scheme: light dark;
  color: #0f172a;
  background-color: #f1f5f9;
  line-height: 1.5;
  font-weight: 400;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(circle at top, #f8fafc, #e2e8f0);
}

main {
  width: min(620px, 100%);
  background: white;
  padding: 2rem;
  border-radius: 1.5rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
}

h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

p.subtitle {
  margin: 0 0 2rem;
  color: #475569;
}

form {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

input[type='text'] {
  flex: 1;
  padding: 0.9rem 1.1rem;
  border: 1px solid #cbd5f5;
  border-radius: 0.9rem;
  font-size: 1rem;
  background: #f8fafc;
  color: #0f172a;
}

button.add {
  padding: 0 1.6rem;
  border: none;
  border-radius: 0.9rem;
  background: linear-gradient(120deg, #2563eb, #7c3aed);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

button.add:active {
  transform: scale(0.98);
}

.review-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

button#start-review {
  flex-shrink: 0;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  border: 1px solid #cbd5f5;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 600;
  cursor: pointer;
}

button#start-review:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.review-status {
  flex: 1;
  font-size: 0.9rem;
  color: #475569;
}

#review-panel {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.25rem;
  background: #f8fafc;
  margin-bottom: 1.5rem;
}

#review-panel h2 {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
}

.review-hint {
  margin: 0 0 1rem;
  color: #64748b;
}

.review-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.review-card {
  border-radius: 1rem;
  background: white;
  padding: 1rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.review-label {
  margin: 0;
  font-size: 0.85rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.review-text {
  margin: 0;
  font-size: 1rem;
  color: #0f172a;
  min-height: 3rem;
}

.review-card button.choose {
  border: none;
  border-radius: 0.75rem;
  padding: 0.65rem 1rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(120deg, #22d3ee, #3b82f6);
  color: white;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.todo-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.9rem;
  background: #f8fafc;
}

button.toggle {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 2px solid #94a3b8;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

button.toggle.completed {
  background: #22c55e;
  border-color: #22c55e;
  color: white;
}

span.text {
  font-size: 1rem;
}

span.text.completed {
  text-decoration: line-through;
  color: #94a3b8;
}

button.remove {
  border: none;
  background: transparent;
  color: #ef4444;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem;
}

.meta {
  font-size: 0.8rem;
  color: #94a3b8;
}

.score-badge {
  font-size: 0.8rem;
  color: #6d28d9;
  background: #ede9fe;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

#empty-state {
  text-align: center;
  color: #94a3b8;
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px dashed #cbd5f5;
}

@media (max-width: 540px) {
  form {
    flex-direction: column;
  }

  button.add,
  button#start-review {
    width: 100%;
  }

  .review-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .todo-item {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
  }

  .meta {
    grid-column: 2 / 3;
  }
}
