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

/* Body styling */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #2193b0, #6dd5ed);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  color: #333;
  animation: fadeIn 1s ease-in-out;
}

/* Main card */
.container {
  background: #fff;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.25);
  text-align: center;
  width: 380px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: slideUp 1s ease, float 4s ease-in-out infinite;
}

.container:hover {
  transform: translateY(-6px);
  box-shadow: 0px 12px 30px rgba(0, 0, 0, 0.3);
}

/* Heading + subtitle inside card */
.container h1 {
  margin-bottom: 10px;
  font-size: 30px;
  color: #2193b0;
  font-weight: bold;
}

.container .subtitle {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
  font-style: italic;
}

/* Form elements */
.form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 16px;
  color: #444;
}

.form input[type="date"] {
  padding: 12px;
  border: 2px solid #2193b0;
  border-radius: 12px;
  font-size: 15px;
  width: 100%;
  margin-bottom: 15px;
  transition: 0.3s;
}

.form input[type="date"]:focus {
  border-color: #6dd5ed;
  outline: none;
  animation: glow 1.5s infinite alternate;
}

/* Buttons */
button {
  padding: 12px 20px;
  background: linear-gradient(135deg, #2193b0, #6dd5ed);
  border: none;
  color: #fff;
  font-size: 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
  width: 48%;
  margin: 5px 1%;
  letter-spacing: 1px;
}

button:hover {
  background: linear-gradient(135deg, #6dd5ed, #2193b0);
  transform: scale(1.07);
  box-shadow: 0px 6px 15px rgba(33, 147, 176, 0.4);
}

button:active {
  transform: scale(0.95);
  box-shadow: 0px 3px 8px rgba(33, 147, 176, 0.3);
}

/* Result box */
#result {
  margin-top: 20px;
  font-size: 18px;
  font-weight: 600;
  color: #333;
  background: rgba(109, 213, 237, 0.15);
  padding: 12px;
  border-radius: 12px;
  animation: popIn 0.4s ease-in-out;
}

/* Loader spinner */
.loader {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top: 4px solid #2193b0;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  margin: 15px auto;
  animation: spin 1s linear infinite;
  display: none;
}

/* Typing dots */
.dots {
  display: none;
  margin-top: 15px;
  font-size: 18px;
  font-weight: bold;
  color: #2193b0;
}

.dots span {
  animation: blink 1.5s infinite;
}

.dots span:nth-child(2) { animation-delay: 0.3s; }
.dots span:nth-child(3) { animation-delay: 0.6s; }

/* Footer */
footer {
  margin-top: 20px;
  text-align: center;
  color: #fff;
  font-size: 14px;
  animation: fadeIn 1.5s ease-in-out;
  animation-delay: 1s;
  opacity: 0;
  animation-fill-mode: forwards;
}

footer strong {
  color: #ffd700;
}

/* Animations */
@keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} }
@keyframes slideUp { from {transform: translateY(40px); opacity: 0;} to {transform: translateY(0); opacity: 1;} }
@keyframes float { 0% {transform: translateY(0);} 50% {transform: translateY(-8px);} 100% {transform: translateY(0);} }
@keyframes glow { 0% {box-shadow: 0 0 5px #2193b0;} 50% {box-shadow: 0 0 15px #6dd5ed;} 100% {box-shadow: 0 0 5px #2193b0;} }
@keyframes popIn { 0% {transform: scale(0.7); opacity: 0;} 100% {transform: scale(1); opacity: 1;} }
@keyframes spin { from {transform: rotate(0deg);} to {transform: rotate(360deg);} }
@keyframes blink { 0% {opacity: 0.2;} 20% {opacity: 1;} 100% {opacity: 0.2;} }
