/* 全局CSS变量 */
:root {
	/* 颜色系统 */
	--primary-color: #8A2BE2;
	--primary-light: #9370DB;
	--secondary-color: #FF6B6B;
	--accent-color: #FFD700;
	--text-primary: #333;
	--text-secondary: #666;
	--white: #ffffff;
	
	/* 卡片和边框颜色 */
	--card-bg: rgba(255, 255, 255, 0.98);
	--border-color: rgba(255, 255, 255, 0.2);
	
	/* 渐变 */
	--gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	--gradient-secondary: linear-gradient(135deg, #87CEEB 0%, #FFD700 50%, #FFB6C1 100%);
	--gradient-game: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
	--gradient-button: linear-gradient(135deg, #8A2BE2, #9370DB);
	
	/* 阴影 */
	--shadow-light: 0 4px 8px rgba(0, 0, 0, 0.1);
	--shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.1);
	--shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.15);
	--shadow-button: 0 5px 15px rgba(0, 0, 0, 0.2);
	
	/* 圆角 */
	--radius-small: 10px;
	--radius-medium: 16px;
	--radius-large: 20px;
	--radius-lg: 20px;
	--radius-xl: 24px;
	--radius-full: 50px;
	
	/* 间距 */
	--spacing-xs: 0.5rem;
	--spacing-sm: 1rem;
	--spacing-md: 1.5rem;
	--spacing-lg: 2rem;
	--spacing-xl: 2.5rem;
	--spacing-2xl: 3rem;
	--spacing-3xl: 4rem;
	
	/* 字体大小 */
	--text-xs: 0.8rem;
	--text-sm: 0.9rem;
	--text-base: 1rem;
	--text-lg: 1.1rem;
	--text-xl: 1.2rem;
	--text-2xl: 1.5rem;
	--text-3xl: 1.8rem;
	--text-4xl: 2.5rem;
	
	/* 过渡 */
	--transition-fast: 0.2s ease;
	--transition-normal: 0.3s ease;
	--transition-slow: 0.5s ease;
	
	/* 容器最大宽度 */
	--container-sm: 1000px;
	--container-md: 1200px;
	--container-lg: 1400px;
}

/* 全局重置 */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	line-height: 1.6;
	color: var(--text-primary);
	background: var(--gradient-secondary);
	min-height: 100vh;
	overflow-x: hidden;
}

/* 通用容器样式 */
.container {
	max-width: var(--container-md);
	margin: 0 auto;
	padding: 0 var(--spacing-lg);
}

.container-sm {
	max-width: var(--container-sm);
}

.container-lg {
	max-width: var(--container-lg);
}

/* 卡片组件 */
.card {
	background: rgba(255, 255, 255, 0.98);
	border-radius: var(--radius-xl);
	box-shadow: var(--shadow-heavy);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	transition: var(--transition-normal);
}

.card:hover {
	transform: translateY(-2px);
	box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

/* 按钮组件 */
.btn {
	padding: var(--spacing-sm) var(--spacing-lg);
	border: none;
	border-radius: var(--radius-full);
	font-weight: 600;
	cursor: pointer;
	transition: var(--transition-normal);
	display: inline-flex;
	align-items: center;
	gap: var(--spacing-xs);
	text-decoration: none;
	font-size: var(--text-sm);
	white-space: nowrap;
}

.btn-primary {
	background: var(--gradient-button);
	color: var(--white);
}

.btn-secondary {
	background: linear-gradient(135deg, #4A90E2, #357ABD);
	color: var(--white);
}

.btn-danger {
	background: linear-gradient(135deg, #FF6B6B, #E55A5A);
	color: var(--white);
}

.btn:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-button);
}

/* 标题组件 */
.title {
	background: var(--gradient-button);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	font-weight: 700;
}

.title-lg {
	font-size: var(--text-4xl);
}

.title-md {
	font-size: var(--text-3xl);
}

.title-sm {
	font-size: var(--text-2xl);
}

/* 网格布局 */
.grid {
	display: grid;
	gap: var(--spacing-md);
}

.grid-2 {
	grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
	grid-template-columns: repeat(3, 1fr);
}

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

/* Flex布局 */
.flex {
	display: flex;
}

.flex-col {
	flex-direction: column;
}

.flex-center {
	align-items: center;
	justify-content: center;
}

.flex-between {
	justify-content: space-between;
}

.flex-wrap {
	flex-wrap: wrap;
}

/* 间距工具类 */
.gap-xs { gap: var(--spacing-xs); }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }
.gap-xl { gap: var(--spacing-xl); }

.mb-xs { margin-bottom: var(--spacing-xs); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }
.mb-2xl { margin-bottom: var(--spacing-2xl); }
.mb-3xl { margin-bottom: var(--spacing-3xl); }

.p-xs { padding: var(--spacing-xs); }
.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.p-xl { padding: var(--spacing-xl); }

/* 文本工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--text-secondary); }
.text-white { color: var(--white); }

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

/* 响应式工具类 */
@media (max-width: 768px) {
	.container {
		padding: 0 var(--spacing-sm);
	}
	
	.grid-auto {
		grid-template-columns: 1fr;
	}
	
	.flex-col-mobile {
		flex-direction: column;
	}
	
	.text-center-mobile {
		text-align: center;
	}
}

@media (max-width: 1200px) {
	.container {
		max-width: var(--container-sm);
		padding: 0 var(--spacing-md);
	}
}

@media (min-width: 1400px) {
	.container {
		max-width: var(--container-lg);
		padding: 0 var(--spacing-lg);
	}
}

/* 动画 */
@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

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

@keyframes slideIn {
	from { transform: translateX(-100%); }
	to { transform: translateX(0); }
}

.animate-spin {
	animation: spin 1s linear infinite;
}

.animate-fade-in {
	animation: fadeIn 0.5s ease-out;
}

.animate-slide-in {
	animation: slideIn 0.3s ease-out;
}

/* 加载动画 */
.loading-spinner {
	width: 50px;
	height: 50px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid var(--primary-color);
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin: 0 auto var(--spacing-sm);
}

/* 工具提示 */
.tooltip {
	position: relative;
	cursor: help;
}

.tooltip::after {
	content: attr(data-tooltip);
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(0, 0, 0, 0.8);
	color: white;
	padding: var(--spacing-xs) var(--spacing-sm);
	border-radius: var(--radius-small);
	font-size: var(--text-xs);
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	transition: var(--transition-normal);
	z-index: 1000;
}

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