* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #d2d2d2;
  background-image: repeating-linear-gradient(
      to right,
      transparent 0 100px,
      #25283b22 100px 101px
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0 100px,
      #25283b22 100px 101px
    );
  font-family: Arial, sans-serif;
  overflow-x: hidden;
}

body::before {
  position: absolute;
  width: min(1400px, 90vw);
  top: 10%;
  left: 50%;
  height: 90%;
  transform: translateX(-50%);
  content: "";
  background-image: url(images/bg.png);
  background-size: 100%;
  background-repeat: no-repeat;
  background-position: top center;
  pointer-events: none;
}

.banner {
  width: 100%;
  height: 100vh;
  text-align: center;
  overflow: hidden;
  position: relative;
}

.todo-form {
  position: relative;
  margin: 20px auto;
  max-width: 600px;
  padding: 20px 30px;
  z-index: 3;
  background: #f0f0f0;
  color: rgba(0, 0, 0, 0.4);
  font-size: 1.5em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: 0.5s;
  border-radius: 5px;
  opacity: 0.7;
  box-shadow: 5px 5px 15px grey;
  overflow: hidden;
}

.todo-form:hover {
  color: var(--clr);
  letter-spacing: 0.25em;
  text-shadow: 0 0 5px var(--clr);
}

.todo-form span {
  position: absolute;
  display: block;
  background: var(--clr);
  box-shadow: 0 0 5px var(--clr);
}

.todo-form span:nth-child(1) {
  left: 0;
  top: 0;
  width: 50.5%;
  height: 1.5px;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.5s;
}

.todo-form:hover span:nth-child(1) {
  transform: scaleX(1);
  transform-origin: right;
}

.todo-form span:nth-child(2) {
  right: 0;
  top: 0;
  width: 50.5%;
  height: 1.5px;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.5s;
}

.todo-form:hover span:nth-child(2) {
  transform: scaleX(1);
  transform-origin: left;
}

.todo-form span:nth-child(3) {
  right: 0;
  top: 0;
  width: 1.5px;
  height: 100%;
  transform-origin: bottom;
  transform: scaleY(0);
  transition: transform 0.5s;
  transition-delay: 0.4s;
}

.todo-form:hover span:nth-child(3) {
  transform: scaleY(1);
  transform-origin: top;
}

.todo-form span:nth-child(4) {
  left: 0;
  top: 0;
  width: 1.5px;
  height: 100%;
  transform-origin: bottom;
  transform: scaleY(0);
  transition: transform 0.5s;
  transition-delay: 0.4s;
}

.todo-form:hover span:nth-child(4) {
  transform: scaleY(1);
  transform-origin: top;
}

.todo-form span:nth-child(5) {
  left: 0;
  bottom: 0;
  width: 50.5%;
  height: 1.5px;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.5s;
  transition-delay: 0.8s;
}

.todo-form:hover span:nth-child(5) {
  transform: scaleX(1);
  transform-origin: left;
}

.todo-form span:nth-child(6) {
  right: 0;
  bottom: 0;
  width: 50.5%;
  height: 1.5px;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.5s;
  transition-delay: 0.8s;
}

.todo-form:hover span:nth-child(6) {
  transform: scaleX(1);
  transform-origin: right;
}

.todo-form h2 {
  margin: 0;
  padding: 0;
}

.form-content {
  max-height: 0;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.3s ease;
  overflow: hidden;
}

.todo-form:hover .form-content {
  max-height: 300px;
  opacity: 1;
}

.form-group {
  margin-bottom: 15px;
}

input {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  box-sizing: border-box;
}

.priority-options {
  margin-top: 5px;
}

.priority-btn,
#addBtn,
.completeBtn,
.deleteBtn {
  position: relative;
  display: inline-block;
  padding: 8px 15px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  background: #c1c1c2;
  color: rgba(0, 0, 0, 0.4);
  font-size: 1em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: 0.5s;
}

.priority-btn:hover,
#addBtn:hover,
.completeBtn:hover,
.deleteBtn:hover {
  color: var(--clr);
  letter-spacing: 0.25em;
  text-shadow: 0 0 5px var(--clr);
}

.priority-btn span,
#addBtn span,
.completeBtn span,
.deleteBtn span {
  position: absolute;
  display: block;
  background: var(--clr);
  box-shadow: 0 0 5px var(--clr);
}

.priority-btn span:nth-child(1),
#addBtn span:nth-child(1),
.completeBtn span:nth-child(1),
.deleteBtn span:nth-child(1) {
  left: 0;
  top: 0;
  width: 50.5%;
  height: 1.5px;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.5s;
}

.priority-btn:hover span:nth-child(1),
#addBtn:hover span:nth-child(1),
.completeBtn:hover span:nth-child(1),
.deleteBtn:hover span:nth-child(1) {
  transform: scaleX(1);
  transform-origin: right;
}

.priority-btn span:nth-child(2),
#addBtn span:nth-child(2),
.completeBtn span:nth-child(2),
.deleteBtn span:nth-child(2) {
  right: 0;
  top: 0;
  width: 50.5%;
  height: 1.5px;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.5s;
}

.priority-btn:hover span:nth-child(2),
#addBtn:hover span:nth-child(2),
.completeBtn:hover span:nth-child(2),
.deleteBtn:hover span:nth-child(2) {
  transform: scaleX(1);
  transform-origin: left;
}

.priority-btn span:nth-child(3),
#addBtn span:nth-child(3),
.completeBtn span:nth-child(3),
.deleteBtn span:nth-child(3) {
  right: 0;
  top: 0;
  width: 1.5px;
  height: 100%;
  transform-origin: bottom;
  transform: scaleY(0);
  transition: transform 0.5s;
  transition-delay: 0.4s;
}

.priority-btn:hover span:nth-child(3),
#addBtn:hover span:nth-child(3),
.completeBtn:hover span:nth-child(3),
.deleteBtn:hover span:nth-child(3) {
  transform: scaleY(1);
  transform-origin: top;
}

.priority-btn span:nth-child(4),
#addBtn span:nth-child(4),
.completeBtn span:nth-child(4),
.deleteBtn span:nth-child(4) {
  left: 0;
  top: 0;
  width: 1.5px;
  height: 100%;
  transform-origin: bottom;
  transform: scaleY(0);
  transition: transform 0.5s;
  transition-delay: 0.4s;
}

.priority-btn:hover span:nth-child(4),
#addBtn:hover span:nth-child(4),
.completeBtn:hover span:nth-child(4),
.deleteBtn:hover span:nth-child(4) {
  transform: scaleY(1);
  transform-origin: top;
}

.priority-btn span:nth-child(5),
#addBtn span:nth-child(5),
.completeBtn span:nth-child(5),
.deleteBtn span:nth-child(5) {
  left: 0;
  bottom: 0;
  width: 50.5%;
  height: 1.5px;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.5s;
  transition-delay: 0.8s;
}

.priority-btn:hover span:nth-child(5),
#addBtn:hover span:nth-child(5),
.completeBtn:hover span:nth-child(5),
.deleteBtn:hover span:nth-child(5) {
  transform: scaleX(1);
  transform-origin: left;
}

.priority-btn span:nth-child(6),
#addBtn span:nth-child(6),
.completeBtn span:nth-child(6),
.deleteBtn span:nth-child(6) {
  right: 0;
  bottom: 0;
  width: 50.5%;
  height: 1.5px;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.5s;
  transition-delay: 0.8s;
}

.priority-btn:hover span:nth-child(6),
#addBtn:hover span:nth-child(6),
.completeBtn:hover span:nth-child(6),
.deleteBtn:hover span:nth-child(6) {
  transform: scaleX(1);
  transform-origin: right;
}

/* Priority button specific styles */
.priority-btn.selected {
  font-weight: bold;
  color: var(--clr);
}

.priority-btn.priority-low.selected {
  background: green;
}

.priority-btn.priority-medium.selected {
  background: yellow;
  color: black;
}

.priority-btn.priority-high.selected {
  background: red;
}

.priority-btn.selected {
  font-weight: bold;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.sort-controls {
  position: relative;
  margin: 10px auto;
  max-width: 300px; /* Smaller than todo-form and todoList */
  padding: 10px 20px; /* Smaller padding */
  text-align: center;
  z-index: 3;
  background: #f0f0f0;
  color: rgba(0, 0, 0, 0.4);
  font-size: 1.2em; /* Slightly smaller than todo-form */
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: 0.5s;
  border-radius: 5px;
  opacity: 0.7;
  box-shadow: 5px 5px 15px grey;
}

.sort-controls:hover {
  color: var(--clr);
  letter-spacing: 0.25em;
  text-shadow: 0 0 5px var(--clr);
}

.sort-controls span {
  position: absolute;
  display: block;
  background: var(--clr);
  box-shadow: 0 0 5px var(--clr);
}

.sort-controls span:nth-child(1) {
  left: 0;
  top: 0;
  width: 50.5%;
  height: 1.5px;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.5s;
}

.sort-controls:hover span:nth-child(1) {
  transform: scaleX(1);
  transform-origin: right;
}

.sort-controls span:nth-child(2) {
  right: 0;
  top: 0;
  width: 50.5%;
  height: 1.5px;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.5s;
}

.sort-controls:hover span:nth-child(2) {
  transform: scaleX(1);
  transform-origin: left;
}

.sort-controls span:nth-child(3) {
  right: 0;
  top: 0;
  width: 1.5px;
  height: 100%;
  transform-origin: bottom;
  transform: scaleY(0);
  transition: transform 0.5s;
  transition-delay: 0.4s;
}

.sort-controls:hover span:nth-child(3) {
  transform: scaleY(1);
  transform-origin: top;
}

.sort-controls span:nth-child(4) {
  left: 0;
  top: 0;
  width: 1.5px;
  height: 100%;
  transform-origin: bottom;
  transform: scaleY(0);
  transition: transform 0.5s;
  transition-delay: 0.4s;
}

.sort-controls:hover span:nth-child(4) {
  transform: scaleY(1);
  transform-origin: top;
}

.sort-controls span:nth-child(5) {
  left: 0;
  bottom: 0;
  width: 50.5%;
  height: 1.5px;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.5s;
  transition-delay: 0.8s;
}

.sort-controls:hover span:nth-child(5) {
  transform: scaleX(1);
  transform-origin: left;
}

.sort-controls span:nth-child(6) {
  right: 0;
  bottom: 0;
  width: 50.5%;
  height: 1.5px;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.5s;
  transition-delay: 0.8s;
}

.sort-controls:hover span:nth-child(6) {
  transform: scaleX(1);
  transform-origin: right;
}

.sort-controls label {
  margin-right: 10px;
  font-size: 1em; /* Match internal font size */
}

.sort-controls select {
  padding: 5px 10px; /* Slightly larger for usability */
  font-size: 1em;
  border-radius: 3px;
  background: #c1c1c2; /* Match button style */
  color: rgba(0, 0, 0, 0.4);
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: 0.5s;
}

.sort-controls select:hover,
.sort-controls select:focus {
  background: var(--clr);
  color: rgba(0, 0, 0, 0.4);
  letter-spacing: 0.25em;
  outline: none; /* Remove default focus outline */
}

#todoList {
  position: relative;
  margin: 10px auto;
  max-width: 800px;
  text-align: center;
  z-index: 3;
  bottom: 100px;
  color: rgba(0, 0, 0, 0.4);
  font-size: 1.5em;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  background: #f0f0f0;
  padding: 10px 30px;
  transition: 0.5s;
  opacity: 0.8;
  max-height: 300px;
  overflow-y: auto;
  border-radius: 5px;
}

#todoList:hover {
  color: var(--clr);
  letter-spacing: 0.25em;
  text-shadow: 0 0 5px var(--clr);
}

#todoList span {
  position: absolute;
  display: block;
  background: var(--clr);
  box-shadow: 0 0 5px var(--clr);
}

#todoList span:nth-child(1) {
  left: 0;
  top: 0;
  width: 50.5%;
  height: 1.5px;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.5s;
}

#todoList:hover span:nth-child(1) {
  transform: scaleX(1);
  transform-origin: right;
}

#todoList span:nth-child(2) {
  right: 0;
  top: 0;
  width: 50.5%;
  height: 1.5px;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.5s;
}

#todoList:hover span:nth-child(2) {
  transform: scaleX(1);
  transform-origin: left;
}

#todoList span:nth-child(3) {
  right: 0;
  top: 0;
  width: 1.5px;
  height: 100%;
  transform-origin: bottom;
  transform: scaleY(0);
  transition: transform 0.5s;
  transition-delay: 0.4s;
}

#todoList:hover span:nth-child(3) {
  transform: scaleY(1);
  transform-origin: top;
}

#todoList span:nth-child(4) {
  left: 0;
  top: 0;
  width: 1.5px;
  height: 100%;
  transform-origin: bottom;
  transform: scaleY(0);
  transition: transform 0.5s;
  transition-delay: 0.4s;
}

#todoList:hover span:nth-child(4) {
  transform: scaleY(1);
  transform-origin: top;
}

#todoList span:nth-child(5) {
  left: 0;
  bottom: 0;
  width: 50.5%;
  height: 1.5px;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.5s;
  transition-delay: 0.8s;
}

#todoList:hover span:nth-child(5) {
  transform: scaleX(1);
  transform-origin: left;
}

#todoList span:nth-child(6) {
  right: 0;
  bottom: 0;
  width: 50.5%;
  height: 1.5px;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.5s;
  transition-delay: 0.8s;
}

#todoList:hover span:nth-child(6) {
  transform: scaleX(1);
  transform-origin: right;
}

.banner .slider {
  position: absolute;
  width: 210px;
  height: 290px;
  top: 25%;
  left: calc(50% - 105px);
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(-16deg);
  animation: autoRun 100s linear infinite;
  z-index: 2;
  transition: transform 0.75s ease;
  scale: 0.85;
  cursor: pointer;
}

.banner .slider:hover {
  transform: perspective(1000px) rotateX(-16deg);
  scale: 1.05;
  transition: transform 0.75s ease;
}

@keyframes autoRun {
  from {
    transform: perspective(1000px) rotateX(-16deg) rotateY(0deg);
  }
  to {
    transform: perspective(1000px) rotateX(-16deg) rotateY(360deg);
  }
}

.banner .slider .item {
  position: absolute;
  inset: 0 0 0 0;
  transform: rotateY(
      calc((var(--position) - 1) * (360 / var(--quantity)) * 1deg)
    )
    translateZ(500px);
  transition: transform 0.75s ease;
  background: white;
  border-radius: 5px;
  padding: 10px;
  overflow: hidden;
  border: 5px solid;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.banner .slider .item.priority-low {
  border-color: green;
}

.banner .slider .item.priority-medium {
  border-color: yellow;
}

.banner .slider .item.priority-high {
  border-color: red;
}

.banner .slider .item.completed h3,
.banner .slider .item.completed p {
  text-decoration: line-through;
}

.banner .slider .item.completed {
  opacity: 0.6;
}

.banner .slider:hover .item {
  transform: rotateY(
      calc((var(--position) - 1) * (360 / var(--quantity)) * 1deg)
    )
    translateZ(550px) scale(1.05);
  transition: transform 0.3s ease;
}

.banner .slider .item h3 {
  font-size: 16px;
  margin-bottom: 5px;
  max-width: 130px;
  word-wrap: break-word;
}

.banner .slider .item p {
  font-size: 12px;
  margin-bottom: 5px;
  max-width: 130px;
  word-wrap: break-word;
}

.banner .slider .item .todoActions {
  margin-top: 5px;
}

.todo-item {
  border: 1px solid #ddd;
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 5px;
  position: relative;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.todo-item.priority-low {
  border-left: 5px solid green;
}

.todo-item.priority-medium {
  border-left: 5px solid yellow;
}

.todo-item.priority-high {
  border-left: 5px solid red;
}

.todo-item.completed h3,
.todo-item.completed p {
  text-decoration: line-through;
}

.todo-item.completed {
  opacity: 0.6;
}

.todoActions {
  margin-top: 10px;
}

/* Specific styles for completeBtn and deleteBtn */
.completeBtn {
  padding: 5px 10px;
  font-size: 0.8em;
  margin-right: 5px;
  background: #c1c1c2;
  color: rgba(0, 0, 0, 0.4);
}

.completeBtn:hover,
.completeBtn:active {
  background: #4caf50;
  color: white;
  letter-spacing: 0.25em;
  text-shadow: 0 0 5px #4caf50;
}

.deleteBtn {
  padding: 5px 10px;
  font-size: 0.8em;
  background: #c1c1c2;
  color: rgba(0, 0, 0, 0.4);
}

.deleteBtn:hover,
.deleteBtn:active {
  background: #f44336;
  color: white;
  letter-spacing: 0.25em;
  text-shadow: 0 0 5px #f44336;
}

.banner .content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.banner .content .model {
  width: 100%;
  height: 70%;
  background-image: url("image/Cynthia.webp");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center 250px;
}

.banner .content .model img {
  max-width: 100%;
  max-height: 80%;
  object-fit: cover;
}

/* Responsive Adjustments */
@media screen and (max-width: 1279px) {
  .banner .slider {
    width: 180px;
    height: 250px;
    left: calc(50% - 90px);
    scale: 0.9;
  }
  .banner .slider .item {
    transform: rotateY(
        calc((var(--position) - 1) * (360 / var(--quantity)) * 1deg)
      )
      translateZ(480px);
  }
  .banner .slider:hover .item {
    transform: rotateY(
        calc((var(--position) - 1) * (360 / var(--quantity)) * 1deg)
      )
      translateZ(510px) scale(1.05);
  }
}

@media screen and (max-width: 1023px) {
  .banner .slider {
    width: 160px;
    height: 220px;
    left: calc(50% - 80px);
    scale: 0.8;
  }
  .banner .slider .item {
    transform: rotateY(
        calc((var(--position) - 1) * (360 / var(--quantity)) * 1deg)
      )
      translateZ(460px);
  }
  .banner .slider:hover .item {
    transform: rotateY(
        calc((var(--position) - 1) * (360 / var(--quantity)) * 1deg)
      )
      translateZ(490px) scale(1.05);
  }
}

@media screen and (max-width: 767px) {
  .banner .slider {
    width: 160px;
    height: 220px;
    left: calc(50% - 80px);
    scale: 0.8;
  }
  .banner .slider .item {
    transform: rotateY(
        calc((var(--position) - 1) * (360 / var(--quantity)) * 1deg)
      )
      translateZ(440px);
  }
  .banner .slider:hover .item {
    transform: rotateY(
        calc((var(--position) - 1) * (360 / var(--quantity)) * 1deg)
      )
      translateZ(470px) scale(1.05);
  }
  .todo-form,
  #addBtn,
  .priority-btn,
  .completeBtn,
  .deleteBtn {
    font-size: 0.9em;
    padding: 6px 12px;
  }
  .completeBtn,
  .deleteBtn {
    padding: 4px 8px;
    font-size: 0.7em;
  }
  .form-content {
    max-height: 400px;
  }
  #todoList {
    max-height: 250px;
  }
  .sort-controls {
    max-width: 250px;
    padding: 8px 15px;
    font-size: 1em;
  }
  .sort-controls select {
    padding: 4px 8px;
  }
}
