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

/* Set a default font and font size */
body {
  font-family: sans-serif;
  background-color: #FFFFFF;
  color: #000000;
}

/* Mobile-first styles */
.container {
  width: 100%;
  max-width: 800px;
  margin: 0px; /* Added margin for mobile */
  padding: 20px;
  font-size: 16px;
}

h1 {
  font-size: 24px;
  margin-bottom: 10px;
  color: #3a6f8a;
}

h2 {
  font-size: 22px;
  font-weight: normal;
  margin-bottom: 8px;
  color: #5a8fa8;
}

.logo, .logo a {
  color: #2a5570;
  margin-bottom: 10px;
}

p {
  font-size: 16px;
  margin-bottom: 10px;
}

.form_field {
  margin-bottom: 10px;
}

.result_sizes, .result_measures {
  display: none;
  margin-top: 10px;
  padding: 5px;
  background-color: #F0F0F0;
  border-radius: 5px;
}
.result_sizes div.category {
  margin-top: 15px;
  font-weight: bold;
}
.result_sizes div.category:first-child {
  margin-top: 5px;
}
.result_sizes div.brand_title {
  margin-top: 5px;
}
.result_sizes > div.brand_title::after {
  content: ": ";
  display: inline;
  padding-right: 5px;
}
.result_sizes ul {
  list-style-type: none;
  padding: 0;
  display: inline;
}
.result_sizes ul li {
  display: inline;
}
.result_measures div.reverseMeasureTitle {
  margin-top: 5px;
  font-weight: bold;
  display: inline;
}
.result_measures div.reverseMeasureTitle::after {
  margin-top: 15px;
  font-weight: bold;
  content: ": ";
  display: inline;
}
.result_measures div.reverseMeasureValue {
  margin-top: 15px;
  font-weight: normal;
  display: inline;
}

.form_field label {
  display: inline-block;
  width: 5rem;
}
.form_field input[type="text"] {
  display: inline-block;
  width: 40px;
}
.form_field.radio label {
  display: inline-block;
  width: 5rem;
  border: 1px solid #ccc;
  border-radius: 7px;
  padding: 3px 6px;
  font-size: 14px;
}
.submit_button {
  display: block;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 16px;
}

.female_example_measures, .male_example_measures {
  border-bottom: dashed 1px #ccc;
  cursor: pointer;
  width: fit-content;
}

.size_example {
  border-bottom: dashed 1px #ccc;
  cursor: pointer;
}

.description {
  margin-top: 15px;
  padding-top: 15px;
  border-top:#666666 1px solid;
}

.menu {
  border-top: 1px #999999 solid;
  border-bottom: 1px #999999 solid;
  margin-bottom: 20px;
}
.menu div {
  margin-top: 10px;
  margin-bottom: 10px;
}
.menu a {
  color: #333333;
}

.bottom_description {
  margin-top: 20px;
}

.result_sizes_v2 {
  display: none;
  margin-top: 10px;
  padding: 10px;
  background-color: #F0F0F0;
  border-radius: 5px;
}
.size_v2_type {
  font-size: 0.78em;
  font-weight: normal;
  color: #b07a30;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 20px;
  margin-bottom: 2px;
  padding-bottom: 3px;
  border-bottom: 1px solid #e8e8e8;
}
.size_v2_type + .size_v2_brand {
  margin-top: 6px;
}
.size_v2_legend {
  float: right;
  max-width: 200px;
  font-size: 0.58em;
  color: #bbbbbb;
  text-align: right;
  line-height: 1.6;
  margin-left: 10px;
}
.size_v2_legend strong {
  font-weight: bold;
  color: #bbbbbb;
}
.size_v2_brand {
  font-size: 0.85em;
  font-weight: bold;
  color: #333333;
  margin-top: 22px;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #dddddd;
}
.size_v2_brand:first-child {
  margin-top: 0;
}
.size_v2_item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.size_v2_label {
  display: inline-block;
  background-color: #ffffff;
  border-radius: 4px;
  padding: 3px 6px;
  font-weight: bold;
  flex-shrink: 0;
}
.size_v2_range {
  font-size: 0.62em;
  color: #999999;
}
.size_v2_range strong {
  font-size: 1.15em;
  color: #000000;
  font-weight: normal;
}
.size_v2_nearest {
  display: inline-block;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 0.65em;
  color: #cccccc;
  border: 1px solid #e0e0e0;
  flex-shrink: 0;
  align-self: center;
}
.size_v2_secondary {
  display: inline-block;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 0.65em;
  color: #aaaaaa;
  border: 1px solid #e0e0e0;
  flex-shrink: 0;
  align-self: center;
}
.size_v2_item.inexact {
  opacity: 0.55;
}

/* Media query for larger screens */
@media (min-width: 768px) {
  .container {
    padding: 20px 80px 40px 80px;
    margin: 10px 40px 40px 40px; /* Added margin for desktop */
    font-size: 20px;
  }

  h1 {
    font-size: 32px;
    margin-bottom: 20px;
  }

  p {
    font-size: 18px;
  }

  .form_field label {
    display: inline-block;
    width: 8rem;
  }
}

.result_measures_v2 {
  display: none;
  margin-top: 10px;
  padding: 5px;
  background-color: #F0F0F0;
  border-radius: 5px;
}
.result_measures_v2 .rv2_fit {
  margin-top: 10px;
  font-weight: bold;
  font-style: italic;
}
.result_measures_v2 .rv2_fit:first-child {
  margin-top: 5px;
}
.result_measures_v2 .rv2_measure {
  margin-top: 5px;
}
.result_measures_v2 .rv2_label {
  font-weight: bold;
}
.result_measures_v2 .rv2_error {
  color: #c00;
  margin-top: 5px;
}

@media (prefers-color-scheme: dark) {
  body {
      background-color: black;
      color: white;
  }
  .result_sizes, .result_measures {
    background-color: #000000;
    border: #333333 1px solid;
  }
  .form_field.radio label {
    border: 1px solid #666666;
  }
  .female_example_measures, .male_example_measures,
  .size_example {
    border-bottom: dashed 1px #666666;
  }
  .menu a {
    color: #cccccc;
  }
  .result_sizes_v2 {
    background-color: #000000;
    border: #333333 1px solid;
  }
  .size_v2_label {
    background-color: #000000;
    border: 1px solid #444444;
  }
  .size_v2_range {
    color: #555555;
  }
  .size_v2_range strong {
    color: #ffffff;
    font-size: 1.15em;
  }
  .size_v2_nearest {
    color: #444444;
    border-color: #333333;
  }
  .size_v2_secondary {
    color: #444444;
    border-color: #333333;
  }
  .size_v2_legend, .size_v2_legend strong {
    color: #444444;
  }
  .size_v2_type {
    color: #9a6820;
    border-bottom-color: #2a2a2a;
  }
  .size_v2_brand {
    color: #cccccc;
    border-bottom-color: #333333;
  }
  .result_measures_v2 {
    background-color: #000000;
    border: #333333 1px solid;
  }
  .result_measures_v2 .rv2_label {
    color: #cccccc;
  }
  .result_measures_v2 .rv2_error {
    color: #ff4444;
  }
  .result_measures_v2 .rv2_fit {
    color: #9a6820;
  }
}
