:root {
  --bg-top: #07111f;
  --bg-bottom: #18344a;
  --panel: rgba(8, 20, 35, 0.72);
  --panel-strong: rgba(10, 25, 43, 0.92);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f5f7fb;
  --muted: #9bb1c9;
  --accent: #7cf2c8;
  --accent-strong: #23d2a0;
  --danger: #ff7b7b;
  --shadow: 0 24px 80px rgba(2, 8, 18, 0.4);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "DM Sans", "Trebuchet MS", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(124, 242, 200, 0.18), transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(100, 175, 255, 0.2), transparent 25%),
    linear-gradient(160deg, var(--bg-top), var(--bg-bottom));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 78%);
  pointer-events: none;
}

.app-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
}

.hero-card,
.list-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 32px;
}

.hero-card::after,
.list-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -35% auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 242, 200, 0.16), transparent 70%);
}

.eyebrow,
.section-label,
.storage-badge,
.stat-label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow,
.section-label {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
}

.hero-copy h1,
.list-header h2,
.empty-state h3 {
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
}

.hero-copy h1 {
  margin: 0;
  max-width: 10ch;
  font-size: clamp(2.6rem, 4vw, 4.8rem);
  line-height: 0.95;
}

.hero-copy p {
  margin: 18px 0 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.todo-form {
  margin-top: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.todo-form input,
.todo-form button,
.todo-item button,
.todo-checkbox {
  border: 0;
  font: inherit;
}

.todo-form input {
  min-width: 0;
  padding: 18px 20px;
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  outline: 1px solid transparent;
  transition: outline-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.todo-form input::placeholder {
  color: rgba(245, 247, 251, 0.45);
}

.todo-form input:focus {
  outline-color: rgba(124, 242, 200, 0.55);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.todo-form button {
  padding: 18px 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #04131d;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.todo-form button:hover,
.todo-form button:focus-visible,
.todo-item button:hover,
.todo-item button:focus-visible {
  transform: translateY(-2px);
}

.todo-form button:hover,
.todo-form button:focus-visible {
  box-shadow: 0 16px 40px rgba(35, 210, 160, 0.28);
}

.stats-row {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stat-card {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 2rem;
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
}

.stat-card.accent {
  background: rgba(124, 242, 200, 0.12);
}

.stat-label,
.storage-badge {
  font-size: 0.72rem;
  color: var(--muted);
}

.list-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  min-height: 620px;
}

.list-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.list-header h2 {
  margin: 0;
  font-size: clamp(1.8rem, 2vw, 2.5rem);
}

.storage-badge {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.todo-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.todo-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  animation: slide-up 220ms ease;
}

.todo-checkbox {
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  outline: 2px solid rgba(124, 242, 200, 0.45);
  outline-offset: 2px;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.todo-checkbox:checked {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  outline-color: transparent;
}

.todo-checkbox:checked::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 7px;
  height: 12px;
  border: solid #032331;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.todo-content {
  min-width: 0;
}

.todo-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  word-break: break-word;
}

.todo-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

.todo-item.completed .todo-title {
  color: rgba(245, 247, 251, 0.55);
  text-decoration: line-through;
}

.todo-item button {
  padding: 10px 14px;
  border-radius: 14px;
  color: var(--danger);
  background: rgba(255, 123, 123, 0.12);
  cursor: pointer;
}

.empty-state {
  margin: auto 0;
  padding: 36px 20px 12px;
  display: none;
  text-align: center;
  color: var(--muted);
}

.empty-state.visible {
  display: block;
}

.empty-state h3 {
  margin: 18px 0 10px;
  color: var(--text);
  font-size: 1.75rem;
}

.empty-state p {
  margin: 0 auto;
  max-width: 32ch;
  line-height: 1.6;
}

.empty-orb {
  width: 84px;
  height: 84px;
  margin: 0 auto;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(124, 242, 200, 0.45), rgba(100, 175, 255, 0.25)),
    rgba(255, 255, 255, 0.07);
  box-shadow: 0 18px 36px rgba(2, 8, 18, 0.25);
  transform: rotate(12deg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding-top: 24px;
  }

  .hero-copy h1 {
    max-width: none;
  }

  .list-card {
    min-height: 520px;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 20px, 100%);
    gap: 18px;
    padding-bottom: 28px;
  }

  .hero-card,
  .list-card {
    border-radius: 24px;
  }

  .hero-card,
  .list-card {
    padding: 22px;
  }

  .todo-form,
  .stats-row,
  .todo-item {
    grid-template-columns: 1fr;
  }

  .todo-item {
    align-items: flex-start;
  }

  .list-header {
    flex-direction: column;
  }

  .storage-badge {
    white-space: normal;
  }
}
