﻿/* ==================== Reset & Base ==================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #f4f5f6;
  color: #222;
  line-height: 1.6;
}
a { text-decoration: none; color: #222; }
a:hover { color: #e4393c; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
input, button { font-family: inherit; font-size: inherit; outline: none; border: none; }
::selection { background: #e4393c; color: #fff; }

/* ==================== Utility ==================== */
.container { width: 1200px; margin: 0 auto; }
.clearfix::after { content: ''; display: table; clear: both; }

/* ==================== Header ==================== */
.header {
  position: sticky; top: 0; z-index: 1000;
  background: #fff; border-bottom: 1px solid #e8e8e8; height: 56px;
  transition: box-shadow 0.3s;
}
.header--scrolled {
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  overflow: visible;
}
.header-inner {
  width: 1200px; margin: 0 auto; display: flex; align-items: center;
  height: 56px; position: relative;
  transition: width 0.3s, padding 0.3s;
}
.header--scrolled .header-inner {
  width: 100%; padding: 0 24px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  opacity: 0; visibility: hidden;
  max-width: 0; margin-right: 0; overflow: hidden;
  transition: opacity 0.3s, visibility 0.3s, max-width 0.3s, margin-right 0.3s;
}
.header--scrolled .logo {
  opacity: 1; visibility: visible;
  max-width: 300px; margin-right: 30px;
}
.logo-icon {
  width: 32px; height: 32px; border-radius: 6px;
}
.logo-text {
  font-size: 22px; font-weight: 700; color: #e4393c; letter-spacing: 1px;
}

/* Navigation */
.nav { display: flex; align-items: center; gap: 0; flex: 1; }
.nav-item {
  padding: 0 14px; height: 56px; line-height: 56px; font-size: 15px;
  color: #555; position: relative; cursor: pointer; white-space: nowrap;
  transition: color 0.2s;
}
.nav-item:hover { color: #e4393c; }
.nav-item.active { color: #e4393c; font-weight: 600; }
.nav-item.active::after {
  content: ''; position: absolute; bottom: 0; left: 14px; right: 14px;
  height: 3px; background: #e4393c; border-radius: 2px 2px 0 0;
}

/* Search */
.header-search {
  display: flex; align-items: center; margin-left: auto;
  background: #f4f5f6; border-radius: 20px; height: 34px; overflow: hidden;
  opacity: 0; visibility: hidden;
  max-width: 0; transition: opacity 0.3s, visibility 0.3s, max-width 0.3s;
}
.header--scrolled .header-search {
  opacity: 1; visibility: visible;
  max-width: 320px;
}
.header--scrolled .header-search { background: #f4f5f6; }
.header-search form { display: flex; align-items: center; height: 100%; }
.header-search input {
  width: 240px; height: 34px; padding: 0 15px; background: transparent; font-size: 14px;
  color: #333; border: none; outline: none;
}
.header-search input::placeholder { color: #bbb; }
.header-search .search-btn {
  height: 34px; width: 50px; background: #e4393c; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  transition: background 0.2s; border: none; flex-shrink: 0;
}
.header-search .search-btn:hover { background: #c9302c; }

/* Header Actions (登录/写文章/发微语/个人中心) */
.header-actions {
  display: flex; align-items: center; gap: 8px; margin-left: 12px;
  opacity: 0; visibility: hidden;
  max-width: 0; overflow: hidden;
  transition: opacity 0.3s, visibility 0.3s, max-width 0.3s;
}
.header--scrolled .header-actions {
  opacity: 1; visibility: visible;
  max-width: 400px; overflow: visible;
}
.header-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 4px;
  height: 34px; padding: 0 14px;
  border-radius: 17px; font-size: 13px; font-weight: 500;
  white-space: nowrap; transition: all 0.2s;
  text-decoration: none;
  border: 1px solid #e0e0e0; color: #555; background: #fff;
}
.header-btn svg { flex-shrink: 0; }
.header-btn-avatar {
  width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.header-btn:hover { border-color: #e4393c; color: #e4393c; }
.header-btn-write {
  background: linear-gradient(135deg, #4a90d9, #6db3f8); color: #fff; border-color: transparent;
  box-shadow: 0 2px 6px rgba(74,144,217,0.25);
}
.header-btn-write:hover {
  background: linear-gradient(135deg, #357abd, #4a90d9); color: #fff;
  border-color: transparent; box-shadow: 0 4px 12px rgba(74,144,217,0.35);
  transform: translateY(-1px);
}
.header-btn-tweet {
  background: linear-gradient(135deg, #e4393c, #ff6b6b); color: #fff; border-color: transparent;
  box-shadow: 0 2px 6px rgba(228,57,60,0.25);
}
.header-btn-tweet:hover {
  background: linear-gradient(135deg, #c62d2f, #e4393c); color: #fff;
  border-color: transparent; box-shadow: 0 4px 12px rgba(228,57,60,0.35);
  transform: translateY(-1px);
}
.header-btn-login {
  background: #e4393c; color: #fff; border-color: #e4393c;
}
.header-btn-login:hover { background: #c62d2f; border-color: #c62d2f; color: #fff; }

/* Header Dropdown */
.header-dropdown { position: relative; }
.dropdown-toggle {
  padding-right: 28px; position: relative; cursor: pointer; font-family: inherit;
}
.dropdown-toggle::after {
  content: ''; position: absolute; right: 10px; top: 50%;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #999;
  margin-top: -2px;
  transition: border-color 0.2s;
}
.header-btn-user:hover { border-color: #e4393c; color: #333; }
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0; margin-top: 6px;
  background: #fff; border-radius: 8px; box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  padding: 8px 0; z-index: 1001; white-space: nowrap; width: 100%; box-sizing: border-box;
}
/* 桥接按钮与菜单之间的空隙，防止鼠标移过时菜单消失 */
.dropdown-menu::before {
  content: ''; position: absolute; top: -6px; left: 0; right: 0; height: 6px;
}
.dropdown-menu.show { display: block; }
.dropdown-user-info {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  border-bottom: 1px solid #f0f0f0; margin-bottom: 4px;
}
.dropdown-avatar {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
}
.dropdown-nickname { font-size: 14px; font-weight: 500; color: #333; }
.dropdown-item {
  display: block; padding: 9px 16px; font-size: 13px; color: #555;
  text-decoration: none; transition: background 0.15s;
}
.dropdown-item:hover { background: #f5f5f5; color: #333; }
.dropdown-item-logout { color: #e4393c; }
.dropdown-item-logout:hover { background: #fef0ef; color: #e4393c; }

/* ==================== Main Content Layout ==================== */
.main-wrap { padding-top: 16px; padding-bottom: 40px; }
.content-area { display: flex; gap: 24px; }
.content-left { flex: 1; min-width: 0; }
.sidebar { width: 320px; flex-shrink: 0; }

/* ==================== Featured Carousel ==================== */
.featured-carousel {
  display: flex; gap: 6px; margin-bottom: 6px; border-radius: 4px; overflow: hidden;
  height: 280px;
}
.featured-main {
  flex: 0 0 65%; position: relative; overflow: hidden; cursor: pointer;
}
.featured-main img {
  width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s;
  display: block;
}
.featured-main:hover img { transform: scale(1.05); }
.featured-side {
  flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0;
}
.featured-item {
  flex: 1; position: relative; overflow: hidden; cursor: pointer; display: block;
}
.featured-item img {
  width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s;
  display: block;
}
.featured-item:hover img { transform: scale(1.05); }
.featured-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 30px 16px 14px;
}
.featured-title {
  font-size: 15px; font-weight: 600; color: #fff; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin: 0;
}
.featured-main .featured-title { font-size: 20px; }
.featured-main .featured-overlay { padding: 50px 20px 18px; }

@media (max-width: 768px) {
  .featured-carousel { flex-direction: column; }
  .featured-main { flex: none; aspect-ratio: 16/9; }
  .featured-side { flex-direction: row; }
  .featured-side .featured-item { aspect-ratio: 16/9; }
  .featured-main .featured-title { font-size: 17px; }
  .featured-title { font-size: 14px; }
}

/* ==================== Hero Banner + Search Overlay ==================== */
.hero-banner {
  position: relative; height: 350px; overflow: hidden;
  background: #0a1030 url(../images/earth_v6.jpeg) center/cover no-repeat;
}
/* Starry space overlay with twinkling */
.hero-banner::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 10% 20%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 22% 10%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 35% 32%, rgba(255,255,255,0.5), transparent),
    radial-gradient(2px 2px at 52% 8%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 68% 18%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 82% 28%, rgba(255,255,255,0.4), transparent),
    radial-gradient(2px 2px at 14% 45%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 30% 52%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 58% 42%, rgba(255,255,255,0.3), transparent),
    radial-gradient(2px 2px at 75% 50%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 90% 42%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 8% 65%, rgba(255,255,255,0.4), transparent),
    radial-gradient(2px 2px at 42% 58%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 65% 62%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 88% 60%, rgba(255,255,255,0.6), transparent),
    radial-gradient(2px 2px at 18% 78%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 48% 75%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 78% 72%, rgba(255,255,255,0.5), transparent);
  animation: starTwinkle 4s ease-in-out infinite alternate;
}
/* Darken overlay for text readability */
.hero-banner::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,0.2); z-index: 2; pointer-events: none;
}

/* ==================== Shooting Stars / Meteors ==================== */
.hero-meteors {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden;
}
/* Meteor 1 — large bright streak, top-right to bottom-left */
.hero-meteors::before {
  content: '';
  position: absolute;
  top: -40px; left: 75%;
  width: 2px; height: 160px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 30%, rgba(180,220,255,0.85) 60%, rgba(255,255,255,0) 100%);
  transform: rotate(-38deg);
  border-radius: 50%;
  animation: meteorFall1 3.5s linear infinite;
}
/* Meteor 1 head glow */
.hero-meteors::before {
  box-shadow: 0 0 6px 2px rgba(180, 220, 255, 0.7), 0 0 12px 4px rgba(135, 200, 255, 0.4);
}
/* Meteor 2 — smaller streak, different trajectory */
.hero-meteors::after {
  content: '';
  position: absolute;
  top: -60px; left: 55%;
  width: 1.5px; height: 100px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.7) 25%, rgba(200,230,255,0.6) 55%, rgba(255,255,255,0) 100%);
  transform: rotate(-42deg);
  border-radius: 50%;
  box-shadow: 0 0 4px 1px rgba(200, 230, 255, 0.5);
  animation: meteorFall2 5s linear infinite;
  animation-delay: 2s;
}

/* Star twinkling */
@keyframes starTwinkle {
  0%   { opacity: 0.7; }
  50%  { opacity: 1; }
  100% { opacity: 0.85; }
}
/* Meteor 1 animation */
@keyframes meteorFall1 {
  0%   { transform: rotate(-38deg) translateY(0); opacity: 0; }
  5%   { opacity: 1; }
  15%  { opacity: 1; }
  20%  { transform: rotate(-38deg) translateY(500px); opacity: 0; }
  100% { transform: rotate(-38deg) translateY(500px); opacity: 0; }
}
/* Meteor 2 animation */
@keyframes meteorFall2 {
  0%   { transform: rotate(-42deg) translateY(0); opacity: 0; }
  5%   { opacity: 0.9; }
  12%  { opacity: 0.9; }
  18%  { transform: rotate(-42deg) translateY(480px); opacity: 0; }
  100% { transform: rotate(-42deg) translateY(480px); opacity: 0; }
}

/* ==================== 焦点轮播图（文章列表区顶部，侧边栏左侧） ==================== */
.focus-carousel { margin-bottom: 16px; }
.focus-carousel-inner {
  display: flex; gap: 2px; height: 240px;
  border-radius: 8px; overflow: hidden;
}
.focus-carousel-inner a { position: relative; overflow: hidden; display: block; }
.focus-carousel-inner img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.focus-carousel-inner a:hover img { transform: scale(1.05); }
.focus-carousel-inner .focus-title {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 40px 16px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff; font-size: 15px; font-weight: 500;
  line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.focus-main { flex: 2; }
/* 左侧大图叠加半透明遮罩，让画面更协调 */
.focus-main::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,0.15); z-index: 1; pointer-events: none;
}
.focus-main .focus-title { z-index: 2; }
.focus-side { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.focus-side .focus-sub { flex: 1; }
.focus-side .focus-sub .focus-title { font-size: 13px; padding: 30px 12px 8px; }

/* Search Overlay - 叠在banner上的搜索层 */
.hero-search-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center; z-index: 3;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.25) 0%, transparent 70%);
}
.hero-search-overlay .container {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.hero-logo {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.hero-logo img { width: 36px; height: 36px; border-radius: 6px; }
.hero-logo span { font-size: 28px; font-weight: 700; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.3); }

.hero-search-box {
  display: flex; width: 640px; height: 48px;
  background: #fff; border-radius: 24px; overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}
.hero-search-input-wrap {
  flex: 1; position: relative; overflow: hidden;
}
.hero-search-box input {
  width: 100%; height: 48px; border: none; padding: 0 20px; font-size: 16px;
  color: #333; background: transparent; outline: none; line-height: 48px;
  position: relative; z-index: 1;
}
.hero-search-box input::placeholder { color: transparent; }
.hero-search-placeholder {
  position: absolute; top: 0; left: 20px; right: 0; height: 48px;
  line-height: 48px; font-size: 16px; color: #bbb; z-index: 0;
  pointer-events: none; white-space: nowrap;
  transition: opacity 0.25s;
}
.hero-search-placeholder span {
  display: block; height: 48px;
  animation: placeholderSlide 0.35s ease;
}
@keyframes placeholderSlide {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.hero-search-input-wrap.focused .hero-search-placeholder,
.hero-search-input-wrap.has-value .hero-search-placeholder { opacity: 0; }
.hero-search-box button {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 48px; padding: 0 28px;
  border: none; background: #e4393c; color: #fff;
  font-size: 15px; font-weight: 500; cursor: pointer;
  border-radius: 0 24px 24px 0; flex-shrink: 0;
  transition: background 0.2s;
}
.hero-search-box button svg { width: 16px; height: 16px; flex-shrink: 0; }

.hero-hot-tags {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.hero-hot-tags > span {
  font-size: 14px; color: rgba(255,255,255,0.9); font-weight: 500;
  position: relative; padding-right: 10px;
}
.hero-hot-tags > span::after {
  content: ''; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 1px; height: 14px; background: rgba(255,255,255,0.4);
}
.hero-hot-tags a {
  font-size: 14px; color: rgba(255,255,255,0.75);
}
.hero-hot-tags a:hover { color: #fff; }

/* Banner信息栏：时间、天气、归属地（右上角） */
.hero-info-bar {
  position: absolute; top: 16px; right: 24px; z-index: 10;
  display: flex; align-items: center; gap: 10px;
}
.hero-info-item {
  font-size: 13px; color: rgba(255,255,255,0.85);
  white-space: nowrap;
}
.hero-info-sep {
  color: rgba(255,255,255,0.35); font-size: 12px;
}
.hero-weather-widget {
  border: none; vertical-align: middle; background: transparent;
}

/* ==================== Article Card (Feed) ==================== */
.feed-list { background: #fff; border-radius: 4px; }
.feed-item {
  display: flex; padding: 20px; border-bottom: 1px solid #f0f0f0; cursor: pointer;
  transition: background 0.15s;
}
.feed-item:last-child { border-bottom: none; }
.feed-item:hover { background: #fafafa; }
.feed-item .feed-text { flex: 1; min-width: 0; }
.feed-item .feed-title {
  font-size: 18px; font-weight: 600; line-height: 1.4; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.feed-item .feed-desc {
  font-size: 14px; color: #666; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 12px;
}
.feed-item .feed-meta { display: flex; align-items: center; gap: 16px; font-size: 13px; color: #999; }
.feed-item .feed-meta span { display: flex; align-items: center; gap: 4px; }
.feed-item .feed-thumb {
  width: 200px; height: 120px; border-radius: 4px; overflow: hidden;
  margin-left: 20px; flex-shrink: 0; background: #f0f0f0;
}
.feed-item .feed-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Multi-image card */
.feed-item.three-pic { flex-direction: column; }
.feed-item.three-pic .pic-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px;
}
.feed-item.three-pic .pic-grid .pic-cell {
  aspect-ratio: 16/10; border-radius: 4px; overflow: hidden; background: #f0f0f0;
}
.feed-item.three-pic .pic-grid .pic-cell img { width: 100%; height: 100%; object-fit: cover; }

.feed-item.no-pic .feed-thumb { display: none; }

/* ==================== Tags Page ==================== */
.tags-wrap { background: #fff; border-radius: 4px; }
.tags-header { padding: 20px 24px 16px; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; gap: 12px; }
.tags-header h2 { font-size: 20px; font-weight: 700; color: #222; margin: 0; }
.tags-header .tags-count { font-size: 13px; color: #999; }

.tags-search-bar { padding: 16px 24px; border-bottom: 1px solid #f0f0f0; }
.tags-search-bar input { width: 100%; height: 40px; border: 1px solid #e0e0e0; border-radius: 4px; padding: 0 14px; font-size: 14px; transition: border-color 0.2s; box-sizing: border-box; }
.tags-search-bar input:focus { border-color: #e4393c; outline: none; }

.tags-cloud { padding: 20px 24px 24px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tags-cloud a { display: inline-block; color: #555; border-radius: 4px; transition: all 0.2s; line-height: 1.4; }
.tags-cloud a:hover { color: #e4393c; transform: translateY(-2px); background: #fef0ef; }

.tags-cloud a.s-1 { font-size: 13px; padding: 3px 10px; background: #f8f8f8; }
.tags-cloud a.s-2 { font-size: 14px; padding: 4px 12px; background: #f5f5f5; }
.tags-cloud a.s-3 { font-size: 16px; padding: 5px 14px; background: #f0f0f0; font-weight: 500; }
.tags-cloud a.s-4 { font-size: 18px; padding: 6px 16px; background: #feeceb; color: #e4393c; font-weight: 600; }
.tags-cloud a.s-5 { font-size: 22px; padding: 8px 20px; background: #fde2e0; color: #c9302c; font-weight: 700; }

/* ==================== Archive Page ==================== */
.archive-wrap { background: #fff; border-radius: 4px; }
.archive-header { padding: 20px 24px 16px; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; gap: 12px; }
.archive-header h2 { font-size: 20px; font-weight: 700; color: #222; margin: 0; }
.archive-header .archive-count { font-size: 13px; color: #999; }

.archive-timeline { padding: 8px 0 4px; }

.archive-year { padding: 0 24px; }
.archive-year-header { display: flex; align-items: center; gap: 12px; padding: 16px 0 8px; cursor: pointer; user-select: none; }
.archive-year-header .year-num { font-size: 22px; font-weight: 700; color: #222; }
.archive-year-header .year-count { font-size: 13px; color: #999; }
.archive-year-header .year-arrow { font-size: 12px; color: #ccc; transition: transform 0.25s; }
.archive-year.collapsed .year-arrow { transform: rotate(-90deg); }
.archive-year-header:hover .year-num { color: #e4393c; }

.archive-month { margin-bottom: 8px; }
.archive-month-header { display: flex; align-items: center; gap: 10px; padding: 10px 0 8px; cursor: pointer; user-select: none; }
.archive-month-header .month-arrow { font-size: 11px; color: #ccc; transition: transform 0.25s; flex-shrink: 0; }
.archive-month.collapsed .month-arrow { transform: rotate(-90deg); }
.archive-month-header .month-name { font-size: 15px; font-weight: 600; color: #444; }
.archive-month-header .month-count { font-size: 13px; color: #bbb; }

/* 月份文章列表：折叠动画 */
.archive-month-body {
  overflow: hidden;
  max-height: 2000px;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}
.archive-month.collapsed .archive-month-body {
  max-height: 0;
  opacity: 0;
}

/* 年份折叠时隐藏月份 */
.archive-year.collapsed .archive-month {
  display: none;
}

.archive-articles { padding-left: 18px; border-left: 2px solid #f0f0f0; margin-left: 3px; }
.archive-article { display: flex; align-items: center; gap: 12px; padding: 10px 0 10px 14px; position: relative; transition: background 0.15s; border-radius: 4px; }
.archive-article::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #ddd; border: 2px solid #fff; position: absolute; left: -5px; top: 15px; transition: background 0.2s; }
.archive-article:hover { background: #fafafa; }
.archive-article:hover::before { background: #e4393c; }
.archive-article .article-date { font-size: 13px; color: #999; width: 72px; flex-shrink: 0; }
.archive-article .article-title { flex: 1; font-size: 14px; color: #333; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.archive-article .article-title:hover { color: #e4393c; }
.archive-article .article-cat { font-size: 12px; color: #e4393c; background: #fef0ef; padding: 0 8px; border-radius: 3px; line-height: 22px; flex-shrink: 0; }

.archive-year-divider { height: 1px; background: #f0f0f0; margin: 8px 24px; }

/* ==================== Tags Category ==================== */
.tags-category { margin-bottom: 8px; }
.tags-category-title { font-size: 15px; font-weight: 600; color: #333; padding: 0 24px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.tags-category-title::before { content: ''; width: 3px; height: 14px; background: #e4393c; border-radius: 2px; }
.tags-category .tags-cloud { padding-top: 0; }

/* ==================== Profile Page ==================== */
.profile-wrap { background: #fff; border-radius: 4px; overflow: hidden; }

.profile-banner {
  height: 140px; background: linear-gradient(135deg, #e4393c 0%, #c9302c 50%, #8b1a1a 100%);
  position: relative;
}
.profile-banner .banner-wave {
  position: absolute; bottom: -2px; left: 0; right: 0; height: 40px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 40 L0 20 Q 150 0 300 20 Q 450 40 600 20 Q 750 0 900 20 Q 1050 40 1200 20 L1200 40Z' fill='%23fff'/%3E%3C/svg%3E") repeat-x;
  background-size: 1200px 40px;
}

.profile-info-wrap { padding: 0 24px 20px; display: flex; align-items: flex-end; gap: 20px; margin-top: -48px; position: relative; z-index: 1; }
.profile-info-avatar {
  width: 96px; height: 96px; border-radius: 50%; overflow: hidden;
  border: 4px solid #fff; box-shadow: 0 2px 12px rgba(0,0,0,0.12); flex-shrink: 0;
  background: #f0f0f0;
}
.profile-info-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-info-main { flex: 1; padding-top: 48px; }
.profile-info-name { font-size: 22px; font-weight: 700; color: #222; display: flex; align-items: center; gap: 10px; }
.profile-info-name .badge-v {
  display: inline-block; background: #e4393c; color: #fff; font-size: 11px;
  padding: 0 6px; line-height: 18px; border-radius: 3px; font-weight: 500;
}
.profile-info-meta { display: flex; align-items: center; gap: 20px; margin-top: 6px; font-size: 13px; color: #999; flex-wrap: wrap; }
.profile-info-bio { font-size: 14px; color: #666; margin-top: 6px; }
.profile-info-edit {
  flex-shrink: 0; padding: 8px 24px; border: 1px solid #e4393c; color: #e4393c;
  border-radius: 20px; font-size: 14px; cursor: pointer; transition: all 0.2s;
  background: #fff; margin-bottom: 4px; text-decoration: none;
}
.profile-info-edit:hover { background: #e4393c; color: #fff; }
.profile-info-submit {
  flex-shrink: 0; padding: 8px 24px; background: #e4393c; color: #fff;
  border-radius: 20px; font-size: 14px; cursor: pointer; transition: all 0.2s;
  text-decoration: none; margin-bottom: 4px; border: none; display: inline-flex;
  align-items: center; gap: 4px;
}
.profile-info-submit:hover { background: #c62d2f; color: #fff; }

.profile-stats-row { display: flex; gap: 12px; padding: 0 24px 20px; }
.profile-stat-card {
  flex: 1; background: #fafafa; border-radius: 8px; padding: 16px 12px;
  text-align: center; transition: all 0.2s; cursor: default;
}
.profile-stat-card:hover { background: #fef0ef; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(228,57,60,0.1); }
.profile-stat-card .stat-num { display: block; font-size: 26px; font-weight: 700; color: #222; line-height: 1.2; }
.profile-stat-card:hover .stat-num { color: #e4393c; }
.profile-stat-card .stat-label {
  display: block; font-size: 13px; color: #999; margin-top: 4px;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.stat-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex-shrink: 0; }

.profile-header-simple {
  padding: 24px 24px 16px; display: flex; align-items: center; gap: 16px;
}
.profile-header-avatar {
  width: 72px; height: 72px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: #f0f0f0;
}
.profile-header-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-header-info { flex: 1; min-width: 0; }
.profile-header-name { font-size: 20px; font-weight: 700; color: #222; display: flex; align-items: center; gap: 8px; }
.profile-header-name .badge-v {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; background: #e4393c;
  color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
}
.profile-header-bio { font-size: 13px; color: #999; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-header-meta { display: flex; align-items: center; gap: 12px; margin-top: 8px; font-size: 13px; color: #999; flex-wrap: wrap; }
.profile-header-edit, .profile-header-submit {
  color: #e4393c; text-decoration: none; font-size: 13px; padding: 2px 10px;
  border: 1px solid #e4393c; border-radius: 12px; transition: all 0.2s;
}
.profile-header-edit:hover, .profile-header-submit:hover { background: #e4393c; color: #fff; }

/* Tab bar (今日头条风格) */
.profile-tabs {
  display: flex; border-bottom: 2px solid #f4f5f6; padding: 0;
  background: #fff; position: relative;
}
.profile-tab {
  flex: 1; text-align: center; padding: 14px 8px 12px;
  font-size: 16px; color: #666; cursor: pointer;
  text-decoration: none; position: relative; user-select: none;
  transition: color 0.25s; letter-spacing: 0.5px;
}
.profile-tab::after {
  content: ''; position: absolute; left: 20%; right: 20%; bottom: 0;
  height: 3px; background: #e4393c; border-radius: 2px 2px 0 0;
  transform: scaleX(0); transition: transform 0.25s ease;
}
.profile-tab:hover { color: #333; }
.profile-tab.active { color: #e4393c; font-weight: 700; }
.profile-tab.active::after { transform: scaleX(1); }

/* Tab content */
.tab-content { display: none; padding: 4px 0; }
.tab-content.active { display: block; }
.tab-content .tab-items { padding: 0; }
.tab-empty { text-align: center; padding: 48px 0; color: #bbb; font-size: 14px; }

/* Scroll sentinel for infinite scroll */
.scroll-sentinel { height: 1px; }

/* ==================== Profile Feed Items (今日头条风格) ==================== */
.profile-feed-item {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 14px 0; margin: 0 20px;
  border-bottom: 1px solid #f0f0f0; cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}
.profile-feed-item:last-child { border-bottom: none; }
.profile-feed-item:hover { background: #fafafa; }
.profile-feed-item .feed-text { flex: 1; min-width: 0; }
.profile-feed-item .feed-title {
  font-size: 16px; font-weight: 400; color: #222; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 6px;
}
.profile-feed-item .feed-title:hover { color: #e4393c; }
.profile-feed-item .feed-meta {
  font-size: 13px; color: #999;
  display: flex; align-items: center; gap: 12px;
}
.profile-feed-item .feed-meta .tag-label {
  font-size: 11px; color: #e4393c; background: #fef0ef;
  padding: 0 6px; border-radius: 3px; line-height: 18px;
}
.profile-feed-item .feed-thumb {
  width: 120px; height: 80px; border-radius: 4px; overflow: hidden;
  flex-shrink: 0; background: #f0f0f0;
}
.profile-feed-item .feed-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.profile-feed-item.no-pic .feed-thumb { display: none; }

/* ==================== Profile Feed Item Wrap (for tweet ops) ==================== */
.profile-feed-item-wrap {
  margin: 0 20px; border-bottom: 1px solid #f0f0f0;
}
.profile-feed-item-wrap .profile-feed-item {
  margin: 0; border-bottom: none;
}
.profile-feed-item-wrap:last-child { border-bottom: none; }
.feed-item-ops {
  display: flex; gap: 16px; padding: 0 0 12px;
}
.feed-item-ops a {
  font-size: 12px; color: #bbb; text-decoration: none; transition: color 0.2s;
}
.feed-item-ops a:hover { color: #e4393c; }

/* Tweet feed item: 图片与左侧等高，操作栏在底部 */
.profile-feed-item.tweet-feed-item {
  align-items: stretch; cursor: pointer;
}
.tweet-feed-item .feed-text {
  display: flex; flex-direction: column; flex: 1; min-width: 0;
}
.tweet-feed-item .feed-title { flex: 1; }
.tweet-feed-item .feed-thumb {
  width: 120px; height: auto; align-self: stretch;
}
.tweet-feed-item .feed-thumb img {
  height: 100%; object-fit: cover;
}
.tweet-feed-item .tweet-act-bar {
  display: flex; align-items: center; gap: 0;
  margin-top: 8px; padding-top: 6px; border-top: 1px solid #f0f0f0;
}
.tweet-act-item {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 12px; color: #999; cursor: pointer; padding: 4px 10px 4px 6px;
  border-radius: 4px; transition: background 0.2s, color 0.2s;
}
.tweet-act-item:hover { background: #f5f5f5; color: #e4393c; }
.tweet-act-item svg { flex-shrink: 0; }
.tweet-act-item .act-count { font-size: 12px; color: #999; }
.tweet-act-item:hover .act-count { color: #e4393c; }
.tweet-act-right {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
}
.tweet-act-right a {
  font-size: 12px; color: #bbb; text-decoration: none; padding: 4px 5px;
  border-radius: 4px; transition: color 0.2s, background 0.2s;
}
.tweet-act-right a:hover { color: #e4393c; background: #f5f5f5; }

/* 微语Tab：今日头条微头条风格 */
.tweet-post-item {
  display: block !important; cursor: pointer;
}
.tweet-post-item .tweet-author-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.tweet-post-item .tweet-avatar {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.tweet-post-item .tweet-author-info {
  display: flex; flex-direction: column; gap: 2px;
}
.tweet-post-item .tweet-nickname {
  font-size: 15px; font-weight: 400; color: #333;
}
.tweet-post-item .tweet-time {
  font-size: 12px; color: #999;
}
.tweet-post-item .tweet-body {
  display: flex; align-items: stretch; gap: 16px;
  height: 80px;
}
.tweet-post-item .tweet-body-left {
  display: flex; flex-direction: column; flex: 1; min-width: 0;
}
.tweet-post-item .tweet-content-text {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; font-size: 16px; line-height: 1.6; color: #222;
  word-wrap: break-word;
}
.tweet-post-item .tweet-detail-link {
  color: #e4393c; font-size: 13px; cursor: pointer;
}
.tweet-post-item .tweet-detail-link:hover {
  color: #c9302c;
}
.tweet-post-item .tweet-thumb {
  width: 120px; flex-shrink: 0; align-self: stretch;
  border-radius: 4px; overflow: hidden;
}
.tweet-post-item .tweet-thumb img {
  display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 4px;
}
.tweet-post-item .tweet-act-bar {
  display: flex; align-items: center; gap: 0;
  margin-top: auto; padding-top: 6px;
}
.tweet-post-item .tweet-act-right {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
}


/* ==================== Sidebar ==================== */
.sidebar-section {
  background: #fff; border-radius: 4px; margin-bottom: 16px; overflow: hidden;
}
.sidebar-title {
  font-size: 16px; font-weight: 600; padding: 16px 16px 12px; position: relative;
  display: flex; justify-content: space-between; align-items: center;
}
.sidebar-title::before {
  content: ''; width: 3px; height: 16px; background: #e4393c;
  position: absolute; left: 8px; top: 18px; border-radius: 2px;
}
.sidebar-title span { margin-left: 8px; }
.sidebar-title-more {
  font-size: 12px; font-weight: 400; color: #999; text-decoration: none;
  margin-right: 2px; transition: color 0.2s; white-space: nowrap;
}
.sidebar-title-more:hover { color: #e4393c; }

/* Hot List */
.hot-list { padding: 0 16px 12px; }
.hot-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid #f5f5f5; cursor: pointer;
}
.hot-item:last-child { border-bottom: none; }
.hot-rank {
  width: 20px; height: 20px; border-radius: 3px; text-align: center;
  line-height: 20px; font-size: 13px; font-weight: 600; color: #999;
  background: #f0f0f0; flex-shrink: 0;
}
.hot-item:nth-child(-n+3) .hot-rank { background: #e4393c; color: #fff; }
.hot-item:nth-child(-n+3) .hot-tag { font-size: 9px; }
.hot-item .hot-title {
  font-size: 14px; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.hot-item .hot-tag {
  font-size: 11px; color: #e4393c; border: 1px solid #e4393c;
  border-radius: 2px; padding: 0 4px; line-height: 18px; flex-shrink: 0;
}
.hot-item:hover .hot-title { color: #e4393c; }
/* 热门Tab在标题栏内 */
.sidebar-title.hot-tabs-title {
  padding-top: 10px; padding-bottom: 6px;
  justify-content: flex-start;
}
.sidebar-title.hot-tabs-title::before {
  top: 12px;
}
.sidebar-title .hot-tab {
  font-size: 14px; color: #bbb; cursor: pointer;
  padding: 3px 10px; margin-right: 4px; border-radius: 4px;
  transition: all 0.2s;
}
.sidebar-title .hot-tab:hover { color: #666; }
.sidebar-title .hot-tab.active {
  color: #e4393c; background: #fef0f0; font-weight: 600;
}

/* Video section */
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 16px 16px; }
.video-card {
  border-radius: 4px; overflow: hidden; cursor: pointer; background: #f9f9f9;
}
.video-card .video-cover {
  position: relative; aspect-ratio: 16/10; overflow: hidden; background: #e8e8e8;
}
.video-card .video-cover img { width: 100%; height: 100%; object-fit: cover; }
.video-card .play-badge {
  position: absolute; bottom: 6px; left: 6px; background: rgba(0,0,0,0.65);
  color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 3px;
}
.video-card .video-title {
  font-size: 13px; padding: 8px 8px 10px; line-height: 1.4; color: #333;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.video-card:hover .video-title { color: #e4393c; }

/* ==================== Sidebar - Search ==================== */
.sidebar-search { padding: 12px 16px 16px; }
.sidebar-search-box {
  display: flex; background: #f4f5f6; border-radius: 20px; overflow: hidden;
  height: 34px;
}
.sidebar-search-box input {
  flex: 1; height: 34px; padding: 0 15px; background: transparent; border: none;
  font-size: 14px; outline: none;
}
.sidebar-search-box button {
  height: 34px; width: 50px; background: #e4393c; color: #fff; cursor: pointer;
  border: none; font-size: 13px; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; flex-shrink: 0;
}
.sidebar-search-box button:hover { background: #c9302c; }

/* ==================== Sidebar - Profile ==================== */
/* ==================== Sidebar - Profile Card ==================== */
.profile-card {
  padding: 24px 16px 0; text-align: center;
  background: #fff; border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: box-shadow 0.3s;
}
.profile-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.profile-card-avatar {
  display: block; width: 72px; height: 72px; border-radius: 50%;
  position: relative; margin: 0 auto; background: #f0f0f0;
  transition: transform 0.3s;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(228,57,60,0.15), 0 2px 12px rgba(228,57,60,0.2);
}
.profile-card-avatar::before {
  content: ''; position: absolute; top: -6px; left: -6px;
  width: calc(100% + 12px); height: calc(100% + 12px); border-radius: 50%;
  border: 1.5px dashed rgba(228,57,60,0.3); pointer-events: none;
}
.profile-card-avatar:hover { transform: scale(1.06); }
.profile-card-avatar:hover::before { animation: avatar-rotate 8s linear infinite; }
@keyframes avatar-rotate { to { transform: rotate(360deg); } }
.profile-card-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.profile-card-name {
  font-size: 17px; font-weight: 600; color: #222; margin: 12px 0 3px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.profile-card-name .badge-v {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; background: linear-gradient(135deg, #e4393c, #ff6b6b);
  color: #fff; border-radius: 50%; font-size: 10px; font-weight: 700;
}
.profile-card-bio {
  font-size: 12px; color: #bbb; margin-bottom: 16px;
  letter-spacing: 0.5px;
}
.profile-card-stats {
  display: flex; border-top: 1px solid #f0f0f0;
}
.profile-card-stats a {
  flex: 1; padding: 12px 0; text-align: center; color: #555;
  transition: all 0.2s; position: relative;
}
.profile-card-stats a + a { border-left: 1px solid #f0f0f0; }
.profile-card-stats a:hover { background: #fef8f8; }
.profile-card-stats .num { display: block; font-size: 18px; font-weight: 700; color: #222; line-height: 1.3; }
.profile-card-stats .label { display: block; font-size: 11px; color: #bbb; margin-top: 3px; letter-spacing: 0.3px; }
.profile-card-footer {
  padding: 12px 16px 14px; border-top: 1px solid #f0f0f0;
}
.profile-card-actions {
  display: flex; gap: 8px;
}
.profile-card-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 0; background: linear-gradient(135deg, #4a90d9, #6db3f8);
  color: #fff; border-radius: 20px; font-size: 13px; text-align: center; font-weight: 500;
  transition: all 0.3s; cursor: pointer; letter-spacing: 0.5px; box-shadow: 0 2px 8px rgba(74,144,217,0.2);
}
.profile-card-btn:hover { background: linear-gradient(135deg, #357abd, #4a90d9); color: #fff; box-shadow: 0 4px 14px rgba(74,144,217,0.35); transform: translateY(-1px); }
.profile-card-btn-tweet {
  background: linear-gradient(135deg, #e4393c, #ff6b6b);
  box-shadow: 0 2px 8px rgba(228,57,60,0.2);
}
.profile-card-btn-tweet:hover { background: linear-gradient(135deg, #c62d2f, #e4393c); box-shadow: 0 4px 14px rgba(228,57,60,0.35); }

/* ==================== Sidebar - Comments ==================== */
.sidebar-comments { padding: 0 16px 12px; }
.sidebar-comment-item {
  display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f5f5f5;
  transition: background 0.15s; border-radius: 4px;
}
.sidebar-comment-item:hover { background: #fafafa; }
.sidebar-comment-item:last-child { border-bottom: none; }
.sidebar-comment-avatar {
  width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: #f0f0f0;
}
.sidebar-comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-comment-body { flex: 1; min-width: 0; }
.sidebar-comment-author { font-size: 13px; font-weight: 500; color: #555; margin-bottom: 2px; }
.sidebar-comment-text {
  font-size: 13px; color: #333; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 2px;
}
.sidebar-comment-time { font-size: 12px; color: #bbb; }

/* ==================== Sidebar - Category ==================== */
.category-list { padding: 0 16px 12px; }
.category-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid #f5f5f5; font-size: 14px; color: #555;
  cursor: pointer; transition: color 0.2s;
}
.category-item:last-child { border-bottom: none; }
.category-item:hover { color: #e4393c; }
.category-item .cat-count {
  background: #f0f0f0; color: #999; font-size: 12px; padding: 0 8px;
  border-radius: 10px; line-height: 20px;
}
.category-item .cat-count::after { content: "篇"; }

/* ==================== Sidebar - Microblog Timeline ==================== */
.sidebar-weibo {
  padding: 4px 8px 16px;
}

/* 时间轴容器 */
.weibo-timeline {
  position: relative;
  padding-left: 34px;
}

/* 时间轴竖线 */
.weibo-timeline::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #e4393c 0%, #4a90d9 100%);
  border-radius: 1px;
}

/* 单条微语 */
.weibo-tl-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  position: relative;
  text-decoration: none;
  border-radius: 6px;
  margin-bottom: 2px;
  transition: background 0.25s ease;
}

.weibo-tl-item:last-child {
  margin-bottom: 0;
}

.weibo-tl-item:hover {
  background: #fafcfd;
}

/* 头像（定位在时间轴线上，与轴点重合） */
.weibo-tl-avatar {
  position: absolute;
  left: -36px;
  top: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: #f4f5f7;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  z-index: 1;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.weibo-tl-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.weibo-tl-avatar-placeholder {
  font-size: 13px;
  font-weight: 600;
  color: #b0b8c1;
  line-height: 1;
}

/* 最新微语：红色光环 */
.weibo-tl-avatar.is-new {
  box-shadow: 0 0 0 3px #e4393c, 0 1px 3px rgba(0, 0, 0, 0.08);
}

.weibo-tl-item:hover .weibo-tl-avatar:not(.is-new) {
  box-shadow: 0 0 0 3px rgba(228, 57, 60, 0.25), 0 2px 6px rgba(0, 0, 0, 0.13);
  transform: translateY(-1px);
}

.weibo-tl-item:hover .weibo-tl-avatar.is-new {
  box-shadow: 0 0 0 5px rgba(228, 57, 60, 0.3), 0 2px 6px rgba(0, 0, 0, 0.13);
  transform: translateY(-1px);
}

/* 正文区域 */
.weibo-tl-body {
  flex: 1;
  min-width: 0;
  padding-top: 5px;
}

/* 昵称 + 时间 同行 */
.weibo-tl-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  line-height: 1;
}

/* 昵称 */
.weibo-tl-nick {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  transition: color 0.25s ease;
}

.weibo-tl-item:hover .weibo-tl-nick {
  color: #e4393c;
}

/* 时间 */
.weibo-tl-time {
  font-size: 12px;
  color: #c0c4cc;
  flex-shrink: 0;
  margin-left: 8px;
  transition: color 0.25s ease;
}

.weibo-tl-item:hover .weibo-tl-time {
  color: #999;
}

/* 正文 */
.weibo-tl-text {
  font-size: 14px;
  line-height: 1.65;
  color: #5a5a5a;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.25s ease;
}

.weibo-tl-text a {
  color: #e4393c;
  text-decoration: none;
}

.weibo-tl-text a:hover {
  text-decoration: underline;
}

.weibo-tl-item:hover .weibo-tl-text {
  color: #333;
}

/* ==================== Sidebar - Tag Cloud ==================== */
.tag-cloud { padding: 4px 16px 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a {
  display: inline-block; background: #f5f5f5; color: #555; font-size: 13px;
  padding: 4px 12px; border-radius: 4px; transition: all 0.2s;
}
.tag-cloud a:hover { background: #e4393c; color: #fff; }
.tag-cloud a.size-lg { font-size: 15px; padding: 5px 14px; }
.tag-cloud a.size-sm { font-size: 12px; padding: 3px 10px; opacity: 0.8; }

/* ==================== Sidebar - Archive ==================== */
.archive-list { padding: 0 16px 12px; }
.archive-item {
  display: flex; justify-content: space-between; padding: 9px 0;
  border-bottom: 1px solid #f5f5f5; font-size: 14px; color: #555; cursor: pointer;
  transition: color 0.2s;
}
.archive-item:last-child { border-bottom: none; }
.archive-item:hover { color: #e4393c; }
.archive-item .arc-count { color: #999; font-size: 13px; }

/* ==================== Sidebar - Calendar ==================== */
.calendar-widget {
  padding: 4px 16px 16px;
}
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #222;
}
.calendar-header .cal-nav {
  color: #999;
  text-decoration: none;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s;
}
.calendar-header .cal-nav:hover {
  background: #f0f0f0;
  color: #e4393c;
}
.calendar-header .cal-month {
  font-size: 14px;
  color: #333;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}
.calendar-grid .cal-weekday {
  font-size: 12px;
  color: #999;
  padding: 6px 0 4px;
  font-weight: 500;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 2px;
}
.calendar-grid .cal-day {
  font-size: 13px;
  color: #444;
  padding: 5px 0;
  border-radius: 4px;
  transition: background 0.15s;
  position: relative;
}
.calendar-grid .cal-day a,
.calendar-grid .cal-day span {
  display: block;
  line-height: 1.4;
  text-decoration: none;
  color: inherit;
}
.calendar-grid .cal-day:hover {
  background: #f5f5f5;
}
.calendar-grid .cal-day.cal-today {
  background: #e4393c;
  color: #fff;
  font-weight: 600;
  border-radius: 4px;
}
.calendar-grid .cal-day.cal-today a,
.calendar-grid .cal-day.cal-today span {
  color: #fff;
}
.calendar-grid .cal-day.cal-has-post {
  font-weight: 600;
  color: #e4393c;
}
.calendar-grid .cal-day.cal-has-post:hover {
  background: #fef0f0;
}
.calendar-grid .cal-day.cal-empty {
  background: transparent;
  cursor: default;
}

/* ==================== Sidebar - Links ==================== */
.link-list { padding: 8px 16px 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.link-list a {
  display: inline-block; font-size: 13px; color: #777; padding: 4px 12px;
  border: 1px solid #e8e8e8; border-radius: 4px; transition: all 0.2s;
}
.link-list a:hover { color: #e4393c; border-color: #e4393c; }

/* ==================== Footer ==================== */
.footer {
  background: #fff; border-top: 1px solid #e8e8e8; padding: 30px 0; text-align: center;
  font-size: 13px; color: #999;
}
.footer .footer-links { margin-bottom: 10px; }
.footer .footer-links a { color: #777; margin: 0 10px; }
.footer .footer-links a:hover { color: #e4393c; }

/* ==================== Article List Page ==================== */
.article-list-wrap { background: #fff; border-radius: 4px; }
.list-item {
  display: flex; padding: 20px; border-bottom: 1px solid #f0f0f0; gap: 20px;
}
.list-item:last-child { border-bottom: none; }
.list-item .list-thumb {
  width: 160px; height: 110px; border-radius: 4px; overflow: hidden;
  flex-shrink: 0; background: #f0f0f0;
}
.list-item .list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-item .list-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.list-item .list-title {
  font-size: 17px; font-weight: 600; margin-bottom: 8px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.list-item .list-title:hover { color: #e4393c; }
.list-item .list-summary {
  font-size: 14px; color: #666; line-height: 1.5; margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.list-item .list-meta { font-size: 13px; color: #999; display: flex; gap: 14px; }
.list-item:hover { background: #fafafa; }

/* Pagination */
.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 6px; padding: 30px 20px;
}
.pagination a, .pagination span {
  display: inline-block; min-width: 36px; height: 36px; line-height: 36px;
  text-align: center; border-radius: 4px; font-size: 14px; color: #555;
  background: #f5f5f5; transition: all 0.2s;
}
.pagination a:hover { background: #e4393c; color: #fff; }
.pagination .active, .pagination > span { background: #e4393c; color: #fff; }
.pagination em { font-style: normal; color: #999; background: transparent; min-width: auto; padding: 0 4px; }

/* ==================== Article Detail ==================== */
.article-detail {
  background: #fff; border-radius: 4px; padding: 30px 40px 40px;
}
.article-detail .article-title {
  font-size: 28px; font-weight: 700; line-height: 1.35; margin-bottom: 16px; color: #111;
}
.article-detail .article-meta {
  display: flex; align-items: center; gap: 16px; font-size: 14px; color: #999; padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0; margin-bottom: 24px;
}
.article-detail .article-meta .author-avatar {
  width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: #f0f0f0;
}
.article-detail .article-meta .author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.article-detail .article-meta .author-name { color: #222; font-weight: 500; }
.article-detail .article-meta .author-name:hover { color: #e4393c; }
.article-detail .article-meta .label-tag {
  background: #fef0ef; color: #e4393c; font-size: 12px; padding: 2px 8px; border-radius: 3px;
}
.article-edit-link {
  color: #e4393c; font-size: 13px; text-decoration: none; margin-left: auto;
  padding: 2px 10px; border: 1px solid #e4393c; border-radius: 3px; transition: all 0.2s;
}
.article-edit-link:hover { background: #e4393c; color: #fff; }

.article-detail .article-content { font-size: 17px; line-height: 1.75; color: #333; }
.article-detail .article-content p { margin-bottom: 22px; }
.article-detail .article-content img {
  width: 100%; border-radius: 4px; margin: 10px 0 18px; background: #f0f0f0;
}
.article-detail .article-content .img-caption {
  text-align: center; font-size: 14px; color: #999; margin-top: -12px; margin-bottom: 22px;
}

/* ============= Markdown 内容排版 ============= */
.article-detail .article-content h1 {
  font-size: 22px; font-weight: 700; color: #222; margin: 32px 0 16px;
  padding-bottom: 8px; border-bottom: 2px solid #e8e8e8;
}
.article-detail .article-content h2 {
  font-size: 20px; font-weight: 700; color: #222; margin: 28px 0 14px;
  padding-left: 10px; border-left: 4px solid #e4393c;
}
.article-detail .article-content h3 {
  font-size: 18px; font-weight: 600; color: #333; margin: 24px 0 12px;
}
.article-detail .article-content h4 {
  font-size: 17px; font-weight: 600; color: #333; margin: 20px 0 10px;
}
.article-detail .article-content h5 {
  font-size: 16px; font-weight: 600; color: #555; margin: 18px 0 10px;
}
.article-detail .article-content h6 {
  font-size: 15px; font-weight: 600; color: #666; margin: 16px 0 10px;
}

/* 列表 */
.article-detail .article-content ul,
.article-detail .article-content ol {
  padding-left: 28px; margin-bottom: 18px;
}
.article-detail .article-content li {
  font-size: 16px; line-height: 1.85; color: #333; margin-bottom: 6px;
}
.article-detail .article-content li > ul,
.article-detail .article-content li > ol {
  margin-top: 6px; margin-bottom: 6px;
}

/* 引用块 */
.article-detail .article-content blockquote {
  border-left: 4px solid #e4393c;
  padding: 12px 18px; margin: 18px 0;
  color: #666; background: #fafafa;
  border-radius: 0 4px 4px 0;
}
.article-detail .article-content blockquote p {
  margin-bottom: 8px; color: #666;
}
.article-detail .article-content blockquote p:last-child {
  margin-bottom: 0;
}

/* 行内代码 */
.article-detail .article-content code {
  background: #f5f5f5; color: #e4393c; padding: 2px 6px;
  border-radius: 3px; font-size: 14px; font-family: 'Consolas','Monaco','Courier New',monospace;
}

/* 代码块 */
.article-detail .article-content pre {
  background: #282c34; color: #abb2bf; padding: 16px 20px;
  border-radius: 6px; overflow-x: auto; margin-bottom: 18px;
  font-size: 14px; line-height: 1.65; white-space: pre-wrap; word-wrap: break-word;
}
.article-detail .article-content pre code {
  background: none; color: inherit; font-size: inherit; padding: 0; border-radius: 0;
}

/* 行内元素 */
.article-detail .article-content strong { font-weight: 700; color: #222; }
.article-detail .article-content em { font-style: italic; }
.article-detail .article-content del { text-decoration: line-through; color: #999; }

/* 链接 */
.article-detail .article-content a {
  color: #e4393c; text-decoration: none; border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.article-detail .article-content a:hover { border-bottom-color: #e4393c; }

/* 分割线 */
.article-detail .article-content hr {
  height: 1px; border: none; border-top: 1px solid #e8e8e8; margin: 28px 0;
}

/* 表格 */
.article-detail .article-content table {
  width: 100%; border-collapse: collapse; margin-bottom: 20px;
  font-size: 14px; line-height: 1.7; border: 1px solid #e8e8e8; border-radius: 4px;
  overflow: hidden;
}
.article-detail .article-content thead {
  background: #e4393c;
}
.article-detail .article-content thead th {
  padding: 10px 14px; font-weight: 600; color: #fff; text-align: left; font-size: 14px;
}
.article-detail .article-content td {
  padding: 10px 14px; border-bottom: 1px solid #e8e8e8; color: #333; font-size: 14px;
}
.article-detail .article-content tbody tr:hover { background: #fef0ef; }
.article-detail .article-content tbody tr:last-child td { border-bottom: none; }

/* 任务列表 */
.article-detail .article-content input[type="checkbox"] { margin-right: 6px; }

/* Tags */
.article-tags { padding: 20px 0; border-bottom: 1px solid #f0f0f0; margin-bottom: 20px; }
.article-tags .tag {
  display: inline-block; background: #f5f5f5; color: #555; font-size: 13px;
  padding: 4px 12px; border-radius: 4px; margin: 0 8px 6px 0;
}
.article-tags .tag:hover { background: #e4393c; color: #fff; }

/* Article Actions */
.article-actions {
  display: flex; justify-content: center; gap: 20px; padding: 24px 0; border-bottom: 1px solid #f0f0f0;
}
.article-actions .action-btn {
  display: flex; align-items: center; gap: 6px; padding: 8px 28px;
  border-radius: 24px; background: #f5f5f5; color: #555; font-size: 14px; cursor: pointer;
  transition: all 0.2s;
}
.article-actions .action-btn:hover { background: #e4393c; color: #fff; }

/* Comments Section */
.comments-section { padding-top: 24px; }
.comments-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; }
.comment-input-wrap {
  display: flex; gap: 12px; margin-bottom: 24px;
}
.comment-input-wrap .comment-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; background: #f0f0f0; overflow: hidden;
}
.comment-input-wrap .comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-input-wrap .comment-input {
  flex: 1; border: 1px solid #e8e8e8; border-radius: 4px; padding: 10px 14px;
  font-size: 14px; resize: none; height: 44px; transition: border-color 0.2s;
}
.comment-input-wrap .comment-input:focus { border-color: #e4393c; }
.comment-item {
  display: flex; gap: 12px; padding: 16px 0; border-bottom: 1px solid #f5f5f5;
}
.comment-item:last-child { border-bottom: none; }
.comment-item .comment-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; background: #f0f0f0; overflow: hidden;
}
.comment-item .comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-item .comment-body { flex: 1; }
.comment-item .comment-author { font-size: 14px; font-weight: 500; color: #222; margin-bottom: 4px; }
.comment-item .comment-text { font-size: 14px; color: #333; line-height: 1.5; margin-bottom: 8px; }
.comment-item .comment-meta { font-size: 13px; color: #999; display: flex; gap: 16px; }
.comment-reply-link { color: #666; text-decoration: none; cursor: pointer; }
.comment-reply-link:hover { color: #e4393c; }

/* Comment Form */
.comment-form {
  background: #f9f9f9;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 24px;
}
.comment-form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.comment-form-input {
  flex: 1;
  height: 40px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 0 14px;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.2s;
}
.comment-form-input:focus {
  border-color: #e4393c;
  outline: none;
}
.comment-form-textarea {
  width: 100%;
  height: 100px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 12px 14px;
  font-size: 14px;
  background: #fff;
  resize: vertical;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.comment-form-textarea:focus {
  border-color: #e4393c;
  outline: none;
}
.comment-form-btn {
  margin-top: 12px;
  padding: 10px 32px;
  background: #e4393c;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}
.comment-form-btn:hover {
  background: #c9302c;
}

/* ==================== Single Page ==================== */
.single-page {
  background: #fff; border-radius: 4px; padding: 40px;
}
.single-page .page-title {
  font-size: 24px; font-weight: 700; margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0; color: #111;
}
.single-page .page-body { font-size: 15px; line-height: 1.8; color: #444; }
.single-page .page-body p { margin-bottom: 16px; }
.single-page .page-body h2 { font-size: 20px; font-weight: 600; margin: 28px 0 12px; color: #222; }
.single-page .page-body h3 { font-size: 17px; font-weight: 600; margin: 22px 0 10px; color: #333; }
.single-page .page-body ul, .single-page .page-body ol { padding-left: 20px; margin-bottom: 16px; }
.single-page .page-body li { margin-bottom: 6px; }

/* ==================== Weibo Page ==================== */
.weibo-wrap { background: #fff; border-radius: 4px; }
.weibo-header {
  padding: 20px 24px 16px; border-bottom: 1px solid #f0f0f0;
  display: flex; align-items: center; gap: 12px;
}
.weibo-header h2 { font-size: 20px; font-weight: 700; color: #222; margin: 0; }
.weibo-header .weibo-count { font-size: 13px; color: #999; }

/* Weibo Post Form */
.weibo-post { padding: 20px 24px; border-bottom: 6px solid #f4f5f6; }
.weibo-post-row { display: flex; gap: 14px; }
.weibo-post-avatar {
  width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: #f0f0f0;
}
.weibo-post-avatar img { width: 100%; height: 100%; object-fit: cover; }
.weibo-post-input { flex: 1; position: relative; }
.weibo-post-input textarea {
  width: 100%; height: 70px; border: 1px solid #e8e8e8; border-radius: 4px;
  padding: 10px 14px; font-size: 14px; resize: none; font-family: inherit;
  transition: border-color 0.2s; box-sizing: border-box;
}
.weibo-post-input textarea:focus { border-color: #e4393c; outline: none; }
.weibo-post-tools {
  display: flex; justify-content: space-between; align-items: center; margin-top: 10px;
}
.weibo-post-actions { display: flex; gap: 12px; }
.weibo-post-actions a {
  color: #999; font-size: 13px; cursor: pointer; transition: color 0.2s;
  display: flex; align-items: center; gap: 4px;
}
.weibo-post-actions a:hover { color: #e4393c; }
.weibo-post-submit {
  background: #e4393c; color: #fff; border: none; border-radius: 4px;
  padding: 8px 24px; font-size: 14px; cursor: pointer; transition: background 0.2s;
}
.weibo-post-submit:hover { background: #c9302c; }
.weibo-post-submit:disabled { background: #ccc; cursor: not-allowed; }

/* Tweet image preview */
.tweet-img-preview {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px;
}
.tweet-img-preview-item {
  position: relative; border: 1px solid #e0e0e0; border-radius: 6px; overflow: hidden;
}
.tweet-img-preview-item img {
  display: block; width: 100px; height: 80px; object-fit: cover;
}
.tweet-img-remove {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; line-height: 22px; text-align: center;
  background: rgba(0,0,0,0.55); color: #fff; border-radius: 50%;
  font-size: 12px; cursor: pointer; transition: background 0.2s;
}
.tweet-img-remove:hover { background: rgba(0,0,0,0.8); }

/* Emoji picker */
.emoji-picker {
  background: #fff; border: 1px solid #e0e0e0; border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  padding: 10px; width: 320px; max-height: 220px; overflow-y: auto;
  margin-top: 6px;
}
.emoji-grid { display: flex; flex-wrap: wrap; gap: 4px; }
.emoji-item {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; cursor: pointer; border-radius: 4px; transition: background 0.15s;
}
.emoji-item:hover { background: #f0f0f0; }

/* Weibo Item */
.weibo-item-wrap {
  padding: 20px 24px; border-bottom: 1px solid #f0f0f0; transition: background 0.15s;
}
.weibo-item-wrap:hover { background: #fafafa; }
.weibo-item-wrap:last-child { border-bottom: none; }
.weibo-item-row { display: flex; gap: 14px; }
.weibo-item-avatar {
  width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: #f0f0f0;
}
.weibo-item-avatar img { width: 100%; height: 100%; object-fit: cover; }
.weibo-item-body { flex: 1; min-width: 0; }
.weibo-item-author {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.weibo-item-author .name { font-size: 14px; font-weight: 600; color: #222; }
.weibo-item-author .name:hover { color: #e4393c; }
.weibo-item-author .badge {
  font-size: 11px; color: #fff; background: #e4393c; border-radius: 3px;
  padding: 0 5px; line-height: 18px; font-weight: 500;
}
.weibo-item-author .time { font-size: 13px; color: #bbb; margin-left: auto; }
.weibo-item-content {
  font-size: 15px; line-height: 1.7; color: #222; margin-bottom: 10px;
  word-break: break-word;
}
.weibo-item-content .mention { color: #e4393c; }
.weibo-item-content .topic { color: #e4393c; }
.weibo-item-images {
  display: grid; gap: 3px;
  max-width: 400px; margin-bottom: 10px;
}
.weibo-item-images img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px;
  background: #f0f0f0; cursor: pointer;
}
.weibo-item-images.img-count-1 { grid-template-columns: 1fr; max-width: 300px; }
.weibo-item-images.img-count-1 img { aspect-ratio: 16/10; }
.weibo-item-images.img-count-2 { grid-template-columns: repeat(2, 1fr); }
.weibo-item-images.img-count-3 { grid-template-columns: repeat(3, 1fr); }
.weibo-item-images.img-count-4 { grid-template-columns: repeat(2, 1fr); }
.weibo-item-images.img-count-5,
.weibo-item-images.img-count-6 { grid-template-columns: repeat(3, 1fr); }
.weibo-item-images.img-count-7,
.weibo-item-images.img-count-8,
.weibo-item-images.img-count-9 { grid-template-columns: repeat(3, 1fr); }
.weibo-detail-images {
  display: grid; gap: 3px;
  max-width: 400px; margin-bottom: 10px;
}
.weibo-detail-images img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px;
  background: #f0f0f0; cursor: pointer;
}
.weibo-detail-images.img-count-1 { grid-template-columns: 1fr; max-width: 300px; }
.weibo-detail-images.img-count-1 img { aspect-ratio: 16/10; }
.weibo-detail-images.img-count-2 { grid-template-columns: repeat(2, 1fr); }
.weibo-detail-images.img-count-3 { grid-template-columns: repeat(3, 1fr); }
.weibo-detail-images.img-count-4 { grid-template-columns: repeat(2, 1fr); }
.weibo-detail-images.img-count-5,
.weibo-detail-images.img-count-6 { grid-template-columns: repeat(3, 1fr); }
.weibo-detail-images.img-count-7,
.weibo-detail-images.img-count-8,
.weibo-detail-images.img-count-9 { grid-template-columns: repeat(3, 1fr); }
.weibo-item-actions {
  display: flex; gap: 0; padding-top: 10px; border-top: 1px solid #f5f5f5;
}
.weibo-item-actions a {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px;
  height: 34px; font-size: 13px; color: #999; border-radius: 4px;
  transition: all 0.2s; cursor: pointer;
}
.weibo-item-actions a:hover { background: #f5f5f5; color: #e4393c; }
.weibo-item-actions a.liked { color: #e4393c; }

/* Weibo Pagination */
.weibo-pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 6px; padding: 24px 20px;
}
.weibo-pagination a, .weibo-pagination span {
  display: inline-block; min-width: 36px; height: 36px; line-height: 36px;
  text-align: center; border-radius: 4px; font-size: 14px; color: #555;
  background: #f5f5f5; transition: all 0.2s;
}
.weibo-pagination a:hover { background: #e4393c; color: #fff; }
.weibo-pagination .active { background: #e4393c; color: #fff; }

/* ==================== Scrollbar ==================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f5f5f5; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ==================== 404 Page ==================== */
.page-404 {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 200px); padding: 60px 0;
}
.page-404-inner { text-align: center; max-width: 500px; padding: 0 20px; }
.error-circle {
  width: 140px; height: 140px; border-radius: 50%;
  background: linear-gradient(135deg, #fef0ef, #fff);
  border: 3px solid #f5f5f5;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
}
.error-code {
  font-size: 56px; font-weight: 800; color: #e4393c;
  letter-spacing: 4px; line-height: 1;
}
.error-title { font-size: 22px; font-weight: 600; color: #222; margin-bottom: 10px; }
.error-desc {
  font-size: 15px; color: #999; line-height: 1.7; margin-bottom: 28px;
}
.error-actions { display: flex; justify-content: center; gap: 16px; margin-bottom: 36px; }
.error-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 24px; border-radius: 24px; font-size: 14px;
  text-decoration: none; transition: all 0.2s;
}
.error-btn-primary { background: #e4393c; color: #fff; }
.error-btn-primary:hover { background: #c62d2f; color: #fff; }
.error-btn-secondary { background: #f5f5f5; color: #555; }
.error-btn-secondary:hover { background: #e8e8e8; }
.error-suggest { padding-top: 28px; border-top: 1px solid #f0f0f0; }
.error-suggest-title { font-size: 14px; color: #999; margin-bottom: 14px; }
.error-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.error-links a {
  font-size: 13px; color: #666; padding: 6px 14px;
  border: 1px solid #e8e8e8; border-radius: 4px; transition: all 0.2s;
}
.error-links a:hover { color: #e4393c; border-color: #e4393c; }

/* ==================== Responsive ==================== */

/* ---------- Tablet (≤1024px) ---------- */
@media (max-width: 1024px) {
  .container { width: 100%; padding: 0 12px; }
  .header-inner { width: 100%; padding: 0 12px; }

  /* Hero */
  .hero-banner { height: 280px; }
  .hero-search-box { width: 480px; }
  .hero-logo span { font-size: 24px; }

  /* Focus carousel */
  .focus-carousel-inner { height: 200px; }

  /* Feed items */
  .feed-item .feed-thumb { width: 140px; height: 90px; }
  .feed-item .feed-title { font-size: 15px; }

  /* Article detail */
  .article-detail { padding: 24px 28px; }
  .article-detail .article-title { font-size: 24px; }

  /* Sidebar */
  .sidebar { width: 260px; }

  /* Profile */
  .profile-header-simple { padding: 20px; }
  .profile-stats-row { padding: 0 20px 16px; }
  .profile-feed-item { margin: 0 12px; }
}

/* ---------- Mobile (≤768px) ---------- */
@media (max-width: 768px) {
  /* Base */
  body { font-size: 15px; }
  .container { padding: 0 8px; }

  /* --- Header / Navbar --- */
  .header { height: 48px; }
  .header-inner { height: 48px; padding: 0 10px; }
  .nav { gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .nav-item { padding: 0 8px; font-size: 13px; height: 48px; line-height: 48px; }
  .nav-item.active::after { left: 8px; right: 8px; height: 2px; }
  .header-search input { width: 100px; }
  .header--scrolled .header-search { display: none; }
  .header--scrolled .header-actions { display: none; }
  .header--scrolled .logo { display: none; }
  .logo-text { font-size: 18px; }

  /* --- Hero Banner --- */
  .hero-banner { display: none; }
  .sidebar { display: none; }

  /* --- Content Area --- */
  .content-area { flex-direction: column; }
  .content-left { width: 100%; }

  /* --- Focus Carousel --- */
  .focus-carousel { margin-bottom: 10px; }
  .focus-carousel-inner { height: 160px; }
  .focus-carousel-inner .focus-title { font-size: 13px; padding: 30px 10px 8px; }
  .focus-side .focus-sub .focus-title { font-size: 11px; padding: 20px 8px 6px; }

  /* --- Feed Items --- */
  .feed-item { padding: 14px 0; gap: 10px; }
  .feed-item .feed-thumb { width: 110px; height: 72px; }
  .feed-item .feed-title { font-size: 15px; -webkit-line-clamp: 2; }
  .feed-item .feed-desc { font-size: 13px; -webkit-line-clamp: 2; }
  .feed-item .feed-meta { font-size: 12px; }
  .feed-item.three-pic .pic-grid { grid-template-columns: repeat(3, 1fr); gap: 3px; }
  .feed-item.three-pic .pic-cell { height: 70px; }

  /* --- Sidebar --- */
  .sidebar { width: 100%; padding: 0; }
  .sidebar-card { border-radius: 0; margin-bottom: 8px; }
  .sidebar-card:last-child { margin-bottom: 0; }
  .hot-list { padding: 0 12px 10px; }
  .hot-item { padding: 8px 0; gap: 8px; }
  .hot-item .hot-title { font-size: 13px; }
  .link-list { padding: 8px 12px 12px; gap: 6px; }
  .link-list a { font-size: 12px; padding: 3px 10px; }
  .tag-list { padding: 4px 12px 14px; }
  .tag-list a { font-size: 12px; padding: 3px 8px; }
  .sidebar-title { padding: 12px 12px 8px; font-size: 14px; }
  .sidebar-login { padding: 14px 12px; }
  .sidebar-login-row input[type="text"],
  .sidebar-login-row input[type="password"] { height: 36px; font-size: 14px; }
  .sidebar-login-btn { height: 36px; font-size: 14px; }

  /* Sidebar merge tabs */
  .sidebar-merge-tabs { gap: 0; }
  .sidebar-merge-tab { font-size: 13px; padding: 10px 0; }
  .sidebar-sort-item { font-size: 13px; }
  .archive-year-title { font-size: 14px; }
  .archive-month-item { font-size: 13px; }

  /* Archive timeline page */
  .archive-year { padding: 0 16px; }
  .archive-year-header { padding: 12px 0 6px; }
  .archive-year-header .year-num { font-size: 18px; }
  .archive-month-header { padding: 8px 0 6px; }
  .archive-month-header .month-name { font-size: 14px; }
  .archive-articles { padding-left: 14px; }
  .archive-article { padding: 8px 0 8px 10px; gap: 8px; }
  .archive-article .article-date { font-size: 12px; width: 60px; }
  .archive-article .article-title { font-size: 13px; }
  .archive-article .article-cat { font-size: 11px; padding: 0 6px; line-height: 20px; }
  .archive-year-divider { margin: 6px 16px; }

  /* Calendar */
  .calendar-header { padding: 10px 12px; }
  .calendar-grid { padding: 0 12px 12px; }
  .calendar-grid .cal-day { font-size: 12px; }

  /* --- Article Detail --- */
  .article-detail { padding: 16px; border-radius: 0; }
  .article-detail .article-title { font-size: 20px; margin-bottom: 10px; }
  .article-detail .article-meta {
    flex-wrap: wrap; gap: 10px; font-size: 13px; padding-bottom: 14px; margin-bottom: 16px;
  }
  .article-detail .article-meta .author-avatar { width: 28px; height: 28px; }
  .article-detail .article-content { font-size: 16px; line-height: 1.7; }
  .article-detail .article-content h1 { font-size: 19px; }
  .article-detail .article-content h2 { font-size: 17px; }
  .article-detail .article-content h3 { font-size: 15px; }
  .article-detail .article-content pre { font-size: 13px; padding: 12px 14px; }
  .article-detail .article-content table { font-size: 12px; }
  .article-detail .article-content thead th,
  .article-detail .article-content td { padding: 8px 10px; }
  /* Scrollable tables on mobile */
  .article-detail .article-content table {
    display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
  }

  /* Article actions */
  .article-actions { gap: 8px; padding: 16px 0; flex-wrap: wrap; }
  .article-actions .action-btn { padding: 6px 16px; font-size: 13px; }
  .article-tags { padding: 14px 0; }
  .article-tags .tag { font-size: 12px; padding: 3px 10px; margin: 0 6px 4px 0; }

  /* Article nav (prev/next) */
  .article-nav { flex-direction: column; gap: 8px; padding: 16px 0; }
  .article-nav-item { padding: 12px 14px; }
  .article-nav-next { align-items: flex-start; }
  .article-nav-title { font-size: 13px; -webkit-line-clamp: 1; }
  .article-nav-label { font-size: 11px; }

  /* --- Comments --- */
  .comments-title { font-size: 16px; }
  .comment-input-wrap { gap: 8px; }
  .comment-input-wrap .comment-avatar { width: 34px; height: 34px; }
  .comment-input-wrap .comment-input { font-size: 13px; height: 38px; padding: 8px 10px; }
  .comment-item { gap: 8px; padding: 12px 0; }
  .comment-item .comment-avatar { width: 30px; height: 30px; }
  .comment-item .comment-author { font-size: 13px; }
  .comment-item .comment-text { font-size: 13px; }
  .comment-item .comment-meta { font-size: 12px; }

  .comment-form { padding: 14px; }
  .comment-form-row { flex-direction: column; gap: 8px; }
  .comment-form-input { height: 36px; font-size: 13px; }
  .comment-form-textarea { height: 80px; font-size: 13px; }
  .comment-form-btn { padding: 8px 24px; font-size: 14px; }

  /* --- Share Modal --- */
  .share-modal-content { padding: 24px 16px 20px; max-width: 320px; }
  .share-modal h4 { font-size: 16px; }
  .share-buttons { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .share-btn { padding: 12px 8px; font-size: 11px; }
  .share-btn-icon { width: 22px; height: 22px; }

  /* --- Profile --- */
  .profile-header-simple { padding: 16px 12px; gap: 12px; }
  .profile-header-avatar { width: 56px; height: 56px; }
  .profile-header-name { font-size: 17px; }
  .profile-header-bio { font-size: 12px; }
  .profile-header-meta { font-size: 12px; gap: 8px; }
  .profile-header-edit, .profile-header-submit { font-size: 12px; padding: 2px 8px; }
  .profile-info-edit-form { padding: 16px 12px; }

  .profile-stats-row { display: none; }
  .profile-stat-card { padding: 12px 8px; }
  .profile-stat-card .stat-num { font-size: 22px; }
  .profile-stat-card .stat-label { font-size: 11px; }

  .profile-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .profile-tab { font-size: 14px; padding: 12px 6px 10px; flex: none; min-width: 56px; }
  .profile-tab::after { left: 12%; right: 12%; }

  .profile-feed-item { margin: 0 10px; padding: 12px 0; gap: 10px; }
  .profile-feed-item .feed-title { font-size: 14px; }
  .profile-feed-item .feed-meta { font-size: 12px; gap: 8px; }
  .profile-feed-item .feed-thumb { width: 90px; height: 60px; }

  /* Profile tweet items */
  .tweet-post-item .tweet-avatar { width: 34px; height: 34px; }
  .tweet-post-item .tweet-nickname { font-size: 14px; }
  .tweet-post-item .tweet-content-text { font-size: 14px; }
  .tweet-post-item .tweet-body { height: 60px; }
  .tweet-post-item .tweet-thumb { width: 80px; }
  .tweet-feed-item .feed-thumb { width: 80px; }
  .tweet-act-item { font-size: 11px; padding: 3px 6px; }
  .tweet-act-item svg { width: 14px; height: 14px; }
  .feed-item-ops { gap: 12px; }
  .feed-item-ops a { font-size: 11px; }

  /* --- User pages (tags, archive, tweets) --- */
  .tags-header { padding: 16px; flex-direction: column; gap: 8px; align-items: flex-start; }
  .tags-header h2 { font-size: 18px; }
  .tags-list { padding: 0 12px 14px; }
  .tag-item { font-size: 13px; }

  .archive-header { padding: 16px; }
  .archive-header h2 { font-size: 18px; }
  .archive-list { padding: 0 12px; }
  .archive-item { padding: 10px 0; }
  .archive-item .archive-title { font-size: 14px; }
  .archive-item .archive-meta { font-size: 12px; }

  /* Weibo page */
  .weibo-header { padding: 14px 16px; }
  .weibo-header h2 { font-size: 17px; }
  .weibo-post { padding: 14px 16px; }
  .weibo-post-avatar { width: 36px; height: 36px; }
  .weibo-post-input textarea { height: 56px; font-size: 13px; }
  .weibo-post-tools { flex-direction: column; gap: 8px; align-items: stretch; }
  .weibo-post-actions { justify-content: flex-start; }
  .weibo-post-submit { width: 100%; text-align: center; }
  .tweet-img-preview-item img { width: 80px; height: 64px; }
  .weibo-tl-item { padding: 10px 8px; gap: 8px; }
  .weibo-tl-avatar { left: -30px; top: 8px; width: 28px; height: 28px; }
  .weibo-tl-avatar.is-new { box-shadow: 0 0 0 2px #e4393c, 0 1px 3px rgba(0, 0, 0, 0.08); }
  .weibo-tl-text { font-size: 13px; line-height: 1.55; }
  .weibo-tl-nick { font-size: 12px; }
  .weibo-timeline { padding-left: 28px; }
  .weibo-timeline::before { left: 12px; }
  .weibo-item-actions a { font-size: 12px; height: 30px; }

  /* Weibo detail page */
  .weibo-detail .weibo-main-avatar { width: 40px; height: 40px; }
  .weibo-detail .weibo-main-nickname { font-size: 15px; }
  .weibo-detail .weibo-main-text { font-size: 15px; }
  .weibo-detail-images { gap: 4px; }
  .weibo-detail-comments .comment-item { padding: 10px 0; }

  /* --- List pages (category archives, search results) --- */
  .list-item { flex-direction: column; gap: 10px; padding: 14px; }
  .list-item .list-thumb { width: 100%; height: 160px; }
  .list-item .list-title { font-size: 15px; }
  .list-item .list-summary { font-size: 13px; }
  .list-item .list-meta { font-size: 12px; gap: 10px; }

  /* --- Single page --- */
  .single-page { padding: 16px; border-radius: 0; }
  .single-page .page-title { font-size: 20px; margin-bottom: 16px; padding-bottom: 12px; }
  .single-page .page-body { font-size: 14px; }
  .single-page .page-body h2 { font-size: 18px; }
  .single-page .page-body h3 { font-size: 15px; }

  /* --- Pagination --- */
  .pagination { padding: 20px 12px; gap: 4px; }
  .pagination a, .pagination span { min-width: 32px; height: 32px; line-height: 32px; font-size: 13px; }
  .weibo-pagination { padding: 16px 12px; gap: 4px; }
  .weibo-pagination a, .weibo-pagination span { min-width: 32px; height: 32px; line-height: 32px; font-size: 13px; }

  /* --- Footer --- */
  .footer { padding: 20px 12px; font-size: 12px; }
  .footer .footer-links a { margin: 0 6px; }

  /* --- 404 Page --- */
  .page-404 { min-height: calc(100vh - 160px); padding: 40px 0; }
  .error-circle { width: 110px; height: 110px; margin-bottom: 18px; }
  .error-code { font-size: 44px; }
  .error-title { font-size: 19px; }
  .error-desc { font-size: 14px; }
  .error-actions { flex-direction: column; align-items: center; gap: 10px; }
  .error-btn { width: 200px; justify-content: center; }
}

/* ---------- Small Mobile (≤480px) ---------- */
@media (max-width: 480px) {
  /* Hero */
  .hero-banner { display: none; }

  /* Focus carousel */
  .focus-carousel-inner { height: 130px; flex-direction: column; }
  .focus-main { flex: 1; }
  .focus-side { flex: none; flex-direction: row; height: 0; overflow: hidden; }

  /* Feed items */
  .feed-item .feed-thumb { width: 90px; height: 60px; }
  .feed-item .feed-title { font-size: 14px; }
  .feed-item.three-pic .pic-cell { height: 56px; }

  /* Nav */
  .nav-item { padding: 0 6px; font-size: 12px; }
  .header-search input { width: 80px; }
  .header--scrolled .logo { max-width: 120px; margin-right: 8px; }
  .logo-text { font-size: 16px; }
  .logo-icon { width: 26px; height: 26px; }

  /* Article detail */
  .article-detail .article-title { font-size: 18px; }
  .article-detail .article-content { font-size: 15px; }
  .article-actions .action-btn { padding: 5px 12px; font-size: 12px; }

  /* Profile */
  .profile-stats-row { flex-wrap: wrap; }
  .profile-stat-card { flex: 1 1 45%; }
}

/* ==================== Sidebar - Login Form ==================== */
.sidebar-login { padding: 16px; }
.sidebar-login-row { margin-bottom: 10px; }
.sidebar-login-row input[type="text"],
.sidebar-login-row input[type="password"] {
  width: 100%; height: 38px; border: 1px solid #e0e0e0; border-radius: 6px;
  padding: 0 12px; font-size: 14px; background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s; box-sizing: border-box;
}
.sidebar-login-row input:focus {
  border-color: #e4393c; box-shadow: 0 0 0 3px rgba(228,57,60,0.08);
  background: #fff; outline: none;
}
.sidebar-login-row input::placeholder { color: #bbb; }
.sidebar-login-captcha { display: flex; gap: 8px; align-items: center; }
.sidebar-login-captcha input { flex: 1; }
.sidebar-login-captcha img {
  width: 90px; height: 38px; border-radius: 4px; cursor: pointer; flex-shrink: 0;
}
.sidebar-login-remember {
  display: flex; align-items: center; gap: 5px; font-size: 13px;
  color: #999; margin-bottom: 10px; cursor: pointer;
}
.sidebar-login-btn {
  width: 100%; height: 38px; background: linear-gradient(135deg, #e4393c, #ff6b6b);
  color: #fff; border: none; border-radius: 20px; font-size: 15px; cursor: pointer;
  transition: all 0.3s; box-shadow: 0 2px 8px rgba(228,57,60,0.2);
}
.sidebar-login-btn:hover {
  background: linear-gradient(135deg, #c62d2f, #e4393c);
  transform: translateY(-1px); box-shadow: 0 4px 14px rgba(228,57,60,0.35);
}
.sidebar-login-links { text-align: center; margin-top: 12px; font-size: 13px; }
.sidebar-login-links a { color: #999; transition: color 0.2s; }
.sidebar-login-links a:hover { color: #e4393c; }
.sidebar-login-links .sep { color: #ddd; margin: 0 8px; }

/* ==================== Share Modal (echo_log.php) ==================== */
.share-modal {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 2000; align-items: center; justify-content: center;
}
.share-modal.active { display: flex; }
.share-modal-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
}
.share-modal-content {
  position: relative; background: #fff; border-radius: 16px;
  padding: 32px 28px 28px; max-width: 400px; width: 90%; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.share-modal-close {
  position: absolute; top: 10px; right: 14px; width: 28px; height: 28px;
  font-size: 18px; color: #999; cursor: pointer; background: #f5f5f5;
  border: none; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; transition: all 0.2s; line-height: 1;
}
.share-modal-close:hover { background: #e8e8e8; color: #333; }
.share-modal-icon {
  font-size: 40px; margin-bottom: 8px;
}
.share-modal h4 {
  font-size: 18px; font-weight: 600; color: #222; margin-bottom: 4px;
}
.share-modal .share-desc {
  font-size: 13px; color: #bbb; margin-bottom: 24px;
}
.share-buttons {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.share-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 16px 8px; border-radius: 12px; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all 0.2s; border: none;
}
.share-btn:hover { transform: translateY(-2px); }
.share-weibo { background: #E6162D; color: #fff; }
.share-weibo:hover { background: #cc1428; color: #fff; box-shadow: 0 4px 12px rgba(230,22,45,0.35); }
.share-qq { background: #1EBAFC; color: #fff; }
.share-qq:hover { background: #0ea0d8; color: #fff; box-shadow: 0 4px 12px rgba(30,186,252,0.35); }
.share-qzone { background: #f5c518; color: #222; }
.share-qzone:hover { background: #e0b214; color: #222; box-shadow: 0 4px 12px rgba(245,197,24,0.35); }
.share-wechat { background: #07c160; color: #fff; }
.share-wechat:hover { background: #06ad56; color: #fff; box-shadow: 0 4px 12px rgba(7,193,96,0.35); }
.share-btn-icon { width: 24px; height: 24px; flex-shrink: 0; }

/* ==================== Article Nav (prev/next) ==================== */
.article-nav {
  display: flex; gap: 12px; padding: 24px 0;
  border-top: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0;
  margin-bottom: 20px;
}
.article-nav-item {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 18px; border-radius: 8px;
  background: #fafafa; color: #333;
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
}
.article-nav-next { align-items: flex-end; }
.article-nav-item:hover {
  background: #fef0ef; color: #e4393c;
  transform: translateY(-1px);
}
.article-nav-label {
  font-size: 12px; color: #999;
  display: flex; align-items: center; gap: 4px;
}
.article-nav-prev .article-nav-label,
.article-nav-prev .article-nav-title { align-self: flex-start; }
.article-nav-next .article-nav-label,
.article-nav-next .article-nav-title { align-self: flex-end; }
.article-nav-prev .article-nav-label::before { content: '← '; }
.article-nav-next .article-nav-label::after  { content: ' →'; }
.article-nav-item:hover .article-nav-label { color: #e4393c; }
.article-nav-title {
  font-size: 14px; line-height: 1.45;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.article-nav-next { text-align: right; }
.article-nav-none {
  visibility: hidden; pointer-events: none;
}

/* ==================== Empty states ==================== */
.feed-empty {
  text-align: center; padding: 60px 20px; color: #999; font-size: 15px;
}
