* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #fafaf5 0%, #ffffff 50%, #fffef7 100%);
  font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
  color: #2c2c2c;
  min-height: 100vh;
  padding-bottom: 3rem;
}

.cors-warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fde047 100%);
  border-bottom: 3px solid #eab308;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.5s ease-out;
}

.cors-warning .cors-warning-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.cors-warning .cors-warning-content i {
  font-size: 2.5rem;
  color: #ca8a04;
  flex-shrink: 0;
  animation: pulse 2s infinite;
}

.cors-warning .cors-warning-content strong {
  display: block;
  font-size: 1.3rem;
  color: #92400e;
  margin-bottom: 0.5rem;
}

.cors-warning .cors-warning-content p {
  margin: 0.5rem 0;
  color: #78350f;
  line-height: 1.6;
}

.cors-warning .cors-warning-content code {
  display: block;
  background: #fff;
  padding: 0.8rem 1rem;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  color: #1e40af;
  margin: 0.5rem 0;
  border: 2px solid #eab308;
  font-weight: 600;
}

.cors-warning .cors-warning-content a {
  color: #1e40af;
  text-decoration: underline;
  font-weight: 600;
}

.cors-warning .cors-warning-content a:hover {
  color: #1e3a8a;
}

.cors-warning .cors-warning-content small {
  color: #92400e;
  font-style: italic;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.header {
  background: transparent;
  padding: 3rem 1rem 2rem 1rem;
  text-align: center;
  position: relative;
}

.language-selector {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.4rem;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 500;
  color: #666;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.lang-btn:hover {
  background: rgba(251, 191, 36, 0.1);
  color: #d97706;
  transform: translateY(-1px);
}

.lang-btn.active {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

.lang-code {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.5px;
}

.lang-text {
  font-size: 0.85rem;
  font-weight: 600;
}

.header h1 {
  margin: 0 0 0.5em 0;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #b8860b;
  font-family: 'Georgia', 'Times New Roman', serif;
  text-shadow: 0 2px 8px rgba(184, 134, 11, 0.15);
}

.header .subtitle {
  color: #5a5a5a;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 400;
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}

.nadi-form {
  background: #fff;
  margin: 0 auto 2rem auto;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2rem;
  transition: box-shadow 0.3s ease;
}

.nadi-form:hover {
  box-shadow: 0 8px 30px 0 rgba(0, 0, 0, 0.12);
}

.nadi-form .mode-selector {
  display: flex;
  gap: 1rem;
  justify-content: center;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 12px;
}

.nadi-form .mode-selector .mode-option {
  flex: 1;
  max-width: 250px;
  cursor: pointer;
  position: relative;
}

.nadi-form .mode-selector .mode-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nadi-form .mode-selector .mode-option input[type="radio"]:checked + .mode-label {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
  transform: translateY(-2px);
}

.nadi-form .mode-selector .mode-option input[type="radio"]:checked + .mode-label i {
  color: #fff;
}

.nadi-form .mode-selector .mode-option .mode-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1.5rem;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  text-align: center;
}

.nadi-form .mode-selector .mode-option .mode-label i {
  font-size: 1.2rem;
  color: #d97706;
  transition: color 0.3s ease;
}

.nadi-form .mode-selector .mode-option .mode-label:hover {
  border-color: #f59e0b;
  transform: translateY(-1px);
}

.nadi-form .persons-container {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: stretch;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.05), rgba(245, 158, 11, 0.03));
  border-radius: 20px;
  padding: 2rem;
  border: 2px solid rgba(251, 191, 36, 0.15);
  transition: all 0.3s ease;
  overflow: visible;
}

.nadi-form .persons-container:hover {
  border-color: rgba(251, 191, 36, 0.3);
  box-shadow: 0 8px 32px rgba(251, 191, 36, 0.12);
}

.nadi-form .persons-container.single-mode {
  justify-content: center;
}

.nadi-form .persons-container.single-mode .person-subcard {
  max-width: 500px;
  width: 100%;
}

.nadi-form .person-subcard {
  flex: 1;
  max-width: 400px;
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem;
  border: 2px solid rgba(251, 191, 36, 0.15);
  transition: all 0.3s ease;
  position: relative;
  z-index: 0;
  overflow: visible;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.nadi-form .person-subcard:hover {
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 8px 30px rgba(251, 191, 36, 0.12);
  transform: translateY(-2px);
}

.nadi-form .person-subcard .person-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(251, 191, 36, 0.2);
}

.nadi-form .person-subcard .person-header i {
  font-size: 1.5rem;
  color: #d97706;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.1));
  border-radius: 50%;
}

.nadi-form .person-subcard .person-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #222;
  font-weight: 700;
}

.nadi-form .person-subcard .person-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nadi-form .person-subcard .field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.time-input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.time-hour, .time-minute {
  width: 60px;
  font-size: 1rem;
  padding: 0.9rem 0.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: #fafafa;
  text-align: center;
}

.time-separator {
  font-size: 1.5rem;
  font-weight: bold;
  color: #d97706;
  margin: 0 0.2rem;
}

.time-period {
  width: 80px;
  font-size: 1rem;
  padding: 0.9rem 0.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: #fafafa;
  cursor: pointer;
  font-weight: 600;
  color: #d97706;
}

/* Date Input with Picker */
.date-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.date-input-wrapper input[type="text"] {
  flex: 1;
  padding-right: 3rem;
}

.date-helper {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.date-icon {
  position: absolute;
  right: 1rem;
  color: #d97706;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: all;
}

.date-icon:hover {
  color: #f59e0b;
  transform: scale(1.1);
}

/* Validation Error Styling */
input.error, select.error {
  border-color: #ef4444 !important;
  background-color: #fef2f2 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
  20%, 40%, 60%, 80% { transform: translateX(10px); }
}

/* Validation Error Overlay */
.validation-error-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
  backdrop-filter: blur(4px);
}

.validation-error-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 90%;
  width: 450px;
  animation: slideDown 0.3s ease;
  overflow: hidden;
}

.error-header {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.error-header i {
  font-size: 2rem;
}

.error-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
}

.error-body {
  padding: 1.5rem;
}

.error-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
}

.error-hint {
  font-size: 0.95rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.6;
}

.error-close-btn {
  width: 100%;
  padding: 1rem;
  border: none;
  background: #f3f4f6;
  color: #374151;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.error-close-btn:hover {
  background: #e5e7eb;
  color: #1f2937;
}

/* ============================================================
   BIRTH DETAILS SUMMARY - MODERN INTERACTIVE DESIGN
   ============================================================ */

.birth-details-summary {
  background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
  border: none;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.15);
  position: relative;
  overflow: hidden;
}

.birth-details-summary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.summary-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.summary-header i {
  font-size: 1.8rem;
  color: #f59e0b;
  animation: checkPulse 2s ease infinite;
}

@keyframes checkPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.summary-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #78350f;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Modern card design */
.summary-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.3rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.summary-card:hover {
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.2);
  transform: translateY(-4px);
  border-color: #fbbf24;
}

.summary-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #fef3c7;
}

.summary-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.summary-avatar i {
  font-size: 1.8rem;
  color: #f59e0b;
}

.summary-name-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.summary-person-label {
  font-size: 0.7rem;
  color: #92400e;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-person-name {
  font-size: 1.15rem;
  color: #78350f;
  font-weight: 700;
}

.summary-info-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.summary-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.8rem;
  background: #fffbeb;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.summary-info-item:hover {
  background: #fef3c7;
  transform: translateX(4px);
}

.info-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.info-icon-wrapper i {
  font-size: 1.1rem;
  color: #ffffff;
}

.birth-icon {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.time-icon {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.location-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.info-content {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}

.info-label {
  font-size: 0.75rem;
  color: #92400e;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 1rem;
  color: #78350f;
  font-weight: 700;
  word-break: break-word;
}

/* Mobile responsive - Stack layout */
@media (max-width: 768px) {
  .birth-details-summary {
    padding: 1.2rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
  }
  
  .summary-header {
    margin-bottom: 1.2rem;
  }
  
  .summary-header i {
    font-size: 1.5rem;
  }
  
  .summary-header h3 {
    font-size: 1rem;
  }
  
  .summary-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  
  .summary-card {
    padding: 1rem;
  }
  
  .summary-avatar {
    width: 42px;
    height: 42px;
  }
  
  .summary-avatar i {
    font-size: 1.5rem;
  }
  
  .summary-person-label {
    font-size: 0.65rem;
  }
  
  .summary-person-name {
    font-size: 1rem;
  }
  
  .summary-info-grid {
    gap: 0.8rem;
  }
  
  .summary-info-item {
    padding: 0.7rem;
  }
  
  .info-icon-wrapper {
    width: 32px;
    height: 32px;
  }
  
  .info-icon-wrapper i {
    font-size: 1rem;
  }
  
  .info-label {
    font-size: 0.7rem;
  }
  
  .info-value {
    font-size: 0.9rem;
  }
}

/* Site Footer */
.site-footer {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  color: #e5e7eb;
  padding: 2.5rem 1rem 1.5rem 1rem;
  margin-top: 4rem;
  border-top: 3px solid #f59e0b;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-badge {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(251, 191, 36, 0.15);
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 1.2rem;
  margin-bottom: 1.5rem;
}

.footer-badge i {
  font-size: 2.5rem;
  color: #fbbf24;
}

.badge-text {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.badge-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 0.5px;
}

.badge-subtitle {
  font-size: 0.85rem;
  color: #9ca3af;
  font-weight: 500;
}

.footer-details {
  margin-bottom: 1.5rem;
}

.footer-details p {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin: 0.8rem 0;
  line-height: 1.7;
  font-size: 0.9rem;
  color: #d1d5db;
}

.footer-details i {
  color: #d97706;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.footer-details strong {
  color: #fbbf24;
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0 1.5rem 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #9ca3af;
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-links a:hover {
  background: rgba(251, 191, 36, 0.25);
  color: #d97706;
  transform: translateY(-2px);
}

.footer-links a i {
  font-size: 1rem;
}

/* BSLND Branding Section */
.bslnd-branding {
  margin-top: 2.5rem;
  padding-top: 2rem;
  text-align: center;
}

.bslnd-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #fbbf24 50%, transparent 100%);
  margin-bottom: 2rem;
}

.bslnd-logo {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.4);
  margin-bottom: 1rem;
  animation: omGlow 3s ease infinite;
}

@keyframes omGlow {
  0%, 100% { box-shadow: 0 4px 16px rgba(251, 191, 36, 0.4); }
  50% { box-shadow: 0 4px 24px rgba(251, 191, 36, 0.6), 0 0 32px rgba(251, 191, 36, 0.3); }
}

.bslnd-logo i {
  font-size: 2.2rem;
  color: #ffffff;
}

.bslnd-org-name {
  margin: 0 0 1.5rem 0;
  font-size: 1.3rem;
  color: #fbbf24;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.bslnd-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.bslnd-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #9ca3af;
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  font-size: 0.85rem;
  font-weight: 500;
}

.bslnd-links a:hover {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  transform: translateY(-2px);
}

.bslnd-links a i {
  font-size: 0.9rem;
}

.bslnd-contact {
  margin: 1rem 0 0 0;
  font-size: 0.85rem;
  color: #9ca3af;
}

.bslnd-contact i {
  color: #fbbf24;
  margin: 0 0.3rem;
}

.footer-copyright {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 1rem;
}

.footer-copyright p {
  margin: 0.3rem 0;
  font-size: 0.85rem;
  color: #9ca3af;
}

.copyright-sub {
  font-size: 0.8rem;
  color: #6b7280;
  font-style: italic;
}

/* Mobile Footer Optimization */
@media (max-width: 768px) {
  .site-footer {
    padding: 2rem 1rem 1rem 1rem;
    margin-top: 3rem;
  }
  
  .footer-badge {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-badge i {
    font-size: 2rem;
  }
  
  .badge-title {
    font-size: 1rem;
  }
  
  .badge-subtitle {
    font-size: 0.8rem;
  }
  
  .footer-details p {
    font-size: 0.85rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .footer-details i {
    align-self: flex-start;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .footer-links a {
    justify-content: center;
  }
  
  /* BSLND branding mobile optimization */
  .bslnd-branding {
    margin-top: 2rem;
    padding-top: 1.5rem;
  }
  
  .bslnd-divider {
    margin-bottom: 1.5rem;
  }
  
  .bslnd-logo {
    width: 56px;
    height: 56px;
  }
  
  .bslnd-logo i {
    font-size: 2rem;
  }
  
  .bslnd-org-name {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
  }
  
  .bslnd-links {
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
  }
  
  .bslnd-links a {
    justify-content: center;
  }
  
  .bslnd-contact {
    font-size: 0.8rem;
  }
  
  .footer-copyright p {
    font-size: 0.8rem;
  }
  
  .copyright-sub {
    font-size: 0.75rem;
  }
}

/* ============================================================
   AIR DATEPICKER - CUSTOM GOLD/YELLOW THEME
   ============================================================ */

/* Input field styling */
input[readonly].air-datepicker-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: #1f2937;
  background: #ffffff;
  transition: all 0.2s ease;
  cursor: pointer;
}

input[readonly].air-datepicker-input:hover {
  border-color: #fbbf24;
  background: #fafafa;
}

input[readonly].air-datepicker-input:focus,
input[readonly].air-datepicker-input.-focus- {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.18);
  background: #ffffff;
}

/* Calendar container */
.air-datepicker {
  background: #ffffff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(251, 191, 36, 0.25), 0 0 0 1px rgba(251, 191, 36, 0.15);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  padding: 0;
  width: 300px;
}

/* Navigation (header) */
.air-datepicker-nav {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-radius: 12px 12px 0 0;
  padding: 1rem;
  border-bottom: none;
}

.air-datepicker-nav--title {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
}

.air-datepicker-nav--title:hover {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
}

.air-datepicker-nav--action {
  color: #ffffff;
  width: 32px;
  height: 32px;
}

.air-datepicker-nav--action:hover {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
}

.air-datepicker-nav--action svg {
  width: 14px;
  height: 14px;
}

.air-datepicker-nav--action path {
  stroke: #ffffff;
  stroke-width: 2.5;
}

/* Body */
.air-datepicker-body {
  padding: 0.8rem;
}

/* Weekdays */
.air-datepicker-body--day-names {
  margin-bottom: 0.5rem;
}

.air-datepicker-body--day-name {
  color: #6b7280;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Day cells */
.air-datepicker-cell {
  border-radius: 8px;
  color: #374151;
  font-weight: 500;
  height: 36px;
  transition: all 0.15s ease;
}

.air-datepicker-cell:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.air-datepicker-cell.-focus- {
  background: #ede9fe;
  color: #d97706;
}

.air-datepicker-cell.-current- {
  background: #fef3c7;
  color: #92400e;
  font-weight: 600;
}

.air-datepicker-cell.-current-:hover {
  background: #fde68a;
}

.air-datepicker-cell.-selected- {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.35);
}

.air-datepicker-cell.-selected-:hover {
  background: linear-gradient(135deg, #5568d3 0%, #6442a0 100%);
}

.air-datepicker-cell.-disabled- {
  color: #d1d5db;
  cursor: not-allowed;
}

.air-datepicker-cell.-disabled-:hover {
  background: transparent;
}

.air-datepicker-cell.-other-month- {
  color: #d1d5db;
}

.air-datepicker-cell.-other-month-:hover {
  color: #9ca3af;
}

/* Buttons */
.air-datepicker--buttons {
  border-top: 1px solid #f3f4f6;
  padding: 0.8rem;
}

.air-datepicker-button {
  background: #f3f4f6;
  color: #374151;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.air-datepicker-button:hover {
  background: #f59e0b;
  color: #ffffff;
}

/* Mobile modal */
.air-datepicker-overlay {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .air-datepicker {
    width: 95vw;
    max-width: 350px;
  }
  
  .air-datepicker-nav {
    padding: 1.2rem 1rem;
  }
  
  .air-datepicker-nav--title {
    font-size: 1rem;
  }
  
  .air-datepicker-nav--action {
    width: 40px;
    height: 40px;
  }
  
  .air-datepicker-nav--action svg {
    width: 16px;
    height: 16px;
  }
  
  .air-datepicker-body {
    padding: 1rem;
  }
  
  .air-datepicker-body--day-name {
    font-size: 0.8rem;
    padding: 0.6rem 0;
  }
  
  .air-datepicker-cell {
    height: 44px;
    font-size: 1rem;
  }
  
  .air-datepicker--buttons {
    padding: 1rem;
  }
  
  .air-datepicker-button {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
  }
  
  input[readonly].air-datepicker-input {
    padding: 0.85rem 1rem;
    font-size: 1rem;
    min-height: 52px;
  }
}

/* ============================================================
   END OF AIR DATEPICKER THEME
   ============================================================ */

/* Time input styling */
.time-hour:focus, .time-minute:focus, .time-period:focus {
  border-color: #f59e0b;
  outline: none;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
  background: #ffffff;
  font-family: inherit;
  color: #1f2937;
  background: linear-gradient(135deg, #ffffff 0%, #fefbff 100%);
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

input[type="date"]:hover {
  border-color: #c4b5fd;
  background: linear-gradient(135deg, #fafafa 0%, #f9f5ff 100%);
}

input[type="date"]:hover ~ .date-icon-themed {
  filter: grayscale(0%) hue-rotate(250deg) brightness(1);
  transform: translateY(-50%) scale(1.1);
}

input[type="date"]:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.18);
  background: linear-gradient(135deg, #ffffff 0%, #f9f5ff 100%);
}

input[type="date"]:focus ~ .date-icon-themed {
  filter: grayscale(0%) hue-rotate(250deg) brightness(1.2);
  transform: translateY(-50%) scale(1.15);
}

/* Valid state - when date is selected */
input[type="date"]:valid {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #f9f5ff 0%, #ede9fe 100%);
}

input[type="date"]:valid ~ .date-icon-themed {
  filter: grayscale(0%) hue-rotate(250deg) brightness(1.1) drop-shadow(0 0 2px rgba(251, 191, 36, 0.55));
}

/* Hide native calendar indicator - we use custom icon */
input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-clear-button {
  display: none;
}

/* Chrome, Edge, Safari date picker popup styling */
input[type="date"]::-webkit-datetime-edit {
  padding: 0;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

input[type="date"]::-webkit-datetime-edit-text {
  color: #9ca3af;
  padding: 0 0.2rem;
}

input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
  padding: 0.2rem 0.3rem;
  border-radius: 4px;
  color: #1f2937;
  font-weight: 500;
}

input[type="date"]::-webkit-datetime-edit-month-field:focus,
input[type="date"]::-webkit-datetime-edit-day-field:focus,
input[type="date"]::-webkit-datetime-edit-year-field:focus {
  background: #ede9fe;
  color: #d97706;
  outline: none;
}

/* Placeholder state */
input[type="date"]:invalid {
  color: #9ca3af;
}

/* Mobile date input styling with gold/yellow theme */
@media (max-width: 768px) {
  .date-input-themed {
    width: 100%;
  }
  
  .date-icon-themed {
    font-size: 1.5rem;
    right: 1.2rem;
    filter: grayscale(0%) hue-rotate(250deg) brightness(0.9) saturate(1.5);
  }
  
  input[type="date"] {
    padding: 0.85rem 3.5rem 0.85rem 1rem;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #fffef7 100%);
    color: #1f2937;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-height: 52px;
    touch-action: manipulation;
  }
  
  input[type="date"]:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.2);
    background: linear-gradient(135deg, #ffffff 0%, #fef3c7 100%);
  }
  
  input[type="date"]:focus ~ .date-icon-themed {
    filter: grayscale(0%) hue-rotate(250deg) brightness(1.3) saturate(1.8) drop-shadow(0 0 3px rgba(251, 191, 36, 0.65));
    transform: translateY(-50%) scale(1.2);
  }
  
  input[type="date"]:active {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  }
  
  /* Valid state (when date is selected) - Strong gold/yellow theme */
  input[type="date"]:valid {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    font-weight: 500;
  }
  
  input[type="date"]:valid ~ .date-icon-themed {
    filter: grayscale(0%) hue-rotate(250deg) brightness(1.2) saturate(2) drop-shadow(0 0 4px rgba(251, 191, 36, 0.75));
    animation: pulse-icon 2s ease infinite;
  }
  
  @keyframes pulse-icon {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.05); }
  }
  
  /* Date value styling */
  input[type="date"]::-webkit-datetime-edit {
    color: #1f2937;
    padding: 0.2rem 0;
    font-weight: 500;
  }
  
  input[type="date"]::-webkit-datetime-edit-text {
    color: #d97706;
    font-weight: 600;
  }
  
  input[type="date"]::-webkit-datetime-edit-month-field,
  input[type="date"]::-webkit-datetime-edit-day-field,
  input[type="date"]::-webkit-datetime-edit-year-field {
    color: #d97706;
    background: transparent;
    padding: 0.2rem 0.3rem;
    border-radius: 4px;
    font-weight: 600;
  }
  
  input[type="date"]::-webkit-datetime-edit-month-field:focus,
  input[type="date"]::-webkit-datetime-edit-day-field:focus,
  input[type="date"]::-webkit-datetime-edit-year-field:focus {
    background: rgba(251, 191, 36, 0.15);
  }
  
  /* Placeholder state on mobile */
  input[type="date"]:invalid {
    color: #9ca3af;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  }
  
  input[type="date"]:invalid ~ .date-icon-themed {
    filter: grayscale(30%) hue-rotate(250deg) brightness(0.7);
  }
}

/* Minimalistic Flatpickr Styling (fallback if needed) */
.flatpickr-calendar {
  background: #ffffff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow: hidden;
  animation: slideUp 0.2s ease;
  width: 280px !important;
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
  border-bottom-color: #f59e0b;
}

.flatpickr-months {
  background: #f59e0b;
  border-radius: 12px 12px 0 0;
  padding: 0.6rem 0.8rem;
  position: relative;
  height: auto;
}

.flatpickr-current-month {
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0;
  height: auto;
  line-height: 1.4;
}

.flatpickr-monthDropdown-months,
.numInputWrapper input {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.85rem;
}

.flatpickr-monthDropdown-months {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 6px;
  padding: 0.2rem 0.4rem;
  cursor: pointer;
  transition: background 0.2s ease;
  margin: 0 0.2rem;
}

.flatpickr-monthDropdown-months:hover {
  background: rgba(255, 255, 255, 0.3);
}

.flatpickr-monthDropdown-months option {
  background: #f59e0b;
  color: #ffffff;
}

.numInputWrapper {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 6px;
  padding: 0.2rem 0.3rem;
  transition: background 0.2s ease;
  margin: 0 0.2rem;
}

.numInputWrapper:hover {
  background: rgba(255, 255, 255, 0.3);
}

.numInputWrapper input {
  background: transparent;
  border: none;
  font-size: 0.85rem;
}

.flatpickr-prev-month,
.flatpickr-next-month {
  fill: #ffffff !important;
  padding: 0.3rem;
  transition: all 0.15s ease;
  position: static;
  width: auto;
  height: auto;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.flatpickr-prev-month svg,
.flatpickr-next-month svg {
  width: 12px;
  height: 12px;
}

/* Year palette button */
.year-palette-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 4px;
  padding: 0.15rem 0.3rem;
  color: #ffffff;
  cursor: pointer;
  font-size: 0.75rem;
  margin-left: 0.3rem;
  transition: background 0.2s ease;
}

.year-palette-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.flatpickr-weekdays {
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
  padding: 0.4rem 0 0.3rem;
}

.flatpickr-weekday {
  color: #9ca3af;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.flatpickr-days {
  padding: 0.4rem;
}

.flatpickr-day {
  color: #1f2937;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.15s ease;
  border: none;
  margin: 1px;
  position: relative;
  height: 32px;
  line-height: 32px;
  max-height: 32px;
}

.flatpickr-day:hover:not(.disabled):not(.selected) {
  background: #f3f4f6;
  transform: none;
  box-shadow: none;
}

.flatpickr-day.selected {
  background: #f59e0b;
  color: #ffffff;
  font-weight: 600;
}

.flatpickr-day.selected:hover {
  background: #5568d3;
}

.flatpickr-day.today {
  background: #fef3c7;
  color: #92400e;
  font-weight: 600;
}

.flatpickr-day.today:hover {
  background: #fde68a;
}

.flatpickr-day.today.selected {
  background: #f59e0b;
  color: #ffffff;
}

.flatpickr-day.disabled,
.flatpickr-day.disabled:hover {
  color: #d1d5db;
  background: transparent;
  cursor: not-allowed;
}

.flatpickr-day.nextMonthDay,
.flatpickr-day.prevMonthDay {
  color: #d1d5db;
  opacity: 0.6;
}

.flatpickr-day.inRange {
  background: #f3f4f6;
}

/* Year Palette Overlay */
.year-palette-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

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

.year-palette {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
  padding: 1.2rem;
  max-width: 340px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: scaleIn 0.2s ease;
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.year-palette-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
  text-align: center;
}

.year-palette-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.year-decade-btn,
.year-btn,
.year-back-btn {
  padding: 0.8rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.9rem;
  font-weight: 500;
  color: #374151;
}

.year-decade-btn:hover,
.year-btn:hover,
.year-back-btn:hover {
  background: #f59e0b;
  color: #ffffff;
  border-color: #f59e0b;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.35);
}

.year-back-btn {
  grid-column: 1 / -1;
  background: #f3f4f6;
  font-weight: 600;
}

.year-btn.current-year {
  background: #fef3c7;
  border-color: #fbbf24;
  color: #92400e;
  font-weight: 600;
}

.year-palette-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 28px;
  height: 28px;
  border: none;
  background: #f3f4f6;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  color: #6b7280;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.year-palette-close:hover {
  background: #e5e7eb;
  color: #1f2937;
}

/* Date input icon animation */
.date-icon {
  transition: all 0.3s ease;
  cursor: pointer;
}

.date-icon:hover {
  color: #d97706;
  transform: scale(1.1);
}

.date-icon:active {
  transform: scale(0.95);
}

/* Input success feedback */
@keyframes successPulse {
  0%, 100% {
    border-color: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  50% {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0);
  }
}

/* Mobile Flatpickr Optimization */
@media (max-width: 768px) {
  .flatpickr-calendar {
    font-size: 1rem;
    width: 92vw !important;
    max-width: 320px;
    margin: 0 auto;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 9999 !important;
  }
  
  .flatpickr-calendar.open {
    display: block !important;
  }
  
  /* Add overlay for mobile */
  .flatpickr-calendar:before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
    backdrop-filter: blur(2px);
  }
  
  .flatpickr-months {
    padding: 0.7rem 0.6rem;
  }
  
  .flatpickr-current-month {
    font-size: 0.95rem;
  }
  
  .flatpickr-monthDropdown-months {
    padding: 0.3rem 0.5rem;
    font-size: 0.85rem;
  }
  
  .numInputWrapper {
    padding: 0.3rem 0.4rem;
  }
  
  .flatpickr-prev-month,
  .flatpickr-next-month {
    padding: 0.4rem;
  }
  
  .flatpickr-prev-month svg,
  .flatpickr-next-month svg {
    width: 14px;
    height: 14px;
  }
  
  .flatpickr-weekday {
    font-size: 0.7rem;
    padding: 0.5rem 0 0.4rem;
  }
  
  .flatpickr-days {
    padding: 0.5rem;
  }
  
  .flatpickr-day {
    height: 38px !important;
    line-height: 38px !important;
    max-height: 38px !important;
    max-width: 38px !important;
    border-radius: 8px;
    font-size: 0.95rem;
    margin: 1px;
    flex-basis: 14.2% !important;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  
  .flatpickr-day:active:not(.disabled):not(.selected) {
    background: #e5e7eb !important;
  }
  
  .year-palette {
    max-width: 90%;
    padding: 1rem;
  }
  
  .year-palette-grid {
    gap: 0.5rem;
  }
  
  .year-decade-btn,
  .year-btn {
    padding: 0.7rem;
    font-size: 0.85rem;
  }
  
  /* Better touch targets on mobile */
  .date-icon {
    padding: 0.6rem;
    margin-right: -0.6rem;
    font-size: 1.1rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  
  .date-input-wrapper input[type="text"] {
    font-size: 1rem;
    padding: 0.8rem 2.5rem 0.8rem 1rem;
    -webkit-appearance: none;
    appearance: none;
  }
}

/* Tablet optimization */
@media (min-width: 769px) and (max-width: 1024px) {
  .flatpickr-calendar {
    font-size: 1rem;
  }
  
  .flatpickr-day {
    height: 40px;
    line-height: 40px;
    max-width: 40px;
  }
}

/* Desktop large screens */
@media (min-width: 1025px) {
  .flatpickr-calendar {
    font-size: 0.95rem;
  }
  
  .flatpickr-day {
    height: 36px;
    line-height: 36px;
    max-width: 36px;
  }
}

.time-hour:focus, .time-minute:focus, .time-period:focus {
  border-color: #f59e0b;
  outline: none;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
  background: #ffffff;
}

.time-hour::placeholder, .time-minute::placeholder {
  color: #9ca3af;
  font-style: italic;
}

.nadi-form .person-subcard label {
  font-size: 0.8rem;
  color: #222;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.nadi-form .person-subcard input {
  font-size: 1rem;
  padding: 0.9rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: #fafafa;
}

.nadi-form .person-subcard input:focus {
  border-color: #f59e0b;
  outline: none;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
  transform: translateY(-1px);
  background: #ffffff;
}

.nadi-form .person-subcard input::placeholder {
  color: #9ca3af;
  font-style: italic;
}

.nadi-form .person-subcard .input-hint {
  display: block;
  font-size: 0.7rem;
  color: #6b7280;
  margin-top: 0.4rem;
  line-height: 1.4;
  font-style: italic;
}

.nadi-form .person-section:hover {
  border-color: rgba(251, 191, 36, 0.35);
  background: #f0f4ff;
}

.nadi-form .person-section h2 {
  margin-bottom: 0.8rem;
  font-size: 1.3rem;
  color: #d97706;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nadi-form .person-section h2:before {
  content: '👤';
  font-size: 1.2rem;
}

.nadi-form .person-section label {
  margin-bottom: 0.2rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #222;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nadi-form .person-section label:first-of-type {
  margin-top: 0;
}

.nadi-form .person-section input {
  font-size: 1rem;
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  transition: all 0.3s ease;
  font-family: inherit;
}

.nadi-form .person-section input:focus {
  border-color: #f59e0b;
  outline: none;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
  transform: translateY(-1px);
}

.nadi-form .person-section input::placeholder {
  color: #aaa;
}

.nadi-form .person-section .input-hint {
  display: block;
  font-size: 0.7rem;
  color: #888;
  margin-top: 0.2rem;
  margin-bottom: 0.3rem;
  font-style: italic;
  line-height: 1.3;
}

.nadi-form button {
  align-self: center;
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: #fff;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  padding: 0.9rem 3rem;
  border: none;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nadi-form button:hover, .nadi-form button:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.nadi-form button:hover i {
  transform: scale(1.2);
  transition: transform 0.3s ease;
}

.nadi-form button i {
  transition: transform 0.3s ease;
}

.nadi-form button:active {
  transform: translateY(0);
}

.results-section {
  margin: 2rem auto;
  max-width: 900px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.08);
  padding: 2.5rem;
  animation: slideIn 0.5s ease-out;
}

.results-section .results-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #b8860b;
  margin: 0 0 2rem 0;
  position: relative;
  padding-bottom: 1rem;
  font-family: 'Georgia', 'Times New Roman', serif;
}

.results-section .results-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  border-radius: 2px;
}

.results-section .results-persons {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: stretch;
  margin-bottom: 2.5rem;
  position: relative;
}

.results-section .results-persons.single-mode {
  justify-content: center;
}

.results-section .results-persons.single-mode .result-person {
  max-width: 500px;
}

.results-section .results-persons .result-person {
  flex: 1;
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 12px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.results-section .results-persons .result-person:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: rgba(251, 191, 36, 0.55);
}

.results-section .results-persons .result-person .person-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e9ecef;
}

.results-section .results-persons .result-person .person-header .person-icon {
  font-size: 1.5rem;
  color: #d97706;
  background: rgba(251, 191, 36, 0.15);
  padding: 0.6rem;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.results-section .results-persons .result-person .person-header h3 {
  font-size: 1.3rem;
  margin: 0;
  color: #222;
  font-weight: 600;
}

.results-section .results-persons .result-person .person-details {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.results-section .results-persons .result-person .person-details .detail-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem;
  background: #fff;
  border-radius: 8px;
}

.results-section .results-persons .result-person .person-details .detail-item .detail-icon {
  color: #f59e0b;
  font-size: 1.1rem;
}

.results-section .results-persons .result-person .person-details .detail-item .detail-label {
  font-size: 0.9rem;
  color: #555;
  font-weight: 500;
}

.results-section .results-persons .result-person .person-details .detail-item .detail-value {
  font-weight: 700;
  color: #222;
  font-size: 1rem;
  margin-left: auto;
}

.results-section .results-persons .result-person .person-details .nadi-badge {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #fff;
  border-radius: 10px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.results-section .results-persons .result-person .person-details .nadi-badge .nadi-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
}

.results-section .results-persons .result-person .person-details .nadi-badge .nadi-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.results-section .results-persons .result-person .person-details .nadi-badge .nadi-info .nadi-label {
  font-size: 0.75rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.results-section .results-persons .result-person .person-details .nadi-badge .nadi-info .nadi-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #222;
}

.results-section .results-persons .result-person .person-details .nadi-badge.aadi {
  border-color: rgba(249, 115, 22, 0.3);
  background: rgba(249, 115, 22, 0.05);
}

.results-section .results-persons .result-person .person-details .nadi-badge.aadi .nadi-icon {
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #fff;
}

.results-section .results-persons .result-person .person-details .nadi-badge.madhya {
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.05);
}

.results-section .results-persons .result-person .person-details .nadi-badge.madhya .nadi-icon {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  color: #fff;
}

.results-section .results-persons .result-person .person-details .nadi-badge.antya {
  border-color: rgba(6, 182, 212, 0.3);
  background: rgba(6, 182, 212, 0.05);
}

.results-section .results-persons .result-person .person-details .nadi-badge.antya .nadi-icon {
  background: linear-gradient(135deg, #06b6d4, #22d3ee);
  color: #fff;
}

.results-section .results-persons .result-person .person-details .nadi-description {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.5;
  padding: 0.8rem;
  background: rgba(251, 191, 36, 0.08);
  border-radius: 8px;
  border-left: 3px solid #f59e0b;
}

.results-section .results-persons .comparison-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 -1rem;
  z-index: 1;
}

.results-section .results-persons .comparison-divider .divider-line {
  width: 2px;
  flex: 1;
  background: linear-gradient(180deg, transparent, #ddd, transparent);
}

.results-section .results-persons .comparison-divider .vs-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
  letter-spacing: 0.1em;
}

.results-section .dosha-judgement-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.results-section .dosha-judgement-card .judgement-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.results-section .dosha-judgement-card .dosha-judgement {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.results-section .dosha-judgement-card .dosha-judgement.danger {
  color: #ef4444;
}

.results-section .dosha-judgement-card .dosha-judgement.success {
  color: #10b981;
}

.results-section .dosha-judgement-card .judgement-explanation {
  font-size: 1rem;
  color: #555;
  max-width: 600px;
  line-height: 1.6;
  margin-top: 0.5rem;
}

.results-section .dosha-judgement-card.compatible {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border: 2px solid rgba(16, 185, 129, 0.3);
}

.results-section .dosha-judgement-card.incompatible {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border: 2px solid rgba(239, 68, 68, 0.3);
}

.results-section .calculation-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(251, 191, 36, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.25);
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: #555;
  text-align: center;
}

.results-section .calculation-info i {
  color: #d97706;
  font-size: 1rem;
}

.results-section .calculation-info strong {
  color: #d97706;
  font-weight: 600;
}

.results-section .calculation-info .tech-note {
  font-size: 0.75rem;
  color: #999;
  font-style: italic;
}

.explanation-section {
  background: #fff;
  padding: 2.5rem;
  margin-top: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.08);
}

.explanation-section .info-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.06), rgba(245, 158, 11, 0.04));
  border-radius: 12px;
  border-left: 4px solid #f59e0b;
  margin-bottom: 2rem;
}

.explanation-section .info-card .info-icon {
  font-size: 2rem;
  color: #d97706;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.explanation-section .info-card h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.3rem;
  color: #b8860b;
  font-weight: 600;
  font-family: 'Georgia', 'Times New Roman', serif;
}

.explanation-section .info-card p {
  color: #555;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

.explanation-section .info-card .sanskrit-shloka {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.08));
  border: 2px solid rgba(251, 191, 36, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
}

.explanation-section .info-card .sanskrit-shloka strong {
  display: block;
  font-size: 1.3rem;
  color: #b8860b;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 1rem;
  font-family: 'Times New Roman', serif;
}

.explanation-section .info-card .sanskrit-shloka p {
  font-size: 1rem;
  color: #555;
  margin: 0;
}

.explanation-section .info-card .sanskrit-shloka p em {
  color: #d97706;
  font-weight: 600;
}

/* Loading and Error States */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.06), rgba(245, 158, 11, 0.04));
  border-radius: 20px;
  border: 2px solid rgba(251, 191, 36, 0.15);
  margin: 2rem 0;
}

.loading-spinner {
  margin-bottom: 2rem;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(251, 191, 36, 0.2);
  border-top: 4px solid #f59e0b;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-content {
  max-width: 400px;
}

.loading-title {
  font-size: 1.5rem;
  color: #d97706;
  font-weight: 700;
  margin-bottom: 1rem;
}

.loading-message {
  font-size: 1rem;
  color: #555;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.loading-progress {
  width: 100%;
  height: 4px;
  background: rgba(251, 191, 36, 0.25);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  border-radius: 2px;
  animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}

.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(220, 38, 38, 0.05));
  border-radius: 20px;
  border: 2px solid rgba(239, 68, 68, 0.2);
  margin: 2rem 0;
}

.error-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.error-title {
  font-size: 1.5rem;
  color: #dc2626;
  font-weight: 700;
  margin-bottom: 1rem;
}

.error-message {
  font-size: 1rem;
  color: #555;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.retry-button {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.retry-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(251, 191, 36, 0.3);
}

.back-to-form-btn {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 2rem auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  align-self: center;
}

.back-to-form-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(251, 191, 36, 0.3);
}

.back-to-form-btn i {
  font-size: 0.9rem;
}

/* Custom Autocomplete Dropdown */
.autocomplete-wrapper {
  position: relative;
}

.autocomplete-container {
  position: relative;
  z-index: 1;
}

/* Ensure active autocomplete rises above all siblings */
.autocomplete-container:has(.autocomplete-dropdown.active) {
  z-index: 10000;
}

.autocomplete-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.autocomplete-container input:focus + .autocomplete-icon {
  color: #d97706;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #f59e0b;
  border-top: none;
  border-radius: 0 0 10px 10px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(251, 191, 36, 0.25);
  display: none;
  margin-top: -2px;
}

/* Portal dropdown (moved to body) */
.autocomplete-dropdown.autocomplete-portal {
  position: fixed;
  border-top: 2px solid #f59e0b;
  border-radius: 0 0 10px 10px;
  margin-top: 0;
  z-index: 999999;
  box-shadow: 0 10px 40px rgba(251, 191, 36, 0.35);
  will-change: transform;
  transform-origin: top center;
}

.autocomplete-dropdown.active {
  display: block;
  animation: slideDown 0.2s ease;
}

.autocomplete-dropdown.autocomplete-portal.active {
  animation: portalFadeIn 0.25s ease;
}

@keyframes portalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.autocomplete-item {
  padding: 0.8rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.06));
  padding-left: 1.2rem;
}

.autocomplete-item.selected {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.12));
  border-left: 3px solid #f59e0b;
}

.autocomplete-item-icon {
  font-size: 0.9rem;
  color: #d97706;
  min-width: 20px;
}

.autocomplete-item-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.autocomplete-item-primary {
  font-weight: 600;
  color: #222;
  font-size: 0.95rem;
}

.autocomplete-item-secondary {
  font-size: 0.75rem;
  color: #666;
}

.autocomplete-item mark {
  background: rgba(251, 191, 36, 0.25);
  color: #d97706;
  font-weight: 700;
  padding: 0 2px;
  border-radius: 2px;
}

.autocomplete-no-results {
  padding: 1.5rem 1rem;
  text-align: center;
  color: #999;
  font-size: 0.9rem;
}

.autocomplete-no-results i {
  display: block;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #d97706;
}

.autocomplete-footer {
  padding: 0.8rem 1rem;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(245, 158, 11, 0.06));
  border-top: 1px solid rgba(251, 191, 36, 0.25);
  font-size: 0.8rem;
  color: #d97706;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
}

.autocomplete-footer i {
  font-size: 0.9rem;
}

.autocomplete-loading {
  padding: 1rem;
  text-align: center;
  color: #d97706;
}

.autocomplete-loading i {
  animation: spin 1s linear infinite;
}

/* Scrollbar styling for dropdown */
.autocomplete-dropdown::-webkit-scrollbar {
  width: 6px;
}

.autocomplete-dropdown::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 0 0 10px 0;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb {
  background: #f59e0b;
  border-radius: 3px;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
  background: #5568d3;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .language-selector {
    position: static;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    max-width: fit-content;
    gap: 0.4rem;
    padding: 0.4rem;
    touch-action: manipulation;
  }
  
  .lang-text {
    display: none;
  }
  
  .lang-btn {
    padding: 0.7rem 1rem;
    min-width: 52px;
    min-height: 44px;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
  }
  
  .lang-btn:active {
    transform: scale(0.95);
  }
  
  .lang-btn.active {
    transform: scale(1.05);
  }
  
  .lang-code {
    font-size: 1.15rem;
    pointer-events: none;
  }

  .autocomplete-dropdown {
    max-height: 250px;
    font-size: 0.9rem;
    z-index: 99999;
  }
  
  .autocomplete-dropdown.autocomplete-portal {
    max-height: 50vh;
    box-shadow: 0 10px 50px rgba(251, 191, 36, 0.45);
  }
  
  .autocomplete-container {
    z-index: 1;
  }
  
  .autocomplete-wrapper {
    z-index: 1;
  }
  
  .autocomplete-item {
    padding: 0.7rem 0.8rem;
  }
  
  .autocomplete-item-primary {
    font-size: 0.9rem;
  }
  
  .autocomplete-item-secondary {
    font-size: 0.7rem;
  }
}

.explanation-section .info-card.troubleshooting-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.05));
  border-left-color: #f59e0b;
}

.explanation-section .info-card.troubleshooting-card .info-icon {
  color: #f59e0b;
}

.explanation-section .info-card.troubleshooting-card h4 {
  color: #d97706;
}

.explanation-section .info-card.troubleshooting-card .location-examples {
  margin: 1rem 0 0 0;
  padding-left: 1.5rem;
}

.explanation-section .info-card.troubleshooting-card .location-examples li {
  margin: 0.5rem 0;
  line-height: 1.6;
  color: #555;
}

.explanation-section .info-card.troubleshooting-card .location-examples li strong {
  color: #222;
}

.explanation-section .nadi-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.explanation-section .nadi-types-grid .nadi-type-card {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.explanation-section .nadi-types-grid .nadi-type-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.explanation-section .nadi-types-grid .nadi-type-card .type-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 1rem auto;
  color: #fff;
}

.explanation-section .nadi-types-grid .nadi-type-card h5 {
  margin: 0 0 0.8rem 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #222;
}

.explanation-section .nadi-types-grid .nadi-type-card p {
  margin: 0;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
}

.explanation-section .nadi-types-grid .nadi-type-card.aadi {
  border-color: rgba(249, 115, 22, 0.3);
}

.explanation-section .nadi-types-grid .nadi-type-card.aadi:hover {
  background: rgba(249, 115, 22, 0.05);
  border-color: #f97316;
}

.explanation-section .nadi-types-grid .nadi-type-card.aadi .type-icon {
  background: linear-gradient(135deg, #f97316, #fb923c);
}

.explanation-section .nadi-types-grid .nadi-type-card.aadi h5 {
  color: #f97316;
}

.explanation-section .nadi-types-grid .nadi-type-card.madhya {
  border-color: rgba(139, 92, 246, 0.3);
}

.explanation-section .nadi-types-grid .nadi-type-card.madhya:hover {
  background: rgba(139, 92, 246, 0.05);
  border-color: #8b5cf6;
}

.explanation-section .nadi-types-grid .nadi-type-card.madhya .type-icon {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

.explanation-section .nadi-types-grid .nadi-type-card.madhya h5 {
  color: #8b5cf6;
}

.explanation-section .nadi-types-grid .nadi-type-card.antya {
  border-color: rgba(6, 182, 212, 0.3);
}

.explanation-section .nadi-types-grid .nadi-type-card.antya:hover {
  background: rgba(6, 182, 212, 0.05);
  border-color: #06b6d4;
}

.explanation-section .nadi-types-grid .nadi-type-card.antya .type-icon {
  background: linear-gradient(135deg, #06b6d4, #22d3ee);
}

.explanation-section .nadi-types-grid .nadi-type-card.antya h5 {
  color: #06b6d4;
}

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

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

@media (max-width: 768px) {
  .cors-warning .cors-warning-content {
    flex-direction: column;
    gap: 1rem;
  }

  .cors-warning .cors-warning-content i {
    font-size: 2rem;
  }

  .cors-warning .cors-warning-content strong {
    font-size: 1.1rem;
  }

  .cors-warning .cors-warning-content code {
    font-size: 0.8rem;
    padding: 0.6rem;
    overflow-x: auto;
  }

  .header h1 {
    font-size: 1.8rem;
  }

  .header .subtitle {
    font-size: 1rem;
  }

  main {
    padding: 0 0.5rem;
  }

  .nadi-form {
    padding: 1.5rem 1rem;
    gap: 1.5rem;
  }

  .nadi-form .mode-selector {
    flex-direction: column;
    padding: 0.8rem;
    gap: 0.8rem;
  }

  .nadi-form .mode-selector .mode-option {
    max-width: 100%;
  }

  .nadi-form .mode-selector .mode-option .mode-label {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }

  .nadi-form .persons-container {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .nadi-form .persons-container.single-mode .person-subcard {
    max-width: none;
  }

  .nadi-form .person-subcard {
    padding: 1.2rem;
  }

  .nadi-form .person-subcard .person-header {
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
  }

  .nadi-form .person-subcard .person-header i {
    width: 35px;
    height: 35px;
    font-size: 1.3rem;
  }

  .nadi-form .person-subcard .person-header h3 {
    font-size: 1.2rem;
  }

  .nadi-form .person-subcard .person-fields {
    gap: 0.8rem;
  }

  .nadi-form .person-subcard input {
    padding: 0.8rem;
    font-size: 0.95rem;
  }

  .nadi-form .person-subcard .input-hint {
    font-size: 0.65rem;
  }

  .nadi-form button {
    width: 100%;
    padding: 0.9rem 2rem;
    font-size: 0.9rem;
  }

  .results-section {
    padding: 1.5rem 1rem;
  }

  .results-section .results-title {
    font-size: 1.3rem;
    padding-bottom: 0.8rem;
  }

  .results-section .results-title:after {
    width: 60px;
    height: 3px;
  }

  .results-section .results-persons {
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .results-section .results-persons.single-mode .result-person {
    max-width: 100%;
  }

  .results-section .results-persons .result-person {
    padding: 1.2rem;
  }

  .results-section .results-persons .result-person .person-header {
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
  }

  .results-section .results-persons .result-person .person-header .person-icon {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }

  .results-section .results-persons .result-person .person-header h3 {
    font-size: 1.2rem;
  }

  .results-section .results-persons .result-person .person-details {
    gap: 1rem;
  }

  .results-section .results-persons .result-person .person-details .detail-item {
    padding: 0.7rem;
  }

  .results-section .results-persons .result-person .person-details .detail-item .detail-label {
    font-size: 0.85rem;
  }

  .results-section .results-persons .result-person .person-details .detail-item .detail-value {
    font-size: 0.95rem;
  }

  .results-section .results-persons .result-person .person-details .nadi-badge {
    padding: 0.9rem;
    gap: 0.8rem;
  }

  .results-section .results-persons .result-person .person-details .nadi-badge .nadi-icon {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }

  .results-section .results-persons .result-person .person-details .nadi-badge .nadi-info .nadi-label {
    font-size: 0.7rem;
  }

  .results-section .results-persons .result-person .person-details .nadi-badge .nadi-info .nadi-value {
    font-size: 1rem;
  }

  .results-section .results-persons .result-person .person-details .nadi-description {
    font-size: 0.8rem;
    padding: 0.7rem;
  }

  .results-section .results-persons .comparison-divider {
    flex-direction: row;
    margin: -0.5rem 0;
  }

  .results-section .results-persons .comparison-divider .divider-line {
    height: 2px;
    width: auto;
    flex: 1;
    background: linear-gradient(90deg, transparent, #ddd, transparent);
  }

  .results-section .results-persons .comparison-divider .vs-circle {
    width: 45px;
    height: 45px;
    font-size: 0.9rem;
  }

  .results-section .dosha-judgement-card {
    padding: 1.5rem 1rem;
  }

  .results-section .dosha-judgement-card .judgement-icon {
    font-size: 2.5rem;
  }

  .results-section .dosha-judgement-card .dosha-judgement {
    font-size: 1.2rem;
  }

  .results-section .dosha-judgement-card .judgement-explanation {
    font-size: 0.9rem;
  }

  .results-section .calculation-info {
    padding: 0.8rem;
    font-size: 0.75rem;
  }

  .results-section .calculation-info i {
    font-size: 0.9rem;
  }

  .results-section .calculation-info .tech-note {
    font-size: 0.65rem;
  }

  .explanation-section {
    padding: 1.5rem 1rem;
  }

  .explanation-section .info-card {
    flex-direction: column;
    gap: 1rem;
    padding: 1.2rem;
  }

  .explanation-section .info-card .info-icon {
    font-size: 1.5rem;
  }

  .explanation-section .info-card h4 {
    font-size: 1.1rem;
  }

  .explanation-section .info-card p {
    font-size: 0.9rem;
  }

  .explanation-section .info-card .sanskrit-shloka {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.12));
    border: 2px solid rgba(251, 191, 36, 0.35);
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
  }

  .explanation-section .info-card .sanskrit-shloka strong {
    display: block;
    font-size: 1.1rem;
    color: #d97706;
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: 0.8rem;
    font-family: 'Times New Roman', serif;
  }

  .explanation-section .info-card .sanskrit-shloka p {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
  }

  .explanation-section .info-card .sanskrit-shloka p em {
    color: #d97706;
    font-weight: 600;
  }

  .explanation-section .info-card.troubleshooting-card .location-examples {
    padding-left: 1.2rem;
  }

  .explanation-section .info-card.troubleshooting-card .location-examples li {
    font-size: 0.85rem;
    margin: 0.4rem 0;
  }

  .explanation-section .nadi-types-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .explanation-section .nadi-types-grid .nadi-type-card {
    padding: 1.2rem;
  }

  .explanation-section .nadi-types-grid .nadi-type-card .type-icon {
    width: 55px;
    height: 55px;
    font-size: 1.6rem;
  }

  .explanation-section .nadi-types-grid .nadi-type-card h5 {
    font-size: 1.1rem;
  }

  .explanation-section .nadi-types-grid .nadi-type-card p {
    font-size: 0.85rem;
  }

  /* Loading and Error States - Mobile */
  .loading-container {
    padding: 2rem 1rem;
  }

  .loading-title {
    font-size: 1.3rem;
  }

  .loading-message {
    font-size: 0.9rem;
  }

  .spinner {
    width: 50px;
    height: 50px;
  }

  .error-container {
    padding: 2rem 1rem;
  }

  .error-title {
    font-size: 1.3rem;
  }

  .error-message {
    font-size: 0.9rem;
  }

  .retry-button {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
  }

  .back-to-form-btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 575px) {
  .header {
    padding: 2rem 0.5rem 1.5rem;
  }

  .header h1 {
    font-size: 1.5rem;
  }

  .header .subtitle {
    font-size: 0.9rem;
  }

  .nadi-form {
    padding: 1rem 0.8rem;
  }

  .nadi-form .persons-container {
    padding: 1rem;
  }

  .nadi-form .person-subcard {
    padding: 1rem;
  }

  .results-section {
    padding: 1rem 0.8rem;
  }

  .results-section .results-title {
    font-size: 1.1rem;
  }

  .results-section .results-persons .result-person {
    padding: 1rem;
  }
}

/* ============================================================
   PWA INSTALL PROMPT - FIRST-TIME USERS ONLY
   ============================================================ */

.pwa-install-prompt {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #fef3c7 100%);
  border: 2px solid #f59e0b;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(251, 191, 36, 0.35);
  padding: 1rem 1.2rem;
  max-width: 320px;
  z-index: 9999;
  animation: slideUpIn 0.4s ease-out;
  backdrop-filter: blur(10px);
}

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

.pwa-install-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pwa-install-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
  animation: pulseHome 2s ease infinite;
}

@keyframes pulseHome {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(251, 191, 36, 0.6);
  }
}

.pwa-install-icon i {
  font-size: 1.5rem;
  color: #ffffff;
}

.pwa-install-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.pwa-install-text strong {
  font-size: 1rem;
  font-weight: 700;
  color: #78350f;
  line-height: 1.2;
}

.pwa-install-text span {
  font-size: 0.85rem;
  color: #92400e;
  line-height: 1.3;
}

.pwa-install-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: stretch;
}

.pwa-install-btn {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #ffffff;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.pwa-install-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.pwa-install-btn:active {
  transform: translateY(0);
}

.pwa-dismiss-btn {
  width: 28px;
  height: 28px;
  background: transparent;
  border: 2px solid #d97706;
  border-radius: 50%;
  color: #d97706;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: flex-end;
  padding: 0;
}

.pwa-dismiss-btn:hover {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #f59e0b;
  transform: scale(1.1);
}

.pwa-dismiss-btn:active {
  transform: scale(0.95);
}

/* Mobile optimization */
@media (max-width: 768px) {
  .pwa-install-prompt {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
    padding: 1rem;
  }

  .pwa-install-content {
    gap: 0.8rem;
  }

  .pwa-install-icon {
    width: 44px;
    height: 44px;
  }

  .pwa-install-icon i {
    font-size: 1.3rem;
  }

  .pwa-install-text strong {
    font-size: 0.95rem;
  }

  .pwa-install-text span {
    font-size: 0.8rem;
  }

  .pwa-install-buttons {
    flex-direction: row;
    gap: 0.5rem;
  }

  .pwa-install-btn {
    flex: 1;
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
  }

  .pwa-dismiss-btn {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .pwa-install-prompt {
    bottom: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
    padding: 0.9rem;
  }

  .pwa-install-icon {
    width: 40px;
    height: 40px;
  }

  .pwa-install-icon i {
    font-size: 1.2rem;
  }

  .pwa-install-text strong {
    font-size: 0.9rem;
  }

  .pwa-install-text span {
    font-size: 0.75rem;
  }
}
