html {
	scrollbar-gutter: stable both-edges;
}

.versus-page-title {
	text-align: center;
	letter-spacing: 1.5vw;
	font-family: 'system-ui';
	text-transform: uppercase;
	margin: 0;
	padding: 4vh 0;
	box-shadow: 0 5px 10px rgba(0,0,0,0.3);
	background: #fff;
}

.versus-main {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 30px 20px;
	gap: 28px;
	min-height: 70vh;
	background-color: rgba(210, 215, 217, 0.75);
}

.versus-back {
	align-self: flex-start;
	font-family: 'system-ui';
	font-size: 0.9em;
	color: #3d4449;
	text-decoration: none;
	opacity: 0.65;
	letter-spacing: 1px;
}
.versus-back:hover { opacity: 1; }

/* ── Historial horizontal ── */
.versus-score {
	width: 100%;
	max-width: 680px;
	min-width: 0;
	box-sizing: border-box;
	background: white;
	border-radius: 10px;
	padding: 12px 16px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.versus-score-title {
	font-family: 'system-ui';
	font-size: 0.78em;
	text-transform: uppercase;
	letter-spacing: 2px;
	color: #888;
	margin-bottom: 8px;
}
.versus-history-grid {
	display: grid;
	grid-template-columns: repeat(10, minmax(0, 1fr));
	grid-template-rows: auto auto;
	gap: 3px 5px;
	text-align: center;
}
.versus-history-num {
	font-family: 'system-ui';
	font-size: 0.7em;
	color: #aaa;
	line-height: 1.4;
}
.versus-history-dot {
	width: 100%;
	max-width: 28px;
	aspect-ratio: 1;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	font-size: 0.85em;
	margin: 0 auto;
}
.versus-history-dot.correct { background: #BAEC67; color: #3d4449; }
.versus-history-dot.wrong   { background: #FF4D4D; color: white; }
.versus-history-dot.empty   { background: #e8e8e8; }

/* ── Arena ── */
.versus-arena {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	width: 100%;
}
.versus-question {
	font-family: 'system-ui';
	font-size: 1.3em;
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: 2px;
	color: #3d4449;
	text-align: center;
}
.versus-cards {
	display: flex;
	align-items: flex-start;
	gap: 18px;
	flex-wrap: wrap;
	justify-content: center;
}
.versus-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	background: white;
	border-radius: 12px;
	padding: 16px;
	width: 240px;
	box-sizing: border-box;
	box-shadow: 0 2px 10px rgba(0,0,0,0.12);
	border: 3px solid transparent;
}
.versus-card-link {
	text-decoration: none;
	color: #3d4449;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.versus-card-link:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 24px rgba(0,0,0,0.18);
	border-color: #BAEC67;
}
.versus-food-name {
	font-family: 'system-ui';
	font-size: 0.9em;
	font-weight: bold;
	text-align: center;
	color: #3d4449;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	line-height: 1.3;
}
.versus-food-img {
	width: 100%;
	height: 150px;
	object-fit: cover;
	border-radius: 8px;
}
.versus-separator {
	font-family: 'system-ui';
	font-weight: bold;
	font-size: 1.1em;
	color: #3d4449;
	background: #FFE6D4;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(0,0,0,0.15);
	flex-shrink: 0;
	border: 2px solid #3d4449;
	align-self: center;
}

/* ── Botón único Ampliar ── */
.versus-zoom-btn {
	background: white;
	color: #3d4449;
	border: 2px solid #3d4449;
	border-radius: 6px;
	padding: 6px 18px;
	font-size: 0.82em;
	cursor: pointer;
	font-family: 'system-ui';
	letter-spacing: 1px;
	text-transform: uppercase;
	transition: background 0.15s, color 0.15s;
}
.versus-zoom-btn:hover {
	background: #3d4449;
	color: white;
}

/* ── Overlay zoom ── */
.versus-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.92);
	z-index: 1000;
	overflow: hidden;
	cursor: ew-resize;
}
.versus-overlay.open { display: block; }

#versus-overlay-img-a,
#versus-overlay-img-b {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 38vw;
	height: 72vh;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

.versus-overlay-close {
	position: absolute;
	top: 14px;
	right: 18px;
	background: rgba(255,255,255,0.18);
	border: 1px solid rgba(255,255,255,0.4);
	color: white;
	font-size: 1.2em;
	cursor: pointer;
	border-radius: 50%;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}
.versus-overlay-close:hover { background: rgba(255,255,255,0.32); }

.versus-cursor-tip {
	position: fixed;
	pointer-events: none;
	display: none;
	background: rgba(186, 236, 103, 0.92);
	color: #3d4449;
	font-family: 'system-ui';
	font-size: 0.8em;
	font-weight: bold;
	letter-spacing: 1px;
	padding: 5px 13px;
	border-radius: 20px;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(0,0,0,0.35);
	transform: translate(14px, -50%);
	z-index: 1001;
}

.versus-overlay-hint {
	position: absolute;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255,255,255,0.5);
	font-family: 'system-ui';
	font-size: 0.8em;
	letter-spacing: 1px;
	pointer-events: none;
	white-space: nowrap;
}

@media only screen and (max-width: 650px) {
	#versus-overlay-img-a,
	#versus-overlay-img-b {
		width: 44vw;
		height: 60vh;
	}
}

/* ── Resultado ── */
.versus-result-section {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	padding: 24px;
	border-radius: 12px;
	width: 100%;
	max-width: 720px;
	box-sizing: border-box;
}
.versus-result-section .versus-cards {
	flex-wrap: nowrap;
}
.versus-result-section.correct { background: rgba(186,236,103,0.2); border: 3px solid #BAEC67; }
.versus-result-section.wrong   { background: rgba(255,77,77,0.1);   border: 3px solid #FF4D4D; }

.versus-result-msg {
	font-family: 'system-ui';
	font-size: 1.8em;
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: 3px;
	text-align: center;
}
.versus-result-section.correct .versus-result-msg { color: #4a8a00; }
.versus-result-section.wrong   .versus-result-msg { color: #cc0000; }

.versus-card.winner { border-color: #BAEC67; background: #f4fde0; }
.versus-card.loser  { opacity: 0.5; }

.versus-calories {
	font-family: 'system-ui';
	font-size: 1.2em;
	font-weight: bold;
	color: #3d4449;
}
.versus-winner-badge {
	background: #BAEC67;
	color: #3d4449;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 0.78em;
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-family: 'system-ui';
}
.versus-next-btn {
	display: inline-block;
	background: #BAEC67;
	color: #3d4449;
	text-decoration: none;
	font-family: 'system-ui';
	font-weight: bold;
	font-size: 1em;
	text-transform: uppercase;
	letter-spacing: 2px;
	padding: 12px 32px;
	border-radius: 8px;
	box-shadow: 0 3px 8px rgba(0,0,0,0.18);
	transition: background 0.2s ease, transform 0.15s ease;
	border: 2px solid #3d4449;
}
.versus-next-btn:hover { background: #a3dc52; transform: translateY(-2px); }

.versus-error {
	text-align: center;
	color: #3d4449;
	font-family: 'system-ui';
	padding: 40px;
}

.versus-difficulty {
	display: flex;
	gap: 12px;
	justify-content: center;
	align-items: center;
	margin: 16px 0 8px;
}

.versus-diff-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	transition: transform 0.2s;
	line-height: 0;
}

.versus-diff-btn img {
	display: block;
	width: auto;
	height: auto;
	zoom: 0.5;
	filter: brightness(0.6);
	transition: filter 0.2s;
}

.versus-diff-btn span {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #fff;
	font-family: 'system-ui';
	font-weight: bold;
	font-size: 0.8em;
	text-shadow: 0 1px 3px rgba(0,0,0,0.8);
	pointer-events: none;
	line-height: 1;
	white-space: nowrap;
	opacity: 0.5;
	transition: opacity 0.2s;
}

.versus-diff-btn:hover img,
.versus-diff-btn.active img {
	filter: brightness(1);
}

.versus-diff-btn:hover span,
.versus-diff-btn.active span {
	opacity: 1;
}

.versus-diff-btn.active {
	transform: scale(1.1);
}

@media only screen and (max-width: 650px) {
	.versus-main     { padding: 20px 10px; }
	.versus-cards    { flex-direction: column; gap: 10px; }
	.versus-food-img { width: 100%; height: 180px; }
	.versus-card     { width: 85vw; }
	.versus-separator { transform: rotate(90deg); }
	.versus-score        { padding: 8px 6px; }
	.versus-history-grid { gap: 2px; }
	.versus-history-num  { font-size: 0.5em; }
	.versus-history-dot  { font-size: 0.6em; }
}
