/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: sans-serif;
  padding: 1rem;
  background-color: #f9f9f9;
  color: #333;
}

/* Title Section */
.title-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  text-align: center;
}

.todo-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-decoration: underline;
}

.todo-img {
  height: 3rem;
}

/* Main Content */
.todo-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
}

/* Input Section */
.input-section {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.todo-input {
  flex: 1 1 250px;
  padding: 1rem;
  border-radius: 5rem;
  border: 1px solid #ccc;
}

.todo-date {
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid #ccc;
  text-align: center;
  flex: 0 1 180px;
}

.add-button {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: greenyellow;
  border: none;
  font-weight: 700;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.task-name {
    margin-right: 1rem;
}

.add-button:hover {
  background-color: limegreen;
  color: white;
}

/* To-Do List Container */
.list-container {
  padding: 1rem;
  border: 2px solid black;
  border-radius: 1rem;
  background-color: #fff;
}

.todo-subcontent {
  padding: 1rem;
  max-height: 50vh;
  overflow-y: auto;
}

.todo-subcontent::-webkit-scrollbar {
  width: 6px;
}

.todo-subcontent::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.todo-subcontent::-webkit-scrollbar-track {
  background-color: transparent;
}

/* Utility styles */
.separate-line {
  border-top: 1px solid black;
  margin: 0.5rem 0;
}

.content-section {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.user-content {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.content-section .remove-btn {
    height: 2rem;
}

.user-content {
    flex-wrap: wrap;
}

.task-name {
    width: 75%;
    word-break: break-all;
}

/* Back Button */
.todo-back {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  width: 10rem;
  height: 4rem;
  border-radius: 5rem;
  background-color: rgba(127, 127, 243, 0.788);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  transition: all 0.3s ease;
}

.todo-back:hover {
  background-color: black;
  color: white;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .title-section {
    flex-direction: column;
  }

  .input-section {
    flex-direction: column;
    align-items: stretch;
  }

  .add-button {
    align-self: center;
  }

  .todo-input,
  .todo-date {
    flex: 1 1 50px;
    width: 100%;
  }

  .todo-back {
    width: 100%;
    right: 0;
    border-radius: 0;
  }
}
    
@media (max-width: 585px) {
    .task-name {
        width: 50%;
    }
}

@media (max-width: 425px) {
    .task-name {
        width: 50%;
    }

    .task-date {
        width: 36%;
    }
}
