/* ===== Kartu pemicu game (launcher) ===== */
.tsa-launcher {
	max-width: 420px;
	margin: 1.5rem auto;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 10px 32px rgba(0,0,0,0.14);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: #222;
	overflow: hidden;
}

.tsa-launcher-banner-img {
	width: 100%;
	display: block;
}

.tsa-launcher-content {
	padding: 1.25rem 1.5rem 1.5rem;
	text-align: center;
}

.tsa-launcher-desc {
	color: #666;
	margin: 0 0 1.1rem;
	font-size: 0.92rem;
	line-height: 1.5;
}

.tsa-play-btn {
	width: 100%;
	max-width: 260px;
	font-size: 1.05rem;
	padding: 0.85rem 1.4rem;
	box-shadow: 0 6px 16px rgba(109,40,217,0.35);
}

.tsa-play-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(109,40,217,0.45);
}

.tsa-btn {
	border: none;
	border-radius: 8px;
	padding: 0.7rem 1.4rem;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.1s ease, opacity 0.2s ease;
}

.tsa-btn:hover {
	opacity: 0.9;
}

.tsa-btn:active {
	transform: scale(0.97);
}

.tsa-btn-primary {
	background: #6d28d9;
	color: #fff;
}

/* ===== Overlay layar penuh (halaman game) ===== */
.tsa-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: #f4f2fb;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	overflow-y: auto;
}

.tsa-confetti-canvas {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 1000001;
}

.tsa-overlay-inner {
	max-width: 640px;
	margin: 0 auto;
	min-height: 100%;
	padding: 1.25rem;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
}

.tsa-overlay-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding-bottom: 0.75rem;
	margin-bottom: 0.5rem;
	position: sticky;
	top: 0;
	background: #f4f2fb;
	padding-top: 0.5rem;
}

.tsa-overlay-title {
	font-size: 1.15rem;
	font-weight: 700;
	color: #222;
}

.tsa-header-badges {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.tsa-badge {
	font-weight: 700;
	padding: 0.35rem 0.85rem;
	border-radius: 999px;
	font-size: 0.9rem;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
}

.tsa-badge-score {
	background: #fff;
	color: #6d28d9;
	box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.tsa-badge-streak {
	background: linear-gradient(135deg, #f59e0b, #ef4444);
	color: #fff;
}

.tsa-badge-timer {
	background: #fff;
	color: #6d28d9;
	box-shadow: 0 2px 6px rgba(0,0,0,0.08);
	transition: background 0.2s ease, color 0.2s ease;
}

.tsa-badge-timer.tsa-timer-warning {
	background: #fef2f2;
	color: #dc2626;
	animation: tsaTimerPulse 1s ease-in-out infinite;
}

@keyframes tsaTimerPulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.08); }
}

@keyframes tsaBump {
	0% { transform: scale(1); }
	40% { transform: scale(1.25); }
	100% { transform: scale(1); }
}

.tsa-bump {
	animation: tsaBump 0.35s ease;
}

.tsa-progress-track {
	width: 100%;
	height: 6px;
	background: #e4dffb;
	border-radius: 999px;
	overflow: hidden;
	margin-bottom: 1rem;
}

.tsa-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #6d28d9, #a855f7);
	border-radius: 999px;
	width: 10%;
	transition: width 0.4s ease;
}

.tsa-close-btn {
	border: none;
	background: #fff;
	color: #444;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	font-size: 1rem;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0,0,0,0.1);
	flex-shrink: 0;
}

.tsa-close-btn:hover {
	background: #eee;
}

.tsa-overlay-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.tsa-overlay-body.tsa-fade-in {
	opacity: 1;
	transform: translateY(0);
}

.tsa-loading {
	margin-top: 3rem;
	color: #888;
	font-size: 1rem;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
}

.tsa-spinner {
	width: 32px;
	height: 32px;
	border: 3px solid #e4dffb;
	border-top-color: #6d28d9;
	border-radius: 50%;
	animation: tsaSpin 0.8s linear infinite;
}

@keyframes tsaSpin {
	to { transform: rotate(360deg); }
}

.tsa-question-image-wrap {
	width: 100%;
	max-width: 360px;
	aspect-ratio: 1 / 1;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 6px 24px rgba(0,0,0,0.12);
	margin-bottom: 1.5rem;
	background: #fff;
}

.tsa-question-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tsa-options-grid {
	width: 100%;
	max-width: 480px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
}

@media (max-width: 480px) {
	.tsa-options-grid {
		grid-template-columns: 1fr;
	}
}

@keyframes tsaOptionIn {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

.tsa-option-btn {
	padding: 0.9rem 1rem;
	border-radius: 10px;
	border: 2px solid #ddd6f7;
	background: #fff;
	font-size: 1rem;
	font-weight: 600;
	color: #333;
	cursor: pointer;
	transition: all 0.15s ease;
	text-align: center;
	animation: tsaOptionIn 0.3s ease both;
}

.tsa-option-btn:hover:not(:disabled) {
	border-color: #6d28d9;
	background: #f7f4ff;
	transform: translateY(-2px);
}

.tsa-option-btn:disabled {
	cursor: default;
}

.tsa-option-correct {
	background: #ecfdf3 !important;
	border-color: #16a34a !important;
	color: #15803d !important;
	animation: tsaOptionIn 0.3s ease both, tsaPulseGreen 0.5s ease;
}

@keyframes tsaPulseGreen {
	0% { box-shadow: 0 0 0 0 rgba(22,163,74,0.4); }
	100% { box-shadow: 0 0 0 12px rgba(22,163,74,0); }
}

.tsa-option-wrong {
	background: #fef2f2 !important;
	border-color: #dc2626 !important;
	color: #b91c1c !important;
}

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

.tsa-shake {
	animation: tsaShake 0.5s ease;
}

.tsa-feedback {
	width: 100%;
	max-width: 480px;
	margin-top: 1.25rem;
	text-align: center;
}

@keyframes tsaFeedbackIn {
	from { opacity: 0; transform: scale(0.9); }
	to { opacity: 1; transform: scale(1); }
}

.tsa-feedback-text {
	font-size: 1rem;
	font-weight: 600;
	margin-bottom: 0.9rem;
	padding: 0.6rem 0.9rem;
	border-radius: 8px;
	animation: tsaFeedbackIn 0.3s ease both;
}

.tsa-feedback-text.correct {
	background: #ecfdf3;
	color: #15803d;
}

.tsa-feedback-text.wrong {
	background: #fef2f2;
	color: #b91c1c;
}

.tsa-next-btn {
	width: 100%;
	max-width: 260px;
}

/* ===== Layar skor akhir ===== */
.tsa-final-score {
	text-align: center;
	padding: 1.5rem 0;
	width: 100%;
	max-width: 380px;
}

.tsa-final-emoji {
	font-size: 3rem;
	margin-bottom: 0.5rem;
}

.tsa-final-title {
	font-size: 1.1rem;
	font-weight: 700;
	color: #666;
	margin-bottom: 0.5rem;
}

.tsa-final-number {
	font-size: 3rem;
	font-weight: 800;
	color: #6d28d9;
	line-height: 1;
	margin-bottom: 0.5rem;
}

.tsa-final-verdict {
	font-size: 1rem;
	color: #444;
	margin-bottom: 1.5rem;
}

.tsa-final-stats {
	display: flex;
	justify-content: center;
	gap: 2rem;
	margin-bottom: 1.75rem;
}

.tsa-final-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.tsa-final-stat-num {
	font-size: 1.5rem;
	font-weight: 800;
	color: #222;
}

.tsa-final-stat-label {
	font-size: 0.8rem;
	color: #888;
	margin-top: 0.2rem;
}
