/* ==========================================================================
   Exam Brain Gym — Number Memory Challenge (v1.1 premium 3D redesign)
   All rules are scoped under .ebg-nm-wrapper. Nothing here touches body,
   button, input, h1-h6, p, etc. globally, to avoid theme/page-builder conflicts.
   ========================================================================== */

.ebg-nm-wrapper {
	--ebg-bg: #080B12;
	--ebg-card: #111827;
	--ebg-card-2: #151C2B;
	--ebg-card-3: #1B2436;
	--ebg-text: #F9FAFB;
	--ebg-text-2: #94A3B8;
	--ebg-accent: #8B5CF6;
	--ebg-accent-2: #C084FC;
	--ebg-accent-hover: #7C3AED;
	--ebg-success: #34D399;
	--ebg-warning: #F59E0B;
	--ebg-error: #EF4444;
	--ebg-border: rgba(255, 255, 255, 0.08);

	width: 100%;
	max-width: 1180px;
	margin: 32px auto;
	box-sizing: border-box;
	padding: 0 16px;
	font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--ebg-text);
	-webkit-text-size-adjust: 100%;
	perspective: 1400px;
}

.ebg-nm-wrapper *,
.ebg-nm-wrapper *::before,
.ebg-nm-wrapper *::after {
	box-sizing: border-box;
}

/* Theme heading-color guard -------------------------------------------- */
/* Some themes (Astra and others) set an explicit color on h1-h6 in their
   base stylesheet. Because that's a directly-cascaded value rather than
   an inherited one, it wins over our wrapper's inherited text color even
   though our rules match with a class. This keeps every heading we use
   readable against the dark background regardless of theme. */
.ebg-nm-wrapper h1,
.ebg-nm-wrapper h2,
.ebg-nm-wrapper h3,
.ebg-nm-wrapper h4,
.ebg-nm-wrapper h5,
.ebg-nm-wrapper h6 {
	color: var(--ebg-text) !important;
}

.ebg-nm-wrapper .ebg-nm-noscript {
	background: var(--ebg-card);
	border: 1px solid var(--ebg-border);
	border-radius: 12px;
	padding: 24px;
	text-align: center;
	color: var(--ebg-text-2);
}

/* Panel shell -------------------------------------------------------- */

.ebg-nm-panel {
	max-width: 1050px;
	margin: 0 auto;
	background:
		radial-gradient(120% 140% at 50% -20%, rgba(139, 92, 246, 0.16), transparent 60%),
		linear-gradient(180deg, #0B0F19 0%, var(--ebg-bg) 40%);
	border: 1px solid var(--ebg-border);
	border-radius: 22px;
	padding: 26px;
	position: relative;
	overflow: hidden;
	box-shadow:
		0 30px 70px rgba(0, 0, 0, 0.5),
		inset 0 1px 0 rgba(255, 255, 255, 0.04);
	outline: none;
}

.ebg-nm-panel::before {
	content: "";
	position: absolute;
	top: -140px;
	left: 50%;
	transform: translateX(-50%);
	width: 520px;
	height: 260px;
	background: radial-gradient(closest-side, rgba(139, 92, 246, 0.22), transparent);
	pointer-events: none;
	filter: blur(4px);
}

.ebg-nm-screen {
	position: relative;
	z-index: 1;
	animation: ebg-nm-fade-in 0.4s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes ebg-nm-fade-in {
	from { opacity: 0; transform: translateY(8px) scale(0.99); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Top bar: logo lockup + sound switch ---------------------------------- */

.ebg-nm-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 22px;
	position: relative;
	z-index: 2;
}

.ebg-nm-logo-lockup {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ebg-nm-logo-mark {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 17px;
	background: linear-gradient(145deg, var(--ebg-accent-2), var(--ebg-accent-hover));
	box-shadow:
		0 6px 16px rgba(139, 92, 246, 0.45),
		inset 0 1px 0 rgba(255, 255, 255, 0.35),
		inset 0 -3px 6px rgba(0, 0, 0, 0.25);
	animation: ebg-nm-float 4s ease-in-out infinite;
}

.ebg-nm-logo-text {
	line-height: 1.15;
}

.ebg-nm-logo-title {
	font-size: 14px;
	font-weight: 800;
	letter-spacing: -0.01em;
}

.ebg-nm-logo-sub {
	font-size: 10.5px;
	color: var(--ebg-text-2);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

@keyframes ebg-nm-float {
	0%, 100% { transform: translateY(0) rotate(0deg); }
	50% { transform: translateY(-4px) rotate(-3deg); }
}

/* iOS-style sound switch -------------------------------------------------- */

.ebg-nm-sound-switch {
	display: flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	border: none;
	cursor: pointer;
	color: var(--ebg-text-2);
	font-size: 12.5px;
	font-weight: 600;
}

.ebg-nm-switch-track {
	width: 36px;
	height: 20px;
	border-radius: 999px;
	background: var(--ebg-card-3);
	border: 1px solid var(--ebg-border);
	position: relative;
	transition: background 0.2s ease;
}

.ebg-nm-switch-thumb {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--ebg-text-2);
	transition: transform 0.2s ease, background 0.2s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.ebg-nm-sound-switch[aria-pressed="true"] .ebg-nm-switch-track {
	background: rgba(139, 92, 246, 0.35);
	border-color: var(--ebg-accent);
}

.ebg-nm-sound-switch[aria-pressed="true"] .ebg-nm-switch-thumb {
	background: var(--ebg-accent-2);
	transform: translateX(16px);
}

/* Hero (landing) ------------------------------------------------------- */

.ebg-nm-hero {
	text-align: center;
	max-width: 640px;
	margin: 0 auto;
}

.ebg-nm-hero-mark-wrap {
	position: relative;
	width: 84px;
	height: 84px;
	margin: 4px auto 14px;
}

.ebg-nm-hero-mark-glow {
	position: absolute;
	inset: -30px;
	background: radial-gradient(closest-side, rgba(139, 92, 246, 0.45), transparent 70%);
	filter: blur(6px);
	animation: ebg-nm-pulse-glow 3.2s ease-in-out infinite;
}

@keyframes ebg-nm-pulse-glow {
	0%, 100% { opacity: 0.55; transform: scale(0.94); }
	50% { opacity: 1; transform: scale(1.06); }
}

.ebg-nm-hero-mark {
	position: relative;
	width: 100%;
	height: 100%;
	border-radius: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 38px;
	background: linear-gradient(155deg, #a78bfa, var(--ebg-accent) 55%, var(--ebg-accent-hover));
	box-shadow:
		0 18px 34px rgba(139, 92, 246, 0.4),
		inset 0 2px 0 rgba(255, 255, 255, 0.4),
		inset 0 -6px 12px rgba(0, 0, 0, 0.3);
	animation: ebg-nm-float 4.5s ease-in-out infinite;
	transform-style: preserve-3d;
}

.ebg-nm-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(139, 92, 246, 0.12);
	color: var(--ebg-accent-2);
	border: 1px solid rgba(139, 92, 246, 0.35);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 6px 13px;
	border-radius: 999px;
}

.ebg-nm-title {
	font-size: 30px;
	font-weight: 800;
	letter-spacing: -0.01em;
	margin: 16px 0 2px;
	line-height: 1.18;
}

.ebg-nm-title .ebg-nm-title-accent {
	display: block;
	background: linear-gradient(90deg, var(--ebg-accent-2), var(--ebg-accent));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	filter: drop-shadow(0 0 18px rgba(139, 92, 246, 0.35));
}

@media (min-width: 1024px) {
	.ebg-nm-title { font-size: 36px; }
}

.ebg-nm-subtitle {
	font-size: 17px;
	font-weight: 700;
	color: var(--ebg-text);
	margin: 6px 0 6px;
}

.ebg-nm-supporting {
	font-size: 14px;
	color: var(--ebg-text-2);
	max-width: 460px;
	margin: 0 auto 24px;
	line-height: 1.6;
}

/* Feature cards with 3D hover tilt --------------------------------------- */

.ebg-nm-features {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin-bottom: 24px;
}

@media (max-width: 640px) {
	.ebg-nm-features { grid-template-columns: 1fr; }
}

.ebg-nm-feature-card {
	background: linear-gradient(160deg, var(--ebg-card-2), var(--ebg-card));
	border: 1px solid var(--ebg-border);
	border-radius: 16px;
	padding: 16px;
	text-align: left;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
	transform-style: preserve-3d;
	will-change: transform;
}

.ebg-nm-feature-card:hover {
	border-color: rgba(139, 92, 246, 0.4);
	box-shadow: 0 14px 30px rgba(139, 92, 246, 0.18);
}

.ebg-nm-feature-icon {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	margin-bottom: 10px;
	background: linear-gradient(145deg, rgba(139, 92, 246, 0.35), rgba(124, 58, 237, 0.15));
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.ebg-nm-feature-card .ebg-nm-feature-title {
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.03em;
	margin-bottom: 3px;
}

.ebg-nm-feature-card .ebg-nm-feature-desc {
	font-size: 13px;
	color: var(--ebg-text-2);
}

/* Buttons ---------------------------------------------------------------- */

.ebg-nm-btn {
	appearance: none;
	border: none;
	cursor: pointer;
	font-family: inherit;
	font-weight: 700;
	font-size: 15px;
	border-radius: 13px;
	padding: 14px 22px;
	min-height: 46px;
	color: var(--ebg-text);
	background: var(--ebg-card-2);
	border: 1px solid var(--ebg-border);
	transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.ebg-nm-btn:hover { transform: translateY(-2px); }
.ebg-nm-btn:active { transform: translateY(0) scale(0.98); }
.ebg-nm-btn:focus-visible {
	outline: 2px solid var(--ebg-accent);
	outline-offset: 2px;
}
.ebg-nm-btn:disabled { cursor: not-allowed; opacity: 0.5; transform: none; }

.ebg-nm-btn-primary {
	position: relative;
	background: linear-gradient(135deg, var(--ebg-accent-2), var(--ebg-accent-hover));
	border-color: transparent;
	box-shadow: 0 12px 26px rgba(139, 92, 246, 0.45), inset 0 1px 0 rgba(255,255,255,0.25);
	overflow: hidden;
}
.ebg-nm-btn-primary:hover {
	box-shadow: 0 16px 32px rgba(139, 92, 246, 0.6), inset 0 1px 0 rgba(255,255,255,0.3);
}
.ebg-nm-btn-primary::after {
	content: "";
	position: absolute;
	top: 0; left: -60%;
	width: 40%; height: 100%;
	background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
	transform: skewX(-20deg);
	animation: ebg-nm-shine 3.2s ease-in-out infinite;
}
@keyframes ebg-nm-shine {
	0% { left: -60%; }
	40%, 100% { left: 130%; }
}

.ebg-nm-btn-block { width: 100%; }
.ebg-nm-btn-ghost { background: transparent; }

.ebg-nm-btn-danger-outline {
	background: rgba(239, 68, 68, 0.08);
	border-color: rgba(239, 68, 68, 0.3);
	color: #FCA5A5;
}

.ebg-nm-micro {
	font-size: 12px;
	color: var(--ebg-text-2);
	text-align: center;
	margin-top: 12px;
}

/* Round flow: get ready / countdown -------------------------------------- */

.ebg-nm-center {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 340px;
	padding: 20px 0;
}

.ebg-nm-getready-label {
	font-size: 13px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ebg-text-2);
	font-weight: 700;
	margin-bottom: 18px;
}

.ebg-nm-countdown-number {
	font-size: 68px;
	font-weight: 800;
	color: var(--ebg-accent-2);
	text-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
	animation: ebg-nm-pop 0.5s cubic-bezier(.2,.9,.3,1.3) both;
}

@keyframes ebg-nm-pop {
	0%   { opacity: 0; transform: scale(0.5) translateZ(0); }
	60%  { opacity: 1; transform: scale(1.12); }
	100% { opacity: 1; transform: scale(1); }
}

/* Level / progress header ------------------------------------------------ */

.ebg-nm-level-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
	flex-wrap: wrap;
	gap: 8px;
}

.ebg-nm-level-tag {
	font-size: 12.5px;
	font-weight: 700;
	color: var(--ebg-text-2);
	letter-spacing: 0.02em;
}

.ebg-nm-level-tag strong { color: var(--ebg-text); }

.ebg-nm-level-right {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ebg-nm-streak-pill {
	font-size: 13px;
	font-weight: 700;
	color: var(--ebg-warning);
}

.ebg-nm-pause-btn {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: var(--ebg-card-2);
	border: 1px solid var(--ebg-border);
	color: var(--ebg-text);
	cursor: pointer;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.12s ease, border-color 0.15s ease;
}
.ebg-nm-pause-btn:hover { transform: translateY(-1px); border-color: var(--ebg-accent); }

.ebg-nm-progress-track {
	width: 100%;
	height: 7px;
	background: var(--ebg-card-2);
	border-radius: 999px;
	overflow: hidden;
	margin-bottom: 18px;
	box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

.ebg-nm-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--ebg-accent), var(--ebg-accent-2));
	border-radius: 999px;
	transition: width 0.4s ease;
	box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
}

/* Number display + ring timer --------------------------------------------- */

.ebg-nm-ring-wrap {
	position: relative;
	width: 160px;
	height: 160px;
	margin: 0 auto 22px;
	filter: drop-shadow(0 8px 18px rgba(139, 92, 246, 0.25));
}

.ebg-nm-ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }

.ebg-nm-ring-bg {
	fill: none;
	stroke: var(--ebg-card-2);
	stroke-width: 8;
}

.ebg-nm-ring-fg {
	fill: none;
	stroke: var(--ebg-accent);
	stroke-width: 8;
	stroke-linecap: round;
	transition: stroke-dashoffset 0.1s linear, stroke 0.2s ease;
}

.ebg-nm-ring-fg.ebg-nm-ring-warning { stroke: var(--ebg-warning); }
.ebg-nm-ring-fg.ebg-nm-ring-danger { stroke: var(--ebg-error); }

.ebg-nm-ring-time {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	font-weight: 700;
	color: var(--ebg-text-2);
}

.ebg-nm-number-display {
	font-size: 50px;
	font-weight: 800;
	letter-spacing: 0.05em;
	font-variant-numeric: tabular-nums;
	animation: ebg-nm-number-fade 0.25s ease both;
	word-break: break-all;
	text-shadow: 0 0 24px rgba(139, 92, 246, 0.25);
}

@media (min-width: 1024px) {
	.ebg-nm-number-display { font-size: 66px; }
}

@keyframes ebg-nm-number-fade {
	from { opacity: 0; transform: scale(0.9); }
	to   { opacity: 1; transform: scale(1); }
}

.ebg-nm-instruction {
	font-size: 20px;
	font-weight: 700;
	margin-bottom: 18px;
}

/* Segmented answer display ------------------------------------------------- */

.ebg-nm-segments {
	display: flex;
	gap: 6px;
	justify-content: center;
	flex-wrap: wrap;
	margin: 18px 0;
	min-height: 56px;
}

.ebg-nm-segment {
	width: 38px;
	height: 48px;
	border-radius: 10px;
	background: var(--ebg-card-2);
	border: 1px solid var(--ebg-border);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	box-shadow: inset 0 2px 4px rgba(0,0,0,0.35);
}

.ebg-nm-segment.ebg-nm-segment-filled {
	border-color: var(--ebg-accent);
	box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.25), inset 0 2px 4px rgba(0,0,0,0.35);
}

.ebg-nm-segment.ebg-nm-segment-empty {
	color: var(--ebg-text-2);
	opacity: 0.4;
}

/* Keypad --------------------------------------------------------------- */

.ebg-nm-keypad {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	max-width: 340px;
	margin: 0 auto 18px;
}

.ebg-nm-key {
	appearance: none;
	border: 1px solid var(--ebg-border);
	background: linear-gradient(160deg, var(--ebg-card-3), var(--ebg-card));
	color: var(--ebg-text);
	font-size: 20px;
	font-weight: 700;
	border-radius: 12px;
	min-height: 52px;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
	touch-action: manipulation;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 4px 10px rgba(0,0,0,0.25);
}

.ebg-nm-key:hover { background: var(--ebg-card-2); }
.ebg-nm-key:active { transform: scale(0.94); box-shadow: inset 0 2px 6px rgba(0,0,0,0.4); }
.ebg-nm-key:focus-visible { outline: 2px solid var(--ebg-accent); outline-offset: 2px; }

.ebg-nm-key-zero { grid-column: span 3; }

.ebg-nm-actions-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	max-width: 340px;
	margin: 0 auto 14px;
}

.ebg-nm-actions-row .ebg-nm-btn { min-height: 48px; }

.ebg-nm-check-btn-wrap {
	max-width: 340px;
	margin: 0 auto;
}

/* Result states (success / error) ------------------------------------------ */

.ebg-nm-result-icon {
	font-size: 40px;
	font-weight: 800;
	margin-bottom: 8px;
}

.ebg-nm-result-icon.ebg-nm-success { color: var(--ebg-success); text-shadow: 0 0 26px rgba(52,211,153,0.4); }
.ebg-nm-result-icon.ebg-nm-error { color: var(--ebg-error); text-shadow: 0 0 26px rgba(239,68,68,0.35); }

.ebg-nm-result-sub {
	font-size: 14px;
	color: var(--ebg-text-2);
	margin-bottom: 14px;
}

.ebg-nm-points-pill {
	display: inline-block;
	font-size: 24px;
	font-weight: 800;
	color: var(--ebg-success);
	animation: ebg-nm-pop 0.4s ease both;
	margin-bottom: 10px;
}

.ebg-nm-taunt-bubble {
	display: inline-block;
	background: var(--ebg-card-2);
	border: 1px solid rgba(239, 68, 68, 0.25);
	border-radius: 14px;
	padding: 10px 16px;
	font-size: 14px;
	font-weight: 600;
	color: var(--ebg-text);
	margin-bottom: 14px;
	animation: ebg-nm-pop 0.35s ease both;
}

.ebg-nm-answer-compare {
	background: var(--ebg-card);
	border: 1px solid var(--ebg-border);
	border-radius: 12px;
	padding: 14px;
	font-size: 14px;
	font-variant-numeric: tabular-nums;
	text-align: left;
	max-width: 360px;
	margin: 0 auto 16px;
}

.ebg-nm-answer-compare div + div { margin-top: 6px; }

.ebg-nm-answer-compare .ebg-nm-digit-wrong {
	color: var(--ebg-error);
	font-weight: 700;
}

.ebg-nm-error-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}

@keyframes ebg-nm-shake {
	10%, 90% { transform: translateX(-1px); }
	20%, 80% { transform: translateX(2px); }
	30%, 50%, 70% { transform: translateX(-4px); }
	40%, 60% { transform: translateX(4px); }
}

.ebg-nm-shake { animation: ebg-nm-shake 0.4s ease both; }

/* Streak toast ------------------------------------------------------------ */

.ebg-nm-streak-toast {
	display: inline-block;
	background: rgba(245, 158, 11, 0.12);
	border: 1px solid rgba(245, 158, 11, 0.4);
	color: var(--ebg-warning);
	font-weight: 700;
	font-size: 13px;
	border-radius: 999px;
	padding: 6px 14px;
	margin-bottom: 14px;
	animation: ebg-nm-pop 0.4s ease both;
}

.ebg-nm-anti-frustration {
	background: rgba(139, 92, 246, 0.08);
	border: 1px solid rgba(139, 92, 246, 0.25);
	border-radius: 12px;
	padding: 14px;
	font-size: 14px;
	color: var(--ebg-text);
	text-align: center;
	margin-bottom: 16px;
}

/* Result / session complete screen ------------------------------------------ */

.ebg-nm-score-big {
	font-size: 46px;
	font-weight: 800;
	margin: 6px 0 18px;
	text-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
}

.ebg-nm-stat-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 18px;
	text-align: left;
}

.ebg-nm-stat-box {
	background: linear-gradient(160deg, var(--ebg-card-2), var(--ebg-card));
	border: 1px solid var(--ebg-border);
	border-radius: 12px;
	padding: 12px 14px;
}

.ebg-nm-stat-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ebg-text-2);
	margin-bottom: 4px;
}

.ebg-nm-stat-value {
	font-size: 18px;
	font-weight: 700;
}

.ebg-nm-pb-banner {
	background: rgba(52, 211, 153, 0.1);
	border: 1px solid rgba(52, 211, 153, 0.35);
	color: var(--ebg-success);
	font-weight: 700;
	border-radius: 12px;
	padding: 12px;
	margin-bottom: 16px;
}

.ebg-nm-result-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

@media (max-width: 480px) {
	.ebg-nm-result-actions { grid-template-columns: 1fr; }
}

/* Progress panel ----------------------------------------------------------- */

.ebg-nm-recent-bars {
	display: flex;
	align-items: flex-end;
	gap: 6px;
	height: 80px;
	margin: 12px 0;
}

.ebg-nm-recent-bar {
	flex: 1;
	background: linear-gradient(180deg, var(--ebg-accent-2), var(--ebg-accent));
	border-radius: 6px 6px 0 0;
	min-height: 4px;
	position: relative;
}

.ebg-nm-recent-bar-label {
	position: absolute;
	bottom: -18px;
	left: 0;
	right: 0;
	text-align: center;
	font-size: 10px;
	color: var(--ebg-text-2);
}

/* Mode select screen ------------------------------------------------------- */

.ebg-nm-mode-title {
	font-size: 22px;
	font-weight: 800;
	margin: 4px 0 16px;
}

.ebg-nm-mode-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 20px;
}

.ebg-nm-mode-card {
	display: flex;
	align-items: center;
	gap: 14px;
	background: linear-gradient(160deg, var(--ebg-card-2), var(--ebg-card));
	border: 1px solid var(--ebg-border);
	border-radius: 16px;
	padding: 14px 16px;
	text-align: left;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
	width: 100%;
	color: var(--ebg-text);
	font-family: inherit;
}

.ebg-nm-mode-card:hover:not(.ebg-nm-mode-locked) {
	transform: translateY(-2px);
	border-color: rgba(139, 92, 246, 0.4);
}

.ebg-nm-mode-card.ebg-nm-mode-selected {
	border-color: var(--ebg-accent);
	box-shadow: 0 0 0 1px var(--ebg-accent), 0 14px 30px rgba(139, 92, 246, 0.3);
	animation: ebg-nm-border-pulse 2.4s ease-in-out infinite;
}

@keyframes ebg-nm-border-pulse {
	0%, 100% { box-shadow: 0 0 0 1px var(--ebg-accent), 0 14px 30px rgba(139, 92, 246, 0.22); }
	50% { box-shadow: 0 0 0 1px var(--ebg-accent-2), 0 16px 36px rgba(139, 92, 246, 0.4); }
}

.ebg-nm-mode-card.ebg-nm-mode-locked {
	opacity: 0.55;
	cursor: not-allowed;
}

.ebg-nm-mode-icon {
	width: 40px;
	height: 40px;
	flex: 0 0 40px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	background: linear-gradient(145deg, rgba(139, 92, 246, 0.35), rgba(124, 58, 237, 0.12));
}

.ebg-nm-mode-locked .ebg-nm-mode-icon {
	background: var(--ebg-card-3);
}

.ebg-nm-mode-body { flex: 1; min-width: 0; }

.ebg-nm-mode-name {
	font-size: 15px;
	font-weight: 700;
	margin-bottom: 2px;
}

.ebg-nm-mode-desc {
	font-size: 12.5px;
	color: var(--ebg-text-2);
}

.ebg-nm-mode-pill {
	flex: 0 0 auto;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 5px 10px;
	border-radius: 999px;
	background: rgba(139, 92, 246, 0.18);
	color: var(--ebg-accent-2);
	border: 1px solid rgba(139, 92, 246, 0.35);
	white-space: nowrap;
}

.ebg-nm-mode-locked .ebg-nm-mode-pill {
	background: var(--ebg-card-3);
	color: var(--ebg-text-2);
	border-color: var(--ebg-border);
}

.ebg-nm-mode-pill-unlocked {
	background: rgba(52, 211, 153, 0.15) !important;
	color: var(--ebg-success) !important;
	border-color: rgba(52, 211, 153, 0.4) !important;
}

.ebg-nm-mode-softlock {
	opacity: 0.85;
}

.ebg-nm-mode-levels {
	font-size: 11px;
	color: var(--ebg-accent-2);
	font-weight: 700;
	letter-spacing: 0.03em;
	margin-top: 4px;
}

.ebg-nm-unlock-callout {
	background: rgba(139, 92, 246, 0.1);
	border: 1px solid rgba(139, 92, 246, 0.3);
	border-radius: 12px;
	padding: 12px 14px;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 14px;
	text-align: left;
}

.ebg-nm-unlock-callout-done {
	background: rgba(52, 211, 153, 0.1);
	border-color: rgba(52, 211, 153, 0.35);
	color: var(--ebg-success);
}

.ebg-nm-level-status {
	text-align: left;
	margin-bottom: 14px;
}

.ebg-nm-level-status-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
	font-size: 13px;
}

.ebg-nm-level-complete-banner {
	font-size: 22px;
	font-weight: 800;
	color: var(--ebg-accent-2);
	text-shadow: 0 0 22px rgba(139, 92, 246, 0.5);
	margin-bottom: 8px;
	animation: ebg-nm-pop 0.4s ease both;
}

.ebg-nm-mode-footer-actions {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}

/* Toast ---------------------------------------------------------------- */

.ebg-nm-toast {
	position: absolute;
	left: 50%;
	bottom: 18px;
	transform: translateX(-50%) translateY(10px);
	background: var(--ebg-card-2);
	border: 1px solid var(--ebg-border);
	color: var(--ebg-text);
	font-size: 13px;
	font-weight: 600;
	padding: 10px 18px;
	border-radius: 999px;
	box-shadow: 0 10px 24px rgba(0,0,0,0.4);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease, transform 0.25s ease;
	z-index: 20;
	white-space: nowrap;
	max-width: calc(100% - 32px);
	text-overflow: ellipsis;
	overflow: hidden;
}

.ebg-nm-toast.ebg-nm-toast-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* Pause overlay ---------------------------------------------------------- */

.ebg-nm-pause-overlay {
	position: absolute;
	inset: 0;
	background: rgba(8, 11, 18, 0.86);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 15;
	border-radius: 22px;
}

.ebg-nm-pause-overlay.ebg-nm-pause-visible {
	display: flex;
}

.ebg-nm-pause-card {
	text-align: center;
	padding: 20px;
	max-width: 280px;
}

.ebg-nm-pause-icon {
	font-size: 34px;
	margin-bottom: 8px;
}

.ebg-nm-pause-title {
	font-size: 20px;
	font-weight: 800;
	margin-bottom: 18px;
	letter-spacing: 0.04em;
}

.ebg-nm-pause-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Side panel stat rows -------------------------------------------------- */

.ebg-nm-side {
	background: var(--ebg-card);
	border: 1px solid var(--ebg-border);
	border-radius: 16px;
	padding: 18px;
}

.ebg-nm-side h4 {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ebg-text-2);
	margin: 0 0 12px;
}

.ebg-nm-side-row {
	display: flex;
	justify-content: space-between;
	font-size: 14px;
	padding: 8px 0;
	border-bottom: 1px solid var(--ebg-border);
}

.ebg-nm-side-row:last-child { border-bottom: none; }

.ebg-nm-footer-note {
	text-align: center;
	font-size: 12px;
	color: var(--ebg-text-2);
	margin-top: 18px;
}

.ebg-nm-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Overflow safety --------------------------------------------------------- */

.ebg-nm-wrapper,
.ebg-nm-wrapper * {
	max-width: 100%;
}

.ebg-nm-wrapper {
	overflow-x: hidden;
}

/* Reduced motion ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.ebg-nm-wrapper * {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}

/* Small mobile tightening --------------------------------------------------- */

@media (max-width: 380px) {
	.ebg-nm-panel { padding: 18px 14px; }
	.ebg-nm-number-display { font-size: 40px; }
	.ebg-nm-segment { width: 30px; height: 42px; font-size: 18px; }
	.ebg-nm-key { min-height: 48px; font-size: 18px; }
	.ebg-nm-hero-mark-wrap { width: 68px; height: 68px; }
	.ebg-nm-title { font-size: 24px; }
	.ebg-nm-ring-wrap { width: 130px; height: 130px; }
}
