* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	line-height: 1.6;
	color: #333;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	min-height: 100vh;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

header {
	text-align: center;
	margin-bottom: 40px;
	color: white;
}

header h1 {
	font-size: 2.5rem;
	margin-bottom: 10px;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
	font-size: 1.1rem;
	opacity: 0.9;
	margin-bottom: 6px;
}

header a,
header a:visited {
	color: white;
	text-decoration: underline;
	transition: color 0.3s ease;
}

header a:hover {
	text-decoration: none;
	color: #e5e5e5;
}

header a:active {
	color: #000;
}

.form-container {
	background: white;
	border-radius: 15px;
	padding: 30px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
	margin-bottom: 30px;
}

.form-section {
	margin-bottom: 30px;
}

.form-section h2 {
	color: #4a5568;
	margin-bottom: 20px;
	font-size: 1.4rem;
	border-bottom: 2px solid #e2e8f0;
	padding-bottom: 10px;
}

.form-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	margin-bottom: 20px;
}

.form-group {
	display: flex;
	flex-direction: column;
}

.form-group label {
	font-weight: 600;
	margin-bottom: 8px;
	color: #2d3748;
	font-size: 0.95rem;
}

.form-group input,
.form-group select {
	padding: 12px 15px;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	font-size: 1rem;
	transition: all 0.3s ease;
	background-color: #f7fafc;
}

.form-group input:focus,
.form-group select:focus {
	outline: none;
	border-color: #667eea;
	background-color: white;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:hover,
.form-group select:hover {
	border-color: #cbd5e0;
}

.form-actions {
	display: flex;
	gap: 15px;
	justify-content: center;
	margin-top: 30px;
}

.btn-primary,
.btn-secondary {
	padding: 12px 30px;
	border: none;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.btn-primary {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
}

.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
	background: #e2e8f0;
	color: #4a5568;
}

.btn-secondary:hover {
	background: #cbd5e0;
	transform: translateY(-1px);
}

.results-container {
	background: white;
	border-radius: 15px;
	padding: 30px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
	animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.results-container h2 {
	color: #2d3748;
	margin-bottom: 25px;
	font-size: 1.8rem;
	text-align: center;
}

.result-summary {
	display: flex;
	justify-content: center;
	margin-bottom: 30px;
}

.score-card {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	padding: 30px;
	border-radius: 15px;
	text-align: center;
	min-width: 200px;
	box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.score-card h3 {
	font-size: 1.2rem;
	margin-bottom: 15px;
	opacity: 0.9;
}

.score-value {
	font-size: 3rem;
	font-weight: bold;
	margin-bottom: 10px;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.score-grade {
	font-size: 1.3rem;
	font-weight: 600;
	padding: 8px 16px;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 20px;
	display: inline-block;
}

.result-details {
	margin-top: 30px;
}

.details-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 20px;
}

.detail-item {
	background: #f7fafc;
	padding: 20px;
	border-radius: 10px;
	border-left: 4px solid #667eea;
	transition: transform 0.2s ease;
}

.detail-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.detail-item h4 {
	color: #2d3748;
	margin-bottom: 12px;
	font-size: 1.1rem;
}

.detail-item p {
	margin-bottom: 6px;
	color: #4a5568;
	font-size: 0.95rem;
}

.detail-item p:last-child {
	margin-bottom: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
	.container {
		padding: 15px;
	}

	header h1 {
		font-size: 2rem;
	}

	.form-container,
	.results-container {
		padding: 20px;
	}

	.form-row {
		grid-template-columns: 1fr;
		gap: 15px;
	}

	.form-actions {
		flex-direction: column;
		align-items: center;
	}

	.btn-primary,
	.btn-secondary {
		width: 100%;
		max-width: 200px;
	}

	.details-grid {
		grid-template-columns: 1fr;
	}

	.score-value {
		font-size: 2.5rem;
	}
}

@media (max-width: 480px) {
	header h1 {
		font-size: 1.8rem;
	}

	.form-container,
	.results-container {
		padding: 15px;
	}

	.score-card {
		padding: 20px;
		min-width: auto;
		width: 100%;
	}

	.score-value {
		font-size: 2rem;
	}
}

/* 加载动画 */
.loading {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 3px solid rgba(255, 255, 255, .3);
	border-radius: 50%;
	border-top-color: #fff;
	animation: spin 1s ease-in-out infinite;
}

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

/* 表单验证样式 */
.form-group input:invalid {
	border-color: #e53e3e;
}

.form-group input:valid {
	border-color: #38a169;
}

/* 工具提示 */
.tooltip {
	position: relative;
	display: inline-block;
}

.tooltip .tooltiptext {
	visibility: hidden;
	width: 200px;
	background-color: #555;
	color: #fff;
	text-align: center;
	border-radius: 6px;
	padding: 8px;
	position: absolute;
	z-index: 1;
	bottom: 125%;
	left: 50%;
	margin-left: -100px;
	opacity: 0;
	transition: opacity 0.3s;
	font-size: 0.85rem;
}

.tooltip:hover .tooltiptext {
	visibility: visible;
	opacity: 1;
}

/* 成绩等级颜色 */
.grade-excellent {
	color: #38a169;
	font-weight: bold;
}

.grade-good {
	color: #3182ce;
	font-weight: bold;
}

.grade-pass {
	color: #d69e2e;
	font-weight: bold;
}

.grade-fail {
	color: #e53e3e;
	font-weight: bold;
}

/* 打印样式 */
@media print {
	body {
		background: white;
	}

	.form-container {
		display: none;
	}

	.results-container {
		box-shadow: none;
		border: 1px solid #ccc;
	}

	.score-card {
		background: #f0f0f0 !important;
		color: #333 !important;
	}
}