:root {
  /* Global color variables - UPDATING COLORS */
  --primary-bg-color: rgb(23, 23, 23);
  --secondary-bg-color: #000000c1;
  --border-color: rgba(0, 255, 162, 0.696);
  --border-color-translucent: rgba(17, 255, 196, 0.597);
}

/* Reset default styling for consistency across browsers */
*,
*::before,
*::after {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
}
html {
  font-size: 1.5rem; /* Equivalent to ~20px */
}

/* Apply background settings for the entire page */
body {
  background-color: var(--primary-bg-color);
  background-image: url(images/background.webp);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  backdrop-filter: blur(15px);
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Outer container to structure the app layout */
.container {
  width: 100%;
  min-height: 100vh;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* border: solid 1.1rem var(--border-color-translucent); */
  border-radius: 2px;
}

/* Main wrapper for the to-do app */
.todo-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 95%;
  background: var(--secondary-bg-color);
  margin: 0 auto 0;
  padding: 1px 0 0;
  border: solid 5px var(--border-color-translucent);
  border-radius: 20px;
  min-height: 80vh;
  box-shadow: inset 2px 2px 3px rgba(39, 255, 215, 0.225);
}

/* Style for the main heading */
h1 {
  color: var(--border-color);
  font-size: clamp(2rem, 5vw, 5em);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  font-size: 3rem;
  text-transform: uppercase;
}

/* Styling for images inside the container */
.container img {
  width: 150px;
  height: 150px;
  margin: 1rem;
}

/* Header layout */
.header-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
}

/* Content section styles */
.content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  width: 100%;
  margin-bottom: 2rem;
}

/* Remove default list styling */
ul {
  list-style-type: none;
}

/* Layout and spacing for the to-do list */
.todo-list {
  width: 80%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  overflow: hidden;
}

/* Input field styles */
#todo-input {
  background: none;
  padding: 10px 20px;
  border: solid 2px rgb(27, 27, 27);
  border-radius: 1000px;
  color: rgb(250, 225, 215);
  caret-color: var(--border-color-translucent);
  box-shadow: 1px 2px 10px rgba(250, 240, 230, 0.187);
  width: 100%;
  height: 50px;
  font-size: 25px;
}

#todo-input:placeholder-shown {
  font-size: 20px;
}

/* Styling for individual to-do items */
.todo {
  border-radius: 20px;
  display: flex;
  align-items: center;
  margin: 10px;
  padding: 5px 10px;
  color: antiquewhite;
  border: solid 1px rgba(0, 255, 162, 0.696);
  font-size: clamp(1rem, 1.2vw, 1.5rem);
  transition: 0.5s ease;
}

/* Style for text inside to-do items */
.todo .todo-txt {
  padding: 5px;
  flex-grow: 1;
  transition: color 1s ease;
  white-space: normal; /* Allows text to wrap */
  overflow-wrap: break-word; /* Breaks long words if needed */
  word-break: break-word; /* Ensures word breaks at boundaries */
}

/* Input focus styling when selected */
#todo-input:focus {
  outline: var(--border-color-translucent) solid 1px;
}

/* Form container styles */
form {
  position: relative;
  width: 65%;
}

/* Add button styles */
#add-btn {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  padding: 0 20px;
  margin: 0 0 20px 0;
  background-color: var(--border-color);
  border: none;
  border-radius: 1000px;
  font: inherit;
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
}

/* Delete button styles */
.delete-btn {
  padding: 3px;
  background: none;
  border: none;
  cursor: pointer;
  transition: fill 0.6s ease;
  fill: #3a3a3a;
}

/* Edit button styles */
.edit-btn {
  margin-left: 1.5rem;
  padding: 3px;
  background: none;
  border: none;
  cursor: pointer;
  transition: fill 0.6s ease;
  fill: #3a3a3a;
}

/* Hover effect for delete button */
@media (hover: hover) {
  .delete-btn:hover {
    fill: rgb(195, 47, 47);
    transition: fill 0.3s ease;
  }
}

/* Hover effect for edit button */
@media (hover: hover) {
  .edit-btn:hover {
    fill: rgb(0, 255, 179);
    transition: fill 0.3s ease;
  }
}

/* Custom checkbox styles */
.custom-checkbox {
  padding: 1.1px;
  margin-right: 10px;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: rgba(0, 255, 179, 0.64) 2px solid;
  border-radius: 50%;
  transition: 0.4s ease;
}

.custom-checkbox:hover {
  border: rgba(5, 137, 93, 0.689) 2px solid;
}
/* Checked state for checkbox */
input[type="checkbox"]:checked ~ .custom-checkbox {
  background-color: rgba(52, 204, 146, 0.147);
  border: rgb(25, 25, 25) 2px solid;
}

/* Change checkmark color when checked */
input[type="checkbox"]:checked ~ .custom-checkbox svg {
  fill: inherit;
  transition: 1s ease;
}

/* Apply strikethrough effect when checked */
input[type="checkbox"]:checked ~ .todo-txt {
  text-decoration: line-through;
  color: #464646;
  transition: color 1s ease;
}

/* Hide default checkbox */
input[type="checkbox"] {
  display: none;
}

.todo:has(input[type="checkbox"]:checked) {
  border-color: #00000085; /* Changes border to gray */
  transition: ease 1s;
}

/* Responsive styles for smaller screens */
@media (max-width: 500px) {
  html {
    font-size: clamp(
      12px,
      2vw,
      18px
    ); /* Minimum 12px, scales with screen, max 18px */
  }

  #add-btn {
    position: unset;
    width: 70%;
    padding: 5px;
    margin: 30px 0;
    height: auto;
  }

  h1 {
    font-size: 3rem;
  }

  .todo-app img {
    width: 100px;
    height: 100px;
    margin-bottom: 30px;
  }

  #todo-input:placeholder-shown {
    font-size: 12px;
  }

  #todo-input {
    font-size: 1rem;
  }

  .todo-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: baseline;
  }

  form {
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/* Themes: Will provide option for user to switch app color theme. */
