html {
  height: 100%;
  width: 100%;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #0d0d0d, #1a1a1a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  box-sizing: border-box;
  overflow-x: hidden;
}

.app {
  background: #141414;
  padding: 35px;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 255, 204, 0.1);
  width: 100%;
  max-width: 450px;
  text-align: center;
  animation: slideIn 0.5s ease-out;
}

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

h1 {
  color: #00ffcc;
  margin-bottom: 10px;
  font-size: 2.2em;
  font-weight: 600;
  letter-spacing: 1px;
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% {
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
  }
  50% {
    text-shadow: 0 0 20px rgba(0, 255, 204, 0.8);
  }
}

.tagline {
  color: #888;
  font-size: 14px;
  margin-bottom: 30px;
  font-weight: 300;
}

.habit-input {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 25px;
}

input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  border: 2px solid transparent;
  outline: none;
  background: #222;
  color: #fff;
  font-size: 15px;
  transition: all 0.3s ease;
}

input:focus {
  border-color: #00ffcc;
  background: #2a2a2a;
  box-shadow: 0 0 0 3px rgba(0, 255, 204, 0.1);
}

input::placeholder {
  color: #666;
}

button {
  padding: 12px 24px;
  background: #00ffcc;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #000;
  font-size: 15px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

button:hover {
  background: #00e6b8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 255, 204, 0.3);
}

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

.suggested-section {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #333;
}

.suggested-section h3 {
  color: #00ffcc;
  font-size: 16px;
  margin-bottom: 15px;
  font-weight: 500;
}

.suggested-habits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.suggested-chip {
  background: #1e1e1e;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.suggested-chip:hover {
  background: #252525;
  border-color: #00ffcc;
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 255, 204, 0.2);
}

ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  max-height: 400px;
  overflow-y: auto;
}

ul::-webkit-scrollbar {
  width: 8px;
}

ul::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 10px;
}

ul::-webkit-scrollbar-thumb {
  background: #00ffcc;
  border-radius: 10px;
}

li {
  background: #1e1e1e;
  padding: 14px 16px;
  border-radius: 12px;
  margin: 8px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  opacity: 0;
  transform: translateX(-20px);
}

li.show {
  opacity: 1;
  transform: translateX(0);
}

li.removing {
  animation: slideOut 0.3s ease-out forwards;
}

@keyframes slideOut {
  to {
    opacity: 0;
    transform: translateX(100px);
    height: 0;
    padding: 0;
    margin: 0;
  }
}

li:hover {
  background: #252525;
  border-color: #00ffcc33;
  transform: translateX(4px) scale(1.02);
}

.habit-text {
  flex: 1;
  text-align: left;
  cursor: pointer;
  padding: 4px;
  transition: all 0.3s ease;
  font-size: 15px;
}

.habit-text.completed {
  text-decoration: line-through;
  opacity: 0.5;
  color: #888;
  animation: completeCheck 0.5s ease-out;
}

@keyframes completeCheck {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.delete-btn {
  background: transparent;
  color: #ff4757;
  border: 1px solid #ff475733;
  padding: 4px 10px;
  font-size: 24px;
  line-height: 1;
  min-width: 32px;
  height: 32px;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-transform: none;
  letter-spacing: normal;
}

.delete-btn:hover {
  background: #ff4757;
  color: #fff;
  border-color: #ff4757;
  transform: translateY(0) scale(1.1) rotate(90deg);
  box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
}

.stats {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #333;
  display: flex;
  justify-content: space-around;
  gap: 20px;
}

.stats p {
  margin: 5px 0;
  color: #aaa;
  font-size: 14px;
}

.stats strong {
  color: #00ffcc;
  font-weight: 600;
}

.stats span {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.celebration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.celebration.active {
  opacity: 1;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: fall 1s linear forwards;
}

@keyframes fall {
  to {
    transform: translateY(100vh) rotate(720deg);
  }
}

@media (max-width: 480px) {
  .app {
    padding: 25px;
  }
  
  h1 {
    font-size: 1.8em;
  }
  
  .stats {
    flex-direction: column;
    gap: 10px;
  }
  
  .suggested-chip {
    font-size: 12px;
    padding: 6px 12px;
  }
}
