/**
 * Reflex Test — interfața probelor.
 * Bara de sus, ecranul final și butoanele vin din core.css.
 *
 * Regulile care stilează butoane sunt prefixate cu `.gh-game`, ca să aibă două
 * clase. Resetul din core.css este `.gh-game button`, adică (0,1,1), și altfel
 * le-ar suprascrie fundalul și colțurile.
 */

/* ---- Cronometru ---- */

.rx-timer {
	height: 6px;
	border-radius: 999px;
	background: var(--gh-panel);
	overflow: hidden;
}

.rx-timer-fill {
	display: block;
	width: 0;
	height: 100%;
	border-radius: 999px;
	background: var(--gh-accent);
	transition: width .08s linear;
}

.rx-timer.is-low .rx-timer-fill {
	background: var(--gh-danger);
}

/* ---- Terenul ---- */

.rx-area {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	height: 400px;
	max-height: 56vh;
	max-height: 56svh;
	padding: 14px;
	border-radius: 16px;
	background: var(--gh-panel);
	box-shadow: var(--gh-shadow);
	overflow: hidden;
}

/* ---- Carduri (intro, rezultat, start) ---- */

.rx-card {
	position: absolute;
	inset: 0;
	z-index: 8;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 24px 20px;
	border-radius: 16px;
	background: var(--gh-panel);
	text-align: center;
}

.rx-card[hidden] { display: none; }

.rx-card-kicker {
	color: var(--gh-muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.rx-card-title {
	font-size: 26px;
	font-weight: 800;
	line-height: 1.15;
}

.rx-card-hint {
	max-width: 260px;
	color: var(--gh-muted);
	font-size: 14px;
}

.rx-card-score {
	color: var(--gh-accent);
	font-size: 46px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.gh-game .rx-start { margin-top: 12px; }

/* ---- Proba: reacție ---- */

.gh-game .rx-panel {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	border-radius: 14px;
	font-size: 28px;
	font-weight: 800;
	color: #fff;
	transition: background .06s linear;
}

.gh-game .rx-wait  { background: #3a4270; }
.gh-game .rx-go    { background: #23c162; }
.gh-game .rx-hit   { background: #2f7de0; }
.gh-game .rx-early { background: #d13a48; }

/* ---- Proba: tap rapid ---- */

.rx-big {
	font-size: 54px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.gh-game .rx-tap {
	display: grid;
	place-items: center;
	width: min(190px, 62%);
	aspect-ratio: 1;
	border-radius: 50%;
	background: var(--gh-accent);
	color: var(--gh-accent-text);
	font-size: 22px;
	font-weight: 800;
	letter-spacing: .04em;
}

.gh-game .rx-tap.is-hit { animation: rx-punch .12s ease; }

@keyframes rx-punch {
	from { transform: scale(.9); }
	to   { transform: scale(1); }
}

/* ---- Proba: ținta ---- */

.gh-game .rx-target {
	position: absolute;
	border-radius: 50%;
	background: radial-gradient(circle at 34% 30%, #ffd76a, #f08a1c);
	box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
	animation: rx-in .12s ease both;
}

@keyframes rx-in {
	from { transform: scale(.6); opacity: 0; }
	to   { transform: scale(1); opacity: 1; }
}

/* ---- Proba: numără punctele ---- */

.rx-dots {
	position: relative;
	width: 100%;
	height: 62%;
	border-radius: 12px;
	background: var(--gh-panel-2);
	transition: opacity .15s ease;
}

.rx-dots.is-hidden { opacity: 0; }

.rx-dot {
	position: absolute;
	width: 16px;
	height: 16px;
	margin: -8px 0 0 -8px;
	border-radius: 50%;
	background: var(--gh-accent);
}

.rx-answers {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
	width: 100%;
}

.rx-answers[hidden] { display: none; }

.gh-game .rx-answer {
	padding: 16px 0;
	border-radius: 12px;
	background: var(--gh-panel-2);
	font-size: 20px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.gh-game .rx-answer.is-good { background: #23c162; color: #06210f; }
.gh-game .rx-answer.is-bad  { background: #d13a48; color: #fff; }

/* ---- Proba: Stroop ---- */

.rx-word {
	font-size: 42px;
	font-weight: 900;
	letter-spacing: .04em;
}

.rx-swatches {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	width: 100%;
}

.gh-game .rx-swatch {
	height: 62px;
	border-radius: 14px;
	transition: transform .1s ease;
}

.gh-game .rx-swatch.is-good { transform: scale(1.08); box-shadow: 0 0 0 3px #fff inset; }
.gh-game .rx-swatch.is-bad  { transform: scale(.9); opacity: .5; }

/* ---- Proba: memorie ---- */

.rx-status {
	color: var(--gh-muted);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	min-height: 18px;
}

.rx-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	width: min(260px, 78%);
	aspect-ratio: 1;
}

.gh-game .rx-tile {
	border-radius: 16px;
	opacity: .45;
	transition: opacity .09s linear, transform .09s linear;
}

.gh-game .rx-tile--0 { background: #e8414a; }
.gh-game .rx-tile--1 { background: #3d8bfd; }
.gh-game .rx-tile--2 { background: #2fbc63; }
.gh-game .rx-tile--3 { background: #e8b52a; }

.gh-game .rx-tile.is-lit {
	opacity: 1;
	transform: scale(1.04);
}

/* ---- Proba: evită roșul ---- */

.gh-game .rx-blob {
	position: absolute;
	border-radius: 50%;
	background: radial-gradient(circle at 34% 30%, #7ef0a4, #23a75c);
	animation: rx-in .1s ease both;
}

.gh-game .rx-blob.is-bad {
	border-radius: 12px;
	background: linear-gradient(160deg, #ff7b84, #cf2c3a);
}

.gh-game .rx-blob.is-right { transform: scale(1.25); opacity: .25; }
.gh-game .rx-blob.is-wrong { transform: scale(.7); opacity: .25; }

/* ---- Detaliere pe probe, în ecranul final ---- */

.rx-breakdown {
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
	font-size: 13px;
}

.rx-breakdown li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 4px 0;
	border-bottom: 1px solid rgba(255, 255, 255, .12);
	opacity: .85;
}

.rx-breakdown li:last-child { border-bottom: 0; }

.rx-breakdown b { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
	.gh-game .rx-target,
	.gh-game .rx-blob,
	.gh-game .rx-tap.is-hit { animation: none; }
}
