@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');

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

body{
    background: radial-gradient(circle at 30% 30%, #f0f7ff, #e8eeee 60%, #d9e2e2);
    min-height: 100vh;
    /* softly animated background gradient */
    animation: bgShift 18s ease-in-out infinite alternate;
}

@keyframes bgShift {
  0% { background: radial-gradient(circle at 30% 30%, #f0f7ff, #e8eeee 60%, #d9e2e2); }
  50% { background: radial-gradient(circle at 70% 40%, #e6f8ff, #e3efe7 60%, #ccd9d9); }
  100% { background: radial-gradient(circle at 50% 70%, #eef6ff, #e9f1ec 60%, #c7d3d3); }
}

.container{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

/* Animated Title */
.input-container h1{
    background: linear-gradient(120deg,#3da33d,#1d7ad1,#6b2bd6,#3da33d);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    color: transparent;
    animation: titleGlow 6s linear infinite;
    letter-spacing: 1px;
    position: relative;
}

@keyframes titleGlow {
  0% { background-position: 0% 50%; filter: drop-shadow(0 0 0px rgba(61,163,61,0.0)); }
  50% { background-position: 100% 50%; filter: drop-shadow(0 0 6px rgba(61,163,61,0.35)); }
  100% { background-position: 0% 50%; filter: drop-shadow(0 0 0px rgba(61,163,61,0.0)); }
}

.input-container{
    width: 100%;
    max-width: 500px;
    text-align: center;
    padding: 20px;
}

.input-container input{
    border: none;
    outline: none;
    padding: 12px;
    margin-block: 12px;
    border-radius: 4px;
    font-size: 16px;
}

.input-container input[type="text"]{
    width: 70%;
    transition: box-shadow .4s, transform .25s;
}

.input-container input[type="text"]:focus{ box-shadow:0 0 0 4px rgba(29,122,209,.18); transform: translateY(-2px); }

.input-container input[type="button"]{
    background-color: #3da33d;
    color: #fff;
    font-weight: 700;
    margin-left: 8px;
    cursor: pointer;
    padding: 12px 24px;
    position:relative;
    transition: color .3s, transform .3s;
}

.input-container input[type="button"]:hover{
    background-color: #60b160;
}

.btn::after{
  content:""; position:absolute; left:50%; top:50%; width:0; height:0; border-radius:50%; background:currentColor; opacity:.15; transform:translate(-50%,-50%); transition: width .5s, height .5s; pointer-events:none;
}
.btn:active{ transform: scale(.9) translateY(1px); }
.btn:focus-visible{ outline:2px solid #1d7ad1; outline-offset:2px; }
.btn:hover::after{ width:180%; height:180%; }

ul{
    width: 70%;
    max-width: 450px;
    /* display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center; */
}

ul li{
    list-style-type: none;
    cursor: pointer;
    margin-block-end: 12px;
    border-radius: 8px;
    border: 0.125px solid #a19f9f;
    padding: 6px 12px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.5s;
    transform-origin: left center;
    animation: todoEnter 480ms cubic-bezier(.68,-0.55,.27,1.55) both;
    position: relative;
    overflow: hidden;
}

@keyframes todoEnter {
  0% { opacity:0; transform: translateX(-18px) scale(.95) rotate(-2deg); }
  60% { opacity:1; transform: translateX(4px) scale(1.02) rotate(.6deg); }
  100% { opacity:1; transform: translateX(0) scale(1) rotate(0); }
}

ul li:hover{
    background-color: #cbcaca;
}

ul li p{
    flex-grow: 1;
    padding: 2px;
}
.deleteBtn{
    color: #ff0000;
}

.editBtn{
    color: #008000;
}

/* Exit animation (applied before removal) */
li.removing{
  animation: todoExit 320ms ease forwards;
}
@keyframes todoExit {
  0% { opacity:1; transform: translateX(0) scale(1); }
  35% { opacity:.7; transform: translateX(6px) scale(.98); }
  100% { opacity:0; transform: translateX(60px) scale(.75); }
}

/* Edit pulse indicator */
li.editing{
  animation: editPulse 1.2s ease-in-out infinite;
}
@keyframes editPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(29,122,209,0.0); }
  50% { box-shadow: 0 0 0 6px rgba(29,122,209,0.15); }
}

/* Subtle gradient line on hover */
ul li::before{
  content:"";
  position:absolute;
  left:0; top:0; bottom:0;
  width:4px;
  background: linear-gradient(#3da33d,#1d7ad1,#6b2bd6);
  opacity:0; transform: translateX(-6px);
  transition: all .4s cubic-bezier(.4,.0,.2,1);
  border-top-right-radius:4px; border-bottom-right-radius:4px;
}
ul li:hover::before{ opacity:1; transform: translateX(0); }

/* Add button special shine */
#addBtn{
  position:relative;
  overflow:hidden;
}
#addBtn::before{
  content:""; position:absolute; top:0; left:-60%; width:40%; height:100%; background:linear-gradient(70deg,rgba(255,255,255,0.15),rgba(255,255,255,0)); transform:skewX(-25deg); animation: shine 4s ease-in-out infinite; }
@keyframes shine { 0% { left:-60%; } 60% { left:140%; } 100% { left:140%; } }

/* Scroll appear (if list grows) */
@media (prefers-reduced-motion: reduce){
  *{ animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition:none !important; }
}