:root {
	--max-width: 1080px;
	--aspect-ratio: 9 / 16;
	--letter-ratio-correction: 1 / 12;
}

html, body {
	font-family: 'Segoe UI', sans-serif;
	height: 100%;
	width: 100%;
	width: 100dvw;
	height: 100dvh;
	margin: 0 !important;
	padding: 0 !important;
	/*overflow: hidden;*/
	color: #ffffff;
	background: #242A54;
background: linear-gradient(90deg, rgba(36, 42, 84, 1) 0%, rgba(79, 93, 162, 1) 60%);
}

body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

main::before {
	content: "";
	position: fixed;
	width: 100%;
	height: 100%;
	background-image: url("https://nopasespalabra.cronapias.com/img/bg.svg");
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover; /* o contain si prefieres */
	opacity: 0.25;
	z-index: 0;
}

main {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	margin: 0 !important;
	padding: 0 !important;
	z-index: 0;
}

.page {
	position: relative;
	margin: 0  !important;
	width: min(100dvw, calc(100dvh * var(--aspect-ratio)));
	max-width: var(--max-width);
	aspect-ratio: var(--aspect-ratio);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	z-index: 1;
}

.btn-game {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: 150px;
	aspect-ratio: 1/1;
	border: 4px solid #fff;
	border-radius: 50%;
	background-color: #242a54;
	color: #fff;
	font-weight: 700;
	text-align: center;
	cursor: pointer;
	transition: all 0.2s ease-in-out;
}

.btn-game:hover {
	background-color: #ffffff;
	color: #242a54;
	border-color: #242a54;
}

.btn-game + .btn-game {
	margin-left: 20px;
}

.wordsring-buttons .btn-game {
	width: 100px;
}

.btn-game > img {
	width: 50%;
	height: auto;
	transition: filter 0.3s ease;
	filter: brightness(0) invert(1);
}

.btn-game:hover > img {
	filter: brightness(0);
}

.btn-game > span {
	font-size: 0.9em;
}

.btn-game > img + span { margin-top: 10px; }

.game-title > img {
	width: 100%;
	height: auto;
	margin-bottom: 50px;
}

.page-access .login-form {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.page-access .login-form .login-form-label {
	font-weight: 700;
	font-size: 18px;
	margin-bottom: 10px;
}

.page-access .btn-game {
	width: 80px;
}

.page-access .btn-game > span { margin-top: 5px;}

.page-access .login-form .login-input {
	background-color: #242b54;
	color: #ffffff;
	font-weight: 700;
	font-size: 20px;
	padding: 10px 15px;
	border: 2px solid #ffffff;
	border-radius: 7px;
	margin-bottom: 10px;
}

.page-access .login-form  .login-failed {
	display: block;
	margin-top: 10px;
	margin-bottom: 10px;
	background-color: #cc0000;
	border: 2px solid #7f0000;
	border-radius: 7px;
	padding: 10px 15px;
}

#WordsRing {
	position: relative;
	width: 100%;
	aspect-ratio: 1/1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

#WordsRingLetters {
	position: absolute;
	width: 100%;
	height: 100%;
	margin: auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

#WordsRingLettersItems {
	position: absolute;
	width: 100%;
	height: 100%;
	margin: auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

/* --- Área Central con Controles --- */
#WordsRingCenterArea {
	position: relative;
	width: 65%;
	height: 65%;
	border-radius: 50%;
	background-color: #000;
	border: 4px solid #1a73e8;
	box-shadow: 0 0 30px rgba(26, 115, 232, 0.4);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1;
	cursor: pointer; /* Indica que se puede clicar */
	overflow: hidden;
}

/* --- Letras del Rosco --- */
.wordsring-letter {
	position: absolute;
	color: #ffffff;
	background: #1a73e8;
	border-radius: 50%;
	display: flex;
	justify-content: center;
	align-items: center;
	width: calc(100dvh * var(--aspect-ratio) * var(--letter-ratio-correction));
	aspect-ratio: 1/1;
	border: 2px solid white;
	overflow: hidden;
	opacity: 0;
	transform: scale(0);
	z-index: 2;
}

.wordsring-letter:focus { outline: none; }

.wordsring-letter.show-photo {
	border-color: #7f0000;
}

.wordsring-letter-value {
	font-size: 14px;
	font-weight: bold;
	color: white;
}

@media (min-width: 480px) {
	.wordsring-letter- {
		width: 30px;
		height: 30px;
		font-size: 16px;
	}
}

@media (min-width: 640px) {
	.wordsring-letter- {
		width: 40px;
		height: 40px;
		font-size: 20px;
	}
}

@media (min-width: 800px) {
	.wordsring-letter- {
		width: 50px;
		height: 50px;
		font-size: 24px;
	}
}

@media (min-width: 980px) {
	.wordsring-letter- {
		width: 60px;
		height: 60px;
		font-size: 30px;
	}
}

.wordsring-letter::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	transition: left 0.6s ease-in-out;
	z-index: -1;
}

.wordsring-letter.status-correct::before { background-color: #2ecc71; left: 0; }
.wordsring-letter.status-wrong::before { background-color: #e74c3c; left: 0; }
/*.wordsring-letter.status-skipped::before { background-color: #ffce46; left: 0; }
.wordsring-letter.status-skipped > wordsring-letter-value { color: #000;}*/

.wordsring-letter.active {
	box-shadow: 0 0 20px rgba(255, 255, 255, 0.9);
	animation: ActiveLetterShadow 2s infinite ease-in-out;
}

.wordsring-letter.active::before {
	animation: ActiveLetterShadow 2s infinite ease-in-out;
}



.wordsring-letter.status-pending.active {
	animation: ActiveLetterShadow 2s infinite ease-in-out, ActiveLetterPendingBG 2s infinite ease-in-out;
}

.wordsring-letter.status-wrong.active::before {
	animation: ActiveLetterShadow 2s infinite ease-in-out, ActiveLetterWrongBG 2s infinite ease-in-out;
}

.wordsring-letter.status-skipped.active::before {
	animation: ActiveLetterShadow 2s infinite ease-in-out, ActiveLetterSkippedBG 2s infinite ease-in-out;
}

@keyframes ActiveLetterPendingBG {
	0% { background-color: #8ebaf4; }
	50% { background-color: #1a73e8; }
	100% { background-color: #8ebaf4; }
}

@keyframes ActiveLetterWrongBG {
	0% { background-color: #f8aaa2; }
	50% { background-color: #e74c3c; }
	100% { background-color: #f8aaa2; }
}

@keyframes ActiveLetterSkippedBG {
	0% { background-color: #ffe6a1; }
	50% { background-color: #ffce46; }
	100% { background-color: #ffe6a1; }
}


@keyframes ActiveLetterShadow {
	0% { box-shadow: 0 0 8px rgba(255, 255, 255, 0.5); }
	50% { box-shadow: 0 0 25px rgba(255, 255, 255, 0.95); }
	100% { box-shadow: 0 0 8px rgba(255, 255, 255, 0.5); }
}

.wordsring-letter.animate {
	transition: transform 0.5s ease, opacity 0.5s ease;
}
.wordsring-letter.show { opacity: 1; transform: scale(1); }


.answer-photo {
	display: flex;
	position: relative;
	flex-wrap: wrap;
	flex-direction: row;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.answer-photo > img {
	position: absolute;
	width: 100%;
	height: auto;
}

.answer-photo-modal .modal-body > img {
	width: 100%;
	height: auto;
}

.answer-photo-modal .modal-title { font-weight: 800; color: #000; }

.answer-photo-modal .modal-footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}