* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: Josefin Sans;
}

@font-face {
  font-family: Josefin Sans;
  src: url(./assets/Josefin_Sans/JosefinSans-VariableFont_wght.ttf);
}

:root {
  --blue-500: hsl(220, 98%, 61%);
  --check-background: linear-gradient(hsl(192, 100%, 67%), hsl(280, 87%, 65%));

  --Gray-50: hsl(0, 0%, 98%);
  --Purple-300: hsl(234, 39%, 85%);
  --Gray-300: hsl(233, 11%, 84%);
  --Gray-600: hsl(236, 9%, 61%);
  --Navy-850: hsl(235, 19%, 35%);

  --Navy-950: hsl(235, 21%, 11%);
  --Navy-900: hsl(235, 24%, 19%);
  --Purple-300: hsl(234, 39%, 85%);
  --Purple-100: hsl(236, 33%, 92%);
  --Purple-600: hsl(235, 16%, 43%);
  --Purple-700: hsl(233, 14%, 35%);
  --Purple-800: hsl(237, 14%, 26%);
  --Gray-600: hsl(236, 9%, 61%);

  --bg-body: var(--Navy-950);
  --bg-card: var(--Navy-900);
  --text-main: var(--Gray-50);
  --text-completed: var(--Gray-600);
  --border-color: var(--Purple-800);
  --bg-image: url("./images/bg-mobile-dark.jpg");
  --bg-image-desktop: url("./images/bg-desktop-dark.jpg");
}

[data-theme="light"] {
  --bg-body: var(--Gray-50);
  --bg-card: #ffffff;
  --text-main: var(--Purple-700);
  --text-completed: var(--Gray-300);
  --border-color: var(--Purple-100);
  --bg-image: url("./images/bg-mobile-light.jpg");
  --bg-image-desktop: url("./images/bg-desktop-light.jpg");
}

body {
  background: var(--bg-body);
  min-height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
}
header {
  min-height: 180px;
  /* margin-bottom: 2rem; */
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  padding: 3rem 1.5rem 0 1.5rem;
  /* gap: 2rem; */
}
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.1875rem;
}
.top-header h1 {
  color: var(--Gray-50);
  letter-spacing: 0.5rem;
  font-size: 1.5rem;
}
.top-header img {
  cursor: pointer;
  width: 20px;
}
.input-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--bg-card);
  padding: 0.875rem 1.25rem;
  border-radius: 0.375rem;
  margin-top: -1.2rem;
}
.input-container .circle {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  /* background: var(--Navy-900); */
  cursor: pointer;
  border: 0.12rem solid var(--border-color);
  /* margin-right: 12px; */
}
.input-container input {
  width: 100%;
  max-width: 540px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 10px;
}
.container {
  width: 100%;
  max-width: 540px;
  /* background-color: var(--Navy-900); */
  margin: -4rem auto 0 auto;
  border-radius: 0.5rem;
  padding: 1.5rem;

  margin-inline: auto;
  position: relative;
  z-index: 10;
}
.todo-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  /* justify-content: space-between; */
  padding: 0;
  background-color: var(--bg-card);
  border-radius: 0.375rem;
  width: 100%;
  margin-top: 1rem;
}

.todo-card ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  list-style: none;
}
#todo-list {
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.todo-item {
  border-bottom: 1px solid var(--Navy-850);
  padding: 19.2px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
}
.todo-item p {
  color: var(--text-main);
  font-size: 14px;
  /* margin: 0; */
  cursor: pointer;
  transition: 0.3s ease;
}
.todo-item.completed p {
  color: var(--text-muted);
  text-decoration: line-through;
}
.todo-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.check-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  border: 0.12rem solid var(--Purple-600);
  /* margin-right: 12px; */
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.check-circle {
  background: var(--check-background);
  border: none;
}
.circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  border: 0.12rem solid var(--Purple-600);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border 0.3s ease;
  /* margin-right: 10px; */
}
.todo-item.completed .circle {
  background: var(--check-background);
  border: none;
}
.todo-item.completed .circle::after {
  content: "";
  width: 12px;
  height: 12px;
  background-image: url(./images/icon-check.svg);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: block;
}
.todo-item.completed p {
  color: var(--Gray-600);
  text-decoration: line-through;
}
.circle:hover {
  border: 1px solid transparent;
  background: var(--check-background);
}
.todo-text {
  color: var(--Gray-50);
  font-size: 14px;
  flex-grow: 1;
  margin-left: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.delete-icon {
  width: 15px;
  height: 15px;
  cursor: pointer;
  margin-left: 19px;
}
.todo-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0.75rem 1.25rem;
}
.todo-footer span {
  color: var(--Gray-600);
  font-size: 12px;
}
.clear-btn {
  background: transparent;
  border: none;
  color: var(--Gray-600);
  font-size: 12px;
  cursor: pointer;
}
.mobile-filters {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 1.5rem;
  padding: 1rem;
  margin-top: 1rem;
  width: 100%;
}
.mobile-filters .filter-btn {
  background: transparent;
  border: none;
  color: var(--Gray-600);
  font-size: 12px;
  cursor: pointer;
}
.mobile-filters .filter-btn:hover {
  color: var(--blue-500);
}
.drag-hint {
  color: var(--Gray-600);
  font-size: 12px;
  text-align: center;
  margin-top: 2rem;
}
.filters {
  display: none;
}

@media (min-width: 768px) {
  body {
    background: var(--bg-body);
    min-height: 100vh;
    display: block;
    padding: 0;
    margin: 0;
  }
  header {
    background-image: var(--bg-image-desktop);
    background-size: cover;
    background-position: center;
    background-position: top;
    /* padding: 3rem 1.5rem 0 1.5rem; */
    min-height: 300px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 4.5rem;
    padding-bottom: 0;
  }
  .top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 540px;
    margin-top: 3rem;
  }
  .top-header h1 {
    font-size: 2rem;
    letter-spacing: 0.5rem;
    line-height: 1;
    margin: 0;
  }
  .input-container,
  .todo-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: var(--bg-card);
    width: 100%;
    max-width: 540px;
    padding: 0.875rem 1.25rem;
    border-radius: 0.375rem;
    margin-top: 0;
  }
  .container {
    width: 100%;
    max-width: 540px;
    /* background-color: var(--Navy-900); */
    margin: -3rem auto 0 auto;
    border-radius: 0.5rem;
    padding: 0;
  }
  .todo-card {
    padding: 0;
  }
  .todo-card ul {
    display: flex;
    flex-direction: column;
    gap: 0;
    list-style: none;
    width: 100%;
  }

  .filters {
    display: flex;
    gap: 1.5rem;
  }
  .desktop-filters {
    display: flex;
    gap: 1.5rem;
  }
  .filter-btn {
    background: transparent;
    border: none;
    color: var(--Gray-600);
    font-size: 12px;
    cursor: pointer;
  }
  .desktop-filters .filter-btn:hover {
    color: var(--blue-500);
  }

  .mobile-filters {
    display: none;
  }
}
