/* 主应用样式 */
:root {
  --primary-color: #4caf50;
  --primary-dark: #388e3c;
  --primary-light: #81c784;
  --secondary-color: #ff9800;
  --text-color: #333333;
  --text-light: #757575;
  --background-light: #f5f5f5;
  --border-color: #e0e0e0;
  --success-color: #66bb6a;
  --warning-color: #ffa726;
  --danger-color: #ef5350;
  --border-radius: 8px;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
}

#app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* 基础组件样式 */
.page-container {
  padding-bottom: 60px;
  min-height: 100vh;
}

.page-content {
  padding: 16px;
}

/* 顶部导航样式 */
.top-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: white;
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-color);
}

.top-header h1 {
  font-size: 17px;
  font-weight: 600;
  flex: 1;
  text-align: center;
}

.top-header .back-button {
  font-size: 20px;
  color: var(--primary-color);
}

/* 底部导航样式 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  display: flex;
  height: 50px;
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.bottom-nav .nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 10px;
  text-decoration: none;
}

.bottom-nav .nav-item.active {
  color: var(--primary-color);
}

.bottom-nav .nav-item i {
  font-size: 20px;
  margin-bottom: 2px;
}

/* 卡片组件样式 */
.card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  overflow: hidden;
}

/* 信息卡片样式 */
.info-card {
  display: flex;
  padding: 12px;
}

.info-card .card-image {
  width: 100px;
  height: 70px;
  border-radius: 4px;
  object-fit: cover;
  margin-right: 12px;
}

.info-card .card-content {
  flex: 1;
}

.info-card .card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.info-card .card-desc {
  font-size: 13px;
  color: var(--text-light);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.info-card .card-meta {
  display: flex;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-light);
}

.info-card .card-meta span {
  margin-right: 8px;
  display: flex;
  align-items: center;
}

.info-card .card-meta i {
  font-size: 14px;
  margin-right: 2px;
}

/* 课程卡片样式 */
.course-card .card-tag {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--secondary-color);
  color: white;
  padding: 2px 6px;
  border-radius: 0 0 0 4px;
  font-size: 10px;
}

.course-card .card-image-container {
  position: relative;
  height: 120px;
  overflow: hidden;
}

.course-card .card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-card .card-body {
  padding: 10px 12px;
}

.course-card .card-price {
  color: var(--danger-color);
  font-weight: bold;
  margin-top: 4px;
  font-size: 15px;
}

.course-card .card-price small {
  font-size: 12px;
  color: var(--text-light);
  text-decoration: line-through;
  margin-left: 4px;
}

/* 活动卡片样式 */
.activity-card {
  display: flex;
  flex-direction: column;
}

.activity-card .card-header {
  position: relative;
  height: 100px;
  overflow: hidden;
}

.activity-card .card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.activity-card .card-status {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.activity-card .card-body {
  padding: 12px;
}

.activity-card .card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.activity-card .card-meta {
  display: flex;
  flex-direction: column;
}

.activity-card .meta-item {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--text-light);
}

.activity-card .meta-item i {
  margin-right: 4px;
  font-size: 14px;
  width: 14px;
  text-align: center;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--border-radius);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

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

.btn-primary:active {
  background-color: var(--primary-dark);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:active {
  background-color: rgba(76, 175, 80, 0.1);
}

.btn-block {
  display: block;
  width: 100%;
}

/* 搜索框样式 */
.search-bar {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 20px;
  padding: 8px 12px;
  margin-bottom: 12px;
}

.search-bar i {
  color: var(--text-light);
  margin-right: 8px;
}

.search-bar input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 14px;
}

/* 分类菜单样式 */
.category-menu {
  display: flex;
  overflow-x: auto;
  margin: 10px 0;
  padding-bottom: 5px;
  -webkit-overflow-scrolling: touch;
}

.category-menu::-webkit-scrollbar {
  display: none;
}

.category-item {
  padding: 6px 14px;
  background: white;
  border-radius: 16px;
  margin-right: 8px;
  font-size: 13px;
  white-space: nowrap;
  color: var(--text-light);
}

.category-item.active {
  background: var(--primary-color);
  color: white;
}

/* 轮播图样式 */
.swiper {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  height: 150px;
  margin-bottom: 16px;
}

.swiper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 功能入口区域 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.feature-item .icon-bg {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: rgba(76, 175, 80, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.feature-item .icon-bg i {
  color: var(--primary-color);
  font-size: 22px;
}

.feature-item .feature-name {
  font-size: 12px;
  color: var(--text-color);
  text-align: center;
} 