* {
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
  box-sizing: border-box;
}
.container {
  width: 100%;
  min-height: 100vh;
  background: linear-gradient(135deg, #153677, #4e085f);
  /* center the app both vertically and horizontally */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.todo-app {
  width: 100%;
  max-width: 540px;
  background-color: #fff;
  /* center via parent flex; remove large top margin that cut off card on small screens */
  margin: auto;
  padding: 30px 40px 80px;
  border-radius: 10px;
}

.align {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.todo-app h2 {
  color: #002765;
  text-transform: capitalize;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}
.todo-app img {
  width: 30px;
  margin-left: 10px;
}
.todo-app h3 {
  color: #002765;
  font-weight: normal;
  margin-bottom: 10px;
}
.page {
  display: none;
  display: flex;
  background: #edeef0;
  border-radius: 30px;
  /* use symmetric padding so children don't overflow the rounded container */
  padding: 8px 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.page.active {
  display: flex;
}
.page.hidden {
  display: none;
}
.task-input {
  /* text-transform: capitalize; */
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  /* ensure input can shrink inside flex (prevents overflow) */
  min-width: 0;
  padding: 10px 12px;
  font-weight: normal; /* stronger weight so placeholder/text is clearer */
  color: #002765;
}

/* clearer placeholder color for better legibility */
.task-input::placeholder {
  color: rgba(0, 39, 101, 0.5);
}

button {
  text-transform: capitalize;
  border: none;
  outline: none;
  /* slightly smaller horizontal padding to avoid pushing out of container */
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: bold;
  background: red;
  cursor: pointer;
}

.week-list li {
  border-radius: 10px;
  list-style: none;
  padding: 12px 8px 15px;
  user-select: none;
  font-size: 17px;
  cursor: pointer;
  position: relative;
  display: flex;
}

.week-list li.checked::before {
  background-image: url(images/checked.png);
}
.week-list li span {
  position: absolute;
  right: 0;
  top: 5px;
  width: 40px;
  height: 40px;
  font-size: 40px;
  border-radius: 50%;
}
.week-list li span:hover {
  color: red;
  transition: all 0.3s ease-in-out 0.1s;
}

.hidden {
  display: none;
}

/* make inner .day containers flex so their .task-input children can flex */
/* .page .day  .task-input{
   text-transform: capitalize;
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 10px;
  font-weight: lighter;
} */

/* Responsive fixes for the input + button inside .page on small screens */
@media (max-width: 480px) {
  .todo-app {
    margin: 40px 12px;
    padding: 20px;
  }

  .page {
    flex-direction: column;
    align-items: stretch; /* make children take full width */
    padding: 8px 12px;
    gap: 10px;
  }

  /* allow the input to shrink properly inside flex containers */
  .page .task-input {
    flex: none;
    width: 100%;
    min-width: 0; /* prevents overflow in some browsers */
    padding: 12px;
    font-size: 16px;
  }

  /* only make page-related action buttons full-width on small screens
     (avoid affecting global buttons like the back button) */
  .page button,
  .add-task-btn,
  #weekListPage > button {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
  }
}
