:root {
  --color-primary: #4A90E2;
  --color-accent: #FF6B35;
  --color-bg: #F5F5F5;
}

* {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
}

[x-cloak] { display: none !important; }

body {
  background-color: var(--color-bg);
  background-image:
    radial-gradient(at 0% 0%, rgba(74, 144, 226, 0.06) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(255, 107, 53, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
}

/* Todo item enter/leave animation */
.todo-item {
  animation: slideIn 280ms cubic-bezier(0.22, 1, 0.36, 1);
  transition: transform 200ms ease, box-shadow 200ms ease, opacity 200ms ease;
}

.todo-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px -4px rgba(74, 144, 226, 0.15);
}

.todo-item.removing {
  animation: slideOut 220ms ease forwards;
  pointer-events: none;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
    max-height: 200px;
    margin-bottom: 0.5rem;
  }
  to {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
    max-height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
  }
}

/* Check mark animation */
.check-btn {
  position: relative;
}

.check-btn:active {
  transform: scale(0.92);
}

.check-anim {
  animation: checkPop 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes checkPop {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(-20deg);
  }
  60% {
    opacity: 1;
    transform: scale(1.15) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* Star feedback */
.star-btn:active {
  animation: starPulse 320ms ease;
}

@keyframes starPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* Star hover sparkle */
.star-btn:hover svg {
  filter: drop-shadow(0 2px 6px rgba(255, 107, 53, 0.4));
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .todo-item,
  .check-anim,
  .star-btn:active,
  .todo-item.removing {
    animation: none !important;
    transition: none !important;
  }
}

/* Tabular numbers for progress percentages */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Smooth horizontal scroll on filter chips */
[role="tablist"]::-webkit-scrollbar {
  display: none;
}
[role="tablist"] {
  scrollbar-width: none;
}
