* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

/* Themes */
:root {
  --bg: #f4f6f9;
  --card: #fff;
  --text: #222;
  --primary: #4a6cff;
}

.dark {
  --bg: #121212;
  --card: #1e1e1e;
  --text: #fff;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.app {
  display: flex;
  height: 100vh;
}

/* Sidebar */

.sidebar {
  width: 250px;
  background: var(--primary);
  color: white;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar h2 {
  text-align: center;
}

#themeBtn {
  padding: 10px;
  border: none;
  background: white;
  color: var(--primary);
  cursor: pointer;
  border-radius: 5px;
}

.stats p {
  margin: 5px 0;
}

/* Main */

main {
  flex: 1;
  padding: 30px;
}

h1 {
  margin-bottom: 20px;
}

.add-box {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

input {
  flex: 1;
  padding: 10px;
  border: 1px solid gray;
  border-radius: 5px;
}

button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
}

/* Tasks */

ul {
  list-style: none;
}

li {
  background: var(--card);
  margin-bottom: 10px;
  padding: 15px;
  border-radius: 5px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

li.done {
  text-decoration: line-through;
  opacity: 0.6;
}

.actions button {
  margin-left: 5px;
  background: crimson;
}

.actions button:first-child {
  background: green;
}