/* 全局样式 */
:root {
  --primary-color: #4CAF50;
  --secondary-color: #8BC34A;
  --accent-color: #FF9800;
  --text-color: #333333;
  --light-bg: #F5F5F5;
  --card-shadow: 0 2px 5px rgba(0,0,0,0.1);
  --header-height: 56px;
  --footer-height: 60px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-color);
  padding-bottom: var(--footer-height);
}

/* 底部安全区域适配 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  body {
    padding-bottom: calc(var(--footer-height) + env(safe-area-inset-bottom));
  }
  .bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

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

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 12px;
  text-decoration: none;
}

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

.nav-item i {
  font-size: 22px;
  margin-bottom: 4px;
}

/* 顶部导航栏 */
.top-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 16px;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 10;
}

.back-button {
  margin-right: 16px;
  font-size: 18px;
}

.page-title {
  font-size: 18px;
  font-weight: 500;
  flex: 1;
  text-align: center;
}

/* 卡片样式 */
.card {
  background-color: white;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--card-shadow);
}

/* 主要按钮 */
.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 500;
}

/* 标签 */
.tag {
  display: inline-block;
  background-color: #f0f0f0;
  color: #666;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  margin-right: 8px;
}

.tag-green {
  background-color: rgba(76, 175, 80, 0.1);
  color: var(--primary-color);
}

.tag-orange {
  background-color: rgba(255, 152, 0, 0.1);
  color: var(--accent-color);
}

/* 内容区域 */
.content-container {
  padding: 16px;
}

/* 列表样式 */
.list-item {
  display: flex;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item-image {
  width: 80px;
  height: 60px;
  border-radius: 4px;
  background-color: #f0f0f0;
  margin-right: 12px;
  background-size: cover;
  background-position: center;
}

.list-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.item-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
  line-height: 1.3;
}

.item-info {
  display: flex;
  font-size: 12px;
  color: #999;
}

.item-date {
  margin-right: 12px;
}

/* 分段控制器 */
.segmented-control {
  display: flex;
  background-color: #f5f5f5;
  border-radius: 8px;
  padding: 2px;
  margin-bottom: 16px;
}

.segment {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  font-size: 14px;
  border-radius: 6px;
}

.segment.active {
  background-color: white;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* 加载更多 */
.load-more {
  text-align: center;
  padding: 16px;
  color: #999;
  font-size: 14px;
}

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  color: #999;
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  color: #ddd;
}

/* 页面组件特定样式 */
/* 首页 */
.banner {
  height: 160px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  margin-bottom: 16px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

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

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

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

.feature-name {
  font-size: 12px;
  color: #666;
  text-align: center;
}

/* 课程卡片 */
.course-card {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  margin-bottom: 16px;
}

.course-image {
  height: 120px;
  background-size: cover;
  background-position: center;
}

.course-info {
  padding: 12px;
  background-color: white;
}

.course-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 8px;
}

.course-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #999;
}

/* 活动卡片 */
.activity-card {
  display: flex;
  padding: 12px;
  background-color: white;
  border-radius: 8px;
  margin-bottom: 12px;
  box-shadow: var(--card-shadow);
}

.activity-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 50px;
  margin-right: 12px;
}

.activity-month {
  font-size: 12px;
  color: #999;
}

.activity-day {
  font-size: 20px;
  font-weight: bold;
  color: var(--primary-color);
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
}

.activity-location {
  font-size: 12px;
  color: #999;
  display: flex;
  align-items: center;
}

.activity-location i {
  margin-right: 4px;
  font-size: 14px;
}

/* 天气预警组件 */
.weather-alert {
  background-color: rgba(255, 152, 0, 0.1);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
}

.weather-alert i {
  color: var(--accent-color);
  font-size: 20px;
  margin-right: 12px;
}

.weather-alert-text {
  flex: 1;
  font-size: 13px;
  color: #666;
}

/* 详情页 */
.detail-header {
  margin-bottom: 16px;
}

.detail-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.4;
}

.detail-meta {
  display: flex;
  font-size: 13px;
  color: #999;
  margin-bottom: 16px;
}

.detail-meta div {
  margin-right: 16px;
}

.detail-content {
  font-size: 15px;
  line-height: 1.6;
  color: #333;
}

.detail-content p {
  margin-bottom: 16px;
}

.detail-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 16px 0;
} 