body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  height: 100vh;
  background-color: #f0f2f5;
  font-family: sans-serif;
}

.container {
  height: calc(100vh - 80px);
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  background-color: #f7fbff;
}

.header {
  height: 80px;
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 0 200px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 10;
  justify-content: space-between;
}

.header .logo {
  font-size: 25px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

input[type="radio"] {
  display: none;
}

.content-wrapper {
  width: fit-content;
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  align-items: center;
  border-radius: 15px;
  gap: 15px;
}

.content-wrapper .logo {
  width: 50px;
  height: 50px;
}

.content-wrapper .content-title {
  line-height: 1.2;
  text-align: center;
}

.content-wrapper .content-text {
  color: #696969;
}

.content-wrapper .content-text .text-icon {
  width: 12px;
  height: 12px;
}

.start-btn {
  margin-top: 25px;
  padding: 12px 45px;
  font-size: 19px;
  border-radius: 7px;
  background-color: #008942;
  user-select: none;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.start-btn:hover {
  background-color: hsl(149, 97%, 40%);
}

.test-wrapper {
  display: none;
  flex-direction: column;
  text-align: center;
  gap: 10px;
}

.test-wrapper .test-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.test-wrapper .test-main-content {
  width: 400px;
  height: 300px;
  user-select: none;
  margin: 0 auto;
}

.test-wrapper .answers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.test-wrapper .answers .answer {
  cursor: pointer;
  display: flex;
  gap: 5px;
  justify-content: center;
}

.test-wrapper .answers .answer .answer-img {
  max-height: 50px;
}

.result {
  display: none;
  font-size: 30px;
}

.result {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  padding: 40px 20px;
  font-size: 18px;
}

.result-title {
  font-size: 18px;
}

.loading-screen {
  position: fixed;
  inset: 0;
  background: #f7fbff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  flex-direction: column;
}

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

.loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  font-size: 20px;
  color: #333;
}

.progress-container {
  width: 300px;
  height: 18px;
  background-color: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background-color: #008942;
  transition: width 0.03s linear;
}

.spinner {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.6); /* белёсый полупрозрачный фон */
  z-index: 9999;

  display: flex;
  justify-content: center;
  align-items: center;
}

.spinner::after {
  content: "";
  width: 50px;
  height: 50px;
  border: 6px solid #ccc;
  border-top-color: #008942;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner.hidden {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


.time-over.hidden {
  display: none;
}

.time-over {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.time-over-text {
  font-size: 28px;
  font-weight: bold;
}


#unlock-btn {
  background-color: #008942;
  color: white;
  padding: 4px 8px;
  font-size: 13px;
  margin-left: 5px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}
#unlock-btn:hover {
  background-color: hsl(149, 97%, 40%);
}

.iq-chart img {
  max-width: 100%;
  width: 600px;
  height: auto;
  border: 1px solid #ccc;
  border-radius: 10px;
}

.payment-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.payment-modal.hidden {
  display: none;
}

.payment-modal-inner {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  text-align: center;
}

.payment-modal-inner h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.payment-modal-inner .pay-btn {
  background-color: #008942;
  color: white;
  padding: 10px 20px;
  font-size: 16px;
  margin: 10px auto;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.payment-modal-inner .pay-btn:hover {
  background-color: hsl(149, 97%, 40%);
}

.payment-modal-inner .cancel-btn {
  background: none;
  border: none;
  color: #888;
  margin-top: 10px;
  cursor: pointer;
}

.unlock {
  font-size: 14px;
  color: tomato;
  cursor: pointer;
}

/* Адаптивность */

@media (max-width: 1024px) {
  .header {
      padding: 0 40px;
  }

  .content-wrapper {
      padding: 20px;
  }
}

@media (max-width: 768px) {
  .header {
      padding: 0 20px;
      height: 70px;
  }

  .header .logo {
      font-size: 20px;
  }

  .container {
      height: calc(100vh - 70px);
      padding: 0 10px;
  }

  .content-wrapper {
      width: 100%;
      padding: 15px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      border-radius: 10px;
      gap: 12px;
  }

  .content-wrapper .content-title {
      font-size: 24px;
  }

  .start-btn {
      padding: 8px 20px;
      font-size: 14px;
  }
}

@media (max-width: 480px) {
  .header {
      padding: 0 10px;
      height: 60px;
  }

  .header .logo {
      font-size: 18px;
  }

  .container {
      height: calc(100vh - 60px);
      padding: 0 5px;
  }

  .content-wrapper {
      width: 100%;
      padding: 10px;
      box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
      border-radius: 8px;
      gap: 10px;
  }

  .content-wrapper .content-title {
      font-size: 20px;
  }

  .start-btn {
      padding: 7px 16px;
      font-size: 13px;
  }

  .test-wrapper .test-main-content {
      max-height: 200px;
  }

  .test-wrapper .answers {
      grid-template-columns: repeat(2, 1fr) !important;
  }
}
