* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body Styling */
body {
  font-family: Arial, sans-serif;
  background-image: url("images/pic1.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  height: 100vh;
  padding: 5px 20px;
}


nav{
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: center;
  gap: 430px;
  width: 100%;
  margin-left: 0;
  margin-bottom: 10px;
}


img{
  position: relative;
  height: 100px;
  width: 100px;
  padding: 5px;
  border-radius: 15px;
}

nav .title{
  font-size: 40px;
  font-weight: bold;
  font-style: italic;
  font-family:'Times New Roman';
  width: 220px;
  
}


#containerbody{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center; 
  padding-bottom: 10px;
  margin-top: 21px;
}

.containerbody{
  background-color: white; 
  padding: 20px 15px 20px 15px; 
  width: 600px;
  height: 300px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 500px;      /* or whatever fits your design */
  overflow-y: auto;       /* allows vertical scrolling */
  overflow-x: hidden;     /* hides horizontal overflow */
  
}


.containerbody h2{
  font-size: 22px;
  display: flex;
  align-items: center;
  border-bottom: 10px;
}

.containerbody h2 img{
  height: 30px;
  width: 30px;
}


.row{
  position: relative;
  display: flex;
  flex-direction: row;
  gap: 5px;
}


.row input{ 
  width: 80%;
  border-radius: 20px;
  padding: 10px 15px;
  outline: none;
  border: none;
  background: #f0f0f0;
}


.row button{
  width: 100px;
  margin-left: -25px;
  background-color: rgb(167, 110, 53);
  border-radius: 8px;
  outline: none;
  border: none;
}



.row button:hover {
  background-color: rgb(150, 100, 50);
  color: black;
}



footer{
  margin-top: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  color: rgb(239, 190, 127);
}



footer .credits{
  text-align: center;
}

strong, .name{
  color: rgb(188, 140, 78);
  font-weight: bold;
}

ul {
  padding: 0;
  list-style: none;
}

ul li {
  position: relative;
  padding: 12px 80px 12px 40px; /* leave more space for span */
  margin-bottom: 12px;
  background: #f0f0f0;
  border-radius: 8px;
  font-size: 18px;
  user-select: none;
}

/* CHECK CIRCLE */
ul li::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  height: 24px;
  width: 24px;
  border-radius: 50%;
  background-image: url(images/unchecked.jpg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

/* WHEN ITEM IS CHECKED */
ul li.checked {
  color: #555;
  text-decoration: line-through;
}

ul li.checked::before {
  background-image: url(images/checked.jpg);
}

/* DELETE BUTTON */
ul li span {
  position: absolute;
  right: 10px;
  top: 7px;
  width: 80px;
  height: 30px;
  background: rgb(188, 140, 78);
  color: white;
  text-align: center;
  border-radius: 6px;
  line-height: 30px;
  font-size: 13px;
  cursor: pointer;
}

ul li span:hover {
  background-color: rgb(150, 100, 50);
  color: black;
}

.copyright a{
  text-decoration: none;
}


@media (max-width: 480px) {
  body {
    padding: 10px;
    background-size: cover;
  }

  nav {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  nav img {
    height: 70px;
    width: 70px;
  }

  nav .title {
    font-size: 24px;
    width: auto;
  }

  .containerbody {
    width: 100%;
    height: auto;
    padding: 15px;
  }

  .row {
    flex-direction: column;
    gap: 10px;
  }

  .row input {
    width: 100%;
  }

  .row button {
    width: 100%;
    margin-left: 0;
  }

  ul li {
    padding: 12px 60px 12px 40px;
    font-size: 16px;
  }

  ul li span {
    width: 50px;
    height: 28px;
    font-size: 12px;
    line-height: 28px;
  }

  footer {
    margin-top: 60px;
    font-size: 14px;
  }
}

/* ====== MEDIUM SCREENS (Tablets) ====== */
@media (min-width: 481px) and (max-width: 768px) {
  nav {
    gap: 50px;
    justify-content: space-between;
  }

  nav img {
    height: 80px;
    width: 80px;
  }

  nav .title {
    font-size: 28px;
  }

  .containerbody {
    width: 90%;
    height: auto;
  }

  .row input {
    width: 70%;
  }

  .row button {
    width: 100px;
  }
}

/* ====== LARGE SCREENS (Desktops & Up) ====== */
@media (min-width: 1200px) {
  nav .title {
    font-size: 48px;
  }

  .containerbody {
    width: 700px;
  }

  .containerbody h2 {
    font-size: 26px;
  }
}