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

:root{
  --bg: #f6f7fb;
  --card: #ffffff;
  --muted: #7a8596;
  --accent: #5b8def;
  --glass: rgba(255,255,255,0.6);
  --text: #10203a;
  --radius: 14px;
  --shadow: 0 6px 18px rgba(35,45,60,0.08);
}

[data-theme="dark"]{
  --bg: #0f1419;
  --card: #1a1f2e;
  --muted: #8a92a6;
  --accent: #6b9cff;
  --glass: rgba(26,31,46,0.6);
  --text: #e8ecf1;
}

*{
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

html,body{
  height: 100%;
  background: linear-gradient(180deg, var(--bg), var(--bg));
  -webkit-font-smoothing: antialiased;
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
}

.container{
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px 20px;
  gap: 20px;
}

.card{
  width: 100%;
  max-width: 720px;
  background: var(--card);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.title{
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.4px;
}

.subtitle{
  color: var(--muted);
  font-size: 13px;
  margin-top: -4px;
}

.add-row{
  display: flex;
  gap: 10px;
  align-items: center;
}

#InputArea{
  flex: 1;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(16,32,58,0.08);
  background: linear-gradient(180deg, rgba(250,251,255,0.8), rgba(245,246,250,0.8));
  outline: none;
  font-size: 14px;
  color: var(--text);
  background: var(--glass);
  transition: box-shadow 0.18s ease, transform 0.12s ease, background 0.3s ease, color 0.3s ease;
}

#InputArea::placeholder{
  color: rgba(122,133,150,0.6);
}

#InputArea:focus{
  box-shadow: 0 6px 18px rgba(91,141,239,0.14);
  transform: translateY(-1px);
}

.button{
  border: none;
  background: var(--accent);
  color: white;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(91,141,239,0.24);
  transition: box-shadow 0.2s ease, transform 0.12s ease;
}

.button:hover{
  box-shadow: 0 6px 18px rgba(91,141,239,0.28);
  transform: translateY(-1px);
}

.button:active{
  transform: translateY(0);
}

.AddTask{
  width: 100%;
}

#List-container{
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 42vh;
  overflow-y: auto;
  padding-right: 6px;
}

#List-container li{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, var(--glass), var(--card));
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 2px 8px rgba(16,32,58,0.04);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.3s ease, color 0.3s ease;
  cursor: pointer;
  word-break: break-word;
  color: var(--text);
}

#List-container li:hover{
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16,32,58,0.08);
}

#List-container li.checked{
  opacity: 0.7;
}

#List-container li.checked::before{
  content: '';
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5b8def, #7aa3e5);
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.3);
}

#List-container li span{
  color: #e05b4f;
  cursor: pointer;
  font-size: 20px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.12s ease, color 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#List-container li span:hover{
  background: rgba(224,91,79,0.1);
  color: #d64536;
}

.edit-btn{
  color: #5577c6;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 6px;
  border: none;
  background: transparent;
  transition: background 0.12s ease, color 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.edit-btn:hover{
  background: rgba(85,119,198,0.08);
  color: #4563a3;
}

.meta{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.github{
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 4px 12px rgba(35,45,60,0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

.github:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(35,45,60,0.16);
}

.github a{
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.github img{
  width: 24px;
  height: 24px;
  filter: invert(0.3);
}

.theme-toggle{
  width: 44px;
  height: 44px;
  border: none;
  background: var(--accent);
  color: white;
  border-radius: 10px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(91,141,239,0.2);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.12s ease;
}

.theme-toggle:hover{
  box-shadow: 0 4px 12px rgba(91,141,239,0.3);
  transform: translateY(-1px);
}

.theme-toggle:active{
  transform: translateY(0);
}

#install-btn{
  position: fixed;
  display: none;
  bottom: 70px;
  right: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 4px 12px rgba(91,141,239,0.3);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#install-btn:hover{
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(91,141,239,0.4);
}

#install-btn img{
  width: 28px;
  height: 28px;
}

/* Scrollbar styling */
#List-container::-webkit-scrollbar{
  width: 6px;
}

#List-container::-webkit-scrollbar-track{
  background: transparent;
}

#List-container::-webkit-scrollbar-thumb{
  background: rgba(91,141,239,0.3);
  border-radius: 3px;
}

#List-container::-webkit-scrollbar-thumb:hover{
  background: rgba(91,141,239,0.5);
}

/* Responsive */
@media (max-width: 480px){
  .card{
    padding: 20px;
  }
  
  .title{
    font-size: 20px;
  }
  
  #InputArea{
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .button{
    padding: 9px 14px;
    font-size: 13px;
  }
  
  #List-container li{
    padding: 10px 12px;
    font-size: 14px;
  }
  
  .header{
    flex-direction: column;
    align-items: flex-start;
  }
  
  .theme-toggle{
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}