@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --bg-gradient-1: #0f172a;
  --bg-gradient-2: #1e1b4b;
  --card-bg: rgba(30, 41, 59, 0.7);
  --card-border: rgba(255, 255, 255, 0.08);
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --delete-bg: rgba(239, 68, 68, 0.15);
  --delete-text: #ef4444;
  --delete-hover-bg: #ef4444;
  --delete-hover-text: #ffffff;
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--bg-gradient-1), var(--bg-gradient-2));
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-primary);
  padding: 20px;
  overflow-x: hidden;
  position: relative;
}

/* Background glowing decoration */
.background-decor {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
}

.orb-1 {
  width: 450px;
  height: 450px;
  background: var(--primary-color);
  top: -100px;
  right: -50px;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: #ec4899;
  bottom: -50px;
  left: -50px;
}

.todo-card {
  width: 100%;
  max-width: 480px;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 1;
}

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

.todo-header {
  text-align: center;
  margin-bottom: 28px;
}

.todo-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #a5b4fc, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.todo-header .subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 300;
}

/* Input and Button layout */
.input-container {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

input {
  flex: 1;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
}

input::placeholder {
  color: #64748b;
}

input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  background: rgba(15, 23, 42, 0.8);
}

button {
  background: var(--primary-color);
  border: none;
  border-radius: 12px;
  padding: 14px 22px;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(1px);
}

/* Todo List styling */
ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Custom Scrollbar for the list */
ul::-webkit-scrollbar {
  width: 6px;
}

ul::-webkit-scrollbar-track {
  background: transparent;
}

ul::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

ul::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 1.05rem;
  font-weight: 400;
  transition: all 0.25s ease;
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  word-break: break-all;
  gap: 12px;
}

li:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

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

/* Delete Button styling inside li */
li button.delete {
  background: var(--delete-bg);
  color: var(--delete-text);
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: capitalize;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
  flex-shrink: 0;
}

li button.delete:hover {
  background: var(--delete-hover-bg);
  color: var(--delete-hover-text);
  transform: scale(1.05);
}

li button.delete:active {
  transform: scale(0.95);
}
