/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 40px;
  width: 100%;
  max-width: 500px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Header styles */
header h1 {
  color: #333;
  font-size: 2.5rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.subtitle {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 30px;
  font-weight: 400;
}

/* Form styles */
.age-form {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 15px;
  margin-bottom: 30px;
  align-items: end;
}

.input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.input-group label {
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
  color: #333;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.input-group input:hover,
.input-group select:hover {
  border-color: #667eea;
}

.input-group input::placeholder {
  color: #999;
  font-weight: 300;
}

/* Button styles */
.calculate-btn {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.calculate-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.calculate-btn:active {
  transform: translateY(-1px);
}

.btn-icon {
  font-size: 1.2rem;
}

/* Result styles */
.result-container {
  margin-top: 30px;
  animation: slideIn 0.5s ease-out;
}

.result-card {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-radius: 15px;
  padding: 25px;
  color: white;
  box-shadow: 0 10px 30px rgba(240, 147, 251, 0.3);
}

.result-card h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.age-display {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.age-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.2);
  padding: 15px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.age-number {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 5px;
}

.age-label {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
}

.total-days {
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  padding-top: 15px;
  margin-top: 15px;
}

.total-days p {
  font-size: 1rem;
  font-weight: 500;
}

#totalDays {
  font-weight: 700;
  font-size: 1.1rem;
}

/* Error styles */
.error-message {
  background: #ff6b6b;
  color: white;
  padding: 15px 20px;
  border-radius: 10px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease-out;
}

.error-icon {
  font-size: 1.2rem;
}

.error-text {
  font-weight: 500;
}

/* Footer styles */
footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e1e5e9;
}

footer p {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 15px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.social-link.linkedin {
  background: linear-gradient(135deg, #0077b5 0%, #005885 100%);
  color: white;
}

.social-link.github {
  background: linear-gradient(135deg, #333 0%, #000 100%);
  color: white;
}

.social-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-link.linkedin:hover {
  box-shadow: 0 5px 15px rgba(0, 119, 181, 0.3);
}

.social-link.github:hover {
  box-shadow: 0 5px 15px rgba(51, 51, 51, 0.3);
}

.social-icon {
  font-size: 1.1rem;
}

.social-text {
  font-weight: 600;
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.age-item:hover {
  animation: pulse 0.6s ease-in-out;
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 30px 20px;
    margin: 10px;
  }

  header h1 {
    font-size: 2rem;
  }

  .age-form {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .age-display {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .age-number {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 20px 15px;
  }

  header h1 {
    font-size: 1.8rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .calculate-btn {
    padding: 12px 25px;
    font-size: 1rem;
  }

  .social-links {
    flex-direction: column;
    gap: 10px;
  }

  .social-link {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
}

/* Loading state */
.calculate-btn.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.calculate-btn.loading .btn-text {
  display: none;
}

.calculate-btn.loading::after {
  content: "⏳";
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
