body {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  color: #fff;
}

.container {
  max-width: 1230px;
  margin: 30px auto;
  width: 100%;
  box-sizing: border-box;
  overflow: visible; /* <== отключить скрытый скролл внутри */
  border-bottom: 1px solid #d9d9d9; 
  border-left: 1px solid #d9d9d9;
  border-right: 1px solid #d9d9d9;
  border-top: 2px solid #d9d9d9;
  border-radius: 20px;
  padding: 40px 60px;
  background: linear-gradient(180deg, rgba(92, 164, 222, 0) 0%, rgba(92, 164, 222, 0.5) 25%, rgba(92, 164, 222, 0.75) 50%, rgba(92, 164, 222, 0.5) 75%, rgba(92, 164, 222, 0) 100%);
  color: white;
  box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.1), 0 4px 25px rgba(0, 0, 0, 0.3);
}

.hero-button {
  position: relative;
  overflow: hidden; /* важно, чтобы анимация не выходила за пределы */
  z-index: 0;
  /* ✅ Центрирование кнопки внизу контейнера */
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 50px auto 20px auto;
  width: 170px;
  height: 50px;
  border-radius: 10px;
  border-top: 2px solid rgba(217, 217, 217, 0.8);
  border-bottom: 1px solid rgba(217, 217, 217, 0.5);
  border-left: 1px solid rgba(217, 217, 217, 0.8);
  border-right: 1px solid rgba(217, 217, 217, 0.8);
  backdrop-filter: blur(4px);
  box-shadow: 0 11px 5px 0 rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 0.5);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 30px;
  color: #17335d;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s ease;
}

.hero-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: #17335d;
  z-index: 1; /* ФОН */
  transition: width 0.6s ease;
}

.hero-button:hover::before {
  width: 100%;
}

.hero-text {
  font-size: 24px; /* 🔽 уменьшенный размер текста */
  font-weight: 600;
  text-align: center;
  position: relative;
  z-index: 2; /* ТЕКСТ НАД ФОНОМ */
}

.hero-button:hover {
  color: #ffffff; /* ← текст меняет цвет */
}

.fade {
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.fade.visible {
  opacity: 1;
}

.result-hidden {
  visibility: hidden;
  opacity: 0;
  transform: translateY(40px);
}

#result {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  visibility: hidden;
  margin-top: 40px;
}

#result.visible {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.role-card {
  max-width: 1230px;
  margin-top: 0;
  margin-bottom: 8px;
  padding: 10px 30px 30px 30px;
  border-bottom: 1px solid #d9d9d9; 
  border-left: 1px solid #d9d9d9;
  border-right: 1px solid #d9d9d9;
  border-top: 2px solid #d9d9d9;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(92, 164, 222, 0) 0%, rgba(92, 164, 222, 0.5) 25%, rgba(92, 164, 222, 0.75) 50%, rgba(92, 164, 222, 0.5) 75%, rgba(92, 164, 222, 0) 100%);
  color: white;
}

.role-card .combo-title {
  margin-bottom: 0;
  font-weight: 500;
  font-size: 18px;
}

.role-card p {
  margin-top: 4px;
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.4;
}

.bar-chart {
  margin: 25px 0;
}

.bar {
  height: 22px;
  background: rgba(255,255,255,0.2);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
}

.assistant {
  display: flex;
  align-items: center;
  margin-top: 20px;
  background: rgba(255,255,255,0.1);
  padding: 16px;
  border-radius: 16px;
}

.assistant img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  margin-right: 20px;
}

.assistant span {
  font-weight: bold;
  font-size: 16px;
}

#quiz-block h1 {
  display: none;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  height: 100%;
}

#quiz-block.fade-out {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transition: opacity 0.6s ease;
}

.question-block {
  margin-left: 20px; /* отступ слева */
  font-family: 'Montserrat', sans-serif;
  font-size: 24px !important;
  font-weight: 600;
  color: #e9e9e9;
  line-height: 1.4;
  padding-right: 10px;
  padding-left: 10px;
}

.question-block label {
  display: block;
  margin: 4px 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 18px !important;
  font-weight: 300;
  color: #ffffff;
  line-height: 1.4;
}

.question-block input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 10px;
  accent-color: #5CA4DE; /* опционально — задаёт цвет галочки в новых браузерах */
  vertical-align: middle;
}

.bar-inner {
  font-family: var(--font-family);
  height: 100%;
  color: white;
  font-size: 16px;
  font-weight: bold;
  line-height: 28px;
  padding-left: 12px;
  border-radius: 12px;
  background: rgba(0,0,0,0.4);
  width: 0;
  animation: grow-bar 1s ease-out forwards;
  align-items: center; 
  will-change: width;
}

@keyframes grow-bar {
  from {
    width: 0;
  }
  to {
    width: var(--bar-width, 100%);
  }
}

@media (max-width: 360px) {
  .container {
    padding: 20px 20px;
  }

  .question-block {
    font-size: 18px !important;
    margin-left: 10px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .question-block label {
    font-size: 14px !important;
  }

  .hero-button {
    width: 140px;
    height: 44px;
    font-size: 20px;
  }

  .assistant img {
    width: 56px;
    height: 56px;
    margin-right: 12px;
  }

  .assistant span {
    font-size: 14px;
  }

  .role-card {
    padding: 20px 20px;
  }

  .role-card p {
    font-size: 14px;
    line-height: 1.3;
  }

  .bar-inner {
    font-size: 14px;
    padding-left: 8px;
  }
}
