* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, 'Times New Roman', serif;
  color: #f5eaff;
  overflow-x: hidden;
  background: #080012;
}

.bg {
  position: fixed;
  inset: 0;
  background: url('assets/background.png') center / cover no-repeat;
  z-index: -3;
}

.overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(169, 63, 255, 0.18), transparent 35%),
    linear-gradient(180deg, rgba(5, 0, 18, 0.15), rgba(5, 0, 18, 0.88));
  z-index: -2;
}

.page {
  width: min(920px, 94%);
  margin: 0 auto;
  padding: 35px 0 55px;
}

.hero {
  text-align: center;
  margin-bottom: 18px;
}

.logo {
  width: 190px;
  max-width: 48vw;
  filter: drop-shadow(0 0 25px #a855f7) drop-shadow(0 0 50px rgba(0, 229, 255, 0.45));
}

h1 {
  margin: 0;
  font-size: clamp(48px, 9vw, 92px);
  letter-spacing: 5px;
  text-transform: uppercase;
  color: #f3d7ff;
  text-shadow: 0 0 10px #d946ef, 0 0 30px #7c3aed, 0 0 55px #4c1d95;
}

.hero p {
  margin: 0;
  letter-spacing: 12px;
  text-transform: uppercase;
  color: #d8b4fe;
  font-size: 18px;
  text-shadow: 0 0 18px #a855f7;
}

.todo-card {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: 42px 42px 34px;
  border: 2px solid rgba(192, 132, 252, 0.85);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(16, 4, 33, 0.88), rgba(8, 0, 20, 0.94));
  box-shadow:
    0 0 20px rgba(168, 85, 247, 0.6),
    inset 0 0 30px rgba(76, 29, 149, 0.55),
    0 30px 80px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
}

.todo-card::before,
.todo-card::after {
  content: '';
  position: absolute;
  width: 58px;
  height: 58px;
  border: 2px solid #c084fc;
  filter: drop-shadow(0 0 12px #a855f7);
}

.todo-card::before {
  left: -10px;
  top: -10px;
  border-right: 0;
  border-bottom: 0;
}

.todo-card::after {
  right: -10px;
  bottom: -10px;
  border-left: 0;
  border-top: 0;
}

.crystal {
  position: absolute;
  left: 50%;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #e879f9, #7c3aed, #22d3ee);
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 0 0 18px #c084fc;
}

.crystal.top { top: -13px; }
.crystal.bottom { bottom: -13px; }

.todo-form {
  display: flex;
  gap: 14px;
  margin-bottom: 28px;
}

.todo-form input {
  flex: 1;
  min-width: 0;
  padding: 17px 20px;
  border: 1px solid rgba(192, 132, 252, 0.7);
  border-radius: 10px;
  background: rgba(10, 2, 28, 0.85);
  color: #f5eaff;
  font-size: 18px;
  outline: none;
  box-shadow: inset 0 0 18px rgba(124, 58, 237, 0.18);
}

.todo-form input::placeholder {
  color: #c4a0ef;
}

.todo-form input:focus {
  border-color: #e879f9;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.45);
}

.todo-form button {
  width: 68px;
  border: 1px solid #f0abfc;
  border-radius: 12px;
  color: white;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  background: linear-gradient(135deg, #581c87, #9333ea, #d946ef);
  box-shadow: 0 0 22px rgba(217, 70, 239, 0.75), inset 0 0 14px rgba(255,255,255,0.18);
  transition: 0.2s ease;
}

.todo-form button:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 35px rgba(217, 70, 239, 0.95);
}

.todo-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.todo-item {
  display: grid;
  grid-template-columns: 34px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(168, 85, 247, 0.42);
  animation: fadeIn 0.2s ease;
}

.diamond {
  width: 23px;
  height: 23px;
  border: 2px solid #d8b4fe;
  transform: rotate(45deg);
  box-shadow: 0 0 12px #a855f7;
}

.todo-text {
  font-size: 18px;
  word-break: break-word;
}

.todo-item.done .todo-text {
  color: #a78bfa;
  text-decoration: line-through;
  opacity: 0.72;
}

.icon-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  padding: 6px 8px;
  color: #c084fc;
  text-shadow: 0 0 10px #a855f7;
  transition: 0.15s ease;
}

.icon-btn:hover {
  transform: scale(1.16);
}

.delete {
  color: #ff4fa3;
}

.empty {
  display: none;
  text-align: center;
  padding: 24px 0 10px;
  color: #c4a0ef;
  font-size: 18px;
}

.footer-note {
  width: fit-content;
  max-width: 100%;
  margin: 28px auto 0;
  padding: 12px 28px;
  border: 1px solid rgba(192, 132, 252, 0.65);
  border-radius: 10px;
  color: #dfb8ff;
  background: rgba(24, 5, 48, 0.75);
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.35);
  text-align: center;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 620px) {
  .page {
    padding-top: 22px;
  }

  .todo-card {
    padding: 30px 18px 28px;
  }

  .todo-form {
    gap: 10px;
  }

  .todo-form button {
    width: 58px;
  }

  .todo-item {
    grid-template-columns: 28px 1fr auto auto;
    gap: 8px;
  }

  h1 {
    letter-spacing: 2px;
  }

  .hero p {
    letter-spacing: 7px;
  }
}
