:root {
  --bg: #0b1020;
  --panel: rgba(255, 255, 255, 0.06);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.65);
  --border: rgba(255, 255, 255, 0.12);
  --brand1: #667eea;
  --brand2: #764ba2;
  --radius: 16px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(102, 126, 234, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(118, 75, 162, 0.15) 0px, transparent 50%);
  line-height: 1.6;
}

.container {
  width: min(800px, calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0;
}

.site-header {
  width: min(800px, calc(100% - 40px));
  margin: 40px auto 20px;
  padding: 30px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.site-header h1 { margin: 0; font-size: 2rem; }
.lead { margin: 10px 0 20px; color: var(--muted); }

.back-link {
  display: inline-block;
  color: var(--brand1);
  text-decoration: none;
  font-weight: bold;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  margin-bottom: 20px;
}

/* Home Card List */
.card-list { list-style: none; padding: 0; display: grid; gap: 15px; }
.card a {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: 0.2s;
}
.card a:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }
.card strong { font-size: 1.2rem; color: var(--brand1); }
.card span { font-size: 0.9rem; color: var(--muted); margin-top: 5px; }

/* Form & Buttons */
button, input[type="submit"] {
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}
input[type="text"] {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  color: white;
  padding: 10px;
  border-radius: 8px;
  width: 100%;
  max-width: 300px;
}

/* Todo App Specific */
.todo-list { list-style: none; padding: 0; margin-top: 20px; }
.todo-item {
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  animation: fadeIn 0.3s ease;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.todo-text {
  flex: 1;
}

.todo-complete {
  background: linear-gradient(135deg, #48bb78, #38a169);
  font-size: 0.85rem;
  padding: 6px 12px;
}

.todo-delete {
  background: linear-gradient(135deg, #f56565, #e53e3e);
  font-size: 0.85rem;
  padding: 6px 12px;
}

.todo-item.completed .todo-text {
  text-decoration: line-through;
  opacity: 0.6;
}

.todo-item.completing {
  animation: completeEffect 0.5s ease forwards;
}

@keyframes completeEffect {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.15) rotate(5deg);
    opacity: 0.8;
    box-shadow: 0 0 30px rgba(72, 187, 120, 0.8);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 0;
  }
}

.todo-item.deleting {
  animation: deleteEffect 0.4s ease forwards;
}

@keyframes deleteEffect {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(0.9) rotate(-8deg);
    opacity: 0.5;
    box-shadow: 0 0 25px rgba(245, 101, 101, 0.9);
  }
  100% {
    transform: scale(0.7) rotate(-15deg);
    opacity: 0;
  }
}

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