body {
	background: linear-gradient(to bottom right, #eef2ff, #ffffff, #faf5ff);
	min-height: 100vh;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 1rem 0.75rem;
}

@media (min-width: 640px) {
	.container {
		padding: 1rem 1rem;
	}
}

@media (min-width: 768px) {
	.container {
		padding: 1.5rem 1.5rem;
	}
}

@media (min-width: 1024px) {
	.container {
		padding: 1.5rem 2rem;
	}
}

.header {
	text-align: center;
	margin-bottom: 1.5rem;
}

.title {
	font-size: 1.5rem;
	font-weight: 700;
	color: #4f46e5;
}

@media (min-width: 768px) {
	.title {
		font-size: 1.875rem;
	}
}

.subtitle {
	color: #6b7280;
	font-size: 0.875rem;
	margin-top: 0.25rem;
}

.stage-switch {
	display: flex;
	gap: 0.75rem;
	margin-bottom: 1rem;
	justify-content: center;
}

.stage-btn {
	padding: 0.5rem 1.5rem;
	border-radius: 9999px;
	border: 1px solid #e5e7eb;
	font-weight: 500;
	background: white;
	cursor: pointer;
	user-select: none;
	text-align: center;
}

.stage-btn.active {
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	color: white;
}

.tab-nav {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.5rem;
	margin-bottom: 1.5rem;
}

.tab-btn {
	padding: 0.75rem 0.5rem;
	font-size: 0.875rem;
	cursor: pointer;
	user-select: none;
	text-align: center;
}

@media (min-width: 768px) {
	.tab-btn {
		font-size: 1rem;
	}
}

.card {
	border-radius: 16px;
	box-shadow: 0 4px 12px #e2e8f0;
	background: white;
	padding: 1rem;
	margin-bottom: 1rem;
}

.btn-purple {
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	color: #fff;
	border-radius: 12px;
	transition: 0.2s;
	padding: 0.5rem 1rem;
	cursor: pointer;
	user-select: none;
	text-align: center;
}

.btn-purple:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

.btn-purple.btn-disabled {
	opacity: 0.5;
	pointer-events: none;
	transform: none;
}

.btn-green {
	background: linear-gradient(135deg, #34d399, #10b981);
	color: #fff;
	border-radius: 12px;
	transition: 0.2s;
	padding: 0.5rem 1rem;
	cursor: pointer;
	user-select: none;
	text-align: center;
}

.btn-green:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

.btn-green.btn-disabled {
	opacity: 0.5;
	pointer-events: none;
	transform: none;
}

.btn-orange {
	background: linear-gradient(135deg, #fb923c, #f97316);
	color: #fff;
	border-radius: 12px;
	transition: 0.2s;
	padding: 0.5rem 1rem;
	cursor: pointer;
	user-select: none;
	text-align: center;
}

.btn-orange:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

.btn-orange.btn-disabled {
	opacity: 0.5;
	pointer-events: none;
	transform: none;
}

.btn-full {
	width: 100%;
	padding: 12px 0;
	font-size: 1rem;
}

.hidden-panel {
	display: none;
}

.hidden {
	display: none;
}

.loading::after {
	content: '...';
	animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
	0%,
	20% {
		content: '.';
	}
	40% {
		content: '..';
	}
	60%,
	100% {
		content: '...';
	}
}

.panel-title {
	font-size: 1.125rem;
	font-weight: 700;
	color: #374151;
	margin-bottom: 1rem;
}

.subject-selector {
	margin-bottom: 1rem;
}

.subject-options {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.subject-options.single-row {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.35rem;
	margin-bottom: 1rem;
}

.subject-options.single-row .subject-tag {
	flex: 1;
	min-width: 0;
	padding: 8px 4px;
	font-size: 0.8rem;
	border-radius: 8px;
}

.subject-tag {
	display: inline-block;
	padding: 10px 0;
	border: 2px solid #d1d5db;
	border-radius: 10px;
	font-size: 0.9rem;
	color: #6b7280;
	cursor: pointer;
	transition: all 0.2s;
	user-select: none;
	background: #f9fafb;
	text-align: center;
}

.subject-tag:hover {
	border-color: #a5b4fc;
	color: #4f46e5;
}

.subject-tag.selected {
	border-color: #6366f1;
	background: #eef2ff;
	color: #4f46e5;
	font-weight: 600;
}

.report-filter-tag {
	display: inline-block;
	padding: 5px 14px;
	border: 2px solid #d1d5db;
	border-radius: 20px;
	font-size: 0.8rem;
	color: #6b7280;
	cursor: pointer;
	transition: all 0.2s;
	user-select: none;
	background: #f9fafb;
	margin-right: 6px;
	margin-bottom: 4px;
}

.report-filter-tag:hover {
	border-color: #a5b4fc;
	color: #4f46e5;
}

.report-filter-tag.active {
	border-color: #6366f1;
	background: #eef2ff;
	color: #4f46e5;
	font-weight: 600;
}

.result-box {
	padding: 1rem;
	border-radius: 0.5rem;
	background: #ecfdf5;
	white-space: pre-wrap;
	font-size: 1rem;
	line-height: 2;
}

.report-section {
	margin-bottom: 0.5rem;
	padding-bottom: 1rem;
}

.score-ring {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	background: conic-gradient(#6366f1 var(--p, 0%), #e2e8f0 0);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto;
}

.score-ring-inner {
	width: 90px;
	height: 90px;
	border-radius: 50%;
	background: white;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.8rem;
	font-weight: 700;
	color: #6366f1;
}

.score-label {
	text-align: center;
	color: #6b7280;
	margin-top: 0.25rem;
	font-size: 0.875rem;
}

.score-detail {
	text-align: center;
	color: #374151;
	font-size: 0.875rem;
	margin-top: 0.25rem;
}

.radar-container {
	max-width: 400px;
	margin: 0 auto;
}

.content-box {
	min-height: 100px;
	padding: 1rem;
	background: #fff7ed;
	border-radius: 0.5rem;
	white-space: pre-wrap;
	font-size: 0.875rem;
	line-height: 1.625;
}

.empty-text {
	color: #9ca3af;
}

.test-desc {
	color: #6b7280;
	font-size: 0.875rem;
	margin-bottom: 1rem;
}

.mt-4 {
	margin-top: 1rem;
}

.mt-6 {
	margin-top: 1.5rem;
}

.mt-3 {
	margin-top: 0.75rem;
}

.option-btn {
	display: flex;
	flex: 1;
	min-width: 45%;
	padding: 10px 8px;
	border: 2px solid #fff;
	border-radius: 12px;
	background: #fff;
	cursor: pointer;
	transition: all 0.2s;
	font-size: 1rem;
	white-space: normal;
	word-break: break-word;
}

@media (max-width: 640px) {
	.option-btn {
		width: 100%;
		padding: 10px 12px;
		font-size: 0.85rem;
	}

	.option-btn.e-option {
		width: 100%;
	}
}

.option-btn.e-option {
	width: 100%;
}

.options-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.option-btn:hover {
	border-color: #a78bfa;
	background: #f5f3ff;
}

.option-btn.selected {
	border-color: #6366f1;
	background: #eef2ff;
	font-weight: 600;
}

.option-btn.correct {
	border-color: #34d399;
	background: #ecfdf5;
}

.option-btn.wrong {
	border-color: #f87171;
	background: #fef2f2;
}

.question-card {
	background: #eef2ff;
	border-radius: 14px;
	padding: 18px;
	margin-bottom: 14px;
}

.question-card.answered {
	border-left-color: #34d399;
}

.stat-bar {
	height: 8px;
	border-radius: 4px;
	background: #e2e8f0;
	overflow: hidden;
}

.stat-bar-fill {
	height: 100%;
	border-radius: 4px;
	transition: width 0.8s ease;
}

.knowledge-tag {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 0.8rem;
	margin: 4px;
}

.text-gray-400 {
	color: #9ca3af;
}

.text-center {
	text-align: center;
}

.py-8 {
	padding-top: 2rem;
	padding-bottom: 2rem;
}

.py-4 {
	padding-top: 1rem;
	padding-bottom: 1rem;
}

.py-3 {
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
}

.py-2 {
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
}

.text-red-500 {
	color: #ef4444;
}

.text-3xl {
	font-size: 1.875rem;
}

.font-bold {
	font-weight: 700;
}

.text-indigo-600 {
	color: #4f46e5;
}

.text-gray-500 {
	color: #6b7280;
}

.mb-2 {
	margin-bottom: 0.5rem;
}

.mb-3 {
	margin-bottom: 0.75rem;
}

.border-t {
	border-top: 1px solid #e5e7eb;
}

.pt-3 {
	padding-top: 0.75rem;
}

.font-medium {
	font-weight: 500;
}

.text-sm {
	font-size: 0.875rem;
}

.text-xs {
	font-size: 0.75rem;
}

.flex {
	display: flex;
}

.justify-between {
	justify-content: space-between;
}

.items-start {
	align-items: flex-start;
}

.mb-1 {
	margin-bottom: 0.5rem;
}

.bg-green-400 {
	background: #4ade80;
}

.bg-yellow-400 {
	background: #facc15;
}

.bg-red-400 {
	background: #f87171;
}

.bg-red-50 {
	background: #fef2f2;
}

.rounded-lg {
	border-radius: 0.5rem;
	padding: 1rem;
}

.text-red-600 {
	color: #dc2626;
}

.text-green-600 {
	color: #16a34a;
}

.mt-1 {
	margin-top: 0.25rem;
}

.bg-red-100 {
	background: #fee2e2;
}

.px-4 {
	padding-left: 1rem;
	padding-right: 1rem;
}

.mr-4 {
	margin-right: 1rem;
}

.border {
	border: 1px solid #e5e7eb;
	padding: 1rem;
}

.cursor-pointer {
	cursor: pointer;
}

.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}

.modal-content {
	background: white;
	border-radius: 12px;
	padding: 24px;
	min-width: 300px;
	max-width: 400px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal-body {
	text-align: center;
	font-size: 16px;
	color: #374151;
	margin-bottom: 20px;
	line-height: 1.5;
}

.modal-btn {
	padding: 10px 20px;
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	color: white;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
	text-align: center;
	user-select: none;
}

.modal-btn:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

.modal-overlay.hidden {
	display: none;
}

/* ========== 模板元素样式 ========== */
.q-num {
	font-weight: 700;
	color: #4f46e5;
}

.q-meta {
	font-size: 0.75rem;
	color: #9ca3af;
}

.q-text {
	font-weight: 500;
	margin-bottom: 0.75rem;
}

.p-num {
	font-weight: 700;
	color: #4f46e5;
}

.p-text {
	font-weight: 500;
	margin-bottom: 0.75rem;
}

.r-score {
	font-size: 1.875rem;
	font-weight: 700;
	color: #4f46e5;
}

.r-summary {
	color: #6b7280;
}

.r-comment {
	border-top: 1px solid #e5e7eb;
	padding-top: 0.5rem;
}

.wi-badge {
	background: #eef2ff;
	color: #4f46e5;
	margin-bottom: 4px;
}

.wi-question {
	font-weight: 500;
}

.wi-your {
	color: #ef4444;
	margin-top: 0.25rem;
}

.wi-correct {
	color: #16a34a;
}

.section-header {
	font-weight: 700;
	margin-bottom: 0.5rem;
	font-size: 0.875rem;
}

.filter-label {
	font-size: 0.875rem;
	font-weight: 500;
	margin-right: 1rem;
	color: #374151;
}