@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

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

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #c2e9fb, #a1c4fd);
  background-size: 300% 300%;
  animation: gradientMove 20s ease infinite;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #333;
}

header {
   position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 20px 0;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.logo {
  font-size: 30px;
  font-weight: 600;
  color: #0d47a1;
  letter-spacing: 1px;
}

.logo span {
  color: #2575fc;
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 50px 20px;
}

form {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(18px);
  padding: 40px 35px;
  border-radius: 24px;
  width: 100%;
  max-width: 720px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  animation: fadeIn 1s ease;
}

form h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 26px;
  font-weight: 600;
  color: #0d47a1;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.form-field {
  position: relative;
}

.form-field.full {
  grid-column: span 2;
}

input, select {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  font-weight: 500;
  transition: all 0.3s ease;
}

input:focus, select:focus {
  outline: none;
  box-shadow: 0 0 6px #2575fc;
  transform: scale(1.02);
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(35%) sepia(40%) saturate(300%) hue-rotate(210deg);
  cursor: pointer;
}

label {
  position: absolute;
  top: -10px;
  left: 14px;
  background: rgba(255,255,255,0.9);
  padding: 0 6px;
  font-size: 14px;
  color: #444;
  font-weight: 500;
  pointer-events: none;
}

#tripDateRange {
  cursor: pointer;
}

button {
  width: 100%;
  padding: 14px;
  margin-top: 24px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

button[type="submit"] {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

button[type="submit"]:hover {
  opacity: 0.92;
  transform: translateY(-2px);
}

button[type="reset"] {
  background-color: #ffffff;
  border: 1px solid #ccc;
  color: #444;
}

button[type="reset"]:hover {
  background-color: #f1f1f1;
}

#durationResult, #apiResult {
  margin-top: 24px;
  white-space: pre-wrap;
  font-weight: 600;
  color: #0d47a1;
  animation: fadeIn 0.5s ease;
}

footer {
  text-align: center;
  background: rgba(255, 255, 255, 0.2);
  padding: 18px 0;
  color: #333;
  font-size: 14px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Responsive */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-field.full {
    grid-column: span 1;
  }
  form {
    padding: 30px 20px;
  }
  form h2 {
    font-size: 22px;
  }
}
