:root {
  --bg: #121212;
  --fg: #eee;
  --primary: #bb86fc;
  --accent: #03dac6;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: sans-serif; background: var(--bg); color: var(--fg); padding: 1rem; }

/* Standard Layout (Buttons neben Titel) */
header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom:25px;
}

/* Titel nimmt volle Breite auf kleinen Geräten */
header h1 {
  flex: 1 1 100%;
  margin: 0 0 15px 0;
}

/* Button-Gruppe passt sich an */
header .btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Optional: Buttons gleichmäßiger bei kleiner Breite */
header .btn-group button {
  flex: 1 1 auto;
  white-space: nowrap;
}

button { background: var(--primary); color: var(--fg); border: none; padding: 0.5rem 1rem; border-radius: 0.5rem; cursor: pointer; }
#filters { display: flex; gap: 1rem; margin-bottom: 1rem; }
.btn-group { display: flex; gap: 0.5rem; }
select, input, textarea { background: #1e1e1e; color: var(--fg); border: 1px solid #333; padding: 0.5rem; border-radius: 0.25rem; width: 100%; }
#taskList { list-style: none; display: grid; gap: 0.5rem; }
#taskList li { background: #1e1e1e; padding: 1rem; border-radius: 0.5rem; display: flex; justify-content: space-between; align-items: center; }
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; }
.modal.hidden { display: none; }
.modal-content { background: var(--bg); padding: 1rem; border-radius: 0.5rem; max-width: 400px; width: 100%; position: relative; }
.close { position: absolute; top: 0.5rem; right: 0.5rem; font-size: 1.5rem; cursor: pointer; }
@media (min-width: 768px) {
  #taskList { grid-template-columns: 1fr 1fr; }
}
h2 { margin-bottom:10px; font-size:18px; }
p { margin-bottom:10px;  }
/* Jeder Listeneintrag wird zur Positionierung relativ */
#taskList li {
  position: relative;
}

/* Container für die Icons */
#taskList li .icons {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  gap: 0.7rem;
}

/* Icons wie Text, ohne Button-Optik */
#taskList li .icons button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-size: 1.2rem;   /* Icons etwas größer */
  line-height: 1;
  cursor: pointer;
  color: inherit;      /* Farbe übernimmt Textfarbe */
}

/* Spezieller Stil für den \"Neues To-Do\"-Button */
#addTaskBtn {
  background-color: #4caf50;     /* Grün z. B. */
  color: white;
  font-weight: bold;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

/* Optional: Hover-Effekt */
#addTaskBtn:hover {
  background-color: #45a045;
}

/* Auf kleinen Geräten 100% Breite */
@media (max-width: 600px) {
  #addTaskBtn {
    flex: 1 1 100%;
    width: 100%;
  }
}

