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

body {
  font-family: "Poppins", sans-serif;
  background-color: #07111f;
  color: #ffffff;
}

.container {
  width: 480px;
  margin: 60px auto;
  background-color: #142a43;
  padding: 25px 30px 35px;
  border-radius: 14px;
  /* box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6); */
  transition: 0.3s ease-in-out;
  transform: scale(1);
  box-shadow: 0 0 25x rgba(0, 150, 255, 0.4) 0 0 25x rgba(0, 150, 255, 0.2);
}

/* .container:hover {
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.5), 0 0 50px rgba(124, 58, 237, 0.4),
    0 0 80px rgba(0, 255, 255, 0.25);
  transform: scale(1.02);
} */

h1 {
  text-align: center;
  font-size: 30px;
  margin-bottom: 20px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
}

h1::after {
  content: "";
  display: block;
  width: 120px;
  height: 3px;
  margin: 8px auto 0;
  background: #0ff4f2;
  border-radius: 2px;
}

#task-input {
  flex: 1;
  min-width: 0;
  padding: 10px;
  border-radius: 6px;
  background-color: #1e324d;
  color: #ffffff;
  border: 1px solid #0ff4f2;
  font-size: 14px;
}

#task-input::placeholder {
  color: #aab8d3;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
}

#task-input:focus {
  outline: none;
  box-shadow: 0 0 10px #0ff4f2, 0 0 20px rgba(15, 244, 242, 0.6),
    0 0 30px rgba(15, 244, 242, 0.4);
  border: 1px solid #0ff4f2;
}

.btns {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 15px;
  flex-wrap: wrap;
}

#add-btn,
#com-btn,
#del-btn,
#reset-btn,
#undo-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  background-color: #0ff4f2;
  color: #0a1326;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
  font-size: 14px;
}

#add-btn:hover,
#com-btn:hover,
#del-btn:hover,
#reset-btn:hover,
#undo-btn:hover {
  background-color: #00e0e4;
  transform: translateY(-2px);
  box-shadow: 0 0 8px #0ff4f2, 0 0 18px #0ff4f2,
    0 0 28px rgba(15, 244, 242, 0.7);
}

#add-btn:active {
  transform: scale(0.95);
}
#add-btn:focus {
  outline: none;
}

.input-section {
  margin-top: 8px;
  display: flex;
  gap: 10px;
}

#task-list {
  list-style: none;
  padding-left: 0;
  margin-top: 18px;
}

.task-item {
  background: rgba(27, 46, 68, 0.8);
  padding: 10px 14px;
  margin-top: 12px;
  border-radius: 10px;
  font-size: 14px;
  color: #e0ecff;
  border: 1px solid rgba(0, 255, 255, 0.15);
  border-left: 3px solid #0ff4f2;
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: "Inter", sans-serif;
  transition: 0.3s ease-in-out;
  backdrop-filter: blur(6px);
}

.task-item:hover {
  border-color: #0ff4f2;
  box-shadow: 0 0 18px rgba(15, 244, 242, 0.4);
  transform: translateY(-3px);
  cursor: pointer;
  border-radius: 10px;
}

.task-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #00eaff;
  border-radius: 4px;
  background-color: transparent;
  cursor: pointer;
  transition: 0.25s ease-in-out;
  position: relative;
}

.task-checkbox:hover {
  box-shadow: 0 0 6px #00eaff;
  transform: scale(1.15);
}

.task-checkbox:checked {
  background-color: #00eaff;
  border-color: #00eaff;
  box-shadow: 0 0 10px #00eaff;
}

.task-checkbox:checked::after {
  content: "✔";
  font-size: 12px;
  color: #001d3d;
  position: absolute;
  top: -2px;
  left: 2px;
}

.completed .task-text {
  text-decoration: line-through;
  color: #7ea0b4;
}

.completed .task-checkbox {
  opacity: 0.7; /* Highly faded */
  box-shadow: none;
  /* cursor: not-allowed; */
}

.stats {
  margin-top: 20px;
  padding: 12px 18px;
  font-size: 14px;
  color: #eaf6ff;
  backdrop-filter: blur(5px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  gap: 8px;
}
.stats-panel p {
  margin: 0;
}

#task-input:-webkit-autofill,
#task-input:-webkit-autofill:hover,
#task-input:-webkit-autofill:focus,
#task-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 10px #0ff4f2, 0 0 20px rgba(15, 244, 242, 0.6),
    0 0 30px rgba(15, 244, 242, 0.4), 0 0 0 1000px #1e324d inset !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 1px solid #0ff4f2 !important;
  background-color: #1e324d !important;
  caret-color: #ffffff;
  transition: background-color 9999s ease-in-out 0s;
}

/* Tablets */
@media (max-width: 768px) {
  .container {
    width: 90%;
  }
  .btns {
    gap: 12px;
  }
  .btns button {
    padding: 8px 12px;
    font-size: 14px;
  }
  .stats {
    font-size: 14px;
  }
}

/* Large phones */
@media (max-width: 600px) {
  .btns {
    gap: 10px;
  }
  .btns button {
    font-size: 13px;
    min-width: 90px;
    padding: 8px 10px;
  }
  .stats {
    font-size: 13px;
  }
}

/* Regular phones */
@media (max-width: 480px) {
  .btns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    justify-content: center;
    justify-items: center;
    margin-top: 25px;
  }

  #task-list {
    margin-bottom: 25px;
  }

  .btns button {
    width: 100%;
    max-width: 140px;
    text-align: center;
    font-size: 13px;
    padding: 10px 0;
  }

  .stats {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 8px;
    font-size: 13px;
    margin-top: 25px;
  }
}

/* Very Tiny Screens 320px */
@media (max-width: 320px) {
  .btns {
    grid-template-columns: 1fr;
  }

  .btns button {
    font-size: 11px;
    padding: 8px 0;
  }

  .stats {
    font-size: 11px;
  }
}
