* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
}

html {
  background: #f5f5f5;
  height: 100%;
  font-size: 18px;
}

body {
  max-width: 640px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft Yahei",
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  background: #f0f2f5;
  min-height: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
}

button,
input,
select,
textarea {
  outline: none;
  border: none;
  background: none;
  font-family: inherit;
}

input::-webkit-input-placeholder {
  color: #999;
}
input::-moz-placeholder {
  color: #999;
}
input:-moz-placeholder {
  color: #999;
}
input:-ms-input-placeholder {
  color: #999;
}

.visually-hidden {
  display: none;
}

.clearfix {
  clear: both;
}

.sr-only {
  display: none;
  visibility: hidden;
}

.mask-overlay {
  position: fixed;
  top: 0px;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75) none repeat scroll 0% 0%;
  z-index: 1000000000;
  display: none;
  max-width: 640px;
  margin: 0 auto;
}

.mask-overlay img {
  position: absolute;
  width: 96%;
  left: 50%;
  margin-left: -48%;
  top: 20%;
  max-width: 640px;
}

.loading-indicator {
  width: 150px;
  height: 10px;
  margin: 0 auto;
  margin-top: 20px;
  font-size: 0.944rem;
}

.loading-indicator span {
  display: inline-block;
  width: 10px;
  height: 100%;
  margin-right: 5px;
  border-radius: 50%;
  background: #302825;
  -webkit-animation: load 1.04s ease infinite;
  animation: load 1.04s ease infinite;
}

.loading-indicator span:last-child {
  margin-right: 0px;
}

.loading-indicator span:nth-child(1) {
  -webkit-animation-delay: 0.13s;
  animation-delay: 0.13s;
}
.loading-indicator span:nth-child(2) {
  -webkit-animation-delay: 0.26s;
  animation-delay: 0.26s;
}
.loading-indicator span:nth-child(3) {
  -webkit-animation-delay: 0.39s;
  animation-delay: 0.39s;
}
.loading-indicator span:nth-child(4) {
  -webkit-animation-delay: 0.52s;
  animation-delay: 0.52s;
}
.loading-indicator span:nth-child(5) {
  -webkit-animation-delay: 0.65s;
  animation-delay: 0.65s;
}

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

@-webkit-keyframes load {
  0% {
    opacity: 1;
    -webkit-transform: scale(1.3);
  }
  100% {
    opacity: 0.2;
    -webkit-transform: scale(0.3);
  }
}

@keyframes load {
  0% {
    opacity: 1;
    transform: scale(1.3);
  }
  100% {
    opacity: 0.2;
    transform: scale(0.3);
  }
}

.chat-section {
  min-height: 100%;
}

.chat-container {
  padding: 0 0 150px 0;
}

.chat-container.expanded {
  padding-bottom: 300px;
}

.message-bubble {
  margin: 5px 10px 0 10px;
  font-size: 1.111rem;
}

.welcome-message {
  display: block;
}

.message-left {
  float: left;
  max-width: 80%;
  margin: 10px 0 0 0;
}

.message-left img {
  float: left;
  margin: 0 5px 0 0;
}

.message-left div {
  position: relative;
  margin: 0 0 0 55px;
  padding: 12px 14px;
  background: #ffffff;
  color: #323232;
  border-radius: 12px;
  line-height: 1.5;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.message-left div i {
  position: absolute;
  top: 15px;
  left: -8px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-right: 8px solid #ffffff;
  border-bottom: 6px solid transparent;
}

.message-left div img {
  float: none;
}

.message-right {
  float: right;
  max-width: 80%;
  margin: 10px 0 0 0;
}

.message-right img {
  float: right;
  margin: 0 0 0 5px;
}

.message-right div {
  position: relative;
  min-height: 41px;
  margin: 0 55px 0 0;
  padding: 10px;
  background: #a0e75a;
  color: #333;
  border-radius: 6px;
}

.message-right div i {
  position: absolute;
  top: 15px;
  right: -8px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-left: 8px solid #a0e75a;
  border-bottom: 6px solid transparent;
}

.warning-text {
  color: #ff4757;
  font-weight: 500;
}

.qualification-image {
  width: 70%;
}

.qualification-image img {
  width: 100%;
  margin: 0 !important;
}

.action-buttons {
  display: grid;
  position: fixed;
  gap: 10px;
  align-items: center;
  justify-items: center;

  bottom: 0.6rem;
  width: 100%;
  max-width: 640px;
  z-index: 999;
  padding: 14px 6px;
  box-sizing: border-box;
  font-size: 0;
  text-align: center;
}

.condition-options
,.age-options{

  grid-template-columns: repeat(2,1fr);

}

.action-buttons a,
.action-buttons button {
  display: inline-block;
  padding: 14px 20px;
  background: #086bd6;
  color: #ffffff;
  font-size: 1.111rem;
  font-weight: 600;
  border-radius: 12px;
  margin-bottom: 8px;
  text-align: center;
  margin: 4px 2%;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
  border: none;
  min-height: 48px;
  letter-spacing: 0.5px;
}

.action-buttons a:hover,
.action-buttons button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.5);
}

.action-buttons a:active,
.action-buttons button:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(74, 144, 226, 0.3);
}

.primary-action button {
  width: 70%;
  padding: 16px 0;
  font-size: 1.389rem;
  background: #086bd6;
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

.primary-action button:hover {
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.5);
}

.age-options button {
  height: 100%;
  width: 100%;
  font-size: 1rem;
  background: #086bd6;
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

.age-options button:hover {
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.5);
}

.condition-options button {
  height: 100%;
  width: 100%;
  font-size: 0.944rem;
  padding: 12px 8px;
  background: #086bd6;
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

.condition-options button:hover {
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.5);
}

.submit-action button {
  width: 70%;
  padding: 16px 0;
  font-size: 1.389rem;
  background: #086bd6;
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

.submit-action button:hover {
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.5);
}

.age-options,
.condition-options,
.submit-action {
  display: none;
}

.form-overlay {
  position: fixed;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 9999;
  background-color: rgba(0, 0, 0, 0.6);
  display: none;
  transition-duration: 0.3s;
  -webkit-transition-duration: 0.3s;
  animation-duration: 0.3s;
  -webkit-animation-duration: 0.3s;
}

.form-overlay.show {
  display: block;
}

.form-container {
  position: fixed;
  bottom: -100%;
  left: 0;
  width: 100%;
  z-index: 99999;
  background-color: #ffffff;
  border-radius: 20px 20px 0 0;
  transition-duration: 0.3s;
  -webkit-transition-duration: 0.3s;
  animation-duration: 0.3s;
  -webkit-animation-duration: 0.3s;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.form-container.show {
  bottom: 0;
}

.form-container form {
  padding: 1.5rem;
}

.form-container form input {
  width: 100%;
  display: block;
  margin: 0 auto;
  color: #444;
  font-size: 1.111rem;
  line-height: 1.5;
  padding: 14px 12px;
  border-bottom: 2px solid #ebedf0;
  margin-bottom: 1%;
  margin-top: 3%;
  transition: border-color 0.3s ease;
}

.form-container form input:focus {
  border-bottom-color: #086bd6;
}

.form-container form input[type="submit"] {
  background: #086bd6;
  width: 90%;
  margin: 20px 5% 10px;
  padding: 16px;
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 25px;
  -webkit-font-smoothing: antialiased;
  font-size: 1.278rem;
  font-weight: 600;
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
  transition: all 0.3s ease;
}

.form-container form input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.5);
}

.form-container form input[type="submit"]:active {
  transform: translateY(0);
}

.form-container strong {
  color: #ff4757;
  font-size: 1rem;
  padding: 3%;
  display: block;
  font-weight: 600;
}

.form-container .hide-btn {
  padding: 14px;
  color: #666;
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  font-size: 1.111rem;
  border-top: #f5f5f5 5px solid;
  -webkit-font-smoothing: antialiased;
  cursor: pointer;
  transition: color 0.3s ease;
}

.form-container .hide-btn:hover {
  color: #333;
}

.loading {
  height: 100px;
  width: 100px;
  position: fixed;
  left: 50%;
  top: 50%;
  margin-left: -50px;
  margin-top: -50px;
  z-index: 999;
  background: rgba(0, 0, 0, 0.7);
  text-align: center;
  color: #fff;
  font-size: 0.944rem;
  border-radius: 12px;
  display: none;
  backdrop-filter: blur(10px);
}

.loading.show {
  display: block;
}

.spinner {
  width: 20px;
  height: 20px;
  margin: 30px 40px 15px;
  position: relative;
}

.container1 > div,
.container2 > div,
.container3 > div {
  width: 6px;
  height: 6px;
  background-color: #fff;
  border-radius: 100%;
  position: absolute;
  -webkit-animation: bouncedelay 1.2s infinite ease-in-out;
  animation: bouncedelay 1.2s infinite ease-in-out;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}

.spinner .spinner-container {
  position: absolute;
  width: 100%;
  height: 100%;
}

.container2 {
  -webkit-transform: rotateZ(45deg);
  transform: rotateZ(45deg);
}

.container3 {
  -webkit-transform: rotateZ(90deg);
  transform: rotateZ(90deg);
}

.circle1 {
  top: 0;
  left: 0;
}
.circle2 {
  top: 0;
  right: 0;
}
.circle3 {
  right: 0;
  bottom: 0;
}
.circle4 {
  left: 0;
  bottom: 0;
}

.container2 .circle1 {
  -webkit-animation-delay: -1.1s;
  animation-delay: -1.1s;
}
.container3 .circle1 {
  -webkit-animation-delay: -1s;
  animation-delay: -1s;
}
.container1 .circle2 {
  -webkit-animation-delay: -0.9s;
  animation-delay: -0.9s;
}
.container2 .circle2 {
  -webkit-animation-delay: -0.8s;
  animation-delay: -0.8s;
}
.container3 .circle2 {
  -webkit-animation-delay: -0.7s;
  animation-delay: -0.7s;
}
.container1 .circle3 {
  -webkit-animation-delay: -0.6s;
  animation-delay: -0.6s;
}
.container2 .circle3 {
  -webkit-animation-delay: -0.5s;
  animation-delay: -0.5s;
}
.container3 .circle3 {
  -webkit-animation-delay: -0.4s;
  animation-delay: -0.4s;
}
.container1 .circle4 {
  -webkit-animation-delay: -0.3s;
  animation-delay: -0.3s;
}
.container2 .circle4 {
  -webkit-animation-delay: -0.2s;
  animation-delay: -0.2s;
}
.container3 .circle4 {
  -webkit-animation-delay: -0.1s;
  animation-delay: -0.1s;
}

@-webkit-keyframes bouncedelay {
  0%,
  80%,
  100% {
    -webkit-transform: scale(0);
  }
  40% {
    -webkit-transform: scale(1);
  }
}

@keyframes bouncedelay {
  0%,
  80%,
  100% {
    transform: scale(0);
    -webkit-transform: scale(0);
  }
  40% {
    transform: scale(1);
    -webkit-transform: scale(1);
  }
}

.message-dialog {
  height: 100%;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  font-size: 1.333rem;
  background-color: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.message-dialog.show {
  display: flex;
}

.message-inner {
  position: absolute;
  width: 90%;
  max-width: 640px;
  margin: 0 auto;
  background-color: rgba(255, 255, 255, 1);
  border-radius: 16px;
  box-sizing: border-box;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.message-inner .msg-top,
.message-inner span {
  text-align: center;
}

.message-inner .msg-top {
  padding: 1.5rem;
  border-bottom: #ebedf0 1px solid;
  font-size: 1.278rem;
  color: #444;
}

.message-inner .msg-top em {
  display: block;
  font-style: normal;
}

.message-inner .msg-top em:nth-child(2) {
  color: #999;
  font-size: 0.944rem;
  margin: 0.6rem 0;
}

.message-inner .msg-top i {
  font-style: normal;
  display: inline;
  margin: 0;
  width: auto;
}

.message-inner .msg-top p {
  margin: 0.5rem 0 0.1rem;
  position: relative;
}

.message-inner .msg-top p input {
  width: 100%;
  font-size: 0.944rem;
  padding: 0.6rem 0;
  border-bottom: #ebedf0 1px solid;
}

.message-inner .msg-btn {
  padding: 0.875rem;
  color: #667eea;
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-weight: 600;
}

.message-inner .msg-btn:hover {
  background-color: #f5f5f5;
}

.message-inner .msg-btn.hide {
  display: none;
}

.disabled {
  background: #ccc !important;
  border: #ccc 1px solid !important;
  cursor: not-allowed !important;
}

input.error {
  border-color: #ff4757 !important;
}

label.error {
  color: #ff4757;
  display: block;
  margin: 0 auto;
  text-align: left;
  font-size: 0.944rem;
}

.head-nav {
  background: #086bd6;
  width: 100%;
  display: inline-block;
  color: #ffffff;
  font-size: 0.889rem;
  padding: 8px 0;
  text-align: center;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.copyright {
  width: 100%;
  text-align: center;
  font-size: 0.833rem;
  color: #ccc;
  position: fixed;
  bottom: 4px;
  left: 0;
}

@media screen and (max-width: 480px) {
  html {
    font-size: 16px;
  }

  body {
    font-size: 1rem;
  }

  .message-bubble {
    font-size: 1.111rem;
    margin: 4px 8px 0 8px;
  }

  .message-left div,
  .message-right div {
    font-size: 0.944rem;
    padding: 10px 12px;
    border-radius: 10px;
  }

  .action-buttons {
    padding: 12px 4px;
    bottom: 0.4rem;
  }

  .action-buttons a,
  .action-buttons button {
    font-size: 1rem;
    padding: 12px 16px;
    margin: 3px 1.5%;
    border-radius: 10px;
    min-height: 44px;
  }

  .primary-action button {
    font-size: 1.278rem;
    padding: 14px 0;
  }

  .age-options button {
    font-size: 0.944rem;
    padding: 12px 8px;
  }

  .condition-options button {
    font-size: 0.889rem;
    padding: 10px 6px;
    margin: 3px 1%;
  }

  .submit-action button { 
    font-size: 1.278rem;
    padding: 14px 0;
  }

  .form-container form input {
    font-size: 1rem;
    padding: 12px 10px;
  }

  .form-container form input[type="submit"] {
    font-size: 1.111rem;
    padding: 14px;
  }

  .form-container strong {
    font-size: 0.944rem;
  }

  .message-inner {
    width: 85%;
  }

  .message-inner .msg-top {
    font-size: 1.111rem;
    padding: 1.25rem;
  }
}

@media screen and (max-width: 360px) {
  html {
    font-size: 15px;
  }

  .action-buttons a,
  .action-buttons button {
    font-size: 0.944rem;
    padding: 10px 12px;
    min-height: 40px;
  }

  .primary-action button {
    font-size: 1.111rem;
  }

  .condition-options button {
    font-size: 0.833rem;
    padding: 8px 4px;
  }
}

@media screen and (orientation: landscape) and (max-height: 500px) {
  .action-buttons {
    bottom: 0.2rem;
    padding: 8px 4px;
  }

  .action-buttons a,
  .action-buttons button {
    padding: 10px 14px;
    margin: 2px 1%;
    min-height: 40px;
  }
}
