* {
  box-sizing: border-box;
  caret-color: transparent;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #dddddd;
  /* background-color: #4b4b4b; */
  color: #111827;
  line-height: 1.6;
}

/* Layout umum */
.site-header {
  text-align: center;
  padding: 1.5rem 1rem 1.5rem;
  background-color: #111827;
  color: #f9fafb;
}

.site-header h1 {
  font-size: 1.8rem;
  padding-bottom: 4px;
}
.site-header h1 span{
  color: rgb(124, 244, 253);
}

.site-header .subtitle {
  color: #c6cbd2;
}

.site-main {
  max-width: 600px;
  margin: 1.5rem auto 2rem;
  padding: 0 1rem;
}

.card {
  background-color: #111827;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: -8px 8px 4px rgba(41, 31, 101, 0.199);
}

.card h2 {
  margin-bottom: 0.75rem;
  color: rgb(255, 255, 255);
}

/* Form */
.todo-form {
  display: flex;
  gap: 0.5rem;
}

.todo-form input[type="text"] {
  flex: 1;
  padding: 0.5rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
  cursor: text;
  caret-color: black;
}

.todo-form input[type="text"]:focus {
  background-color: #d0cfcf;
  outline: none;
  box-shadow: 0 0 0 1px #2563eb33;
}

.todo-form button {
  padding: 0.5rem 0.9rem;
  border-radius: 0.5rem;
  border: none;
  background-color: #2563eb;
  color: #ffffff;
  font-size: 0.9rem;
  cursor: pointer;
}

.todo-form button:hover {
  background-color: #1d4ed8;
}

.error-message {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #b91c1c;
  background-color: #fdcaca;
  box-sizing: border-box;
  padding: 4px 8px;
  border-radius: 8px;
  display: none;
}

.error-message.show {
  display: inline-block; 
}

/* Daftar tugas */
.todo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  background-color: rgb(255, 255, 255);
}

.todo-item:last-child {
  border-bottom: none;
}

.todo-text {
  flex: 1;
  font-size: 0.95rem;
}

/* Tugas selesai */
.todo-item.completed .todo-text {
  text-decoration: line-through;
  color: #6b7280;
}

/* Tombol aksi */
.todo-actions {
  display: flex;
  gap: 0.35rem;
}

.todo-actions button {
  padding: 0.3rem 0.6rem;
  border-radius: 0.5rem;
  border: none;
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-complete {
  background-color: #10b981;
  color: #ffffff;
}

.btn-complete:hover {
  background-color: #059669;
}

.btn-delete {
  background-color: #ef4444;
  color: #ffffff;
}

.btn-delete:hover {
  background-color: #dc2626;
}

/* Footer */
.site-footer {
  text-align: center;
  font-size: 0.8rem;
  color: #6b7280;
  padding: 0.75rem 1rem 1rem;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.551);  
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup {
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.popup-actions {
  justify-content: center;
  display: flex;
  flex-direction: row;
  gap: 16px;
}


.btn-yes {
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  background-color: #10b981;
  color: white;
  outline: none;
}

.btn-yes:hover {
  background-color: #059669;
}

.btn-no {
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  background-color: #ef4444;
  color: white;
  outline: none;
}

.btn-no:hover {
  background-color: #dc2626;
}