:root {
  --primary-color: #4CAF50;
  --secondary-color: #388E3C;
  --text-color: #333333;
  --light-gray: #f8f8f8;
  --border-color: #f0f0f0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text-primary);
  background-color: #f9f9f9;
  line-height: 1.6;
}

#app {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background-color: white;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 15px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  margin-right: 12px;
  transition: transform 0.3s ease;
}

.logo:hover img {
  transform: rotate(5deg);
}

.logo h1 {
  font-size: 1.6rem;
  color: var(--primary-color);
  font-weight: 700;
  letter-spacing: 0.5px;
}

nav ul {
  display: flex;
  list-style: none;
}

nav li {
  margin-left: 25px;
  transition: all 0.3s ease;
}

nav a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 50px;
  transition: all 0.3s ease;
  position: relative;
}

nav li:hover {
  transform: translateY(-2px);
}

nav li:hover a {
  color: var(--primary-color);
}

nav li.active a {
  color: var(--primary-color);
  font-weight: 600;
}

nav li.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 3px;
}

main {
  flex: 1;
  padding: 30px;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 30px;
  color: var(--text-primary);
  font-weight: 700;
  position: relative;
  padding-bottom: 10px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 3px;
}

.card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  aspect-ratio: 16/9;
}

.card-content {
  padding: 15px;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #666;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.btn {
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(76, 175, 80, 0.2);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn .material-icons {
  margin-right: 6px;
  font-size: 18px;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(76, 175, 80, 0.3);
  background-color: var(--primary-dark);
}

.btn:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(76, 175, 80, 0.2);
}

.btn-secondary {
  background-color: var(--accent-color);
  box-shadow: 0 4px 10px rgba(255, 152, 0, 0.2);
}

.btn-secondary:hover {
  box-shadow: 0 6px 15px rgba(255, 152, 0, 0.3);
  background-color: var(--accent-dark);
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-large {
  padding: 12px 30px;
  font-size: 16px;
}

footer {
  background-color: white;
  padding: 20px 30px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-top: 1px solid #f0f0f0;
  margin-top: 40px;
}

/* 课程页面样式 */
.courses-container {
  padding: 20px 0;
}

.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.category-btn {
  padding: 8px 16px;
  border-radius: 50px;
  background: #f0f0f0;
  border: none;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-btn:hover {
  background-color: #e0e0e0;
  transform: translateY(-2px);
}

.category-btn.active {
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(76, 175, 80, 0.2);
}

/* 详情页面通用样式 */
.back-btn {
  margin-bottom: 20px;
}

.back-btn a {
  color: var(--text-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-size: 16px;
}

.back-btn a:hover {
  color: var(--primary-color);
}

/* 课程详情页样式 */
.course-detail {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  padding: 20px;
}

.course-header {
  display: flex;
  margin-bottom: 30px;
}

.course-cover {
  width: 300px;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 30px;
}

.course-title {
  font-size: 24px;
  margin-bottom: 15px;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.course-meta > div {
  display: flex;
  align-items: center;
}

.course-meta .material-icons {
  margin-right: 5px;
  font-size: 18px;
  color: #666;
}

.course-content {
  padding: 0 20px;
}

.course-description, .course-curriculum {
  margin-bottom: 30px;
}

.course-description h3, .course-curriculum h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #333;
}

.course-description p {
  margin-bottom: 15px;
  line-height: 1.6;
  color: #666;
}

.curriculum-item {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.curriculum-header {
  padding: 15px;
  display: flex;
  align-items: center;
  background: #f9f9f9;
  cursor: pointer;
}

.curriculum-header .material-icons {
  margin-right: 10px;
  color: var(--primary-color);
}

.curriculum-header span:nth-child(2) {
  flex: 1;
}

.curriculum-header span:last-child {
  color: #999;
  font-size: 14px;
}

/* 问答社区样式 */
.community-container {
  padding: 20px 0;
}

.community-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.search-bar {
  display: flex;
  max-width: 500px;
  margin-top: 20px;
}

.search-bar input {
  flex: 1;
  height: 46px;
  border: 1px solid #e0e0e0;
  border-radius: 50px 0 0 50px;
  padding: 0 20px;
  font-size: 14px;
  transition: all 0.3s ease;
  background-color: #f9f9f9;
}

.search-bar input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
  outline: none;
  background-color: white;
}

.search-btn {
  height: 46px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0 50px 50px 0;
  padding: 0 20px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.search-btn:hover {
  background: var(--primary-dark);
}

.ask-btn {
  height: 40px;
}

.question-card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.question-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.question-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #333;
}

.question-desc {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.question-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-info {
  display: flex;
  align-items: center;
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 8px;
  object-fit: cover;
}

.time {
  font-size: 12px;
  color: #999;
  margin-left: 10px;
}

.stats {
  display: flex;
  gap: 15px;
  font-size: 12px;
  color: #999;
}

.stats span {
  display: flex;
  align-items: center;
}

.stats .material-icons {
  font-size: 14px;
  margin-right: 3px;
}

/* 直播页面样式 */
.live-container {
  padding: 20px 0;
}

.live-tabs {
  display: flex;
  margin-bottom: 20px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.tab-btn {
  flex: 1;
  padding: 12px 0;
  text-align: center;
  background: none;
  border: none;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn.active {
  color: var(--primary-color);
  font-weight: bold;
  position: relative;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px;
}

.tab-btn:hover {
  background-color: #f0f0f0;
}

.live-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.live-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.live-cover {
  position: relative;
  height: 180px;
}

.live-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live-status {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  color: white;
}

.status-live {
  background: #f44336;
}

.status-upcoming {
  background: #2196F3;
}

.status-replay {
  background: #9e9e9e;
}

.live-viewers {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  color: white;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
}

.live-viewers .material-icons {
  font-size: 14px;
  margin-right: 5px;
}

.live-info {
  padding: 15px;
}

.live-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #333;
}

.host-info {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

.host-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 8px;
  object-fit: cover;
}

.live-time {
  font-size: 12px;
  color: #999;
}

/* 资源页面样式 */
.resources-container {
  padding: 20px 0;
}

.resource-tabs {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 20px;
  background: white;
  border-radius: 8px;
  padding: 10px;
}

.resource-tabs .tab-btn {
  flex: none;
  padding: 8px 15px;
  margin: 5px;
  border-radius: 20px;
  background: #f5f5f5;
  transition: all 0.3s ease;
}

.resource-tabs .tab-btn.active {
  background: var(--primary-color);
  color: white;
}

.resource-tabs .tab-btn.active::after {
  display: none;
}

.resource-tabs .tab-btn:hover {
  background-color: #f0f0f0;
}

.resource-card {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.resource-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.resource-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
}

.resource-icon img {
  width: 30px;
  height: 30px;
}

.resource-info {
  flex: 1;
}

.resource-title {
  font-size: 16px;
  margin-bottom: 5px;
  color: #333;
}

.resource-meta {
  display: flex;
  font-size: 12px;
  color: #999;
}

.resource-meta span {
  margin-right: 15px;
}

.download-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.download-btn .material-icons {
  font-size: 20px;
}

/* 个人中心样式 */
.mine-container {
  padding: 20px 0;
}

.user-profile {
  background: white;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.avatar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 30px;
}

.user-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 10px;
  object-fit: cover;
}

.user-name {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 5px;
}

.user-level {
  font-size: 14px;
  color: var(--primary-color);
}

.user-stats {
  display: flex;
  flex: 1;
  justify-content: space-around;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
}

.stat-label {
  font-size: 14px;
  color: #666;
}

.mine-section {
  background: white;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 18px;
  margin-bottom: 15px;
  color: #333;
}

.mine-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.mine-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  border-radius: 8px;
  background: #f8f8f8;
  cursor: pointer;
  transition: transform 0.2s;
}

.mine-item:hover {
  transform: translateY(-3px);
  background: #f0f0f0;
}

.mine-item i {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--primary-color);
}

.points-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.points-value {
  font-size: 18px;
  font-weight: bold;
}

.exchange-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.exchange-item {
  background: #f8f8f8;
  border-radius: 8px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.exchange-item img {
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
}

.exchange-name {
  font-weight: bold;
  margin-bottom: 5px;
}

.exchange-points {
  color: #666;
  margin-bottom: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  header {
    flex-direction: column;
  }
  
  nav {
    margin-top: 15px;
    width: 100%;
  }
  
  nav ul {
    justify-content: space-between;
    width: 100%;
  }
  
  nav li {
    margin: 0;
  }
  
  .course-header {
    flex-direction: column;
  }
  
  .course-cover {
    width: 100%;
    margin-right: 0;
    margin-bottom: 15px;
  }
  
  .community-header {
    flex-direction: column;
  }
  
  .search-bar {
    width: 100%;
    margin-right: 0;
    margin-bottom: 15px;
  }
  
  .ask-btn {
    width: 100%;
  }
  
  .resource-tabs {
    overflow-x: auto;
    white-space: nowrap;
    flex-wrap: nowrap;
  }
  
  .resource-tabs .tab-btn {
    flex: 0 0 auto;
  }
}

/* 添加平滑滚动效果 */
html {
  scroll-behavior: smooth;
}

/* 添加页面过渡动画 */
#content {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 响应式图片 */
img {
  max-width: 100%;
  height: auto;
}

.user-avatar, .user-avatar-large, .host-avatar {
  object-fit: cover;
}

/* 美化卡片样式 */
.course-card, .question-card, .live-card, .resource-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.course-card:hover, .question-card:hover, .live-card:hover, .resource-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.card-img {
  height: 180px;
  object-fit: cover;
  transition: all 0.5s ease;
}

.course-card:hover .card-img {
  transform: scale(1.05);
}

.card-content {
  padding: 16px;
  background: white;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 44px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
}

.card-meta span {
  display: flex;
  align-items: center;
}

.card-meta .material-icons {
  font-size: 16px;
  margin-right: 4px;
}

/* 美化课程网格 */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
} 