body {
  font-family: proxima-nova,Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
  background-color: #081024;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0px 0px 40px 0px;
  margin: 0;
}

.header-box {
  background: none;
  padding: 20px 30px;
  border-radius: 0px;
  /* box-shadow: 0 2px 8px rgba(0,0,0,0.1); */
  box-sizing: border-box;
  max-width: 800px;
  margin: 0 auto 20px auto;
  width: 100%;
}

/* Logo wrapper positioning */
.logo-wrapper {
  position: relative;
}

/* Language switcher - discrete positioning */
.language-switcher {
  position: absolute;
  top: 10px;
  right: -200px;
  display: flex;
  gap: 2px;
  z-index: 10;
}

.lang-btn {
  padding: 8px 12px;
  border: 2px solid transparent;
  background: transparent;
  color: white;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 40px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lang-btn:hover {
  background: rgba(46, 157, 206, 0.15);
  transform: translateY(-1px);
}

.lang-btn.active {
  color: white;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(46, 157, 206, 0.3);
}

.title {
  text-align: left;
  color: #fff;
  margin: 0 0 10px 0;
  font-weight: bold;
  font-size: 2em;
}

.description {
  text-align: left;
  color: #d9e4f2;
  margin: 0;
  line-height: 1.5;
}

/* Instructions collapsible section */
.instructions-section {
  margin-top: 20px;
}

.instructions-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 16px 0;
  transition: all 0.3s ease;
  position: relative;
  /* Remove tap highlight on mobile */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.instructions-toggle::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(46, 157, 206, 0.4) 0%, rgba(46, 157, 206, 0.3) 100%);
  transition: all 0.4s ease;
}

/* Only apply hover effects on devices that support true hovering */
@media (hover: hover) {
  .instructions-toggle:hover {
    padding-left: 8px;
    color: #fff;
  }

  .instructions-toggle:hover::after {
    background: linear-gradient(90deg, rgba(46, 157, 206, 0.6) 0%, rgba(46, 157, 206, 0.4) 100%);
    height: 3px;
  }

  .instructions-toggle:hover h3 {
    color: #fff;
  }

  .instructions-toggle:hover .toggle-arrow {
    color: rgba(46, 157, 206, 0.9);
  }
}

/* Tap animation for mobile devices */
.instructions-toggle.tap-animate {
  padding-left: 8px;
  color: #fff;
}

.instructions-toggle.tap-animate::after {
  background: linear-gradient(90deg, rgba(46, 157, 206, 0.6) 0%, rgba(46, 157, 206, 0.4) 100%);
  height: 3px;
}

.instructions-toggle.tap-animate h3 {
  color: #fff;
}

.instructions-toggle.tap-animate .toggle-arrow {
  color: rgba(46, 157, 206, 0.9);
}

.instructions-toggle h3 {
  margin: 0;
  color: #d9e4f2;
  font-size: 1.1em;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: color 0.3s ease;
}

.instructions-toggle.expanded h3 {
  color: #fff;
}

.toggle-arrow {
  color: #d9e4f2;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-left: 12px;
  width: 18px;
  height: 18px;
  /* Remove tap highlight on mobile */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.toggle-arrow.expanded {
  transform: rotate(180deg);
  color: rgba(46, 157, 206, 0.8);
}

.instructions-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
  position: relative;
}

.instructions-content.expanded {
  max-height: 1000px;
  transition: max-height 0.6s ease-in;
}

.instructions-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(46, 157, 206, 0.4) 0%, transparent 100%);
  transition: width 0.6s ease 0.2s;
}

.instructions-content.expanded::before {
  width: 100%;
}

.instructions-inner {
  padding: 24px 0 16px 0;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.4s ease 0.1s;
}

.instructions-content.expanded .instructions-inner {
  opacity: 1;
  transform: translateY(0);
}

.instructions-inner h4 {
  color: #fff;
  margin: 24px 0 12px 0;
  font-size: 1.05em;
  font-weight: 500;
  letter-spacing: 0.2px;
  padding-top: 50px;
}

.instructions-inner ol,
.instructions-inner ul {
  color: #d9e4f2;
  line-height: 1.7;
  font-size: 0.95em;
}

.instructions-inner ol li,
.instructions-inner ul li {
  margin-bottom: 12px;
  padding-left: 4px;
}

.instructions-inner strong {
  color: #fff;
  font-weight: 700;
}

.instructions-inner p {
  color: #d9e4f2;
  margin: 12px 0;
  font-size: 0.95em;
  line-height: 1.6;
}

/* Economic parameters collapsible section */
.economic-section {
  margin-top: 0;
}

.economic-toggle {
  cursor: pointer;
  padding: 0;
  margin: 0;
  /* Remove tap highlight on mobile */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}



.economic-toggle .toggle-arrow {
  color: #081024;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: auto;
  width: 24px;
  height: 24px;
}

.toggle-arrow.expanded {
  transform: rotate(180deg);
}

.economic-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
  margin: 0 -4px;
}

.economic-content.expanded {
  max-height: 300px;
  transition: max-height 0.6s ease-in;
}

.economic-inner {
  opacity: 0;
  transition: opacity 0.4s ease 0.1s;
  padding: 16px 4px;
}

.economic-content.expanded .economic-inner {
  opacity: 1;
}

.logo-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.logo {
  max-width: 400px;
  height: auto;
}

.container-row {
  display: flex;
  justify-content: center;
  gap: 32px;
  max-width: 1200px;
  margin: 20px auto 0 auto;
  width: 100%;
  align-items: flex-start;
}

.left-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
  max-width: 400px;
}

.right-column {
  flex: 1;
  max-width: 550px;
}

.container {
  background: white;
  color: #081024;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  box-sizing: border-box;
}

.container h2 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.2em;  /* Add this line - adjust value as needed */
}

.tall-container {
  min-height: 600px;
}

.input-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px 16px;
  align-items: center;
}

.input-grid label {
  text-align: right;
  margin: 0;
  font-weight: 600;
  color: #344563;
  font-size: 14px;
}

/* Style for labels with tooltips */
.input-grid label[data-tooltip] {
  cursor: help;
}

.input-grid input {
  width: 100%;
  padding: 12px 16px;
  box-sizing: border-box;
  color: #081024;
  border: 2px solid #e1e8f0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  background-color: #ffffff;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.input-grid input:focus {
  outline: none;
  border-color: #2E9DCE;
  box-shadow: 0 0 0 3px rgba(46, 157, 206, 0.1), 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.input-grid input:hover:not(:focus) {
  border-color: #b8c8d9;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Birthday validation styles */
.input-grid input#inputBirth.valid {
  border-color: #48bb78;
  background-color: #f0fff4;
}

.input-grid input#inputBirth.valid:focus {
  border-color: #48bb78;
  box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.1), 0 2px 8px rgba(0, 0, 0, 0.1);
}

.input-grid input#inputBirth.invalid {
  border-color: #f56565;
  background-color: #fff5f5;
}

.input-grid input#inputBirth.invalid:focus {
  border-color: #f56565;
  box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.1), 0 2px 8px rgba(0, 0, 0, 0.1);
}

.input-grid select {
  width: 100%;
  padding: 12px 16px;
  box-sizing: border-box;
  color: #081024;
  background-color: #ffffff;
  border: 2px solid #e1e8f0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23344563' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 44px;
  position: relative;
}

.input-grid select:focus {
  outline: none;
  border-color: #2E9DCE;
  box-shadow: 0 0 0 3px rgba(46, 157, 206, 0.1), 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E9DCE' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
}

.input-grid select:hover:not(:focus) {
  border-color: #b8c8d9;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Enhanced dropdown option styling */
.input-grid select option {
  padding: 8px 16px;
  background-color: #ffffff;
  color: #081024;
  font-weight: 500;
  border: none;
}

.input-grid select option:hover {
  background-color: rgba(46, 157, 206, 0.1);
}

.input-grid select option:checked {
  background-color: #2E9DCE;
  color: #ffffff;
}

.input-grid select option:hover {
  background-color: rgba(46, 157, 206, 0.1);
}

.input-grid select option:checked {
  background-color: #2E9DCE;
  color: #ffffff;
}

/* Dropdown arrow rotation animation */
.input-grid select:focus {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E9DCE' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='18,15 12,9 6,15'%3e%3c/polyline%3e%3c/svg%3e");
}

/* Additional styling for better consistency */
.input-grid select:disabled {
  background-color: #f8f9fa;
  color: #6c757d;
  border-color: #e9ecef;
  cursor: not-allowed;
  opacity: 0.7;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
}

/* Custom checkbox styling */
.checkbox-container {
  position: relative;
  display: inline-block;
  /* Prevent text selection on rapid clicks */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.checkbox-container input[type="checkbox"] {
  opacity: 0;
  position: absolute;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.checkbox-container .custom-checkbox {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: white;
  border: 2px solid #b8c8d9;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  /* Prevent text selection on rapid clicks */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.checkbox-container .custom-checkbox:hover {
  border-color: #2E9DCE;
}


.checkbox-container input[type="checkbox"]:checked + .custom-checkbox {
  background: linear-gradient(135deg, #2E9DCE 0%, #247ba3 100%);
  border: none;
  padding: 2px;
}

.checkbox-container .custom-checkbox svg {
  opacity: 0;
}

.checkbox-container input[type="checkbox"]:checked + .custom-checkbox svg {
  opacity: 1;
}

.input-grid .full-width {
  grid-column: 1 / span 2;
  text-align: center;
}

.salary-grid {
  display: grid;
  grid-template-columns: 0.5fr 0.5fr 5.2fr 1fr 2fr;
  gap: 8px 12px;
  align-items: center;
  /* max-height: 3000px; */
  overflow-y: auto;
  padding: 10px;
}

.salary-grid p {
  margin: 0;
  padding: 4px 8px;
  text-align: center;
  font-size: 0.9em;
}

.salary-grid p:nth-child(-n+5) {
  font-weight: bold;
  margin-bottom: 8px;
}

.salary-grid input {
  width: 100%;
  padding: 8px 12px;
  box-sizing: border-box;
  border: 2px solid #e1e8f0;
  text-align: right;
  font-size: 0.9em;
  font-weight: 500;
  border-radius: 6px;
  color: #081024;
  background-color: #ffffff;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Remove spinner arrows from number inputs */
.salary-grid input[type="number"]::-webkit-outer-spin-button,
.salary-grid input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.salary-grid input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.salary-grid input:focus {
  outline: none;
  border-color: #2E9DCE;
  box-shadow: 0 0 0 2px rgba(46, 157, 206, 0.1), 0 2px 4px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.salary-grid input:hover:not(:focus):not(:disabled) {
  border-color: #b8c8d9;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.salary-grid .grayed-out {
  opacity: 0.4;
  color: #999;
}

.salary-grid .grayed-out input {
  background-color: #f8f9fa;
  color: #6c757d;
  border-color: #e9ecef;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Current year row highlight */
.salary-grid {
  position: relative;
}

button#launchSimulation,
button#launchSimulation-mobile,
button.mobile-button {
  background: linear-gradient(135deg, #2E9DCE 0%, #247ba3 100%);
  color: white;
  border: none;
  padding: 20px 32px;
  border-radius: 12px;
  font-size: 1.4em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 20px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(46, 157, 206, 0.25);
  letter-spacing: 0.5px;
}

button#launchSimulation:hover,
button#launchSimulation-mobile:hover,
button.mobile-button:hover {
  background: linear-gradient(135deg, #247ba3 0%, #1a5f7a 100%);
  box-shadow: 0 12px 40px rgba(46, 157, 206, 0.35);
  transform: translateY(-2px);
}

button#launchSimulation:active,
button#launchSimulation-mobile:active,
button.mobile-button:active {
  background: linear-gradient(135deg, #1a5f7a 0%, #154d66 100%);
  transform: translateY(0);
  box-shadow: 0 6px 24px rgba(46, 157, 206, 0.3);
}

/* Disabled button styles */
button#launchSimulation:disabled,
button#launchSimulation-mobile:disabled,
button.mobile-button:disabled,
button#launchSimulation.disabled-button,
button#launchSimulation-mobile.disabled-button,
button.mobile-button.disabled-button {
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
  color: #a0aec0;
  cursor: not-allowed;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: none;
  opacity: 0.6;
}

button#launchSimulation:disabled:hover,
button#launchSimulation-mobile:disabled:hover,
button.mobile-button:disabled:hover,
button#launchSimulation.disabled-button:hover,
button#launchSimulation-mobile.disabled-button:hover,
button.mobile-button.disabled-button:hover {
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: none;
  cursor: not-allowed;
}


/* Clear All button styles - expanding banner effect */
.clear-all-btn {
  position: relative;
  background: white;
  color: #dc2626;
  border: 1px solid #dc2626;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
  letter-spacing: 0.2px;

  display: flex;
  align-items: center;
  justify-content: flex-start; /* keep content aligned left */

  width: 32px;
  min-width: 32px;
  height: 32px;
  margin: 0 0 0 auto;
  padding: 0 8px; /* small horizontal padding */
  overflow: hidden;

  /* Remove tap highlight on mobile */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.clear-btn-x {
  font-size: 1.2em;
  font-weight: 300;
  line-height: 1;
  flex-shrink: 0;
  text-align: center;
  width: 16px; /* fixed space for centering in the square state */
  display: flex;
  justify-content: center;
  align-items: center;
}

.clear-btn-text {
  margin-left: 8px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.clear-all-btn:hover {
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  color: #b91c1c;
  border-color: #b91c1c;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);

  transform: translateY(-1px);
  width: 120px; /* expands to the left since margin-right is auto */
}

.clear-all-btn:hover .clear-btn-text {
  opacity: 1;
  transform: translateX(0);
}

.clear-all-btn:active {
  background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
  color: #991b1b;
  border-color: #991b1b;
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.15);
}

/* Touch device adjustments - always show expanded button */
@media (hover: none) and (pointer: coarse) {
  .clear-all-btn {
    width: 120px; /* Always expanded on touch devices */
  }
  
  .clear-all-btn .clear-btn-text {
    opacity: 1;
    transform: translateX(0);
  }
  
  /* Disable sticky hover states but keep brief active feedback */
  .clear-all-btn:hover:not(:active) {
    background: white !important;
    color: #dc2626 !important;
    border-color: #dc2626 !important;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1) !important;
    transform: none !important;
    width: 120px; /* Keep expanded width */
  }
  
  .clear-all-btn:active {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%) !important;
    color: #991b1b !important;
    border-color: #991b1b !important;
    transform: none !important;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.15) !important;
    transition: all 0.1s ease !important; /* Brief feedback */
  }
  
  /* Back to top button - disable sticky states but keep brief active feedback */
  .back-to-top-btn:hover:not(:active) {
    background: linear-gradient(135deg, #2E9DCE 0%, #247ba3 100%) !important;
    box-shadow: 0 8px 32px rgba(46, 157, 206, 0.25) !important;
    transform: translateY(0) scale(1) !important;
  }
  
  .back-to-top-btn:active {
    background: linear-gradient(135deg, #1a5f7a 0%, #134e68 100%) !important;
    transform: translateY(0) scale(0.95) !important;
    box-shadow: 0 4px 16px rgba(46, 157, 206, 0.3) !important;
    transition: all 0.1s ease !important; /* Brief feedback */
  }
  
  .back-to-top-btn:hover:not(:active) svg {
    transform: none !important;
  }
  
  .back-to-top-btn:active svg {
    transform: scale(0.9) !important;
    transition: transform 0.1s ease !important;
  }
}


.results-section {
  background-color: white;
  width: 100%;
  margin-top: 40px;
  padding: 40px 0;
  /* min-height: 1200px; */
  overflow: visible;
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  position: relative;
}

.results-section.visible {
  display: block;
  opacity: 1;
}

.results-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 40px;
  box-sizing: border-box;
  overflow: visible;
}

.summary-container {
  margin-top: 50px;
  padding-top: 40px;
}

.results-container h2 {
  color: #081024;
  margin-top: 0;
  margin-bottom: 30px;
  font-size: 2em;
  font-weight: bold;
  text-align: center;
}

/* User parameters summary styling */
.user-parameters-summary {
  margin-bottom: 25px;
  text-align: center;
  max-width: 650px;
  margin: 0 auto;
  padding-bottom: 25px;
}

.user-parameters-summary p {
  color: #4a5568;
  font-size: 0.95em;
  font-weight: 400;
  line-height: 1.5;
  margin: 0;
  padding: 15px 20px;
  /* background-color: #f7fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0; */
}

.user-parameters-summary span {
  font-weight: 600;
  color: #2d3748;
}

#simulation-results {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  color: #081024;
  overflow-x: auto;
}

#summary-results {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 30px;
  width: 550px;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  color: #081024;
  overflow-x: auto;
}

.results-table {
  display: grid;
  grid-template-columns: 0.4fr 0.4fr 0.4fr 0.8fr 0.8fr 0.8fr;
  gap: 6px 8px;
  align-items: center;
  /* max-height: 1500px; */
  padding: 10px;
  min-width: 400px;
  position: relative;
  overflow: visible;
}

.prestation-header {
  grid-column: span 2;
  background-color: #f8f9fa;
  border-bottom: 2px solid #333;
  font-size: 1em;
  font-weight: bold;
  padding: 10px;
  margin-bottom: 0;
}

.results-header small {
  font-size: 0.8em;
  font-weight: normal;
  display: block;
  margin-top: 4px;
}

.results-cell {
  margin: 0;
  padding: 4px 8px;
  text-align: center;
  font-size: 0.9em;
  cursor: pointer;
  /* Remove tap highlight on mobile */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.results-header {
  margin: 0;
  padding: 4px 8px;
  text-align: center;
  font-size: 0.9em;
  font-weight: bold;
  margin-bottom: 8px;
  transition: background-color 0.2s ease;
  /* Remove tap highlight on mobile */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Row and column highlighting */
.results-table .highlight-row {
  position: relative;
}

.results-table .highlight-row::before {
  content: '';
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: -6px;
  right: -6px;
  background-color: #d6ebf5;
  z-index: -1;
  pointer-events: none;
}

.results-table .highlight-col {
  position: relative;
}

.results-table .highlight-col::after {
  content: '';
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: -6px;
  right: -6px;
  background-color: #d6ebf5;
  z-index: -1;
  pointer-events: none;
}

/* Intersection highlighting - hover cell (takes priority) */
.results-table .highlight-intersection {
  position: relative;
  z-index: 10;
  transition: none !important;
}

.results-table .highlight-intersection::before {
  content: '';
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: -6px;
  right: -6px;
  background-color: #9ac9e3;
  z-index: -1;
  pointer-events: none;
}

/* Hide row/col backgrounds when intersection is active */
.results-table .highlight-intersection::after {
  display: none;
}



label {
  display: block;
  margin: 10px 0;
}

/* Custom tooltip styling for results headers */
.results-header[data-tooltip] {
  cursor: help;
}

/* Results wrapper for positioning overlay */
.results-wrapper {
  position: relative;
  /* padding-bottom: 100px; */
}

/* Loading overlay */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  border-radius: 8px;
}

/* Main page loading overlay */
.main-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(5px);
}

/* Results section loading overlay */
.results-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1500;
  min-height: 300px;
}

/* Blue loading curtain */
.blue-loading-curtain {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #081024;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1600;
  min-height: 600px;
  transition: transform 0.8s ease-in-out;
}

.blue-loading-curtain .loading-spinner {
  border-top: 6px solid #ffffff;
  border-right: 6px solid #ffffff;
  border-bottom: 6px solid #ffffff;
  border-left: 6px solid rgba(255, 255, 255, 0.3);
  transition: opacity 0.5s ease-out;
}

.blue-loading-curtain .loading-text {
  color: #ffffff;
  font-weight: bold;
  font-size: 1.2em;
  transition: opacity 0.5s ease-out;
}

.blue-loading-curtain.fade-spinner .loading-spinner,
.blue-loading-curtain.fade-spinner .loading-text {
  opacity: 0;
}

.blue-loading-curtain.wipe-down {
  transform: translateY(100%);
}

.loading-overlay.hidden {
  display: none;
}

/* Loading spinner */
.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  position: relative;
  margin-bottom: 24px;
  animation: spin 2s linear infinite;
}

.loading-spinner::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border: 3px solid transparent;
  border-top: 3px solid #ffffff;
  border-radius: 50%;
  animation: spin 2s linear infinite;
}

/* Blue curtain spinner override */
.blue-loading-curtain .loading-spinner {
  border: 3px solid rgba(255, 255, 255, 0.15);
}

.blue-loading-curtain .loading-spinner::before {
  border: 3px solid transparent;
  border-top: 3px solid #ffffff;
  border-right: 3px solid rgba(255, 255, 255, 0.8);
}

.blue-loading-curtain .loading-spinner::after {
  border: 2px solid transparent;
  border-top: 2px solid rgba(255, 255, 255, 0.9);
  border-right: 2px solid rgba(255, 255, 255, 0.5);
}

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



.loading-text {
  font-size: 1.2em;
  font-weight: bold;
  color: #081024;
  margin: 0;
}

/* Results hidden during loading */
.results-wrapper.loading .results-table {
  opacity: 0;
  pointer-events: none;
}

/* Results animation */
.results-table {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.results-table.fade-in {
  opacity: 0;
  transform: translateY(20px);
}

.results-table.show {
  opacity: 1;
  transform: translateY(0);
}

/* Summary Table Styles */
.summary-table {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr;
  gap: 8px 12px;
  align-items: center;
  padding: 10px;
  width: 500px;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  overflow: visible;
}

.summary-header {
  background-color: #f8f9fa;
  border-bottom: 2px solid #333;
  font-size: 0.9em;
  font-weight: bold;
  padding: 10px;
  margin-bottom: 0;
  text-align: center;
}

.summary-label {
  margin: 0;
  padding: 4px 8px;
  text-align: center;
  font-size: 0.9em;
  font-weight: bold;
  margin-bottom: 8px;
  transition: background-color 0.2s ease;
}

.summary-table .results-cell {
  margin: 0;
  padding: 4px 8px;
  text-align: center;
  font-size: 0.9em;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

/* Summary table animations */
.summary-table {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.summary-table.fade-in {
  opacity: 0;
  transform: translateY(20px);
}

.summary-table.show {
  opacity: 1;
  transform: translateY(0);
}

/* Tooltip container */
.custom-tooltip {
  position: fixed;
  background: #2c3e50;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
  max-width: 280px;
  text-align: left;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  border: 0px solid #95a5a6;
  font-weight: normal;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.custom-tooltip.show {
  opacity: 1;
}

/* Back to Top Button */
.back-to-top-btn {
  position: fixed;
  bottom: 2vh;
  right: 2vw;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #2E9DCE 0%, #247ba3 100%);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(46, 157, 206, 0.25);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  opacity: 1;
  transform: translateY(0) scale(1);
  /* Remove tap highlight on mobile */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.back-to-top-btn:hover {
  background: linear-gradient(135deg, #247ba3 0%, #1a5f7a 100%);
  box-shadow: 0 12px 40px rgba(46, 157, 206, 0.35);
  transform: translateY(-4px) scale(1.05);
}

.back-to-top-btn:active {
  transform: translateY(-2px) scale(0.98);
  transition: all 0.15s ease;
}

.back-to-top-btn.hidden {
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  pointer-events: none;
}

.back-to-top-btn svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  /* Remove tap highlight on mobile */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: none; /* Prevent SVG from being a separate tap target */
}

.back-to-top-btn:hover svg {
  transform: translateY(-2px);
}

/* Visitor Counter Styles */
.visitor-counter {
  text-align: center;
  margin-bottom: 5px;
  padding: 5px;
  opacity: 1;
  transition: all 0.3s ease;
  /* background: rgba(255, 255, 255, 0.05); */
  /* border-radius: 8px; */
  /* border: 1px solid rgba(255, 255, 255, 0.1); */
  /* backdrop-filter: blur(10px); */
}

.visitor-counter.hidden {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  display: none;
}

.visitor-counter img {
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  max-width: 100%;
  height: auto;
}

.footer {
  padding-top: 40px;
  max-width: 700px;
  text-align: left;
}

.footer-text {
  text-align: left;
  font-size: 1em;
  font-weight: 300;
  color: white;
  /* margin-top: 40px; */
  /* padding-top: 40px; */
}

.footer-text strong {
  font-weight: 750;
}

.footer-text a {
  color: white;
  text-decoration: underline;
  transition: 0.2s;
}

.footer-text a:hover {
  text-decoration: none;
  color: #2E9DCE;
  transition: 0.2s;
}

/* Simulation note - discrete styling */
.simulation-note {
  max-width: 700px;
  margin: 20px auto 0 auto;
  padding: 0 30px;
  text-align: center;
}

.simulation-note p {
  color: #6f747e;
  font-size: 0.90em;
  font-weight: 300;
  margin: 0;
  font-style: italic;
}

.simulation-note em {
  color: #6f747e;
}

/* Hide mobile button on desktop */
.mobile-button {
  display: none !important;
}

/* ========================================
   MOBILE RESPONSIVE DESIGN
   ======================================== */

/* Tablet and below */
@media screen and (max-width: 1024px) {
  .container-row {
    max-width: 100%;
    gap: 24px;
    padding: 0 20px;
  }
  
  .left-column {
    max-width: 100%;
  }
  
  .right-column {
    max-width: 100%;
  }
  
  .results-container {
    padding: 0 20px;
  }
  
  #summary-results {
    width: 100%;
    max-width: 600px;
  }
}

/* Mobile devices */
@media screen and (max-width: 768px), screen and (max-device-width: 768px) {
  body {
    padding: 0 0 40px 0;
    -webkit-text-size-adjust: 100%;
  }
  
  /* Header adjustments */
  .header-box {
    padding: 15px 20px;
    margin: 0 auto 15px auto;
  }
  
  /* Mobile language switcher */
  .language-switcher {
    top: 5px;
    right: -50px;
    gap: 1px;
  }
  
  .lang-btn {
    padding: 5px 8px;
    font-size: 11px;
    min-width: 28px;
    border-radius: 4px;
  }
  
  .lang-btn:hover {
    background: rgba(46, 157, 206, 0.15);
    transform: none; /* Remove lifting effect on mobile */
  }
  
  .title {
    font-size: 1.6em;
    margin-bottom: 8px;
  }
  
  .description {
    font-size: 0.9em;
    line-height: 1.4;
  }
  
  /* Instructions section mobile adjustments */
  .instructions-toggle {
    padding: 8px 0;
  }
  
  .instructions-toggle h3 {
    font-size: 1.1em;
  }
  
  .instructions-inner {
    padding: 15px 0 8px 0;
  }
  
  .instructions-inner h4 {
    font-size: 1em;
    margin: 15px 0 8px 0;
  }
  
  .instructions-inner ol,
  .instructions-inner ul {
    font-size: 0.9em;
    line-height: 1.5;
    padding-left: 20px;
  }
  
  .instructions-inner ol li,
  .instructions-inner ul li {
    margin-bottom: 8px;
  }
  
  .logo {
    max-width: 300px;
  }
  
  /* Switch to single column layout */
  .container-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px;
    margin: 15px auto 0 auto;
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .left-column {
    gap: 20px;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    order: 1 !important;
  }
  
  .right-column {
    max-width: 100% !important;
    width: 100% !important;
    order: 2 !important;
  }
  
  /* Hide desktop button and show mobile button */
  #launchSimulation {
    display: none !important;
  }
  
  .mobile-button {
    display: block !important;
    order: 3 !important;
    margin-top: 20px;
    width: 100%;
    max-width: 100%;
    /* Copy the same styling as the original button */
    padding: 12px 24px;
    background: linear-gradient(135deg, #2E9DCE 0%, #1E7BA8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(46, 157, 206, 0.2);
  }
  
  /* Container adjustments */
  .container {
    padding: 15px 20px;
    border-radius: 8px;
  }
  
  .tall-container {
    min-height: auto;
  }
  
  /* Form adjustments */
  .input-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px;
    text-align: left;
  }
  
  .input-grid label {
    text-align: left;
    margin-bottom: 4px;
    font-size: 14px;
  }
  
  .input-grid input,
  .input-grid select {
    padding: 14px 16px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .input-grid .full-width {
    width: 100%;
  }
  
  /* Checkbox adjustments */
  .checkbox-container {
    justify-self: start;
  }
  
  /* Button adjustments */
  button#launchSimulation,
  button#launchSimulation-mobile,
  button.mobile-button {
    padding: 16px 24px;
    font-size: 1.2em;
    margin-top: 15px;
  }
  
  /* Salary grid adjustments */
  .salary-grid {
    grid-template-columns: 0.6fr 0.8fr 3fr 1fr 2fr;
    gap: 6px 8px;
    padding: 8px;
    font-size: 0.85em;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .salary-grid p {
    padding: 3px 6px;
    font-size: 0.8em;
  }
  
  .salary-grid input {
    padding: 6px 8px;
    font-size: 0.8em;
  }
  
  /* Results section adjustments */
  .results-section {
    padding: 30px 0;
    width: 100%;
  }
  
  .results-container {
    padding: 0 10px;
    max-width: none;
    box-sizing: border-box;
    background: none !important;
  }
  
  .results-container h2 {
    font-size: 1.6em;
    margin-bottom: 20px;
  }
  
  /* Remove all backgrounds from results elements on mobile */
  .results-wrapper,
  #simulation-results,
  #summary-results,
  .results-table,
  .prestation-header,
  .results-header,
  .results-cell {
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
  }
  
  /* Extra padding for mobile animation space */
  .results-wrapper {
    padding-bottom: 20px !important;
  }
  
  #simulation-results,
  #summary-results {
    padding: 20px;
    border-radius: 8px;
    width: 100%;
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: none !important;
  }
  
  /* Results table adjustments */
  .results-table {
    grid-template-columns: 0.3fr 0.3fr 0.5fr 0.6fr 0.6fr 0.6fr;
    gap: 2px 3px;
    padding: 20px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
  }
  
  .results-cell,
  .results-header {
    padding: 4px 2px;
    font-size: 0.7em;
    line-height: 1.2;
  }
  
  .prestation-header {
    padding: 6px 4px;
    font-size: 0.75em;
  }
  
  .results-header small {
    font-size: 0.9em;
  }
  
  /* Summary table adjustments */
  .summary-table {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3px 4px;
    padding: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
  }
  
  .summary-header,
  .summary-label {
    padding: 8px;
    font-size: 0.8em;
  }
  
  /* Back to top button - viewport units handle responsiveness automatically */
  
  /* Tooltip adjustments */
  .custom-tooltip {
    max-width: 250px;
    font-size: 12px;
    padding: 10px 12px;
  }
  
  /* Footer adjustments */
  .footer {
    padding-top: 30px;
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .footer-text {
    font-size: 0.9em;
  }
}

/* Small mobile devices */
@media screen and (max-width: 480px) {
  .header-box {
    padding: 12px 15px;
  }
  
  /* Extra small mobile language switcher */
  .language-switcher {
    top: 3px;
    right: -50px;
    gap: 1px;
  }
  
  .lang-btn {
    padding: 4px 6px;
    font-size: 10px;
    min-width: 24px;
    font-weight: 500;
  }
  
  .title {
    font-size: 1.4em;
  }
  
  .logo {
    max-width: 250px;
  }
  
  .container-row {
    padding: 0 10px;
  }
  
  .container {
    padding: 12px 15px;
  }
  
  /* Ensure mobile button is shown on small screens too */
  #launchSimulation {
    display: none !important;
  }
  
  .mobile-button {
    display: block !important;
    order: 3 !important;
    margin-top: 20px;
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
  }
  
  .input-grid {
    display: flex !important;
    flex-direction: column !important;
  }
  
  .input-grid input,
  .input-grid select {
    padding: 12px 14px;
  }
  
  button#launchSimulation,
  button#launchSimulation-mobile,
  button.mobile-button {
    padding: 14px 20px;
    font-size: 1.1em;
  }
  
  .salary-grid {
    grid-template-columns: 0.5fr 0.7fr 2.5fr 0.8fr 1.5fr;
    gap: 4px 6px;
    padding: 6px;
  }
  
  .salary-grid p {
    padding: 2px 4px;
    font-size: 0.75em;
  }
  
  .salary-grid input {
    padding: 5px 6px;
    font-size: 0.75em;
  }
  
  #simulation-results,
  #summary-results {
    padding: 3px;
    box-sizing: border-box;
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
  }
  
  /* Remove all backgrounds from results elements on small mobile */
  .results-wrapper,
  .results-table,
  .prestation-header,
  .results-header,
  .results-cell {
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
  }
  
  /* Extra padding for small mobile animation space */
  .results-wrapper {
    padding-bottom: 20px !important;
  }
  
  .results-table {
    grid-template-columns: 0.25fr 0.25fr 0.4fr 0.5fr 0.5fr 0.5fr;
    gap: 1px 2px;
    padding: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .results-cell,
  .results-header {
    padding: 3px 1px;
    font-size: 0.65em;
    line-height: 1.1;
  }
  
  .prestation-header {
    padding: 4px 2px;
    font-size: 0.7em;
  }
  
  .results-header small {
    font-size: 0.8em;
  }
  
  .summary-table {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
  }
  
  .custom-tooltip {
    max-width: 200px;
    font-size: 11px;
    padding: 8px 10px;
  }
}

/* Landscape mobile adjustments */
@media screen and (max-width: 768px) and (orientation: landscape) {
  .salary-grid {
    max-height: 300px;
  }
  
  .results-table {
    max-height: 400px;
  }
}

/* Ensure date input is wide enough on all browsers, especially Safari */
#inputBirth {
  min-width: 160px;
  width: 100%;
  box-sizing: border-box;
}

/* Safari-specific fix for date input width */
@supports (-webkit-touch-callout: none) {
  #inputBirth {
    min-width: 180px;
    font-size: 1em;
  }
}