/* 全局样式 */
:root {
	--primary-color: #0066cc;
	--secondary-color: #ff6b6b;
	--text-color: #333;
	--light-gray: #f5f5f5;
	--dark-gray: #666;
	--white: #fff;
	--shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Helvetica Neue', Arial, sans-serif;
	line-height: 1.6;
	color: var(--text-color);
	background-color: var(--light-gray);
}

/* 头部样式 */
.header {
	background: var(--white);
	box-shadow: var(--shadow);
	position: fixed;
	width: 100%;
	top: 0;
	z-index: 1000;
}

.container {
	width: 1200px;
	margin: 0 auto;
}

.header .container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 70px;
}

.logo {
	display: flex;
	align-items: center;
}

.logo img {
	height: 40px;
	width: auto;
}

.nav ul {
	display: flex;
	list-style: none;
	gap: 30px;
}

.nav a {
	color: var(--text-color);
	text-decoration: none;
	font-size: 16px;
	transition: color 0.3s;
}

.nav a:hover,
.nav a.active {
	color: var(--primary-color);
}

.user-panel {
	display: flex;
	align-items: center;
	position: relative;
	cursor: pointer;
}

.user-info {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 5px;
	border-radius: 20px;
	transition: background-color 0.3s;
}

.user-info:hover {
	background-color: var(--light-gray);
}

.avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background-color: var(--light-gray);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.avatar i {
	font-size: 20px;
	color: var(--dark-gray);
}

.avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.username {
	font-size: 14px;
	color: var(--text-color);
}

/* 登录弹出框样式 */
.login-popup {
	position: absolute;
	top: 100%;
	right: 0;
	width: 300px;
	background: var(--white);
	border-radius: 8px;
	box-shadow: var(--shadow);
	padding: 20px;
	margin-top: 10px;
	display: none;
	z-index: 1000;
}

.login-popup.active {
	display: block;
}

.login-popup h3 {
	text-align: center;
	margin-bottom: 20px;
	color: var(--text-color);
}

.login-form {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.login-form input {
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
}

.login-btn {
	padding: 10px;
	background: var(--primary-color);
	color: var(--white);
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.3s;
}

.login-btn:hover {
	background: #0052a3;
}

.form-footer {
	text-align: center;
	font-size: 14px;
	color: var(--dark-gray);
}

.register-link {
	color: var(--primary-color);
	text-decoration: none;
	margin-left: 5px;
}

.register-link:hover {
	text-decoration: underline;
}

/* 搜索框样式 */
.search-box {
	position: relative;
	width: 300px;
	margin: 0 20px;
}

.search-box i {
	position: absolute;
	left: 10px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--dark-gray);
}

.search-box input {
	width: 100%;
	padding: 8px 80px 8px 30px;
	border: 1px solid var(--primary-color);
	border-radius: 4px;
	font-size: 14px;
}

.search-box button {
	position: absolute;
	right: 0;
	top: 0;
	height: 100%;
	padding: 0 15px;
	background: var(--primary-color);
	color: var(--white);
	border: none;
	border-radius: 0 4px 4px 0;
	cursor: pointer;
}

/* 轮播图区域样式 */
.banner-section {
	position: relative;
	width: 100%;
	height: 650px;
	overflow: hidden;
	margin-top: 70px;
}

/* 纵向导航栏样式 */
.vertical-nav {
	position: absolute;
	left: calc(50% - 600px);
	top: 0;
	width: 200px;
	height: 650px;
	background: rgba(0, 0, 0, 0.6);
	z-index: 100;
}

.vertical-nav ul {
	list-style: none;
	display: flex;
	flex-direction: column;
	width: 100%;
	padding: 30px 0;
	height: 100%;
	justify-content: flex-start;
}

.vertical-nav li {
	position: relative;
	margin: 5px 0;
}

.vertical-nav a {
	display: block;
	color: white;
	text-decoration: none;
	padding: 14px 20px;
	font-size: 16px;
	transition: all 0.3s;
}

.vertical-nav a:hover {
	background: rgba(255, 255, 255, 0.1);
	padding-left: 30px;
}

/* 可选：添加箭头指示 */
.vertical-nav a::after {
	content: '>';
	position: absolute;
	right: 20px;
	opacity: 0;
	transition: opacity 0.3s;
}

.vertical-nav a:hover::after {
	opacity: 1;
}

.banner-slider {
	position: relative;
	width: 100%;
	height: 650px;
}

.banner-slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 650px;
	opacity: 0;
	transition: opacity 0.5s ease-in-out;
}

.banner-slide.active {
	opacity: 1;
}

.banner-slide img {
	width: 100%;
	height: 650px;
	object-fit: cover;
}

.banner-dots {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 5px;
}

.dot {
	width: 8px;
	height: 8px;
	background: rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	cursor: pointer;
	transition: all 0.3s;
}

.dot.active {
	width: 20px;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.8);
}

/* 课程板块通用样式 */
.course-section {
	padding: 50px 0;
	margin-top: 20px;
}

.section-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 30px;
}

.section-header h2 {
	font-size: 28px;
	color: var(--text-color);
}

.more-link {
	color: var(--dark-gray);
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 5px;
}

.course-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
}

/* 课程卡片样式 */
.course-card {
	background: var(--white);
	border-radius: 8px;
	overflow: hidden;
	transition: transform 0.3s;
	box-shadow: var(--shadow);
}

.course-card:hover {
	transform: translateY(-5px);
}

.course-image {
	position: relative;
	height: 160px;
}

.course-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.course-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s;
}

.course-card:hover .course-overlay {
	opacity: 1;
}

.course-overlay i {
	color: var(--white);
	font-size: 48px;
}

.course-info {
	padding: 20px;
}

.course-info h3 {
	font-size: 18px;
	margin-bottom: 10px;
}

.course-meta {
	display: flex;
	gap: 15px;
	color: var(--dark-gray);
	font-size: 14px;
	margin-bottom: 15px;
}

.course-meta i {
	margin-right: 5px;
}

.learn-btn {
	width: 100%;
	padding: 10px;
	background: var(--primary-color);
	color: var(--white);
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.3s;
}

.learn-btn:hover {
	background: #0052a3;
}

/* 特定板块样式 */
.php-section {
	background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}

.popular-section {
	background: var(--white);
}

.programming-section .python {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 页脚样式 */
.footer {
	background: #002244;
	color: var(--white);
	padding: 50px 0 20px;
	margin-top: 50px;
}

.footer-content {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 30px;
	margin-bottom: 30px;
}

.footer-section h4 {
	margin-bottom: 20px;
	font-size: 18px;
}

.footer-section ul {
	list-style: none;
}

.footer-section ul li {
	margin-bottom: 10px;
}

.footer-section a {
	color: var(--white);
	text-decoration: none;
	transition: color 0.3s;
}

.footer-section a:hover {
	color: var(--secondary-color);
}

.social-icons {
	display: flex;
	gap: 15px;
}

.social-icons a {
	font-size: 24px;
}

.footer-bottom {
	text-align: center;
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
	.header .container {
		flex-direction: column;
		height: auto;
		padding: 15px;
	}

	.search-box {
		width: 100%;
		margin: 10px 0;
	}

	.nav ul {
		flex-direction: column;
		text-align: center;
		gap: 10px;
	}

	.login-form {
		flex-direction: column;
		width: 100%;
	}

	.course-grid {
		grid-template-columns: 1fr;
	}
}

/* 用户面板样式 */
.user-menu {
	position: absolute;
	top: 100%;
	right: 0;
	width: 200px;
	background: var(--white);
	border-radius: 8px;
	box-shadow: var(--shadow);
	margin-top: 10px;
	display: none;
	z-index: 1000;
}

.user-menu.active {
	display: block;
}

.user-menu ul {
	list-style: none;
	padding: 10px 0;
}

.user-menu ul li {
	padding: 0;
	margin: 0;
}

.user-menu ul li a {
	display: flex;
	align-items: center;
	padding: 10px 20px;
	color: var(--text-color);
	text-decoration: none;
	transition: background-color 0.3s;
}

.user-menu ul li a:hover {
	background-color: var(--light-gray);
}

.user-menu ul li i {
	margin-right: 10px;
	width: 20px;
	text-align: center;
}

.user-menu .logout {
	color: #ff4444;
}

/* 登录状态下的用户面板样式 */
.user-panel.logged-in .login-popup {
	display: none !important;
}

/* 我的课程表样式 */
.my-course-panel {
	position: absolute;
	right: calc(50% - 600px);
	top: 50%;
	transform: translateY(-50%);
	width: 230px;
	height: 350px;
	background: white;
	border-radius: 10px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	padding: 20px;
	z-index: 100;
}

.my-course-panel h3 {
	color: #333;
	font-size: 18px;
	margin-bottom: 20px;
	text-align: center;
}

.course-list {
	margin-bottom: 15px;
}

.course-item {
	padding: 15px 0;
	border-bottom: 1px solid #f1f1f1;
}

.course-name {
	display: block;
	color: #333;
	font-size: 14px;
	margin-bottom: 5px;
}

.course-status {
	display: block;
	color: #999;
	font-size: 12px;
}

.view-all-btn {
	width: 100%;
	padding: 10px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	color: #333;
	cursor: pointer;
	transition: all 0.3s;
	margin-top: -5px;
}

.view-all-btn:hover {
	background: #f5f5f5;
}

/* 精品推荐导航样式 */
.featured-nav {
	background: #fff;
	padding: 15px 0;
	border-bottom: 1px solid #eee;
}

.featured-nav .container {
	display: flex;
	align-items: center;
}

.featured-title {
	font-size: 16px;
	color: #333;
	margin-right: 30px;
	position: relative;
}

.featured-title::after {
	content: '|';
	color: #ddd;
	position: absolute;
	right: -15px;
}

.featured-links {
	flex: 1;
	display: flex;
	justify-content: space-around;
	align-items: center;
}

.featured-links a {
	color: #666;
	text-decoration: none;
	font-size: 14px;
	transition: color 0.3s;
	display: flex;
	align-items: center;
}

.featured-links a:not(:last-child) {
	margin-right: 40px;
}

/* 在每个链接后添加分隔符 */
.featured-links a:not(:last-child)::before {
	content: '|';
	color: #ddd;
	margin: 0 20px;
}

.featured-links a:hover {
	color: var(--primary-color);
}

.mod-more {
	color: var(--primary-color);
	text-decoration: none;
	font-size: 14px;
	margin-right: 20px;
	margin-left: 20px;
}

/* 添加新的样式 */
.featured-courses {
	padding: 40px 0;
	background: #fff;
}

.section-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.section-header h2 {
	font-size: 20px;
	color: #494949;
}

.view-all {
	color: #a5a5a5;
	font-size: 12px;
	text-decoration: none;
}

.course-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 15px;
}

.course-card {
	background: white;
	border-radius: 4px;
	overflow: hidden;
	transition: box-shadow 0.3s;
}

.course-card:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.course-image {
	position: relative;
	height: 160px;
}

.course-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hot-tag,
.new-tag {
	position: absolute;
	top: 10px;
	right: -28px;
	transform: rotate(45deg);
	padding: 4px 30px;
	font-size: 12px;
	color: white;
}

.hot-tag {
	background: #ff1b1b;
}

.new-tag {
	background: #ff7c2d;
}

.course-info {
	padding: 20px 15px;
}

.course-info h3 {
	font-size: 14px;
	color: #050505;
	margin-bottom: 12px;
	line-height: 1.5;
	height: 42px;
	overflow: hidden;
}

.course-meta {
	display: flex;
	align-items: center;
	font-size: 12px;
}

.level {
	color: #ff7c2d;
}

.student-count {
	color: #999;
	margin-left: 5px;
}

/* 分类导航样式 */
.section-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.section-nav {
	display: flex;
	gap: 20px;
}

.section-nav a {
	color: #666;
	text-decoration: none;
	font-size: 14px;
	padding: 5px 0;
	position: relative;
}

.section-nav a.active {
	color: #00a1d6;
}

.section-nav a.active::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 2px;
	background: #00a1d6;
}

.view-all {
	color: #999;
	text-decoration: none;
	font-size: 14px;
}

/* 各个区域的特殊样式 */
.programming-entry {
	background: #f8f8f8;
	padding: 40px 0;
}

.programming-entry .section-header h2 {
	font-size: 20px;
	color: #494949;
}

.programming-content {
	display: flex;
	gap: 20px;
	margin-top: 20px;
	position: relative;
}

.left-content {
	width: 228px;
	height: 420px;
	background: linear-gradient(135deg, #5c4aad 0%, #3f2e8c 100%);
	border-radius: 4px;
	overflow: hidden;
}

.left-content img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.top-banner {
	width: calc(100% - 245px);
	position: absolute;
	right: 0;
	top: 0;
	border-radius: 4px;
	height: 100px;
}

.right-content {
	width: calc(100% - 228px);
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 25px;
	margin-top: 120px;
	margin-left: auto;
}

.right-content .course-item {
	border-radius: 4px;
	transition: box-shadow 0.3s;
}

.right-content .course-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 4px;
}

.data-analysis {
	background: #f8f8f8;
	padding: 40px 0;
}

.data-analysis .section-header h2 {
	font-size: 20px;
	color: #494949;
}

.data-analysis .programming-content {
	display: flex;
	gap: 20px;
	margin-top: 20px;
	position: relative;
}

.data-analysis .left-content {
	width: 228px;
	height: 420px;
	background: linear-gradient(135deg, #ff9a44 0%, #fc6076 100%);
	border-radius: 4px;
	overflow: hidden;
}

.data-analysis .left-content img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.data-analysis .top-banner {
	width: calc(100% - 245px);
	position: absolute;
	right: 0;
	top: 0;
	border-radius: 4px;
	height: 100px;
}

.data-analysis .right-content {
	width: calc(100% - 228px);
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 25px;
	margin-top: 120px;
	margin-left: auto;
}

.data-analysis .course-item {
	border-radius: 4px;
	overflow: hidden;
	transition: box-shadow 0.3s;
}

.data-analysis .course-item:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.data-analysis .course-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 4px;
}

.data-analysis .course-info {
	margin-top: 10px;
}

.data-analysis .course-meta {
	display: flex;
	align-items: center;
	gap: 5px;
	margin-top: 5px;
}

.data-analysis .level {
	color: #ff7c2d;
	font-size: 12px;
}

.data-analysis .student-count {
	color: #999;
	font-size: 12px;
}

/* 注册表单样式 */
.register-form {
	display: none;
	flex-direction: column;
	gap: 15px;
}

.register-form input {
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
}

.register-btn {
	padding: 10px;
	background: var(--primary-color);
	color: var(--white);
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.3s;
}

.register-btn:hover {
	background: #0052a3;
}