/* ============ Hero区域 ============ */
.hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  padding: 40px 0;  /* 从64px缩减到40px */
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  height: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, transparent 70%);
  opacity: 0.15;
}

.hero .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
  gap: 48px;
}

/* 左侧内容 */
.hero-left {
  flex: 1;
  max-width: 600px;
}

.hero-title {
  font-size: 28px;  /* 从36px缩减到28px */
  font-weight: 700;
  margin-bottom: 8px;  /* 从12px缩减到8px */
  letter-spacing: -1px;
}

.hero-desc {
  font-size: 14px;  /* 从16px缩减到14px */
  opacity: 0.8;
  margin-bottom: 16px;  /* 从24px缩减到16px */
  line-height: 1.6;  /* 从1.8缩减到1.6 */
}

.hero-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-tag {
  display: inline-block;
  background: rgba(255,255,255,0.1);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.1);
  text-decoration: none;
}

.hero-tag:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.3);
}

/* 右侧：讨论区+统计 */
.hero-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-end;
}

/* ============ 讨论区大卡片 ============ */
.discussion-hero-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  padding: 24px 28px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  min-width: 320px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
}

.discussion-hero-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
  animation: glow 4s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50% { transform: translate(-5%, -5%) scale(1.1); opacity: 1; }
}

.discussion-hero-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 50px rgba(102, 126, 234, 0.5);
}

.discussion-hero-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.discussion-icon-wrap {
  position: relative;
  flex-shrink: 0;
}

.discussion-emoji {
  font-size: 40px;
  position: relative;
  z-index: 1;
  display: block;
}

.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.5);
  animation: pulse-out 1.5s infinite;
}

@keyframes pulse-out {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

.discussion-info {
  flex: 1;
}

.discussion-info h3 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.discussion-info p {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
}

.discussion-online {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}

.online-dot-green {
  width: 10px;
  height: 10px;
  background: #48c78e;
  border-radius: 50%;
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.online-count-big {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.online-label-text {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  align-self: flex-end;
  margin-bottom: 4px;
}

.discussion-enter {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  position: relative;
  z-index: 1;
}

.enter-text {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

.enter-arrow {
  font-size: 16px;
  color: #fff;
  transition: transform 0.3s;
}

.discussion-hero-card:hover .enter-arrow {
  transform: translateX(4px);
}

/* ============ 弱化的统计数据 ============ */
.hero-stats-mini {
  display: flex;
  gap: 12px;
  align-items: center;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.hero-stats-mini:hover {
  opacity: 0.7;
}

.stat-mini {
  display: flex;
  align-items: baseline;
  gap: 2px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
}

.stat-mini-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.stat-mini-label {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
}

.stat-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.1);
}

/* ============ 主内容区 ============ */
.main {
  padding-top: 48px;
}

.main .container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
}

/* ============ 文章区域 ============ */
.posts-section {
  min-width: 0;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* ============ 文章卡片 ============ */
.post-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: var(--transition);
  overflow: hidden;
}

.post-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: transparent;
}

.post-card-link {
  display: block;
  padding: 24px;
}

.post-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.post-category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.post-category.category-tea {
  background: #fff0f3;
  color: #f5576c;
}

.post-date {
  font-size: 13px;
  color: var(--text-muted);
}

.post-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.post-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.read-more {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  white-space: nowrap;
}

/* 特色文章（第一篇） */
.post-card-featured {
  grid-column: span 2;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: #fff;
}

.post-card-featured .post-card-link {
  padding: 32px;
}

.post-card-featured .post-category {
  background: rgba(243, 128, 32, 0.2);
  color: var(--primary);
}

.post-card-featured .post-title {
  font-size: 24px;
  color: #fff;
}

.post-card-featured .post-excerpt {
  color: rgba(255,255,255,0.7);
  -webkit-line-clamp: 4;
}

.post-card-featured .post-date {
  color: rgba(255,255,255,0.5);
}

.post-card-featured .tag {
  color: rgba(255,255,255,0.5);
}

.post-card-featured .read-more {
  color: var(--primary);
}

/* 茶水间卡片 */
.post-card-tea:not(.post-card-featured) {
  background: linear-gradient(135deg, #fff5f7 0%, #fff 100%);
  border-color: #ffe0e6;
}

/* ============ 侧边栏 ============ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border);
}

.sidebar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* 分类列表 */
.category-list {
  list-style: none;
}

.category-list li {
  margin-bottom: 4px;
}

.category-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-size: 14px;
}

.category-list a:hover {
  background: var(--bg-secondary);
}

.category-list a.tea-link {
  background: #fff0f3;
  color: #f5576c;
}

.category-list a.tea-link:hover {
  background: #ffe8ec;
}

.cat-name {
  color: var(--text-primary);
}

.tea-link .cat-name {
  color: #f5576c;
}

.cat-count {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.tea-link .cat-count {
  background: rgba(245, 87, 108, 0.15);
  color: #f5576c;
}

/* 标签云 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-item {
  display: inline-block;
  padding: 6px 14px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: 20px;
  font-size: 13px;
  transition: var(--transition);
}

.tag-item:hover {
  background: var(--primary);
  color: #fff;
}

/* 关于卡片 */
.about-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.admin-link {
  display: inline-block;
  font-size: 13px;
  color: var(--text-muted);
  transition: var(--transition);
}

.admin-link:hover {
  color: var(--primary);
}

/* 访问统计卡片 */
.stats-card {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border: none;
}

.stats-card .sidebar-title {
  color: #fff;
  border-bottom-color: rgba(255,255,255,0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-item {
  text-align: center;
  padding: 12px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
}

.stat-item .stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.stat-item .stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .hero .container {
    flex-direction: column;
    gap: 32px;
  }
  
  .hero-left {
    max-width: 100%;
    text-align: center;
  }
  
  .hero-tags {
    justify-content: center;
  }
  
  .hero-right {
    align-items: center;
    width: 100%;
  }
  
  .discussion-hero-card {
    width: 100%;
    min-width: auto;
  }
  
  .main .container {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    order: -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  
  .post-card-featured {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 32px 0;
  }
  
  .hero-title {
    font-size: 24px;
  }
  
  .hero-desc {
    font-size: 14px;
  }
  
  .hero-tags {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .hero-tag {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  /* 文章卡片移动端优化 - 重构版 */
  .posts-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .post-card {
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .post-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  }
  
  .post-card-link {
    padding: 14px 16px;
  }
  
  .post-card-header {
    margin-bottom: 8px;
  }
  
  .post-category {
    font-size: 11px;
    padding: 3px 8px;
  }
  
  .post-date {
    font-size: 12px;
  }
  
  .post-title {
    font-size: 16px;
    line-height: 1.45;
    margin-bottom: 6px;
    -webkit-line-clamp: 2;
    font-weight: 600;
  }
  
  .post-excerpt {
    font-size: 13px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    margin-bottom: 10px;
    color: var(--text-secondary);
  }
  
  .post-card-featured {
    grid-column: span 1;
    border-radius: 14px;
  }
  
  .post-card-featured .post-card-link {
    padding: 18px;
  }
  
  .post-card-featured .post-title {
    font-size: 17px;
    -webkit-line-clamp: 2;
  }
  
  .post-card-featured .post-excerpt {
    -webkit-line-clamp: 2;
    font-size: 13px;
  }
  
  .post-footer {
    flex-direction: row;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
  }
  
  .post-tags {
    flex-wrap: nowrap;
    overflow: hidden;
    max-width: 70%;
  }
  
  .post-tags .tag {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
  }
  
  .post-tags .tag:first-child {
    display: inline;
  }
  
  .post-tags .tag:nth-child(n+2) {
    display: none;
  }
  
  .read-more {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
  }
  
  /* 侧边栏优化 */
  .sidebar {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .sidebar-card {
    border-radius: 16px;
    padding: 16px;
  }
  
  .hero-stats-mini {
    width: 100%;
    justify-content: center;
  }
  
  /* 讨论区卡片移动端 */
  .discussion-hero-card {
    border-radius: 16px;
    padding: 20px;
  }
  
  .discussion-hero-inner {
    gap: 12px;
  }
  
  .discussion-icon-wrap {
    width: 48px;
    height: 48px;
  }
  
  .discussion-emoji {
    font-size: 24px;
  }
  
  .discussion-info h3 {
    font-size: 16px;
  }
  
  .discussion-online {
    padding: 6px 12px;
  }
  
  .online-count-big {
    font-size: 20px;
  }
}
