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

:root {
  --bg: #0e0e12;
  --surface: #16161d;
  --border: #2a2a38;
  --accent: #c8f135;
  --accent-dim: rgba(200, 241, 53, 0.12);
  --text: #f0f0f5;
  --muted: #6b6b80;
  --done: #3a3a4a;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 20px 80px;
}

body::before {
  content: '';
  position: fixed;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(200,241,53,0.07) 0%, transparent 70%);
  pointer-events: none;
}


.container {
  width: 100%;
  max-width: 560px;
}

.header { margin-bottom: 48px; }

.header-top {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

h1 {
  font-family: 'Syne', 'Georgia', serif;
  font-weight: 800;
  font-size: 2.8rem;
  letter-spacing: -0.04em;
}

.dot {
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,241,53,0.5); }
  50% { box-shadow: 0 0 0 8px rgba(200,241,53,0); }
}

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

.subtitle { color: var(--muted); font-size: 0.9rem; font-weight: 300; }
.subtitle strong { color: var(--accent); font-weight: 500; }

.logout-btn {
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 6px;
  transition: all 0.15s;
  letter-spacing: 0.03em;
}
.logout-btn:hover { color: #ff5f5f; border-color: #ff5f5f; background: rgba(255,95,95,0.06); }

.stats { display: flex; gap: 20px; }

.stat { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.stat span { color: var(--accent); font-weight: 600; font-size: 1rem; letter-spacing: 0; margin-right: 4px; }


.add-form {
  display: flex;
  gap: 10px;
  margin-bottom: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 8px 8px 20px;
  transition: border-color 0.2s;
}
.add-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200,241,53,0.08);
}
.add-form input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.95rem;
  padding: 6px 0;
}
.add-form input::placeholder { color: var(--muted); }

.add-form button,
.btn-primary {
  background: var(--accent);
  color: #0e0e12;
  border: none;
  border-radius: 9px;
  padding: 10px 20px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: transform 0.15s, opacity 0.15s;
}
.add-form button:hover,
.btn-primary:hover { opacity: 0.85; transform: scale(0.98); }


.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
  font-weight: 500;
}

.task-list { display: flex; flex-direction: column; gap: 8px; }

.task {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color 0.2s, transform 0.15s;
  animation: slideIn 0.25s ease both;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.task:hover { border-color: #3a3a50; transform: translateX(2px); }
.task.done { background: rgba(22,22,29,0.5); border-color: transparent; }

.check-btn {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border);
  background: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
  text-decoration: none;
}
.check-btn:hover { border-color: var(--accent); background: var(--accent-dim); }
.task.done .check-btn { background: var(--accent); border-color: var(--accent); }

.checkmark { width: 10px; height: 10px; display: none; }

.checkmark::before {
  content: '';
  display: block;
  width: 10px; height: 6px;
  border-left: 2px solid #0e0e12;
  border-bottom: 2px solid #0e0e12;
  transform: rotate(-45deg) translate(1px, -1px);
}

.task-title { flex: 1; font-size: 0.95rem; color: var(--text); line-height: 1.4; }
.task.done .task-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--done); }


/* ── Empty ── */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.4; }
.empty p { font-size: 0.9rem; font-weight: 300; }

/* ── Footer ── */
.footer-actions { margin-top: 28px; display: flex; justify-content: flex-end; }
.clear-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.clear-btn:hover { border-color: #ff5f5f; color: #ff5f5f; background: rgba(255,95,95,0.06); }

/* ── Auth pages ── */
.auth-container {
  width: 100%;
  max-width: 420px;
}

.auth-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
}

.auth-header { margin-bottom: 32px; }
.auth-header h1 { font-size: 2rem; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.dot-inline {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2.5s ease-in-out infinite;
}
.auth-header p { color: var(--muted); font-size: 0.9rem; }

.auth-form { display: flex; flex-direction: column; gap: 18px; margin-bottom: 24px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.field input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200,241,53,0.08);
}

.btn-primary { width: 100%; padding: 14px; border-radius: 10px; font-size: 0.95rem; }

.alert {
  background: rgba(255, 95, 95, 0.1);
  border: 1px solid rgba(255, 95, 95, 0.3);
  color: #ff8f8f;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.88rem;
  margin-bottom: 20px;
}

.btn-delete {
  background: var(--accent);
  color: #0e0e12;
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: opacity 0.15s, transform 0.15s;
}

.btn-delete:hover {
  opacity: 0.8;
  transform: scale(0.96);
}

.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}


.auth-switch { text-align: center; font-size: 0.85rem; color: var(--muted); }
.auth-switch a { color: var(--accent); text-decoration: none; font-weight: 500; }
.auth-switch a:hover { text-decoration: underline; }

  .menu {
    display: inline-block;
    cursor: pointer;
  }

  .bar1, .bar2, .bar3 {
    width: 35px;
    height: 5px;
    background-color: #333;
    margin: 6px 0;
    transition: 0.4s;
  }

  .change .bar1 {
    -webkit-transform: rotate(-45deg) translate(-9px, 6px);
    transform: rotate(-45deg) translate(-9px, 6px);
  }

  .change .bar2 {opacity: 0;}

  .change .bar3 {
    -webkit-transform: rotate(45deg) translate(-8px, -8px);
    transform: rotate(45deg) translate(-8px, -8px);
  }   


  .footer-left-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.2s ease;
  backdrop-filter: blur(6px);
}

.footer-left-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
