/* Todo App Styles */

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
}

.themed-preview {
  background-color: #0f172a;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.1), transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.1), transparent 40%);
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* Glassmorphism Container */
.todo-app {
  width: 100%;
  max-width: 480px;
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1.5rem;
  padding: 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Header */
.todo-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
}

.todo-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(to right, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.todo-counter {
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 500;
}

/* Form */
.todo-form {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.todo-input {
  flex: 1;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 0.875rem 1.25rem;
  color: #f8fafc;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s;
}

.todo-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Buttons */
.btn {
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: #3b82f6;
  color: white;
  font-weight: 600;
  padding: 0 1.5rem;
  border-radius: 0.75rem;
  font-size: 0.95rem;
}

.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-icon {
  background: transparent;
  color: #64748b;
  width: 32px;
  height: 32px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.btn-icon:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* List */
.todo-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  transition: all 0.2s;
}

.todo-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.todo-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  flex: 1;
}

/* Custom Checkbox */
.todo-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #475569;
  border-radius: 0.35rem;
  margin: 0;
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: all 0.2s;
}

.todo-checkbox::before {
  content: "";
  width: 0.65em;
  height: 0.65em;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  box-shadow: inset 1em 1em white;
  background-color: white;
  transform-origin: center;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.todo-checkbox:checked {
  background-color: #10b981;
  border-color: #10b981;
}

.todo-checkbox:checked::before {
  transform: scale(1);
}

.todo-text {
  font-size: 1rem;
  transition: all 0.2s;
}

/* CSS-only state based on checkbox */
.todo-checkbox:checked + .todo-text {
  text-decoration: line-through;
  color: #64748b;
}
