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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
  transition: all 0.4s ease;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.container {
  max-width: 500px;
  margin: 60px auto;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  border-radius: 25px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 40px;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

h1 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.5px;
}

.topDiv {
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#taskInput {
  padding: 18px 24px;
  font-size: 1.1rem;
  border-radius: 15px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

#taskInput::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

#taskInput:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}


#taskInput,
#taskStats {
  width: 100%;
  border-radius: 12px;
  padding: 15px 20px;
  font-size: 1rem;
  box-sizing: border-box;
}



@media (max-width: 768px) {
  #taskInput,
  #taskStats {
    font-size: 0.95rem;
    padding: 14px 18px;
  }
}

@media (max-width: 480px) {
  #taskInput,
  #taskStats {
    font-size: 0.9rem;
    padding: 12px 16px;
  }
}


button {
  padding: 16px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 15px;
  cursor: pointer;
  border: none;
  margin: 5px 0;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 1px;
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

button:hover::before {
  left: 100%;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

#addTask {
  background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
  color: white;
}

#addTask:hover {
  background: linear-gradient(135deg, #0072ff 0%, #00c6ff 100%);
}

#clearTask {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: white;
}

#clearTask:hover {
  background: linear-gradient(135deg, #ee5a24 0%, #ff6b6b 100%);
}

#toggleBtn {
  background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
  color: white;
}

#toggleBtn:hover {
  background: linear-gradient(135deg, #ff9ff3 0%, #feca57 100%);
}

ul {
  list-style: none;
  margin-top: 20px;
}

li {
  margin: 12px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 15px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(135deg, #00c6ff, #0072ff);
  transition: width 0.3s ease;
}

li:hover {
  transform: translateX(8px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

li:hover::before {
  width: 6px;
}

input[type="checkbox"] {
  width: 22px;
  height: 22px;
  cursor: pointer;
  accent-color: #00c6ff;
  margin-right: 15px;
  border-radius: 6px;
}

.delete-btn {
  font-size: 1.2rem;
  padding: 8px 12px;
  margin-left: 15px;
  cursor: pointer;
  background: rgba(255, 107, 107, 0.2);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 10px;
  color: #ff6b6b;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.delete-btn:hover {
  background: rgba(255, 107, 107, 0.3);
  transform: scale(1.1);
}

.completed {
  text-decoration: line-through;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

.completed::before {
  background: linear-gradient(135deg, #2ed573, #1e90ff);
}

/* Light Mode */
.light-mode {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.light-mode .container {
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #333;
}

.light-mode h1 {
  color: #333;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.light-mode #taskInput {
  background: rgba(255, 255, 255, 0.3);
  color: #333;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.light-mode #taskInput::placeholder {
  color: rgba(51, 51, 51, 0.6);
}

.light-mode li {
  background: rgba(255, 255, 255, 0.2);
  color: #333;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.light-mode li:hover {
  background: rgba(255, 255, 255, 0.3);
}

.light-mode .completed {
  color: rgba(51, 51, 51, 0.5);
}

#showBtns {
  display: flex;
  gap: 12px;
  margin: 20px 0;
  flex-wrap: wrap;
}

#showBtns button {
  flex: 1;
  min-width: 100px;
  padding: 12px 20px;
  font-size: 0.9rem;
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  color: #333;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#showBtns button:hover {
  background: linear-gradient(135deg, #fed6e3 0%, #a8edea 100%);
  transform: translateY(-1px);
}

/* Action buttons container */
.action-buttons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.action-buttons button {
  flex: 1;
  min-width: 140px;
   margin-left: 2px;
  margin-right: 2px;
}

/* Task stats styling */
#taskStats {
  text-align: center;
  margin: 20px 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 12px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.light-mode #taskStats {
  color: #333;
  background: rgba(255, 255, 255, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    margin: 20px auto;
    padding: 25px;
  }
  
  h1 {
    font-size: 2rem;
    margin-bottom: 30px;
  }
  
  #taskInput {
    padding: 15px 20px;
    font-size: 1rem;
  }
  
  button {
    padding: 14px 28px;
    font-size: 0.9rem;
  }
  
  li {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  #showBtns {
    flex-direction: column;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-buttons button,
  #showBtns button {
    width: 100%;
  }
}

#warning{
    text-align: center;
}

@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    max-width: 700px;
    padding: 30px;
  }

  h1 {
    font-size: 2.2rem;
  }

  #taskInput {
    font-size: 1.05rem;
    padding: 16px 22px;
  }

  button {
    font-size: 0.95rem;
    padding: 14px 30px;
  }

  li {
    padding: 18px;
  }

  #taskStats {
    font-size: 1rem;
  }
}


@media (min-width: 1440px) {
  .container {
    max-width: 800px;
    padding: 50px;
  }

  h1 {
    font-size: 2.8rem;
  }

  #taskInput {
    font-size: 1.2rem;
    padding: 20px 28px;
  }

  button {
    font-size: 1.05rem;
    padding: 18px 36px;
  }

  li {
    padding: 22px;
  }

  #taskStats {
    font-size: 1.2rem;
  }
}
