/* --- Beautiful Modern Theme --- */
html,
body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: #f8fafc;
  background-image: 
    radial-gradient(circle at 50% -10%, rgba(99, 102, 241, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 100% 25%, rgba(249, 115, 22, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 0% 75%, rgba(139, 92, 246, 0.08) 0%, transparent 45%),
    radial-gradient(#cbd5e1 1.2px, transparent 1.2px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 24px 24px;
  background-attachment: fixed;
  color: #0f172a;
}

/* Glassmorphism navbar - matched to index.html page */
#top-panel {
  position: relative !important;
  width: 100% !important;
  background: linear-gradient(90deg, #f08035 0%, #ee833c 100%) !important;
  box-shadow: 0 2px 16px rgba(230, 81, 0, 0.10), 0 1.5px 0 #ffe0b2 inset !important;
  display: flex !important;
  align-items: center !important;
  padding: 0.5rem 2rem !important;
  z-index: 10 !important;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
  flex-wrap: wrap !important;
  border-radius: 0 0 18px 18px !important;
  height: auto !important;
  min-height: 52px !important;
  margin-bottom: 16px !important;
  box-sizing: border-box !important;
}

#top-panel h3 {
  font-size: 1.5rem !important;
  font-weight: 900 !important;
  color: #fff !important;
  margin: 0 1.5rem 0 0 !important;
  letter-spacing: -0.5px !important;
  font-family: 'Raleway', 'Inter', Arial, sans-serif !important;
  text-shadow: 0 2px 8px #ff9800, 0 0 2px #fff !important;
  line-height: 1.2 !important;
  cursor: pointer !important;
}

#top-panel .navbar {
  display: flex !important;
  gap: 0.75rem !important;
  margin-left: auto !important;
  align-items: center !important;
  flex-wrap: wrap !important;
}

#top-panel .navbar a {
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700 !important;
  font-size: 0.92rem !important;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s !important;
  padding: 0.25rem 0.65rem !important;
  border-radius: 6px !important;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
  background: none !important;
  letter-spacing: 0.3px !important;
  border: none !important;
  position: relative !important;
  white-space: nowrap !important;
}

#top-panel .navbar a:hover,
#top-panel .navbar a:focus {
  color: #fffbe6 !important;
  background: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 4px 14px rgba(255, 152, 0, 0.15) !important;
  outline: none !important;
  transform: translateY(-1px) !important;
}

/* Left Panel */
#left-panel {
  background: linear-gradient(180deg, #883f15, #da9021, #883f15);
  box-shadow: 2px 0 16px rgba(230, 81, 0, 0.10);
  border-radius: 0 18px 18px 0;
}

#left-panel h3 {
  font-family: 'Raleway', 'Inter', Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  text-shadow: 0 2px 8px #ff9800, 0 0 2px #fff;
}

#left-panel .navbar a {
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: 8px;
  background: none;
  transition: background 0.2s, color 0.2s;
  display: block;
}

#left-panel .navbar a:hover,
#left-panel .navbar a:focus {
  background: rgba(255, 255, 255, 0.10);
  color: #fffbe6;
}

/* Glassmorphism Form Container */
.form-container {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(142, 197, 252, 0.13), 0 2px 16px rgba(230, 81, 0, 0.08);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  padding: 2.2rem 2rem;
  margin: 2vw auto;
  max-width: 760px;
  width: 96%;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  border: 1.5px solid #ffe0b2;
}

.map-picker {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #ffd0a8;
  border-radius: 14px;
  background: rgba(255, 251, 246, 0.9);
  width: 100%;
  box-sizing: border-box;
}

.map-search-row {
  display: flex !important;
  align-items: stretch !important;
  gap: 8px !important;
  margin-top: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.map-search-row input,
.map-search-row input[type="search"],
#map-search {
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 44px !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  box-sizing: border-box !important;
  border: 1.5px solid #e65100 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  font-size: 1rem !important;
  color: #2d1600 !important;
}

.map-search-row button,
#map-search-btn {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 80px !important;
  height: 44px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  border-radius: 8px !important;
  background: linear-gradient(90deg, #e65100 0%, #ff9800 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  border: none !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}

.map-search-status {
  min-height: 1.4em;
  margin: 8px 0;
  color: #7a421f;
  font-size: 0.9rem;
}

.map-picker-canvas {
  width: 100%;
  height: 380px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #ffd0a8;
  z-index: 10;
}

.map-search-suggestions {
  position: relative;
  background: #fff;
  border: 1px solid #e0c8b0;
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 4px;
  margin-bottom: 6px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.map-picker-help {
  margin: 8px 0 0;
  color: #6b5547;
  font-size: 0.9rem;
}

.light-roads-layer {
  opacity: 0.32 !important;
  filter: brightness(1.2) contrast(0.85);
}

.sharp-labels-layer {
  opacity: 1 !important;
  filter: contrast(1.2) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.75));
}

@media (max-width: 600px) {
  .form-container {
    width: 98% !important;
    max-width: 100% !important;
    padding: 1.3rem 0.85rem !important;
    margin: 8px auto !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
  }

  form {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.9rem !important;
  }

  .form-group {
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 0.4rem !important;
  }

  .form-group input:not([type="radio"]),
  .form-group select {
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 1.05rem !important;
    padding: 11px 12px !important;
  }

  .time-group {
    display: flex !important;
    gap: 4px !important;
    width: 100% !important;
  }

  .time-group select {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    padding: 11px 4px !important;
    text-align: center !important;
  }

  .map-picker {
    padding: 10px 8px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .map-search-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .map-search-row input,
  #map-search {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: 44px !important;
  }

  .map-search-row button,
  #map-search-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 70px !important;
    height: 44px !important;
    padding: 0 12px !important;
    white-space: nowrap !important;
  }

  .map-picker-canvas {
    width: 100% !important;
    height: 420px !important;
    border-radius: 8px !important;
  }
}

.form-container h2,
.form-container h3 {
  font-family: 'Raleway', 'Inter', Arial, sans-serif;
  font-weight: 900;
  color: #e65100;
  letter-spacing: 1px;
  text-align: center;
  margin-bottom: 1.5rem;
  background: linear-gradient(90deg, #e65100 0%, #ff9800 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Form Styles */
form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.2rem 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.7rem;
}

.form-group label {
  font-weight: 700;
  color: #a04a00;
  margin-bottom: 0.4em;
  font-size: 1.08em;
  letter-spacing: 0.2px;
}

.form-group input:not([type="radio"]),
.form-group select {
  background: rgba(255, 243, 224, 0.7);
  border: 1.5px solid #e65100;
  border-radius: 10px;
  padding: 12px;
  font-size: 1.08em;
  color: #2d1600;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
  margin-bottom: 0.2em;
}

.form-group input:not([type="radio"]):focus,
.form-group select:focus {
  border: 2px solid #ff9800;
  box-shadow: 0 2px 8px #ff980033;
}

.form-group input[readonly] {
  background: #fffbe6;
  color: #a04a00;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.7) sepia(1) saturate(5) hue-rotate(10deg);
}

/* Button Styles */
button,
.form-container button,
#okPaymentModalBtn {
  background: linear-gradient(90deg, #e65100 0%, #ff9800 100%);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-weight: 800;
  font-size: 1.13rem;
  letter-spacing: 0.7px;
  padding: 1rem 2.2rem;
  margin-top: 1.2rem;
  box-shadow: 0 4px 18px rgba(179, 18, 23, 0.12);
  cursor: pointer;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.2s;
}

button:hover,
button:focus,
.form-container button:hover,
#okPaymentModalBtn:hover {
  background: linear-gradient(90deg, #ff9800 0%, #e65100 100%);
  color: #fffbe6;
  transform: scale(1.04);
  box-shadow: 0 8px 32px rgba(255, 152, 0, 0.18);
  border: 2px solid #e65100;
  outline: none;
}

/* Error Message */
.form-group div[style*="color:red"] {
  color: #d32f2f !important;
  font-size: 0.97em;
  margin-top: 2px;
}

/* Modern Radio Group */
.modern-radio-group {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 6px 0 10px 0;
  width: 100%;
}

.modern-radio-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  margin: 0;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  border: 1.5px solid rgba(218, 144, 33, 0.35);
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.modern-radio-option:hover {
  background: rgba(230, 81, 0, 0.06);
  border-color: #da9021;
}

.modern-radio-option:has(input[type="radio"]:checked) {
  background: rgba(230, 81, 0, 0.08);
  border-color: #e65100;
  box-shadow: 0 2px 8px rgba(230, 81, 0, 0.12);
}

.modern-radio-group input[type="radio"],
.modern-radio-option input[type="radio"],
input[type="radio"]#birthplaceDefault,
input[type="radio"]#birthplaceManual {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  border: 2px solid #da9021 !important;
  border-radius: 50% !important;
  outline: none !important;
  transition: border 0.2s ease !important;
  background: #fff !important;
  position: relative !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
}

.modern-radio-group input[type="radio"]:checked,
.modern-radio-option input[type="radio"]:checked,
input[type="radio"]#birthplaceDefault:checked,
input[type="radio"]#birthplaceManual:checked {
  border: 6px solid #da9021 !important;
  background: #fff !important;
}

.modern-radio-group input[type="radio"]:focus-visible,
.modern-radio-option input[type="radio"]:focus-visible {
  box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.25) !important;
}

.modern-radio-label {
  font-size: 0.95rem;
  color: #8a3c00;
  font-weight: 600;
  cursor: pointer;
  margin: 0;
  user-select: none;
  line-height: 1.2;
}

/* Small screen mobile responsive */
@media (max-width: 600px) {
  .modern-radio-group {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 4px 0 8px 0 !important;
    width: 100% !important;
  }

  .modern-radio-option {
    flex: 1 1 calc(50% - 8px) !important;
    min-width: 130px !important;
    padding: 8px 10px !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .modern-radio-option input[type="radio"],
  .modern-radio-group input[type="radio"] {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
  }

  .modern-radio-label {
    font-size: 0.88rem !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 360px) {
  .modern-radio-group {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
  }

  .modern-radio-option {
    flex: 1 1 100% !important;
    width: 100% !important;
    justify-content: flex-start !important;
  }
}

/* Sunrise Table */
#sunriseCalcOutput table {
  background: #fffbe6;
  border-radius: 10px;
  box-shadow: 0 2px 8px #ff980022;
}

#sunriseCalcOutput th,
#sunriseCalcOutput td {
  text-align: center;
}

/* Payment Modal */
#paymentModal>div {
  background: linear-gradient(120deg, #fff, #f7e7c6 80%);
  border-radius: 18px;
  box-shadow: 0 8px 32px #0003;
}

/* Responsive */
@media (max-width: 700px) {
  .form-container {
    padding: 1.2rem 0.7rem;
    border-radius: 14px;
    margin: 1.2rem 0.3rem;
  }

  form {
    grid-template-columns: 1fr !important;
    gap: 1.2rem !important;
  }

  .form-group label {
    font-size: 1em;
  }

  button,
  .form-container button,
  #okPaymentModalBtn {
    font-size: 1rem;
    padding: 0.85rem 1.2rem;
    min-width: 120px;
    width: 100%;
    margin-top: 1.2rem;
  }
}

/* --- End Beautiful Modern Theme --- */

/* Existing styles... */
body {
  margin: 0;
  padding: 0;
}

/* Left Panel Styles */
#left-panel {
  display: none;
  /* Hide by default on large screens */
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 200px;
  background: linear-gradient(180deg, #e65100be, #ffb84dab, #e6510093);
  padding: 10px;
  box-shadow: 5px 0 10px rgba(0, 0, 0.6, 0.555);
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(5px);
  transform: translateX(-100%);
  will-change: transform;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  contain: layout style paint;
}

#left-panel.active {
  transform: translateX(0);
}

body.panel-active {
  margin-left: 0 !important;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#left-panel h3 {
  color: white;
  text-shadow: 2px 2px 4px rgb(0, 0, 0, 0.6);
  margin-bottom: 15px;
  font-size: 22px;
  text-align: center;
}

#left-panel .navbar {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}

#left-panel .navbar li {
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.322);
}

#left-panel .navbar a {
  display: block;
  padding: 12px 15px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

#left-panel .navbar a:hover {
  background: rgba(255, 255, 255, 0.473);
  padding-left: 20px;
}

/* Top Panel Styles */
#top-panel {
  height: 50px;
  /* Increased height */
  background: linear-gradient(90deg, #e65100d8 0%, #ff9800 100%);
  background-size: 200% 200%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
  border-radius: 0;
  justify-content: space-between;
  padding: 20px 30px;
  /* Increased padding for width */
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

#top-panel h3 {
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
  margin: 0;
  font-size: 28px;
  /* Increased font size */
}

.navbar a {
  padding: 5px 10px;
  font-size: 12px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  text-decoration: none;
  color: white;
  font-weight: bold;
  transition: all 0.3s ease;
}

.navbar a:hover {
  background-color: rgba(255, 255, 255, 0.144);
  font-size: 14px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
  transform: scale(1.05);
}

#menu-toggle {
  display: none;
  /* Hidden by default */
  background: transparent;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0;
}

@media screen and (max-width: 768px) {
  #menu-toggle {
    display: flex;
    position: fixed;
    left: 5px;
    top: 0px;
    z-index: 1001;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.3s;
  }

  #menu-toggle .arrow {
    display: block;
    width: 24px;
    height: 24px;
    transition: transform 0.3s;
  }

  /* Rotate arrow when menu is open */
  body.panel-active #menu-toggle .arrow {
    transform: rotate(90deg);
  }
}

@media screen and (max-width: 768px) {
  #top-panel {
    display: flex;
    height: 35px;
    /* Slightly increased for mobile */
    padding: 10px 15px;
    /* Increased padding for mobile */
  }

  #top-panel .navbar {
    display: none !important;
    /* Force hide navigation buttons */
  }

  #top-panel h3 {
    font-size: 20px;
    /* Slightly larger for mobile */
    margin-left: 40px;
    /* Make space for menu toggle */
    order: 2;
    /* Move after menu toggle */
  }

  #menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 20px;
    position: fixed;
    left: 5px;
    top: 0px;
    z-index: 1001;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
  }

  #menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: #ffffff;
    border-radius: 3px;
    transition: all 0.3s ease;
  }

  /* Hide middle line and transform others to X when panel is active */
  body.panel-active #menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.panel-active #menu-toggle span:first-child {
    transform: translateY(8px) rotate(45deg);
  }

  body.panel-active #menu-toggle span:last-child {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Update menu toggle animation */
  body.panel-active #menu-toggle span {
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  #menu-toggle span {
    opacity: 1;
    transition: opacity 0.3s ease;
  }

  /* Rest of the mobile styles */
  #left-panel {
    display: block;
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    will-change: transform;
    overscroll-behavior: contain;
  }

  #left-panel.active {
    display: block;
    width: 180px;
  }

  #left-panel .navbar a {
    padding: 12px 15px;
    font-size: 14px;
    margin: 4px 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: left;
    display: block;
    width: calc(100% - 10px);
    margin-left: 5px;
  }

  #left-panel .navbar a:hover {
    background: rgba(255, 255, 255, 0.966);
    transform: translateX(5px) scale(1.05);
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  }

  #left-panel .navbar a:active {
    transform: translateX(15px) scale(1.1);
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.4);
  }

  body.panel-active {
    margin-left: 180px;
  }

  .form-container {
    width: 95%;
    padding: 15px;
  }

  form {
    grid-template-columns: 1fr;
  }

  .form-group {
    margin-bottom: 10px;
  }

  .time-group {
    gap: 3px;
  }

  .time-group select {
    padding: 8px 5px;
    font-size: 0.9em;
  }

  button {
    grid-column: span 1;
    padding: 10px;
  }

  .content {
    margin-left: 0;
    padding: 10px;
  }

  .form-container {
    width: 100%;
    padding: 15px;
    margin: 0;
  }

  form {
    grid-template-columns: 1fr !important;
    gap: 15px;
  }

  .form-group {
    margin-bottom: 0;
    width: 100%;
  }

  .form-group input:not([type="radio"]),
  .form-group select {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    /* Prevent zoom on iOS */
  }

  .time-group {
    gap: 8px;
    flex-direction: row;
    justify-content: space-between;
  }

  .time-group select {
    flex: 1;
    min-width: 0;
    padding: 12px;
    font-size: 16px;
  }

  h2 {
    font-size: 1.5em;
    margin-bottom: 15px;
    margin-top: 40px;
  }

  button {
    width: 100%;
    margin-top: 10px;
    padding: 15px;
    font-size: 16px;
  }
}

/* --- Birth Registration Form Styles from try.html --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


.form-container {
  /* More white and blurrier glass effect */
  background: linear-gradient(190deg, rgb(255, 255, 255) 0%, rgb(255, 255, 255) 100%),
    url('https://images.unsplash.com/photo-1462331940025-496dfbfc7564?auto=format&fit=crop&w=800&q=80');
  background-size: cover;
  background-position: center;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  padding: 30px;
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  animation: spaceMove 18s linear infinite alternate;
}

@keyframes spaceMove {
  0% {
    background-position: 0% 50%, center;
  }

  100% {
    background-position: 100% 50%, center;
  }
}

/* Add margin to content to avoid overlap with nav */
.content {
  margin-top: 50px;
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
}

@media screen and (min-width: 769px) {
  .content {
    margin-left: 0;
    /* No left margin since panel is hidden */
  }

  #left-panel {
    display: none;
    /* Hide left panel on large screens unless active */
    width: 200px;
    transform: translateX(-100%);
  }

  #left-panel.active {
    display: block;
    transform: translateX(0);
  }
}

@media screen and (max-width: 768px) {
  .content {
    margin-left: 0;
    padding: 10px;
  }

  .form-container {
    width: 100%;
    padding: 15px;
    margin: 0;
  }

  form {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px;
    width: 100%;
  }

  form {
    grid-template-columns: 1fr !important;
    gap: 15px;
  }

  .form-group {
    margin-bottom: 0;
    width: 100%;
  }

  .form-group input:not([type="radio"]),
  .form-group select {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    /* Prevent zoom on iOS */
  }

  .time-group {
    gap: 8px;
    flex-direction: row;
    justify-content: space-between;
  }

  .time-group select {
    flex: 1;
    min-width: 0;
    padding: 12px;
    font-size: 16px;
  }

  h2 {
    font-size: 1.5em;
    margin-bottom: 15px;
  }

  button {
    width: 100%;
    margin-top: 10px;
    padding: 15px;
    font-size: 16px;
  }
}

h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
  font-weight: bold;
  letter-spacing: 1px;
}

form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group input:not([type="radio"]),
.form-group select {
  background: rgba(228, 228, 228, 0.565);
  border: 1px solid #964d12;
  border-radius: 10px;
  padding: 10px;
  font-size: 1em;
  color: #333;
  outline: none;
}

.form-group label {
  margin-bottom: 5px;
  color: #333;
  font-weight: bold;
}

.coordinates-group {
  display: none;
}

.time-group {
  display: flex;
  gap: 5px;
}

.time-group select {
  flex: 1;
}

button {
  grid-column: span 2;
  padding: 14px 0;
  font-size: 1.1em;
  background: linear-gradient(90deg, #f19d30b8 0%, #ffcc33ca 100%);
  color: #333;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(218, 144, 33, 0.664), 0 1.5px 4px rgb(136, 63, 21);
  font-weight: bold;
  letter-spacing: 1px;
  transition:
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.2s,
    box-shadow 0.2s,
    transform 0.1s;
  margin-top: 32px;
  /* Add more gap above the button */
}

button:hover,
button:focus {
  background: linear-gradient(90deg, #f4c03e 0%, #f2981a 100%);
  color: #222;
  box-shadow: 0 8px 24px rgba(218, 144, 33, 0.22), 0 2px 8px rgba(136, 63, 21, 0.869);
  transform: translateY(-2px) scale(1.03);
  outline: none;
}

button:active {
  background: linear-gradient(90deg, #ffb347 0%, #ffbb33 100%);
  color: #111;
  box-shadow: 0 2px 8px rgba(218, 144, 33, 0.13);
  transform: translateY(1px) scale(0.98);
}

.all-filled input,
.all-filled select,
.all-filled label {
  color: black !important;
}

/* --- End Birth Registration Form Styles --- */
#dob {
  font-size: 1.3em;
}



/* Animated arrow for menu toggle */
#menu-toggle .arrow {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  /* Start pointing down */
  transform: rotate(0deg);
  /* Make arrow visible on any background */
  filter: drop-shadow(0 0 2px #964d12) drop-shadow(0 0 2px #fff);
}

body.panel-active #menu-toggle .arrow {
  /* Animate to right when open */
  transform: rotate(90deg) translateX(4px);
}

#menu-toggle .arrow {
  animation: arrow-bounce 1.2s infinite alternate;
}

@keyframes arrow-bounce {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  60% {
    transform: translateY(3px) rotate(0deg);
  }

  100% {
    transform: translateY(0) rotate(0deg);
  }
}

body.panel-active #menu-toggle .arrow {
  animation: arrow-move-right 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes arrow-move-right {
  from {
    transform: rotate(0deg) translateY(0);
  }

  to {
    transform: rotate(90deg) translateX(4px);
  }
}

/* ==========================================================================
   📱 Mobile / Small Screen Registration Form Layout Optimization
   Eliminates wasted gaps on left & right sides on mobile devices (<768px)
   ========================================================================== */

@media screen and (max-width: 768px) {

  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
  }

  /* Info header section above form */
  .reg-info-section {
    width: 100% !important;
    max-width: 100% !important;
    margin: 10px 0 14px 0 !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
  }

  .reg-steps {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 4px !important;
    width: 100% !important;
  }

  .reg-step {
    width: 100% !important;
    padding: 3px 4px !important;
    gap: 4px !important;
    border-radius: 6px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    min-height: unset !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }

  /* Outer Content Wrapper */
  .content {
    margin-left: 0 !important;
    margin-top: 15px !important;
    margin-bottom: 20px !important;
    padding: 0 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Main Registration Form Container */
  .form-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px 10px !important;
    margin: 6px 0 !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
  }

  /* Form Layout */
  form {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .form-group {
    width: 100% !important;
    margin-bottom: 4px !important;
    box-sizing: border-box !important;
  }

  .form-group input:not([type="radio"]),
  .form-group select {
    width: 100% !important;
    max-width: 100% !important;
    padding: 11px 10px !important;
    font-size: 16px !important;
    /* Prevents zoom on iOS */
    box-sizing: border-box !important;
    border-radius: 8px !important;
  }

  .form-group label {
    font-size: 0.95rem !important;
    margin-bottom: 4px !important;
  }

  /* 12-Hour Time Select Inputs */
  .time-group {
    display: flex !important;
    flex-direction: row !important;
    gap: 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .time-group select {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: 100% !important;
    padding: 10px 4px !important;
    font-size: 15px !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  /* Radio Buttons & Labels */
  .modern-radio-group {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .modern-radio-option {
    flex: 1 1 calc(50% - 6px) !important;
    min-width: 100px !important;
    padding: 8px 6px !important;
    box-sizing: border-box !important;
    justify-content: center !important;
  }

  /* Map Container */
  .map-picker {
    width: 100% !important;
    padding: 10px 8px !important;
    margin: 10px 0 0 0 !important;
    box-sizing: border-box !important;
    border-radius: 12px !important;
  }

  .map-search-row {
    display: flex !important;
    width: 100% !important;
    gap: 6px !important;
    box-sizing: border-box !important;
  }

  .map-search-row input,
  #map-search {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #map {
    width: 100% !important;
    height: 240px !important;
    box-sizing: border-box !important;
    border-radius: 8px !important;
  }

  /* Submit & Action Buttons */
  button,
  .form-container button {
    grid-column: auto !important;
    width: 100% !important;
    padding: 13px !important;
    font-size: 1rem !important;
    margin-top: 14px !important;
    box-sizing: border-box !important;
  }

  /* Nav Toggle Buttons Row (Saka Date, Danda, Lagna Buttons) */
  #buttonrow {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 8px !important;
    margin: 10px 0 !important;
    padding: 0 6px !important;
    box-sizing: border-box !important;
  }

  #buttonrow .toggle-btn,
  .toggle-btn {
    width: 100% !important;
    min-width: 100% !important;
    padding: 12px 14px !important;
    font-size: 0.95rem !important;
    box-sizing: border-box !important;
    border-radius: 24px !important;
    text-align: center !important;
  }

  /* Fixed/Sticky Mobile Top Navbar - Matched to index.html */
  #top-panel {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    padding: 0.5rem 1rem !important;
    min-height: 48px !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-radius: 0 0 14px 14px !important;
    margin-bottom: 12px !important;
    box-sizing: border-box !important;
  }

  #top-panel .navbar {
    display: none !important;
  }

  #top-panel h3 {
    font-size: 1.5rem !important;
    margin: 0 !important;
    line-height: 1.1 !important;
  }

  #menu-toggle {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    width: 36px !important;
    height: 36px !important;
    cursor: pointer !important;
    position: fixed !important;
    right: 1px !important;
    left: auto !important;
    transform: none !important;
    z-index: 2001 !important;
    background: transparent !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }

  #menu-toggle span {
    height: 4px !important;
    width: 28px !important;
    background: #ffffff !important;
    margin: 3px 0 !important;
    border-radius: 2px !important;
    transition: all 0.3s ease !important;
    display: block !important;
    opacity: 1 !important;
  }

  /* Morph 3 horizontal lines to X icon when panel is open */
  body.panel-active #menu-toggle span:nth-child(1) {
    transform: translateY(10px) rotate(45deg) !important;
  }

  body.panel-active #menu-toggle span:nth-child(2) {
    opacity: 0 !important;
    width: 0 !important;
  }

  body.panel-active #menu-toggle span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg) !important;
  }

  /* Header inside form container */
  .form-container h2 {
    font-size: 1.5rem !important;
    margin-bottom: 12px !important;
    text-align: center !important;
  }
}

/* Strict 1:1 Non-Elongated Circular Tip Close Button */
.reg-close-btn,
.areg-close-btn,
.reg-sw-close,
.areg-notice-close {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  flex: 0 0 28px !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  align-self: center !important;
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Extra small devices (phones, <480px) */
@media screen and (max-width: 480px) {
  .content {
    padding: 0 3px !important;
  }

  .form-container {
    padding: 14px 8px !important;
    border-radius: 12px !important;
  }

  .reg-info-section {
    padding: 0 4px !important;
  }
}

/* =========================================================
   Time Combobox (viewkuthimanualforastrologer design)
   ========================================================= */
.vkm-time-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 1.2fr;
  gap: 8px;
  align-items: center;
}

.vkm-time-combobox {
  position: relative;
  width: 100%;
  height: 44px;
  box-sizing: border-box;
}

.vkm-time-combobox .vkm-time-input {
  width: 100%;
  height: 44px;
  box-sizing: border-box;
  padding: 0 22px 0 6px;
  background: #f8faff;
  border: 1.5px solid #d4e0f0;
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1a2a44;
  text-align: center;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.vkm-time-combobox .vkm-time-input:focus {
  border-color: #3578e5;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(53, 120, 229, 0.14);
}

button.vkm-combo-arrow,
.vkm-time-combobox button.vkm-combo-arrow,
.form-container .vkm-time-combobox button.vkm-combo-arrow,
.vkm-combo-arrow {
  position: absolute !important;
  right: 5px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 22px !important;
  height: 28px !important;
  min-width: 22px !important;
  max-width: 22px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  margin: 0 !important;
  margin-top: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  background-image: none !important;
  color: #64748b !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
  border-radius: 5px !important;
  grid-column: auto !important;
  letter-spacing: normal !important;
  line-height: 1 !important;
  outline: none !important;
  z-index: 5 !important;
  transition: color 0.15s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background 0.15s ease !important;
}

button.vkm-combo-arrow:hover,
.vkm-time-combobox button.vkm-combo-arrow:hover,
.form-container .vkm-time-combobox button.vkm-combo-arrow:hover,
button.vkm-combo-arrow:focus,
.vkm-time-combobox button.vkm-combo-arrow:focus {
  background: rgba(37, 99, 235, 0.08) !important;
  color: #2563eb !important;
  box-shadow: none !important;
  transform: translateY(-50%) !important;
  outline: none !important;
}

.vkm-time-combobox.is-open button.vkm-combo-arrow,
.form-container .vkm-time-combobox.is-open button.vkm-combo-arrow {
  transform: translateY(-50%) rotate(180deg) !important;
  color: #2563eb !important;
  background: rgba(37, 99, 235, 0.12) !important;
}

button.vkm-combo-arrow:active,
.vkm-time-combobox button.vkm-combo-arrow:active {
  background: rgba(37, 99, 235, 0.18) !important;
  color: #1d4ed8 !important;
  box-shadow: none !important;
  transform: translateY(-50%) scale(0.95) !important;
}

.vkm-time-combobox.is-open button.vkm-combo-arrow:active {
  transform: translateY(-50%) rotate(180deg) scale(0.95) !important;
}

button.vkm-combo-arrow svg,
.vkm-combo-arrow svg {
  width: 12px !important;
  height: 12px !important;
  display: block !important;
  pointer-events: none !important;
  stroke: currentColor !important;
  stroke-width: 2.5 !important;
  fill: none !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  transition: transform 0.2s ease !important;
}

.vkm-combo-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  min-width: 58px;
  max-height: 180px;
  overflow-y: auto;
  background: #ffffff;
  border: 1.5px solid #3578e5;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.18);
  z-index: 9999;
  display: none;
  padding: 3px 0;
  list-style: none;
  margin: 0;
  scrollbar-width: thin;
}

.vkm-time-combobox.is-open .vkm-combo-menu {
  display: block;
}

.vkm-combo-item {
  padding: 6px 4px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.vkm-combo-item:hover,
.vkm-combo-item.is-selected {
  background: #eff6ff;
  color: #2563eb;
}

.form-group .vkm-time-grid select,
.vkm-time-grid select {
  width: 100%;
  height: 44px;
  box-sizing: border-box;
  padding: 0 8px;
  background: #f8faff;
  border: 1.5px solid #d4e0f0;
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1a2a44;
  text-align: center;
  outline: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group .vkm-time-grid select:focus,
.vkm-time-grid select:focus {
  border-color: #3578e5;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(53, 120, 229, 0.14);
}

@media (max-width: 600px) {
  .vkm-time-grid {
    gap: 5px;
  }
}