@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Instrument+Sans:wght@400;500;600&display=swap');

/* ===== Variables ===== */
:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --surface2: #222222;
  --border: #2e2e2e;
  --accent: #c8f060;
  --accent-dim: rgba(200, 240, 96, 0.12);
  --danger: #ff5c5c;
  --danger-dim: rgba(255, 92, 92, 0.12);
  --text: #f0f0f0;
  --text-muted: #777;
  --done: #444;
  --radius: 10px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Instrument Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 48px 24px 80px;
}

/* ===== Page header ===== */
body::before {
  content: "✓ Tasks";
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -1px;
  margin-bottom: 32px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Layout wrapper ===== */
body > * { max-width: 560px; margin-left: auto; margin-right: auto; }

/* ===== Create button ===== */
body > button {
  display: flex;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20px;
  /* keep all your other properties */
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #0f0f0f;
  border: none;
  border-radius: 24px;
  padding: 10px 22px;
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .18s, transform .15s;
}
body > button:hover { opacity: .85; transform: translateY(-1px); }

/* ===== New task form ===== */
#newTaskInfo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  animation: slideDown .2s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

#newTaskInfo p {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--text-muted);
  margin-bottom: 6px;
  margin-top: 14px;
}
#newTaskInfo p:first-child { margin-top: 0; }

#newTaskInfo input {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
  transition: border-color .18s;
}
#newTaskInfo input:focus { border-color: var(--accent); }

/* Form buttons row */
#newTaskInfo button {
  margin-top: 16px;
  margin-right: 8px;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .18s;
}
#newTaskInfo button:last-child {
  background: var(--accent);
  color: #0f0f0f;
}
#newTaskInfo button:last-child:hover { opacity: .8; }
#newTaskInfo button:first-of-type {
  background: var(--surface2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
#newTaskInfo button:first-of-type:hover { color: var(--text); }

/* ===== Section labels ===== */
h2 {
  font-family: 'Syne', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin: 32px auto 10px;
  max-width: 560px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ===== Task containers ===== */
#taskContainer, #completedContainer {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 560px;
  margin: 0 auto;
}

/* ===== Task rows =====
   Each task = p + 3 buttons. We group them visually
   using a card-like row via adjacent sibling tricks.
   Since each "task" is just loose elements, we style
   the p as the card top and float buttons alongside.
   We use a wrapper div approach via display tricks.
*/

/* The paragraph is the task card */
#taskContainer p, #completedContainer p {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 14px 16px 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  margin-top: 12px;
  transition: background .18s;
}

/* Button row directly under the p */
#taskContainer p + button,
#completedContainer p + button {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-top: none;
  border-right: none;
  padding: 8px 14px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .18s, background .18s;
  margin: 0;
}

/* Second button (delete) */
#taskContainer p + button + button,
#completedContainer p + button + button {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-top: none;
  border-right: none;
  padding: 8px 14px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--danger);
  cursor: pointer;
  transition: background .18s;
  margin: 0;
}
#taskContainer p + button + button:hover,
#completedContainer p + button + button:hover {
  background: var(--danger-dim);
}

/* Third button (complete) — last in row, rounded bottom-right */
#taskContainer p + button + button + button,
#completedContainer p + button + button + button {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 8px 14px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  transition: background .18s;
  margin: 0;
  border-right: 1px solid var(--border);
}
#taskContainer p + button + button + button:hover,
#completedContainer p + button + button + button:hover {
  background: var(--accent-dim);
}

/* Edit button hover */
#taskContainer p + button:hover,
#completedContainer p + button:hover {
  color: var(--text);
  background: var(--border);
}

/* Completed task styling */
#completedContainer p {
  color: var(--done);
  text-decoration: line-through;
}

button .material-icons {
  font-size: 18px;
  vertical-align: middle;
}

#openTaskBtn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1a73e8;
  color: white;
  border: none;
  font-size: 32px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}