/* Body with gradient background and floating circles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  height: 100vh;
  align-items: center;
  justify-content: center;
  background: linear-gradient(-45deg, #ff9a9e, #fad0c4, #fbc2eb, #a6c1ee);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  overflow: hidden;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Floating circles */
.floating-circles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.floating-circles span {
  position: absolute;
  display: block;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: float 10s linear infinite;
}

@keyframes float {
  0% { transform: translateY(100vh) translateX(0); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(-10vh) translateX(50px); opacity: 0; }
}

/* Container */
.container {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.95);
  padding: 50px 60px;
  border-radius: 20px;
  box-shadow: 0 12px 25px rgba(0,0,0,0.2);
  text-align: center;
  width: 520px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: floatCard 3s ease-in-out infinite;
}

/* Floating card */
@keyframes floatCard {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Heading typing animation */
h1 {
  font-size: 2rem;
  margin-bottom: 25px;
  color: #333;
  overflow: hidden;
  border-right: 4px solid #333;
  white-space: nowrap;
  letter-spacing: 2px;
  animation: typing 2s steps(30, end), blink 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  50% { border-color: transparent; }
}

/* Input */
input {
  width: 100%;
  padding: 15px;
  margin-bottom: 18px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

input:focus {
  border-color: #4CAF50;
  outline: none;
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.4);
}

/* Button */
button {
  background: linear-gradient(135deg, #43cea2, #185a9d);
  color: white;
  padding: 14px 24px;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.3s ease;
}

button:hover {
  transform: scale(1.08);
  background: linear-gradient(135deg, #185a9d, #43cea2);
}

/* Result text with color classes */
#result {
  margin-top: 20px;
  font-weight: bold;
  font-size: 1.4rem;
  color: #222;
}

/* History list */
#history {
  margin-top: 20px;
  text-align: left;
}

#historyList li {
  cursor: pointer;
  padding: 5px;
  transition: all 0.2s ease;
  border-radius: 5px;
}

#historyList li:hover {
  background-color: #f0f0f0;
}



