/* 茶智库APP - 全局样式表 */

/* 颜色变量 */
:root {
  --primary-color: #7BAE7F; /* 主色调：茶绿色 */
  --secondary-color: #8C4D3F; /* 辅助色：茶褐色 */
  --accent-color: #D9A566; /* 点缀色：金黄色 */
  --background-color: #F9F5E7; /* 背景色：米白色 */
  --text-color: #333333; /* 文本颜色：深灰色 */
  --light-text: #666666; /* 浅色文本 */
  --white: #FFFFFF; /* 白色 */
  --light-gray: #F5F5F5; /* 浅灰色 */
  --border-color: #E0E0E0; /* 边框颜色 */
  --success-color: #4CAF50; /* 成功色 */
  --warning-color: #FFC107; /* 警告色 */
  --error-color: #F44336; /* 错误色 */
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 阴影 */
  --primary-light: rgba(123, 174, 127, 0.1); /* 主色调浅色背景 */
}

/* 全局重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-size: 14px;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

ul, ol {
  list-style: none;
}

/* 布局容器 */
.container {
  max-width: 414px; /* 移动端最大宽度 */
  margin: 0 auto;
  background-color: var(--white);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* 头部导航 */
.header {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  background-color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

.header-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color);
}

.header-left, .header-right {
  display: flex;
  align-items: center;
}

.header-icon {
  width: 24px;
  height: 24px;
  margin: 0 5px;
}

/* 底部标签栏 */
.tabbar {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 414px;
  margin: 0 auto;
  height: 56px;
  background-color: var(--white);
  border-top: 1px solid var(--border-color);
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  padding: 0 10px;
  justify-content: space-around;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--light-text);
  font-size: 10px;
  position: relative;
  transition: all 0.3s ease;
  padding: 8px 0;
}

.tab-item.active {
  color: var(--primary-color);
  transform: translateY(-2px);
}

.tab-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 3px 3px 0 0;
}

.tab-icon {
  font-size: 20px;
  margin-bottom: 4px;
  transition: all 0.3s ease;
}

.tab-item.active .tab-icon {
  transform: scale(1.1);
}

.tab-item span {
  font-weight: 500;
}

/* 调整内容区域，为底部菜单留出空间 */
.content {
  padding: 15px;
  padding-bottom: 70px; /* 为底部标签栏留出空间 */
}

/* 搜索框 */
.search-box, .search-bar {
  display: flex;
  align-items: center;
  background-color: var(--light-gray);
  border-radius: 20px;
  padding: 8px 15px;
  margin: 10px 0;
}

.search-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
}

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

/* 轮播图 */
.swiper {
  width: 100%;
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  margin: 15px 0;
}

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

.swiper-slide {
  position: relative;
}

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

.swiper-slide.active {
  display: block;
}

.swiper-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 15px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
  color: white;
}

.swiper-caption h3 {
  font-size: 16px;
  margin-bottom: 5px;
}

.swiper-caption p {
  font-size: 12px;
  opacity: 0.9;
}

.swiper-pagination {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
}

.swiper-dot, .swiper-pagination-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  margin: 0 3px;
}

.swiper-dot.active, .swiper-pagination-bullet.active {
  background-color: var(--white);
}

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

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-more {
  font-size: 12px;
  color: var(--light-text);
}

/* 快捷操作区 */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 15px 0;
}

.quick-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.quick-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(123, 174, 127, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
}

.quick-action-icon img {
  width: 24px;
  height: 24px;
}

.quick-action-text {
  font-size: 12px;
  color: var(--text-color);
}

/* 导航网格 */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 15px 0;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-color);
}

.nav-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.nav-text {
  font-size: 12px;
  color: var(--text-color);
}

/* 茶叶列表 */
.tea-list {
  margin: 15px 0;
}

.tea-item {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.tea-image {
  width: 80px;
  height: 80px;
  border-radius: 4px;
  margin-right: 10px;
  background-size: cover;
  background-position: center;
}

.tea-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tea-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
}

.tea-desc {
  font-size: 12px;
  color: var(--light-text);
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tea-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tea-price {
  color: var(--secondary-color);
  font-weight: 600;
}

.tea-rating {
  display: flex;
  align-items: center;
}

.rating-star {
  color: var(--accent-color);
  margin-right: 2px;
}

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

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

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

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

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

/* 表单元素 */
.form-group {
  margin-bottom: 15px;
}

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

.form-input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
  outline: none;
}

.form-input:focus {
  border-color: var(--primary-color);
}

.form-select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
  outline: none;
  background-color: var(--white);
}

.form-textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
  outline: none;
  min-height: 100px;
  resize: vertical;
}

/* 评分滑块 */
.rating-slider {
  width: 100%;
  margin: 10px 0;
}

.slider-container {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.slider-label {
  width: 80px;
  font-size: 14px;
}

.slider {
  flex: 1;
  -webkit-appearance: none;
  height: 5px;
  border-radius: 5px;
  background: var(--light-gray);
  outline: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
}

.slider-value {
  width: 40px;
  text-align: right;
  font-size: 14px;
  color: var(--primary-color);
  font-weight: 600;
}

/* 雷达图 */
.radar-chart {
  width: 100%;
  height: 200px;
  margin: 20px 0;
}

/* 步骤指示器 */
.steps {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--border-color);
  z-index: 1;
}

.step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
  color: var(--light-text);
  font-weight: 600;
  border: 2px solid var(--white);
}

.step.active .step-icon {
  background-color: var(--primary-color);
  color: var(--white);
}

.step.completed .step-icon {
  background-color: var(--success-color);
  color: var(--white);
}

.step-text {
  font-size: 12px;
  color: var(--light-text);
}

.step.active .step-text {
  color: var(--primary-color);
  font-weight: 500;
}

/* 用户信息 */
.user-info {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.user-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-right: 15px;
  background-size: cover;
  background-position: center;
}

.user-details {
  flex: 1;
}

.user-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
}

.user-level {
  display: inline-block;
  padding: 2px 8px;
  background-color: rgba(217, 165, 102, 0.1);
  color: var(--accent-color);
  border-radius: 10px;
  font-size: 12px;
  margin-right: 5px;
}

/* 徽章系统 */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
}

.badge {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.badge img {
  width: 30px;
  height: 30px;
}

.badge.locked {
  opacity: 0.5;
}

.badge.locked::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 列表项 */
.list-item {
  display: flex;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.list-icon {
  width: 24px;
  height: 24px;
  margin-right: 10px;
}

.list-content {
  flex: 1;
}

.list-title {
  font-size: 16px;
  margin-bottom: 3px;
}

.list-desc {
  font-size: 12px;
  color: var(--light-text);
}

.list-arrow {
  width: 16px;
  height: 16px;
  color: var(--light-text);
}

/* 标签 */
.tags {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -5px;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  background-color: var(--light-gray);
  color: var(--light-text);
  border-radius: 15px;
  font-size: 12px;
  margin: 0 5px 5px 0;
  cursor: pointer;
}

.tag.active {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

/* 海报生成 */
.poster-preview {
  width: 100%;
  height: 400px;
  background-color: var(--light-gray);
  border-radius: 8px;
  margin: 15px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.poster-template {
  width: 80px;
  height: 120px;
  border-radius: 4px;
  margin: 0 5px;
  background-size: cover;
  background-position: center;
  border: 2px solid transparent;
}

.poster-template.active {
  border-color: var(--primary-color);
}

.poster-templates {
  display: flex;
  overflow-x: auto;
  padding: 10px 0;
}

/* 泡茶计时器 */
.timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
}

.timer-display {
  font-size: 48px;
  font-weight: 600;
  margin: 10px 0;
}

.timer-controls {
  display: flex;
  gap: 10px;
}

/* 区块样式 */
.section {
  margin-bottom: 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
}

.section-more {
  font-size: 12px;
  color: var(--light-text);
}

/* 按钮尺寸 */
.btn-sm {
  padding: 4px 12px;
  font-size: 12px;
}

/* 动画 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

/* 响应式调整 */
@media (max-width: 320px) {
  .quick-actions, .nav-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .header-title {
    font-size: 16px;
  }
}

/* 工具类 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-accent { color: var(--accent-color); }
.mt-10 { margin-top: 10px; }
.mb-10 { margin-bottom: 10px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.p-15 { padding: 15px; }
.flex { display: flex; }
.flex-between { justify-content: space-between; }
.flex-center { justify-content: center; align-items: center; }
.flex-column { flex-direction: column; }
.gap-10 { gap: 10px; }
.w-100 { width: 100%; }
.h-100 { height: 100%; }
.rounded { border-radius: 8px; }
.shadow { box-shadow: var(--shadow); }

/* 评测列表项样式 */
.evaluation-item {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.evaluation-item:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

.evaluation-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.evaluation-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-size: cover;
  margin-right: 10px;
}

.evaluation-user {
  flex: 1;
}

.evaluation-username {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}

.evaluation-date {
  font-size: 12px;
  color: var(--light-text);
}

.evaluation-content {
  display: flex;
  margin-bottom: 10px;
}

.evaluation-info {
  flex: 1;
}

.evaluation-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
}

.evaluation-desc {
  font-size: 14px;
  color: var(--light-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.evaluation-image {
  width: 80px;
  height: 80px;
  border-radius: 4px;
  background-size: cover;
  margin-left: 10px;
}

.evaluation-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.evaluation-stats {
  display: flex;
  align-items: center;
}

.evaluation-rating {
  margin-right: 15px;
}

.evaluation-rating i {
  color: var(--accent-color);
  margin-right: 5px;
}

.evaluation-rating span {
  font-size: 14px;
  font-weight: 600;
}

.evaluation-views i,
.evaluation-likes i,
.evaluation-comments i {
  color: var(--light-text);
  margin-right: 5px;
}

.evaluation-views span,
.evaluation-likes span,
.evaluation-comments span {
  font-size: 12px;
  color: var(--light-text);
}

.evaluation-actions {
  display: flex;
}

.evaluation-likes {
  margin-right: 15px;
}

/* 标签页样式 */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 15px;
}

.tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  color: var(--light-text);
  cursor: pointer;
}

.tab-active {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-weight: 500;
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  cursor: pointer;
}

/* 悬浮按钮 */
.float-btn {
  position: fixed;
  bottom: 70px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 99;
}

/* 点赞按钮交互 */
.like-btn {
  cursor: pointer;
}

.like-btn .fas.fa-heart {
  color: var(--secondary-color);
}

/* 成就排行榜 */
.user-level {
    display: inline-block;
    padding: 2px 8px;
    background-color: rgba(217, 165, 102, 0.1);
    color: var(--accent-color);
    border-radius: 10px;
    font-size: 12px;
    margin-right: 5px;
}

/* 我的茶库样式 */
.my-tea-collection {
    padding: 10px 0;
}

.tea-collection-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.stats-number {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

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

.tea-collection-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.tea-collection-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
}

.tea-collection-image {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    margin-bottom: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
}

.tea-collection-name {
    font-size: 12px;
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tea-collection-item.more .tea-collection-more {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    color: var(--light-text);
    font-size: 18px;
}

.tea-collection-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 5px;
}

/* 评测项目样式 */
.evaluation-item {
    display: flex;
    flex-direction: column;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
} 