* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(45deg, #6a11cb, #2575fc, #ff6b6b, #f9d423);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.container {
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 40px 30px;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 500px;
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.container:hover {
  transform: translateY(-5px);
}

h1 {
  color: #2c3e50;
  text-align: center;
  margin-bottom: 30px;
  font-size: 2.5em;
  font-weight: 600;
  background: linear-gradient(45deg, #6a11cb, #2575fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.input-group {
  margin-bottom: 25px;
}

label {
  display: block;
  margin-bottom: 10px;
  color: #34495e;
  font-weight: 500;
  font-size: 1.1em;
}

input[type="date"] {
  width: 100%;
  padding: 15px;
  border: 2px solid rgba(106, 17, 203, 0.3);
  border-radius: 10px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
}

input[type="date"]:focus {
  border-color: #6a11cb;
  box-shadow: 0 0 15px rgba(106, 17, 203, 0.2);
  outline: none;
}

button {
  width: 100%;
  padding: 16px;
  background: linear-gradient(45deg, #6a11cb, #2575fc);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1em;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

button:hover {
  background: linear-gradient(45deg, #2575fc, #6a11cb);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.result-box {
  margin-top: 30px;
  padding: 25px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  display: none;
  position: relative;
  overflow: hidden;
}

.result-box::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(106, 17, 203, 0.1),
    transparent
  );
  transform: rotate(45deg);
  animation: borderLight 3s linear infinite;
}

@keyframes borderLight {
  0% {
    transform: rotate(45deg) translateX(-50%);
  }
  100% {
    transform: rotate(45deg) translateX(50%);
  }
}

.age-section,
.breakdown-section {
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

h2 {
  color: #2c3e50;
  font-size: 1.4em;
  margin-bottom: 15px;
  font-weight: 600;
}

#ageOutput {
  font-size: 2em;
  color: #6a11cb;
  font-weight: 700;
  text-align: center;
  margin: 15px 0;
}

#ageBreakdown {
  color: #34495e;
  line-height: 1.8;
  font-size: 1.1em;
}

#ageBreakdown p {
  margin: 8px 0;
  padding: 10px;
  background: rgba(106, 17, 203, 0.05);
  border-radius: 8px;
  transition: transform 0.3s ease;
}

#ageBreakdown p:hover {
  transform: translateX(10px);
}

.note {
  margin-top: 25px;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9em;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px;
  border-radius: 8px;
}

.app-footer {
  margin-top: 40px;
  padding-top: 25px;
  border-top: 1px solid rgba(106, 17, 203, 0.2);
  position: relative;
}

.app-footer::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(106, 17, 203, 0.4),
    transparent
  );
}

.footer-content {
  text-align: center;
  font-size: 0.9em;
  color: #666;
}

.app-version {
  font-size: 0.8em;
  color: #888;
  margin-bottom: 8px;
}

.copyright {
  line-height: 1.6;
  margin: 10px 0;
}

.contact-info {
  margin-top: 15px;
  padding: 12px;
  background: rgba(106, 17, 203, 0.05);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.contact-info:hover {
  background: rgba(106, 17, 203, 0.08);
  transform: translateY(-2px);
}

.creator {
  font-weight: 700;
  background: linear-gradient(45deg, #6a11cb, #2575fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.email-link {
  color: #6a11cb;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
}

.email-link i {
  color: #2575fc;
  transition: transform 0.3s ease;
}

.email-link:hover i {
  transform: rotate(15deg);
}

/* Responsive */
@media (max-width: 480px) {
  .container {
    padding: 25px 20px;
    margin: 15px;
  }

  h1 {
    font-size: 2em;
  }

  #ageOutput {
    font-size: 1.8em;
  }

  .app-footer {
    margin-top: 30px;
    padding-top: 20px;
  }

  .footer-content {
    font-size: 0.85em;
  }

  .contact-info {
    padding: 10px;
  }
}

#ageOutput:empty::before,
#ageBreakdown p:empty::before {
  content: "-";
  color: #888;
}
