* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(
      150deg,
      rgba(173, 108, 42, 1) 10%,
      rgba(120, 39, 105, 1) 85%
    )
    no-repeat;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  /* border: 3px solid green; */
}

h1 {
  color: white;
  font-family: "Kodchasan", sans-serif;
  font-weight: 500;
  font-style: normal;
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 20px;
}

#container {
  width: 100vw;
  height: 100dvh;
  /* padding-left: 15px; */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow-x: hidden;
}

#kanban-board {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  overflow-x: auto;
  width: 100vw;
  height: calc(100dvh - 100px);
  padding: 0 15px;
  padding-bottom: 20px;
}

.column {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 15px;
  min-width: 90%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background-color: red;
  height: 50px;
  padding: 20px 10px;
  border-radius: 15px 15px 0 0;
  position: sticky;
  top: 0;
}

h2 {
  color: white;
  font-family: "Kodchasan", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(1.5rem, 2vw, 2.5rem);
}

#todo {
  background-color: #782669;
}

#in-progress {
  background-color: #8a2be2;
}

#done {
  background-color: #4caf50;
}

#add-task-btn {
  font-size: clamp(2rem, 3vw, 2.5rem);
  background-color: transparent;
  border: none;
  width: 50px;
  height: 50px;
  color: white;
  cursor: pointer;
  transition: transform 0.1s ease;
}

#add-task-btn:active {
  transform: scale(0.95);
}

.task {
  width: 95%;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "task-title task-title edit-task delete-task"
    "task-description task-description task-description task-description";
  grid-template-rows: auto 1fr;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 15px;
  padding: 10px;
  margin-top: 10px;
  touch-action: none;
  user-select: none;
}

.task-title {
  grid-area: task-title;
  font-family: "Host Grotesk", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  color: white;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  padding: 10px 0;
}

img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.edit-task {
  grid-area: edit-task;
  justify-self: end;
  padding: 10px 10px;
  width: 50px;
  height: 50px;
  cursor: pointer;
  background-color: transparent;
  border: none;
  transition: transform 0.1s ease;
}

.edit-task:active {
  transform: scale(0.95);
}
.delete-task {
  grid-area: delete-task;
  justify-self: end;
  cursor: pointer;
  background-color: transparent;
  border: none;
  padding: 10px 10px;
  width: 50px;
  height: 50px;
  transition: transform 0.1s ease;
}

.delete-task:active {
  transform: scale(0.95);
}

.task-description {
  grid-area: task-description;
  font-family: "Host Grotesk", sans-serif;
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: normal;
  color: white;
  font-size: clamp(1rem, 2vw, 1.5rem);
  margin-bottom: 10px;
}

#add-task {
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-template-rows: auto auto;
  grid-template-areas:
    "task-title save-task-btn delete-task"
    "task-description task-description task-description";
  gap: 10px;
  width: 95%;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 15px;
  padding: 10px;
  margin-top: 10px;
}

#add-task textarea {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 10px;
  padding: 15px;
  font-family: "Host Grotesk", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  color: white;
  resize: none;
  overflow-wrap: break-word;
  outline: none;
}

#add-task .task-title {
  grid-area: task-title;
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  padding: 10px;
  width: 100%;
  min-width: 0;
  height: fit-content;
  box-sizing: border-box;
}

#add-task .delete-task {
  grid-area: delete-task;
  align-self: center;
  width: 50px;
  height: auto;
}

.save-task-btn {
  grid-area: save-task-btn;
  cursor: pointer;
  border: none;
  padding: 10px 10px;
  width: auto;
  /* height: fit-content; */
  margin-left: 10px;
  border-radius: 15px;
  /* background-image: linear-gradient(
    150deg,
    rgba(173, 108, 42, 1) 0%,
    rgba(120, 39, 105, 1) 51%,
    rgba(173, 108, 42, 1) 100%
    ); */
  background-image: linear-gradient(
    to right,
    rgba(173, 108, 42, 1) 0%,
    rgba(120, 39, 105, 1) 51%,
    rgba(173, 108, 42, 1) 100%
  );
  background-size: 200% auto;
  color: white;
  font-family: "Host Grotesk", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-weight: 300;
  font-size: clamp(1rem, 2vw, 1.5rem);
  text-align: center;
  align-self: center;
  transition: 0.5s ease;
}
.save-task-btn:hover {
  background-position: right center;
}

.save-task-btn:active {
  transform: scale(0.95);
}

#add-task .task-description {
  grid-area: task-description;
  font-weight: 300;
  font-size: clamp(1rem, 2vw, 1.5rem);
  margin-bottom: 10px;
  margin-top: 10px;
}

/* Scroll-bar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb:hover {
  background: #a15d39dc;
  cursor: pointer;
}

/* Media Queries for medium screens */
@media (min-width: 768px) {
  #container {
    width: 95%;
  }

  #kanban-board {
    width: 100%;
  }

  .column {
    min-width: 45%;
  }
}

/* Media Queries for larger screens */
@media (min-width: 1200px) {
  #container {
    width: 80%;
  }

  .column {
    min-width: 30%;
    /* min-width: 0; */
    /* width: fit-content; */
  }
}
