body {
  background-color: #f5f5f7;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif,
    sans-serif;
  margin: 0px;
  position: relative;
  overflow: hidden;
}

.main-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0px;
}

.adding-task-container {
  order: 2;
  width: 75%;
  min-height: 100vh;
  align-content: center;
  height: auto;
}

.adding-task-content-container {
  padding: 0px;
  display: flex;
  flex-direction: column;
  align-items: center;
  h1 {
    margin-top: 0px;
    font-size: 4vw;
    color: #333;
  }
  p {
    margin: 0px 0;
    font-size: 1.8vw;
    color: #666;
  }
  #task-form {
    display: flex;
    flex-direction: column;
    width: 75%;
    gap: 10px;
  }

  /* Input Styles */
  #task-input {
    --c-glass: #ffffff;
    --c-light: #fff;
    --c-dark: #000;
    --c-content: #224;
    --c-action: #0052f5;
    --c-bg: #e8e8e9;
    --glass-reflex-dark: 1;
    --glass-reflex-light: 1;
    --saturation: 150%;
    width: 100%;

    padding: 15px;
    border: 2px solid #ccc;
    border-radius: 15px;
    font-size: 1.2vw;
    font-family: "DM Sans", sans-serif;
    color: var(--c-content);
    background-color: color-mix(in srgb, var(--c-glass) 33%, transparent);
    backdrop-filter: blur(8px) saturate(var(--saturation));
    -webkit-backdrop-filter: blur(8px) saturate(var(--saturation));
    box-shadow: inset 0 0 0 1px
        color-mix(
          in srgb,
          var(--c-light) calc(var(--glass-reflex-light) * 10%),
          transparent
        ),
      inset 1.8px 3px 0px -2px color-mix(in srgb, var(--c-light)
            calc(var(--glass-reflex-light) * 90%), transparent),
      inset -2px -2px 0px -2px color-mix(in srgb, var(--c-light)
            calc(var(--glass-reflex-light) * 80%), transparent),
      inset -3px -8px 1px -6px color-mix(in srgb, var(--c-light)
            calc(var(--glass-reflex-light) * 60%), transparent),
      inset -0.3px -1px 4px 0px
        color-mix(
          in srgb,
          var(--c-dark) calc(var(--glass-reflex-dark) * 12%),
          transparent
        ),
      inset -1.5px 2.5px 0px -2px
        color-mix(
          in srgb,
          var(--c-dark) calc(var(--glass-reflex-dark) * 20%),
          transparent
        ),
      inset 0px 3px 4px -2px color-mix(in srgb, var(--c-dark)
            calc(var(--glass-reflex-dark) * 20%), transparent),
      inset 2px -6.5px 1px -4px
        color-mix(
          in srgb,
          var(--c-dark) calc(var(--glass-reflex-dark) * 10%),
          transparent
        ),
      0px 1px 5px 0px
        color-mix(
          in srgb,
          var(--c-dark) calc(var(--glass-reflex-dark) * 10%),
          transparent
        ),
      0px 6px 16px 0px
        color-mix(
          in srgb,
          var(--c-dark) calc(var(--glass-reflex-dark) * 8%),
          transparent
        );
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 30px;
  }

  #task-input:focus {
    outline: none;
    border-color: #6a5cff;
    box-shadow: 0 0 12px rgba(106, 92, 255, 0.6);
    transform: scale(1.02);
    animation: borderPulse 2s infinite;
  }

  #task-input.error {
    border-color: #ff3a3a;
    animation: shake 0.3s ease;
  }

  @keyframes shake {
    0% {
      transform: translateX(0);
    }
    25% {
      transform: translateX(-5px);
    }
    50% {
      transform: translateX(5px);
    }
    75% {
      transform: translateX(-5px);
    }
    100% {
      transform: translateX(0);
    }
  }

  @keyframes borderPulse {
    0% {
      border-color: #ff3a82;
    }
    50% {
      border-color: #5233ff;
    }
    100% {
      border-color: #ff3a82;
    }
  }
  /* Button */
  .add-task {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 28px;
    width: 50%;
    margin: 0 auto;

    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;

    font-size: 1.25vw;
    font-family: "Segoe UI", Roboto, sans-serif;
    font-weight: 500;
    color: #222;

    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);

    cursor: pointer;
    transition: all 0.3s ease;
  }

  .add-task:hover {
    background: rgba(255, 255, 255, 0.45);
    color: #0052f5;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  }

  .add-task:active {
    transform: scale(0.96);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  }

  .add-task__icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.2s ease;
  }

  .add-task:hover .add-task__icon {
    transform: scale(1.2);
  }
}

.task-list-container {
  order: 1;
  padding: 0px;
  width: 25%;
  height: 100vh;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow: 0 4px 15px #0000004c;
  border-right: 2px solid #f5f5f7;
  overflow-y: auto;
}

.task-list-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px dashed #eee;
  font-size: 1.33vw;
}

.bi {
  font-size: 1.4vw;
  z-index: 999;
}

.bi:hover {
  color: #0052f5;
  cursor: pointer;
  transform: scale(1.1);
}

.task-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(255, 255, 255, 0.5);
  font-size: 1.2vw;
  margin: 5px;
  padding: 8px 16px;
  border-radius: 12px;
  gap: 8px;
  white-space: normal;
  word-break: break-word;
}

.list .actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.list span {
  flex: 1;
}

.list:hover {
  background-color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.quick-edit-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: none;

  .bi-x-octagon {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 1.5rem;
    cursor: pointer;
  }

  .modal-content > h2 {
    font-size: 1.5rem;
    padding: 0px 20px;
  }

  #edit-task-form {
    display: flex;
    flex-direction: column;
    padding: 20px;
    width: 400px;
  }

  #edit-task-input {
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
  }

  button {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background: #0052f5;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease;
  }

  button:hover {
    background: #0041c4;
  }
}

footer {
  text-align: center;
  font-size: 0.8em;
  color: #000;
  position: fixed;
  bottom: 10px;
  left: 63.9%;
  transform: translateX(-50%);
}

/* Gradient Background Styles */
.gradient-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.gradient-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
}

.sphere-1 {
  width: 40vw;
  height: 40vw;
  background: linear-gradient(
    40deg,
    rgba(255, 0, 128, 0.8),
    rgba(255, 102, 0, 0.4)
  );
  top: -10%;
  left: -10%;
  animation: float-1 15s ease-in-out infinite alternate;
}

.sphere-2 {
  width: 45vw;
  height: 45vw;
  background: linear-gradient(
    240deg,
    rgba(72, 0, 255, 0.8),
    rgba(0, 183, 255, 0.4)
  );
  bottom: -20%;
  right: -10%;
  animation: float-2 18s ease-in-out infinite alternate;
}

.sphere-3 {
  width: 30vw;
  height: 30vw;
  background: linear-gradient(
    120deg,
    rgba(133, 89, 255, 0.5),
    rgba(98, 216, 249, 0.3)
  );
  top: 60%;
  left: 20%;
  animation: float-3 20s ease-in-out infinite alternate;
}

.noise-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

@keyframes float-1 {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(10%, 10%) scale(1.1);
  }
}

@keyframes float-2 {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-10%, -5%) scale(1.15);
  }
}

@keyframes float-3 {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }
  100% {
    transform: translate(-5%, 10%) scale(1.05);
    opacity: 0.6;
  }
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 40px 40px;
  background-image: linear-gradient(
      to right,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

.glow {
  position: absolute;
  width: 40vw;
  height: 40vh;
  background: radial-gradient(circle, rgba(72, 0, 255, 0.15), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 8s infinite alternate;
  filter: blur(30px);
}

@keyframes pulse {
  0% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(0.9);
  }
  100% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

::-webkit-scrollbar-thumb {
    background: rgba(193, 193, 193, 0.6);
    border-radius: 4px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 168, 168, 0.8);
}

/* Extra Small Devices (Phones, <576px) */
@media (max-width: 576px) {
  .main-container {
    justify-items: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
  }

  .adding-task-container {
    order: 1;
    width: 100%;
    min-height: auto;
    padding: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .adding-task-content-container {
    width: 100%;
    text-align: center;
    h1 {
      font-size: 8vw;
      margin-bottom: 10px;
    }
    p {
      font-size: 4.5vw;
      margin-bottom: 20px;
    }
    #task-form {
      width: 90%;
      margin: 0 auto;
      gap: 12px;
    }
    #task-input {
      font-size: 4.5vw;
      padding: 12px;
      width: 90%;
      margin-top: 15px;
      border-radius: 10px;
      isolation: isolate;
    }
    .add-task {
      font-size: 0.9rem;
      padding: 10px 20px;
      border-radius: 25px;
      margin: 10px auto;
    }
    .add-task__icon {
      width: 16px;
      height: 16px;
    }
  }

  .task-list-container {
    order: 2;
    width: 100%;
    height: auto;
    max-height: 0;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    border-right: none;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 100;
  }

  .task-list-container.active {
    max-height: 100vh;
    opacity: 1;
    padding: 16px;
  }

  .task-list-header {
    font-size: 5vw;
    padding: 10px 12px;
    justify-content: space-between;
    position: relative;
  }

  .bi-list-task {
    font-size: 5.5vw;
    display: none;
  }

  .task-list-toggle {
    display: block;
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 6vw;
    color: #0052f5;
    cursor: pointer;
    z-index: 101;
  }

  .list {
    font-size: 4.5vw;
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 8px;
  }

  .quick-edit-modal {
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 10px;
    .modal-content > h2 {
      font-size: 1.2rem;
      padding: 10px 16px;
    }
    #edit-task-form {
      width: 100%;
      padding: 16px;
    }
    #edit-task-input {
      font-size: 0.9rem;
      padding: 8px;
      border-radius: 5px;
    }
    button {
      font-size: 0.9rem;
      padding: 8px 12px;
      border-radius: 5px;
    }
    .bi-x-octagon {
      font-size: 1.2rem;
      top: 10px;
      right: 10px;
    }
  }

  footer {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7em;
    bottom: 10px;
    padding: 10px;
  }

  .gradient-background {
    display: block;
  }

  .gradient-sphere,
  .glow,
  .grid-overlay,
  .noise-overlay,
  .particles-container {
    display: block;
    filter: blur(20px);
  }
}

/* Small Devices (Tablets, 576px - 768px) */
@media (min-width: 577px) and (max-width: 768px) {
  .main-container {
    flex-direction: column;
    justify-content: flex-start;
  }

  .adding-task-container {
    order: 1;
    width: 100%;
    padding: 20px;
  }

  .adding-task-content-container {
    h1 {
      font-size: 6vw;
    }
    p {
      font-size: 3.5vw;
    }
    #task-form {
      width: 85%;
      gap: 10px;
    }
    #task-input {
      font-size: 3vw;
      padding: 14px;
    }
    .add-task {
      font-size: 1rem;
      padding: 12px 24px;
      align-items: center;
    }
  }

  .task-list-container {
    order: 2;
    width: 100%;
    height: auto;
    border-right: none;
    border-top: 2px solid #f5f5f7;
    padding: 20px;
  }

  .task-list-header {
    font-size: 3.5vw;
    padding: 12px 14px;
  }

  .bi {
    font-size: 3.5vw;
  }

  .list {
    font-size: 3vw;
    padding: 8px 14px;
  }

  .quick-edit-modal {
    width: 80%;
    #edit-task-form {
      width: 100%;
      padding: 18px;
    }
    .modal-content > h2 {
      font-size: 1.4rem;
    }
    #edit-task-input {
      font-size: 1rem;
    }
  }

  footer {
    left: 50%;
    font-size: 0.75em;
  }

  .gradient-sphere {
    filter: blur(20px);
  }
  .sphere-1 {
    width: 50vw;
    height: 50vw;
  }
  .sphere-2 {
    width: 55vw;
    height: 55vw;
  }
  .sphere-3 {
    width: 40vw;
    height: 40vw;
  }
}

/* Medium Devices (Small Laptops, 769px - 992px) */
@media (min-width: 769px) and (max-width: 992px) {
  .main-container {
    flex-direction: row;
  }

  .adding-task-container {
    width: 65%;
    padding: 24px;
  }

  .adding-task-content-container {
    h1 {
      font-size: 5vw;
    }
    p {
      font-size: 2.5vw;
    }
    #task-form {
      width: 80%;
    }
    #task-input {
      font-size: 2vw;
    }
  }

  .task-list-container {
    width: 35%;
    padding: 16px;
  }

  .task-list-header {
    font-size: 2vw;
  }

  .bi {
    font-size: 2vw;
  }

  .list {
    font-size: 1.8vw;
  }

  .quick-edit-modal {
    width: 60%;
  }

  footer {
    left: 67%;
  }
}

/* Large Devices and Above (>992px) */
@media (min-width: 993px) {
  .task-list-toggle {
    display: none; /* Hide toggle on desktop */
  }
}
