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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #2c3e50;
  position: relative;
  overflow-x: hidden;
}

/* Background decoration */
.background-decoration {
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  animation: rotate 20s linear infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Header */
header {
  text-align: center;
  padding: 40px 20px 20px;
  z-index: 1;
}

h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  color: white;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  font-weight: 400;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Main container */
.container {
  max-width: 600px;
  margin: 20px auto 40px;
  padding: 20px;
}

.form-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.15),
    0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: slideInUp 0.8s ease;
}

/* Input groups */
.input-group {
  margin-bottom: 28px;
  position: relative;
}

.input-group:last-of-type {
  margin-bottom: 32px;
}

label {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 600;
  color: #2c3e50;
  font-size: 15px;
  gap: 12px;
}

.step-number {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Form inputs */
select, input[type="date"] {
  width: 100%;
  padding: 16px 20px;
  border-radius: 16px;
  border: 2px solid #e9ecef;
  font-size: 16px;
  background: #fafbfc;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}

select:focus, input[type="date"]:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 
    0 0 0 4px rgba(102, 126, 234, 0.1),
    0 8px 25px rgba(102, 126, 234, 0.15);
  transform: translateY(-2px);
}

select:disabled, input[type="date"]:disabled {
  background: #f8f9fa;
  color: #adb5bd;
  cursor: not-allowed;
  border-color: #e9ecef;
}

/* Button group */
.button-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

button {
  flex: 1;
  min-width: 140px;
  padding: 16px 24px;
  border-radius: 16px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

button:hover::before {
  left: 100%;
}

#findBtn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

#findBtn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

#findBtn:disabled {
  background: linear-gradient(135deg, #adb5bd, #6c757d);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-reset {
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  color: white;
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.btn-reset:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
}

.btn-icon {
  font-size: 18px;
}

/* Output/Result section */
.output {
  margin-top: 32px;
  padding: 32px;
  background: linear-gradient(135deg, #f8f9ff, #e8f4f8);
  border: 2px solid rgba(102, 126, 234, 0.1);
  border-radius: 20px;
  text-align: center;
  display: none;
  position: relative;
  overflow: hidden;
}

.output::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.result-icon {
  font-size: 32px;
  margin-bottom: 12px;
  animation: bounce 1s ease infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

.result-text {
  font-size: 18px;
  color: #495057;
  margin-bottom: 16px;
  font-weight: 500;
}

.result-day {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from { filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.5)); }
  to { filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.8)); }
}

/* Footer */
footer {
  text-align: center;
  padding: 40px 20px;
  margin-top: auto;
}

.footer-content {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.footer-content p {
  margin-bottom: 4px;
}

.footer-subtitle {
  font-size: 12px;
  opacity: 0.7;
}

footer a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

footer a:hover {
  color: white;
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .form-section {
    margin: 20px;
    padding: 24px;
  }
  
  .button-group {
    flex-direction: column;
  }
  
  button {
    min-width: unset;
  }
  
  .result-day {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 10px;
  }
  
  .form-section {
    margin: 10px;
    padding: 20px;
  }
  
  .step-number {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }
  
  select, input[type="date"] {
    padding: 14px 16px;
    font-size: 15px;
  }
}
