:root {
	--yellow: #ffbe00;
	--red: #ff0052;
	--blue: #0160D1;
	--black: #2f2f39;
	--gray-white: #ffffffbf;
}

.well-wrap {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 400px;
	margin: 0;
}

.well-container {
    background: var(--gray-white);
	margin: 40px 0;
	padding: 40px;
    border-radius: 20px;
    box-shadow: -2px 3px 10px rgba(0, 0, 0, .1);
	width: 100%;
	max-width: 650px;
	text-align: center;
}

.well-wrap h1 {
	color: var(--black);
	margin: 0 0 35px;
	font-size: 28px;
	line-height: 34px;
	font-weight: 400;
}

/* Прогресс-бар */

.progress-wrapper {
	margin: 25px 0;
}

.progress-bg {
	background: #eee;
	height: 16px;
	border-radius: 8px;
	overflow: hidden;
}

#bar {
	width: 0%;
	height: 100%;
	background: var(--yellow);
	transition: width 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

#status-text {
	font-size: 14px;
	color: #666;
	margin-top: 12px;
	min-height: 2.2em;
}

/* Кнопки */

.controls {
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: center;
	margin-top: 20px;
}

.well-wrap button {
	padding: 12px 24px;
	font-size: 14px;
	cursor: pointer;
	border: none;
	border-radius: 4px;
	text-transform: uppercase;
	transition: box-shadow 0.2s ease-in-out;
}

#main-btn {
	background: var(--yellow);
	color: var(--black);
	min-width: 240px;
}

#main-btn:hover {
	box-shadow: 0 0 0 2px #ffd650;
}

#main-btn:disabled {
	background: var(--blue);
	color: #fff;
	cursor: not-allowed;
	box-shadow: none !important;
}

#yes-btn {
	background: var(--yellow);
	color: var(--black);
	margin-right: 8px;
}

#no-btn {
	background: #ddd;
	color: var(--black);
}

#yes-btn:hover {
	box-shadow: 0 0 0 2px #ffd650;
}

#no-btn:hover {
	box-shadow: 0 0 0 2px #d9d9d9;
}

.hidden {
	display: none !important;
}

.error-state #bar {
	background: var(--red);
}

.error-state #status-text {
	color: var(--red);
}

.error-state #main-btn {
	background: var(--red);
	color: #fff;
	opacity: 1 !important;
	filter: none !important;
}

.error-state #main-btn:hover {
    box-shadow: 0 0 0 2px #ffaac4;
}

/* Сертификат */

#cert {
	border: 5px double var(--blue);
	padding: 30px;
	background: var(--gray-white);
	margin-top: 10px;
    position: relative;
    overflow: hidden;
}

#cert:before {
	content: "ПЕЧАТЬ \A СУДЬБЫ";
    white-space: pre-wrap;
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 80px;
    height: 80px;
    border: 3px double var(--blue);
    border-radius: 50%;
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    transform: rotate(-15deg);
    opacity: 0.3;
    line-height: 1.2;
    text-transform: uppercase;
    pointer-events: none;
}

#cert h3 {
	color:var(--blue); 
	margin: 0 0 25px;
}

.achievements-list {
	text-align: left;
	font-size: 14px;
	display: inline-block;
	margin-top: 10px;
}

.randstuff {
	font-size: 12px;
	color: #999;
	margin-top: 20px;
}

#cert-btns {
	margin-top: 20px;
}

#save-btn {
	background: var(--yellow);
	color: var(--black);
	margin-right: 8px;
}

#retry-btn {
	background: #ddd;
	color: var(--black);
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

#save-btn:hover {
	box-shadow: 0 0 0 2px #ffd650;
}

#retry-btn:hover {
	box-shadow: 0 0 0 2px #d9d9d9;
}

/* Адаптив для мобилок */

@media (max-width: 480px) {
	.well-wrap {
		min-height: 300px;
	}

	.well-container {
		padding: 40px 20px;
		width: 95%;
	}

	.well-wrap h1 {
		font-size: 24px;
		line-height: 30px;
	}

	#status-text {
		min-height: 40px;
	}

	#decision-btns,
	#cert-btns {
		flex-direction: column !important;
		width: 100%;
	}

	.well-wrap button {
		width: 100%;
		margin-right: 0 !important;
		margin-bottom: 8px;
		justify-content: center;
	}

	#cert {
		padding: 15px !important;
		width: 100% !important;
		box-sizing: border-box;
	}
}

/* Скачать в ios */

#ios-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.9);
	z-index: 10000;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: white;
	padding: 20px;
	box-sizing: border-box;
}

#ios-overlay img {
	max-width: 100%;
	border: 2px solid var(--blue);
	border-radius: 8px;
}

#ios-overlay p {
	margin-top: 20px;
	font-weight: bold;
	text-align: center;
}

#close-overlay {
	margin-top: 20px;
	background: var(--red);
	color: white;
	padding: 10px 20px;
	border-radius: 5px;
	cursor: pointer;
}