body {
	font-family: 'PT Sans', sans-serif;
	background-color: #f4f4f4;
	margin: 0;
	padding: 0;
	display: flex;
	justify-content: center; /* Центрируем по горизонтали */
}

h3.title {
	font-weight:100;
	font-size:16px;
	color:#999;
	padding-top:10px;
	margin:0px;
}

h1.title {
	font-size:21px;
	font-weight:100;
	color:#555;
	padding:10px 0px;
	margin:0px;
}

.game-container {
	background: #f4f4f4;
	padding: 0px;
	margin-top: 0px; /* Отступ сверху */
	/*border-radius: 10px;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);*/
	text-align: center;
	width: 700px;
}

.score-wrap{
  height: 40px;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom:10px
}

#buttons-container {
	display: flex;
	gap: 10px;
	height: 45px;
	width: 350px; /* Контейнер занимает всю ширину */
	justify-content: center;   /* горизонтальный центр */
	align-items: center;       /* вертикальный центр (если нужно) */	
}

button {
	flex: 1; /* Каждая кнопка занимает равное пространство */
	margin: 0;
	padding: 10px 20px;
	font-size: 16px;
	cursor: pointer;
	border: none;
	border-radius: 5px;
	background: #007BFF;
	color: white;
	text-align: center;
	max-width:250px;
	height:45px;
}

.buttonEnd {
	flex: 1; /* Каждая кнопка занимает равное пространство */
	margin: 0;
	padding: 10px 20px;
	font-size: 16px;
	cursor: pointer;
	border: none;
	border-radius: 5px;
	background: #777;
	color: white;
	text-align: center;
	max-width:500px;
}

.btn-negative{
  background-color: #111;
  color: #fff;
}

.btn-positive{
  background-color: #2FA4F7;
  color: #fff;
}

/* по умолчанию скрыта, как было inline */
.btn-next{
  max-width: 510px;
  height: 45px;
  display: none;
}

.btn-next-pos {
	background: #060;
}

.btn-next-neg {
	background: red;
}

.feedback-wrap{
  height: 70px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#quote {
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.5s ease;
	color:#777;	
}

#quote.visible {
	visibility: visible;
	opacity: 1;
}

#feedback {
	font-weight: 100;
	margin: 20px 0;
}

#numQ {
	display:none
}

#name {
	font-size:28px;
	line-height: 45px
}

#role, #nickname {
	font-size:16px;
	color:#777;
	line-height: 22px
}

#textBlock {
	height:110px
}

p.q_text {
	font-size:16px;
}

#photo-container {
  position: relative;     /* ВОТ ЭТО КЛЮЧ */
  overflow: hidden;       /* чтобы overlay не вылезал */
  margin: 10px auto 20px;
  width: 350px;
  height: 350px;
  text-align: center;
}

#photo-placeholder {
	background-color: #eee;
	width: 350px;
	height: 350px;
	border-radius: 10px;
	margin-bottom: 10px;
	display: flex;
	justify-content: center;
	color: #666;
	font-size: 14px;
	text-align: center;
}

#photo {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;   /* или contain */
  border-radius: 10px;
}

.correct {
	color: #060; /* Зеленый цвет для правильного ответа */
	font-weight: bold;
}

.incorrect {
	color: red; /* Красный цвет для неправильного ответа */
	font-weight: bold;
}

.badge {
  display: none;            /* скрыт */
}

.badge:not(:empty) {
  display: inline-block;
  background-color: #aaa;
  color: #fff;
  padding: 4px 10px;      /* создаёт "капсулу" вокруг текста */
  border-radius: 999px;   /* делает плавный скруглённый овал */
  font-size: 14px;
  font-weight: 100;
  line-height: 1;
  margin-top:20px
  
}

.dots {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;   /* ← центрируем кружочки */
  max-width: 600px;
  margin: 20px auto;         /* ← центрирование всего блока */
}

.dot {
  width: 10px;
  height: 10px;
  background-color: #ccc;   /* серый — по умолчанию */
  border-radius: 50%;
  display: inline-block;
  transition: background 0.3s;
}

/* цвета по состоянию */
.dot.correct {
  background-color: #4CAF50; /* зелёный */
}

.dot.wrong {
  background-color: #ff4444; /* красный */
}

.dot.current {
  background-color: #ccc;  /* тёмно-серый */
}

.muted{
  color: #999;
}

button {
	user-select: none;
	-webkit-user-select: none;   /* Safari / iOS */
	-ms-user-select: none;       /* старые Edge */
}

.photo-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;     /* должно совпадать с #photo */
  border-radius: 10px;
  opacity: 0;
  transition: opacity 1s linear;
  pointer-events: none;
}

/* Z-печать поверх фото */
.z-stamp{
  position: absolute;
  right: 20px;
  bottom: 10px;
  z-index: 3;              /* выше overlay картинки */
  font-weight: 900;
  font-size: 54px;
  line-height: 1;
  color: rgba(255,255,255,0.75);
  text-shadow: 0 2px 8px rgba(0,0,0,0.45);
  opacity: 0;
  transform: translateY(6px) scale(0.58);
  transition: opacity 1s linear, transform 1s linear;
  pointer-events: none;
  user-select: none;
}

.share-score {
	font-size: 24px;
	color: #777;
}

#shareBlock {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 12px;
	text-align: center;
	width: 100%;
}

.share-actions {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	width: 100%;
}

.share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0 12px;
	border-radius: 10px;
	text-decoration: none;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	border: none;
	cursor: pointer;
	background: #666;
	white-space: nowrap;
	box-sizing: border-box;
	max-width: none;
}

.share-native {
	background: #666;
}

.share-facebook {
	background: #1877f2;
}

.share-x {
	background: #111;
}

.share-telegram {
	background: #229ED9;
}

.share-whatsapp {
	background: #25D366;
}

.footer a{
	color:#777;
}

.footer {
	color:#777;
	padding: 20px;
	border-top: 1px solid #ccc;
	text-align: center;
	font-size: 14px;
}

#quoteBlock{
  background: #eee;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 10px auto;
  width: 100%;
  box-sizing: border-box;
}

#quoteBlock p{
  margin: 16px 0;
}

#quoteBlock:empty{
  display:none;
}

body.modal-open {
	overflow: hidden;
}

.share-modal {
	position: fixed;
	inset: 0;
	display: none;
	z-index: 9999;
}

.share-modal.is-open {
	display: block;
}

.share-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.share-modal-dialog {
	position: absolute;
	top: 24px;
	left: 50%;
	transform: translateX(-50%);
	width: calc(100% - 32px);
	max-width: 600px;
	background: #fff;
	border-radius: 18px;
	padding: 22px 18px 18px;
	box-sizing: border-box;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
	animation: shareModalIn 0.22s ease-out;
}

@keyframes shareModalIn {
	from {
		opacity: 0;
		transform: translateX(-50%) translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateX(-50%) translateY(0);
	}
}

.share-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 34px;
	height: 34px;
	border: none;
	border-radius: 50%;
	background: #eee;
	color: #444;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	box-shadow: none;
	max-width: none;
}

.share-close:active {
	transform: scale(0.96);
}

.restart-modal-btn {
	margin-top: 10px;
	display: block;
	width: 80%;
	max-width: none;
	box-sizing: border-box;
	min-height: 44px;
	color: #fff;
	border: none;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.restart-modal-btn:active {
	width:100%
}

.confetti-layer {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	z-index: 10000;
}

.confetti-piece {
	position: absolute;
	top: -20px;
	width: 10px;
	height: 16px;
	opacity: 0.95;
	border-radius: 2px;
	will-change: transform, opacity;
	animation-name: confettiFall;
	animation-timing-function: linear;
	animation-fill-mode: forwards;
}

.confetti-piece.is-round {
	width: 10px;
	height: 10px;
	border-radius: 50%;
}

@keyframes confettiFall {
	0% {
		transform: translate3d(0, -20px, 0) rotate(0deg);
		opacity: 0;
	}
	10% {
		opacity: 1;
	}
	100% {
		transform: translate3d(var(--drift-x), 110vh, 0) rotate(var(--rotate-end));
		opacity: 0;
	}
}

.reward-video-wrap {
	margin-top: 24px;
	width: 100%;
	text-align: center;
}

.reward-video-title {
	font-size: 16px;
	font-weight: 600;
	color: #444;
	margin-bottom: 10px;
}

.reward-video-box {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: 12px;
	overflow: hidden;
	background: #ddd;
}

.reward-video-box iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.share-modal-title {
	font-size: 18px;
	font-weight: 300;
	color: #444;
	padding-top:12px;
	padding-bottom:20px;
}

.share-title {
	font-size: 14px;
	font-weight: 100;
	color: #999;
	padding-top:20px
}

.share-modal-prize {
	margin-top: 10px;
	text-align: center;
	width: 100%;
	font-size: 14px;
	font-weight: 100;
	line-height: 30px;
	color: #999
}

.share-modal-prize a{
	color:#999
}

.share-score {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;

	background: #f0f0f0;
	border-radius: 14px;

	padding: 14px 20px;

	box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);

	min-width: 160px;
}

.share-score-value {
	font-size: 16px;
	color: #555;
	line-height: 1.2;
}

.share-score-percent {
	font-size: 26px;
	font-weight: 700;
	color: #222;
	line-height: 1.2;
	margin-top: 2px;
}

.score-bad {
	background: #ffe5e5;
}

.score-mid {
	background: #fff4d6;
}

.score-good {
	background: #e6f0ff;
}

.score-perfect {
	background: #e7f6ec;
}