/* === Base Reset === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  height: 100%;
}
body {
  font-family: 'General Sans', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  padding: 20px;
  transition: background 0.3s, color 0.3s;
}

/* === Theme Vars === */
:root {
  --bg: #111;
  --card: #1e1e1e;
  --text: #fff;
  --subtext: #aaa;
  --accent: #ff3030;
}
body.light {
  --bg: #f7f7f7;
  --card: #fff;
  --text: #111;
  --subtext: #555;
  --accent: #007aff;
}

/* === Container === */
.container {
  max-width: 1300px;
  margin: 40px auto;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 0 30px;
}

/* === Header === */
header {
  font-size: 3rem;
  font-weight: 800;
  text-align: center;
  animation: fadeSlideIn 0.6s ease-out forwards;
  opacity: 0;
}
.header-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  animation: fadeSlideIn 0.8s ease-out forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

/* === Buttons === */
.modern-btn {
  background: linear-gradient(145deg, var(--card), transparent);
  border: 1px solid var(--subtext);
  color: var(--text);
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(6px);
}
.modern-btn:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: scale(1.05);
}

/* === Task Form === */
.task-form {
  display: flex;
  gap: 16px;
  align-items: center;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.06);
}
.task-form input {
  flex: 1;
  padding: 14px;
  font-size: 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.05);
  color: var(--text);
}
.task-form input::placeholder {
  color: var(--subtext);
}
.task-form button {
  background: rgba(255, 48, 48, 0.8);
  font-size: 1rem;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: bold;
  color: #fff;
  border: none;
  cursor: pointer;
}
.task-form button:hover {
  background: rgba(255, 48, 48, 1);
}

/* === Category Columns (STACKED) === */
#category-columns {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 20px;
}

/* === Category Card === */
.category-column {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  animation: fadeInUp 0.4s ease;
}
.category-column.animate-in {
  animation: popIn 0.35s ease-out;
}
.category-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.category-title {
  font-size: 1.2rem;
  font-weight: 700;
}
.category-top button {
  background: none;
  border: none;
  color: var(--subtext);
  font-size: 1.1rem;
  cursor: pointer;
}

/* === Task List === */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

/* === Task Card === */
.task-card {
  background: rgba(255,255,255,0.05);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid rgba(255,255,255,0.06);
}
.task-card:hover {
  transform: scale(1.015);
  background-color: #262626;
}
.task-card.completed {
  opacity: 0.5;
  text-decoration: line-through;
  background-color: #161616;
}
.task-title {
  flex: 1;
  margin-right: 12px;
}
.task-actions button {
  background: none;
  border: none;
  color: var(--subtext);
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: 10px;
}
.task-actions button:hover {
  color: var(--text);
}
.task-card.removing {
  animation: fadeOut 0.25s forwards;
}

/* === Completed Section === */
#completed-list {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.section-label {
  font-size: 1.3rem;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--subtext);
  margin: 40px 0 12px;
  border-bottom: 1px solid var(--card);
  padding-bottom: 4px;
}

/* === Focus Mode === */
body.focus-mode .task-form,
body.focus-mode .header-buttons,
body.focus-mode #add-category {
  display: none;
}

/* === Drag Ghost === */
.dragging {
  opacity: 0.4;
  background: #333 !important;
}

/* === Animations === */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(10px); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* === Responsive === */
@media (max-width: 600px) {
  .task-form {
    flex-direction: column;
  }
  .task-form input,
  .task-form button {
    width: 100%;
  }
}
