@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

:root {
  --bg: #0f1419;
  --surface: #161c22;
  --border: #26303a;

  --text: #e6edf3;
  --muted: #9ba3af;

  --accent: #3fa9f5;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* BACK LINK */
.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: #7dd3fc;
}

/* HEADER */
.header {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px 24px;
  animation: fadeIn 400ms ease forwards;
}

.header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.date {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* LAYOUT */
.layout {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 760px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

/* PANELS */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  opacity: 0;
  transform: translateY(8px);
  animation: panelEnter 420ms ease forwards;
}

.panel:nth-child(1) { animation-delay: 60ms; }
.panel:nth-child(2) { animation-delay: 120ms; }

.panel h2 {
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-weight: 600;
}

/* TASK INPUT */
.input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.input-row input {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.input-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(63,169,245,0.15);
}

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

.input-row button {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  cursor: pointer;
  transition: border-color 160ms ease, transform 120ms ease;
}

.input-row button:hover {
  border-color: var(--accent);
}

.input-row button:active {
  transform: scale(0.96);
}

/* TASK LIST */
.task-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.task {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 6px;
  border-bottom: 1px solid var(--border);
  animation: taskFade 200ms ease forwards;
}

.task:last-child {
  border-bottom: none;
}

.task label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.task input[type="checkbox"] {
  accent-color: var(--accent);
  cursor: pointer;
}

.task.completed span {
  text-decoration: line-through;
  color: var(--muted);
}

.delete {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: color 120ms ease, opacity 120ms ease;
}

.delete:hover {
  color: #f87171;
}

/* NOTES */
textarea {
  width: 100%;
  height: 260px;
  resize: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(63,169,245,0.12);
}

textarea::placeholder {
  color: var(--muted);
}

/* FOOTER */
.footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  animation: fadeIn 500ms ease forwards;
}

/* ANIMATIONS */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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