* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background: linear-gradient(to right, #9494f5, #6d68e4);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 700px;
  background-color: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.header {
  background-color: #4844b2;
  color: white;
  text-align:center;
  padding: 2rem 1rem;
}

.header h1 {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.header p {
  font-size: 1rem;
  opacity: 0.9;
}

.task-input {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 1rem;
  padding: 1.5rem;
  justify-content: center;
}

.task-input input {
  flex: 1;
  padding: 0.8rem 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
}

.hide{
  text-decoration: line-through;
  color: #666363;
}


.hide1{
  text-decoration: line-through;
  color: #666363;
  text-decoration-color:black; 
}


.task-input button {
  background-color: #4844b2;
  color: white;
  border: none;
  padding: 0 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  width: auto;
}

.task-list {
  display: flex;
  flex-direction: column;
}

.task {
  display:flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  border-top: 1px solid #eee;
  background-color: #fff;
}


.task-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.task label {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.complete-checkbox{
  transform: scale(1.8);
  margin-right: 1rem;
  cursor: pointer;
}

.edit-btn{
  margin-right:0.8rem;
  cursor: pointer;
  border: none;
  background-color: #4844b2;
  color: white;
  border-radius: 4px;
  padding: 3px;
}

.edit-btn:active {
  background-color: #222279;
  transition: 0.1s ease-in-out;
}

.delete-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #444;
}

.todo-name{
  font-size: 1.2rem;
  font-weight: bold;
  margin-left: 0.5rem;
  overflow-wrap: break-word;
  word-wrap: break-word;
  white-space: normal;
}
.colored{
  color: #4844b2;
  font-weight: bold;
  font-size: 1.2rem;
  margin-left: 0.5rem;
}

.rap{
  flex-wrap: nowrap;
  white-space: nowrap;
}

.colored1{
  color: #d02a15;
  font-weight: bold;
  font-size: 1.2rem;
  margin-left: 0.5rem;
}

@media (max-width:575px){
  .container{
    margin: 20px;
  }
  .task-input{
    grid-template-columns:1fr;
  }
  .js-date{
    width: 100%;
  }

  .task-input button{
    padding: 0.8rem 0;
  }
  .colored , .colored1{
    font-size: 1rem;
  }

  .delete-btn{
    font-size: small;
  }
  .complete-checkbox{
    transform: scale(1.2);
  }
  .edit-btn{
    padding: 2px;
    font-size: 0.6rem;
  } 
  .js-time{
    width: 100%;
    min-width: 100%;
  }
}


@media (min-width:576px) and (max-width:769px) {
  .container {
    width: 100%;
    max-width: 95%;
    box-sizing: border-box;
  }

  .task-input {
    grid-template-columns: 1fr 1fr; /* Split into 2 columns */
    gap: 1rem;
  }

  .task-input input,
  .task-input button {
    width: 100%;
  }

  .task-input span {
    width: 100%;
  }

  .js-date,
  .js-time {
    width: 100%;
  }

  .js-time{
    grid-column: 1 /span 2;
    justify-self: center;
    width: 50%;
  }

  .task-input button {
    grid-column: span 2; /* Make the button full width under inputs */
    padding: 0.8rem;
  }
}
