#quiz-container {
  font-family: 'Segoe UI', sans-serif;
  max-width: 660px;
  margin: 32px auto;
  padding: 28px 22px 24px 22px;
  border-radius: 14px;
  background-color: #f9f9f9;
  box-shadow: 0 8px 22px rgba(0,0,0,0.06);
  text-align: center;
}

.quiz-title {
  text-align: center;
  color: #333;
}

.quiz-info,
.quiz-meta {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.quiz-meta {
  background: #e3f2fd;
  padding: 10px 20px;
  border-radius: 12px;
  display: inline-block;
  margin-bottom: 16px;
  font-size: 1.08em;
  font-weight: 500;
  color: #2c3e50;
}

.quiz-progress {
  margin-bottom: 18px;
  text-align: center;
}
.quiz-progress-text {
  font-size: 1em;
  margin-bottom: 6px;
  color: #1976d2;
  font-weight: 600;
}
.quiz-progress-bar {
  background: #f1f1f1;
  height: 14px;
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
  box-shadow: 0 0 4px #ccc inset;
  margin: 0 auto 8px auto;
  max-width: 480px;
}
.quiz-progress-fill {
  background: linear-gradient(90deg, #42a5f5, #007acc 78%, #005fa3);
  height: 100%;
  width: 0;
  transition: width 0.35s cubic-bezier(.4,2,.2,1);
  border-radius: 8px 0 0 8px;
}

.quiz-question-block {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 14px rgba(44, 62, 80, 0.07);
  padding: 28px 20px 22px 20px;
  margin-bottom: 24px;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.quiz-question {
  font-size: 1.15em;
  font-weight: 600;
  margin-bottom: 18px;
  color: #263238;
  background-color: #e3f2fd;
  padding: 20px;
  border-radius: 10px;
  margin-left: auto;
  margin-right: auto;
}

.quiz-answers {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

/* Цветовые квадраты — ровно по 3 в ряд с grid */
.quiz-answers-color {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  justify-items: center;
  margin-bottom: 10px;
  width: 100%;
  max-width: 330px;
  margin-left: auto;
  margin-right: auto;
}

.quiz-color-choice {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 10px rgba(44,62,80,0.10);
  cursor: pointer;
  transition: border 0.18s, box-shadow 0.18s, transform 0.12s;
  outline: none;
  margin: 0;
  display: block;
  box-sizing: border-box;
  background-clip: padding-box;
}

.quiz-color-choice:hover,
.quiz-color-choice:focus {
  border: 2.5px solid #1976d2;
  box-shadow: 0 4px 18px rgba(33,150,243,0.18);
  transform: scale(1.09);
}

@media (max-width: 600px) {
  .quiz-answers-color {
    max-width: 190px;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
  }
  .quiz-color-choice {
    width: 44px;
    height: 44px;
    border-radius: 7px;
  }
}

/* Классические кнопки-ответы */
.quiz-answer {
  font-size: 1.05em;
  background: #007acc;
  border: none;
  border-radius: 10px;
  padding: 16px 0;
  width: 93%;
  cursor: pointer;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(0,123,204,0.13), 0 1.5px 3px #e3f2fd;
  margin-bottom: 5px;
  transition: background 0.16s, color 0.16s, box-shadow 0.16s;
  letter-spacing: 0.03em;
}
.quiz-answer:hover {
  background: #005fa3;
  color: #fff;
  box-shadow: 0 8px 26px rgba(0,123,204,0.20);
}

.quiz-back {
  margin-top: 26px;
  background: none;
  color: #007acc;
  border: 1.5px solid #e3f2fd;
  padding: 9px 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1em;
  font-weight: 500;
  transition: border 0.16s, color 0.16s, background 0.16s;
}
.quiz-back:hover {
  border: 1.5px solid #1976d2;
  color: #fff;
  background: #1976d2;
}

.quiz-final {
  max-width: 550px;
  background: #f5faff;
  padding: 28px 20px;
  border-radius: 18px;
  margin: 0 auto;
  box-shadow: 0 2px 10px rgba(44, 62, 80, 0.06);
  text-align: center;
}

.quiz-result {
  font-size: 1.18em;
  color: #00796b;
  font-weight: 700;
}

.quiz-share {
  margin-top: 25px;
  font-size: 17px;
  text-align: center;
}
.quiz-share p {
  margin-bottom: 12px;
}
.share-btn {
  margin: 5px;
  display: inline-block;
  background-color: #ffffff;
  color: #333;
  padding: 11px 17px;
  border-radius: 8px;
  border: 1px solid #ccc;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  transition: all 0.18s;
}
.share-btn img {
  height: 21px;
  vertical-align: middle;
  margin-right: 6px;
}
.share-btn:hover {
  background-color: #007acc;
  color: #fff;
  border-color: #007acc;
}

.quiz-subscribe {
  margin-top: 30px;
  font-size: 17px;
  background: linear-gradient(to right, #e0f7fa, #e3f2fd 78%);
  padding: 20px 16px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}
.quiz-subscribe p {
  margin: 13px 0;
}
.quiz-subscribe a {
  color: #0066cc;
  font-weight: 600;
  text-decoration: underline;
}
.quiz-subscribe a:hover {
  text-decoration: none;
}

.quiz-subscribe a[rel~="nofollow"] {
  color: #0066cc;
}

@media (max-width: 800px) {
  #quiz-container {
    max-width: 98vw;
    padding: 8vw 1vw;
  }
  .quiz-final, .quiz-question-block {
    max-width: 98vw;
    padding-left: 1vw;
    padding-right: 1vw;
  }
  .quiz-progress-bar {
    max-width: 98vw;
  }
}

.quiz-passed-count {
  font-size: 1.08em;
  color: #1976d2;
  background: #e3f2fd;
  border-radius: 8px;
  padding: 8px 18px;
  margin-bottom: 18px;
  display: inline-block;
  font-weight: 500;
}