/* Dodo — 할일 앱 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #0c0f14;
  --surface: rgba(22, 27, 36, 0.75);
  --surface-border: rgba(255, 255, 255, 0.08);
  --text: #e8ecf4;
  --muted: #8b95a8;
  --accent: #6ee7b7;
  --accent-dim: rgba(110, 231, 183, 0.15);
  --danger: #f87171;
  --radius: 14px;
  --radius-sm: 10px;
  --font: system-ui, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Consolas", monospace;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

html {
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}

.bg-orb--1 {
  width: 420px;
  height: 420px;
  background: #1e3a5f;
  top: -120px;
  right: -80px;
}

.bg-orb--2 {
  width: 380px;
  height: 380px;
  background: #134e4a;
  bottom: -100px;
  left: -100px;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

.header {
  margin-bottom: 1.75rem;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 700;
}

.title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.date {
  margin: 1rem 0 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  margin-bottom: 1.25rem;
}

.form {
  display: flex;
  gap: 0.6rem;
}

.input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

.input:focus {
  border-color: rgba(110, 231, 183, 0.45);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.btn {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.15rem;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

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

.btn--primary {
  background: linear-gradient(135deg, #34d399, #2dd4bf);
  color: #042f2e;
  white-space: nowrap;
}

.btn--primary:hover {
  filter: brightness(1.06);
}

.filters {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.chip {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.chip:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
}

.chip--active {
  background: var(--accent-dim);
  border-color: rgba(110, 231, 183, 0.35);
  color: var(--accent);
}

.todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  animation: enter 0.28s ease;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.todo-item--done .todo-item__text {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.todo-item--editing {
  border-color: rgba(110, 231, 183, 0.35);
}

.todo-item__input {
  flex: 1;
  min-width: 0;
  padding: 0.35rem 0.5rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(110, 231, 183, 0.4);
  border-radius: 8px;
  outline: none;
}

.todo-item__input:focus {
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.checkbox {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.checkbox:hover {
  border-color: var(--accent);
}

.checkbox:checked {
  background: var(--accent);
  border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23042f2e' stroke-width='2'%3E%3Cpath d='M2 6l3 3 5-5'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}

.todo-item__text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  font-size: 1rem;
}

.edit-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: color 0.15s ease, background 0.15s ease;
}

.edit-btn:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

.delete-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: color 0.15s ease, background 0.15s ease;
}

.delete-btn:hover {
  color: var(--danger);
  background: rgba(248, 113, 113, 0.12);
}

.empty {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 2rem 1rem;
  margin: 0;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.link-btn {
  font: inherit;
  font-size: 0.85rem;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}

.link-btn:hover {
  color: var(--accent);
}

.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;
}
