/* 全局样式 */
:root {
  --primary-green: #5B8C2E;    /* 农业绿 */
  --action-orange: #FFA726;    /* 行动按钮 */
  --policy-blue: #3F51B5;      /* 政策权威色 */
  --error-red: #F44336;        /* 错误提示色 */
  --text-dark: #333333;        /* 主要文字颜色 */
  --text-gray: #666666;        /* 次要文字颜色 */
  --bg-light: #F8F9FA;         /* 浅色背景 */
}

body {
  font-family: "思源黑体", "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", sans-serif;
  color: var(--text-dark);
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  overflow-x: hidden;
}

/* 底部导航栏 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: white;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  color: var(--text-gray);
}

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

.nav-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.nav-label {
  font-size: 12px;
}

/* 顶部导航栏 */
.top-header {
  position: sticky;
  top: 0;
  background-color: white;
  padding: 15px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  z-index: 50;
}

.back-btn {
  margin-right: 15px;
  font-size: 18px;
}

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

/* 卡片样式 */
.card {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  margin-bottom: 15px;
}

/* 按钮样式 */
.btn-primary {
  background-color: var(--primary-green);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-primary:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.btn-secondary {
  background-color: var(--action-orange);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-secondary:active {
  transform: scale(0.98);
  opacity: 0.9;
}

/* 标签样式 */
.tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  margin-right: 8px;
}

.tag-policy {
  background-color: var(--policy-blue);
  color: white;
}

.tag-tech {
  background-color: var(--primary-green);
  color: white;
}

/* 搜索栏 */
.search-bar {
  background-color: var(--bg-light);
  border-radius: 8px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  margin: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.search-icon {
  color: var(--text-gray);
  margin-right: 10px;
}

.search-input {
  border: none;
  background: transparent;
  flex: 1;
  font-size: 14px;
  color: var(--text-dark);
}

.search-input::placeholder {
  color: var(--text-gray);
}

/* 轮播图 */
.swiper {
  height: 250px;
  margin: 15px;
  border-radius: 12px;
  overflow: hidden;
}

.swiper-slide {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

/* 快捷入口 */
.quick-entries {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  padding: 15px;
}

.quick-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.entry-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 8px;
}

.entry-label {
  font-size: 12px;
  color: var(--text-dark);
  text-align: center;
}

/* 资讯瀑布流 */
.news-list {
  padding: 0 15px;
}

.news-item {
  padding: 15px;
  margin-bottom: 15px;
}

.news-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 1.4;
}

.news-summary {
  font-size: 14px;
  color: var(--text-gray);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.news-time {
  font-size: 12px;
  color: var(--text-gray);
}

/* 课程样式 */
.course-cover {
  position: relative;
  height: 200px;
  background-size: cover;
  background-position: center;
}

.course-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.7) 100%);
  display: flex;
  align-items: flex-end;
  padding: 15px;
}

.try-watch {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
}

.course-title {
  color: white;
  font-size: 18px;
  font-weight: 500;
}

.expert-info {
  display: flex;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #f0f0f0;
}

.expert-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 15px;
  position: relative;
}

.verified-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 18px;
  height: 18px;
  background-color: var(--primary-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
}

.expert-name {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}

.expert-students {
  font-size: 12px;
  color: var(--text-gray);
}

.course-outline {
  padding: 15px;
}

.outline-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 15px;
}

.chapter-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.chapter-left {
  display: flex;
  align-items: center;
}

.chapter-icon {
  margin-right: 10px;
  color: var(--text-gray);
}

.chapter-name {
  font-size: 14px;
}

.chapter-right {
  display: flex;
  align-items: center;
}

.chapter-duration {
  font-size: 12px;
  color: var(--text-gray);
  margin-right: 10px;
}

.chapter-locked {
  color: var(--text-gray);
}

/* 活动样式 */
.countdown {
  background-color: var(--error-red);
  color: white;
  padding: 10px 15px;
  text-align: center;
  font-weight: 500;
}

.countdown-number {
  font-size: 20px;
  margin-right: 5px;
}

.event-map {
  height: 180px;
  background-color: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-gray);
  position: relative;
}

.map-nav-btn {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background-color: white;
  color: var(--primary-green);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.signup-form {
  padding: 15px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-input {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 16px;
}

.form-input.error {
  border-color: var(--error-red);
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

/* 个人中心 */
.profile-header {
  background-color: var(--primary-green);
  padding: 30px 15px;
  color: white;
  display: flex;
  align-items: center;
}

.profile-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin-right: 20px;
  border: 2px solid white;
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 5px;
}

.profile-desc {
  font-size: 14px;
  opacity: 0.9;
}

.points-bar {
  margin-top: 8px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  height: 6px;
  position: relative;
  overflow: hidden;
}

.points-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(to right, #FFA726, #FFCC80);
  border-radius: 10px;
}

.points-text {
  font-size: 12px;
  margin-top: 5px;
}

.function-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background-color: white;
  padding: 20px 0;
}

.function-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
}

.function-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  color: var(--primary-green);
}

.function-label {
  font-size: 12px;
  color: var(--text-dark);
}

.post-demand {
  margin: 20px 15px;
}

.post-btn {
  width: 100%;
  background-color: var(--action-orange);
  color: white;
  text-align: center;
  padding: 12px 0;
  border-radius: 8px;
  font-weight: 500;
}

/* 老年模式适配 */
.large-text {
  font-size: 1.5em !important;
}

.large-text .nav-label {
  font-size: 16px !important;
}

.large-text .card {
  padding: 20px !important;
}

/* 离线模式提示 */
.offline-notice {
  background-color: #FFF3E0;
  color: var(--action-orange);
  padding: 10px 15px;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.offline-icon {
  margin-right: 10px;
} 