:root {
  --container-color: #ffffff;
  --text-color: #222222;
  --background-color: #f8f8f8;
  --accent-color: linear-gradient(140deg, #065143, #9ad4d6);
}
/* --- css reset --- */

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

/* mobile defaults */
body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  background-color: var(--background-color);
  color: var(--text-color);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  display: grid;
  place-items: center;
  margin-bottom: 10rem;
}

/*utility classes*/

.container {
  width: 90%;
  max-width: 900px;
  border-radius: 20px;
  margin: 2rem auto;
  padding: 1rem;
  background-color: var(--container-color);
}

.flex {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

.frosted {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#error-message {
  color: red;
  font-style: italic;
}

/*header setup*/

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3rem;
  background-color: var(--container-color);
  padding: 0 10%;
  font-size: clamp(0.7rem, 2vw, 1rem);
}

.title {
  font-weight: 1000;
}

.portfolio-link {
  font-weight: 500;
}

.logo a {
  font-family: "Pacifico", sans-serif;
  background-image: var(--accent-color);
  color: transparent;
  background-clip: text;
}

.logo a:link,
.logo a:visited {
  font-family: "Pacifico", sans-serif;
  background-image: var(--accent-color);
  color: transparent;
  background-clip: text;
  text-decoration: none;
}

.title {
  font-weight: 700;
}

.back-to-portfolio-link:link,
.back-to-portfolio-link:visited {
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 20px;
}

.back-to-portfolio-link:hover {
  color: var(--container-color);
  background-color: var(--text-color);
}

/*container setup*/

#outer-container {
  background-color: #121827;

  background-image: radial-gradient(
      circle at 20% 80%,
      rgba(23, 107, 135, 0.4),
      transparent 30%
    ),
    radial-gradient(circle at 80% 30%, rgba(131, 56, 236, 0.3), transparent 35%),
    radial-gradient(
      ellipse at 50% 60%,
      rgba(67, 233, 185, 0.2),
      transparent 45%
    );
  background-attachment: fixed;
}

#add-task-container {
  text-align: center;
  padding: 0;
}

#divider {
  height: 0;
  width: 70%;
  margin: 0 auto 0 auto;
}

.task-item {
  display: flex;
  align-items: center;
  padding-left: 5%;
  padding-right: 5%;
  gap: 1rem;
}

.task-item.completed {
  opacity: 0.5;
}
.task-item.completed span {
  text-decoration: line-through;
}

#input-form {
  display: flex;
  flex-direction: row;
  gap: 0;
  align-items: center;
  justify-content: space-evenly;
  background-color: transparent;
  width: 100%;
}

/*font setup*/

h1 {
  width: 80%;
  padding-top: 2rem;
  margin: auto;
  color: #f0f0f0d8;
}

.checkbox {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid white;
  opacity: 0.7;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.checkbox:hover {
  opacity: 1;
  border-color: #38c780;
}

.checkbox:checked {
  color: #f0f0f0;
  opacity: 1;
  background-color: #38c780;
  border-color: #38c780;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='3' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='m4.5 12.75 6 6 9-13.5' /%3e%3c/svg%3e");
  background-position: center;
  background-repeat: no-repeat;
}

li span {
  flex-grow: 1;
  font-size: medium;
  color: #f0f0f0;
}

.delete-button {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #f0f0f0;
  font-size: 20px;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.delete-button:hover {
  opacity: 1;
  color: coral;
}

#submit-button {
  margin-left: 1rem;
  border: none;
  background-color: var(--text-color);
  color: white;
  border-radius: 20px;
  padding: 0.5rem;
  font-family: "Inter", sans-serif;
  transition: all 0.3s ease;
}
#submit-button:hover {
  cursor: pointer;
  background-color: white;
  color: var(--text-color);
}

#input {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-grow: 1;
  outline: none;
  color: #f0f0f0;
  width: 100%;
  font-family: "Inter", sans-serif;
  border-radius: 10px;
  padding: 0.5rem;
  transition: all 0.3s ease;
}

#input::placeholder {
  font-family: "Inter", sans-serif;
  color: rgba(211, 211, 211, 0.61);
  text-overflow: ellipsis;
}

#input:focus {
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.5);
}

/*footer setup*/

footer {
  width: 100%;
  background-color: var(--text-color);
  color: #ccc;
  padding: 2rem 1rem;
  text-align: center;
}

.social-links {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

footer a {
  color: #ccc;
}

.copyright-text {
  font-size: 0.9rem;
  margin: 0;
}

@media (max-width: 767px) {
  #input-form {
    flex-direction: column;
    gap: 1rem;
  }
}
