﻿/* ================================================
   QQ空间炫酷风格 - 个人网站样式
   深色星空背景 + 毛玻璃卡片 + 霓虹紫蓝配色
   ================================================ */

/* ---------- CSS变量 ---------- */
:root {
  --primary: #667eea;
  --secondary: #764ba2;
  --accent: #f093fb;
  --text-primary: #f0f0f0;
  --text-secondary: #b0b0d0;
  --text-muted: #7a7a9a;
  --bg-card: rgba(255, 255, 255, 0.06);
  --bg-card-hover: rgba(255, 255, 255, 0.10);
  --border-glass: rgba(255, 255, 255, 0.12);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.3);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --sidebar-width: 240px;
  --font-sans: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --site-bg: url('../images/hero-cover.jpg');
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background:
    linear-gradient(rgba(10, 10, 46, 0.82), rgba(10, 10, 46, 0.82)),
    var(--site-bg) center/cover fixed no-repeat;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ---------- 星空背景 Canvas ---------- */
#starfield {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* ---------- 背景渐变覆盖层 ---------- */
.bg-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: radial-gradient(ellipse at 30% 20%, rgba(102,126,234,0.15) 0%, transparent 70%),
              radial-gradient(ellipse at 70% 80%, rgba(118,75,162,0.12) 0%, transparent 65%);
  z-index: 0;
  pointer-events: none;
}

/* ---------- 布局 ---------- */
.layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  max-width: 1480px;
  margin: 0 auto;
}

/* ======== 侧边栏 ======== */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: sticky;
  top: 0;
  flex-shrink: 0;
  background:
    linear-gradient(135deg, rgba(10,10,46,0.88) 0%, rgba(10,10,46,0.72) 50%, rgba(10,10,46,0.88) 100%),
    var(--site-bg) center/cover no-repeat;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-glass);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.sidebar-avatar {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 3px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 0 25px rgba(102, 126, 234, 0.3);
}
.sidebar-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: #1a1a3e;
}

.sidebar-name {
  font-size: 18px; font-weight: 700;
  margin-bottom: 4px;
  background: linear-gradient(270deg, #667eea, #f093fb, #4facfe, #667eea);
  background-size: 400% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}
.sidebar-bio {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 50px;
  text-align: center;
}

.sidebar-nav {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 24px;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 15px;
  transition: all 0.3s ease;
  position: relative;
}
.sidebar-nav a i {
  width: 20px; text-align: center;
  font-size: 16px;
  transition: all 0.3s ease;
}
.sidebar-nav a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}
.sidebar-nav a:hover i {
  color: var(--primary);
  text-shadow: 0 0 12px rgba(102, 126, 234, 0.5);
}
.sidebar-nav a.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(102,126,234,0.20), rgba(118,75,162,0.15));
  border: 1px solid rgba(102, 126, 234, 0.25);
}
.sidebar-nav a.active i {
  color: var(--primary);
}
.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: -1px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  box-shadow: 0 0 12px rgba(102, 126, 234, 0.5);
}

/* 侧边栏搜索框 */
.sidebar-search {
  width: 100%;
  padding: 0 12px;
  margin: 16px 0;
}
.sidebar-search form {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all 0.3s;
}
.sidebar-search form:focus-within {
  border-color: rgba(102, 126, 234, 0.4);
  background: rgba(255, 255, 255, 0.07);
}
.sidebar-search input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 13px;
}
.sidebar-search input::placeholder {
  color: var(--text-muted);
}
.sidebar-search button {
  background: none;
  border: none;
  padding: 8px 12px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  transition: color 0.3s;
}
.sidebar-search button:hover {
  color: var(--primary);
}

.sidebar-footer {
  margin-top: auto;
  text-align: center;
  padding-top: 20px;
  width: 100%;
  border-top: 1px solid var(--border-glass);
}
.sidebar-footer p { font-size: 11px; color: var(--text-muted); }
.sidebar-social {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}
.sidebar-social a {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 14px;
  transition: all 0.3s ease;
}
.sidebar-social a:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* ======== 主内容 ======== */
.main-content {
  flex: 1;
  padding: 40px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  min-width: 0;
}
/* 全站窄屏容器 */
.content-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ======== 通用卡片 ======== */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: all 0.4s ease;
  animation: borderPulse 3s ease-in-out infinite;
}

.card:hover {
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card), 0 0 30px rgba(102, 126, 234, 0.1);
  animation: borderPulse 1.5s ease-in-out infinite;
}

/* ======== 首页 - 封面区 ======== */
.hero-section {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 240px;
  display: flex;
  align-items: center;
  padding: 24px 40px;
  margin-bottom: 32px;
  background:
    linear-gradient(135deg, rgba(26,16,64,0.85) 0%, rgba(13,13,59,0.60) 50%, rgba(26,5,51,0.85) 100%),
    var(--site-bg) center/cover no-repeat;
  border: 1px solid var(--border-glass);
  animation: heroGlow 4s ease-in-out infinite;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 30%, rgba(240,147,251,0.10) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 70%, rgba(102,126,234,0.12) 0%, transparent 50%);
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 30px;
}
.hero-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 40px rgba(102, 126, 234, 0.3);
}
.hero-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  background: #1a1a3e;
  border-radius: 50%;
}
.hero-text h1 {
  font-size: 32px; font-weight: 800;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #fff 30%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-text p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.hero-stats {
  display: flex;
  gap: 24px;
  margin-top: 12px;
}
.hero-stats span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}
.hero-stats span i { color: var(--primary); }
.hero-stats strong { color: var(--text-primary); font-size: 16px; }

/* ======== 首页信息卡片网格 ======== */
.home-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.section-title {
  font-size: 18px; font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title i { color: var(--primary); }
.section-title .more-link {
  margin-left: auto;
  font-size: 13px; font-weight: 400;
  color: var(--text-secondary);
  transition: color 0.3s;
}
.section-title .more-link:hover { color: var(--primary); }

/* ======== 文章卡片 ======== */
.article-card {
  display: flex;
  gap: 20px;
  padding: 20px;
  margin-bottom: 16px;
  cursor: pointer;
  animation: fadeInUp 0.6s ease both;
}
.article-card:last-child { margin-bottom: 0; }
.article-card-img {
  width: 120px; height: 85px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
}
.article-card-img i { font-size: 32px; color: rgba(255,255,255,0.3); }
.article-card-img img { width: 100%; height: 100%; object-fit: cover; }
.article-card-body { flex: 1; min-width: 0; }
.article-card-body h3 {
  font-size: 15px; font-weight: 600;
  margin-bottom: 6px; line-height: 1.4;
  transition: color 0.3s;
}
.article-card:hover .article-card-body h3 { color: var(--primary); }
.article-card-body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.article-meta span { display: flex; align-items: center; gap: 4px; }
.article-meta .tag {
  padding: 2px 10px;
  border-radius: 20px;
  background: rgba(102, 126, 234, 0.15);
  color: var(--primary);
  font-size: 11px;
}

.article-card-medium {
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  animation: fadeInUp 0.6s ease both;
}
.article-card-medium .article-card-img {
  width: 100%; height: 160px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.article-card-medium .article-card-body { padding: 20px; }

/* 防止 hover 时 card 的 borderPulse 覆盖 fadeInUp，导致动画重启卡片消失 */
.article-card-medium:hover,
.article-card:hover {
  animation: fadeInUp 0.6s ease both;
}

/* ======== 微语卡片 ======== */
.weibo-item {
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 14px;
 animation: fadeInUp 0.5s ease both;
}

.timeline-item:hover .weibo-item {
  background: var(--bg-card-hover);
  border-radius: var(--radius-sm);
}

.weibo-item:last-child { border-bottom: none; }
.weibo-avatar {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.weibo-avatar img { width: 100%; height: 100%; object-fit: cover; background: #1a1a3e; }

/* ======== 头像通用 ======== */
.avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.sidebar-avatar .avatar-inner {
  background: radial-gradient(circle at 30% 30%, #1a1a4e, #0d0d2b);
}

.hero-avatar .avatar-inner {
  font-size: 36px;
}
.weibo-body { flex: 1; min-width: 0; }
.weibo-body .weibo-name { font-size: 13px; font-weight: 600; color: var(--primary); }
.weibo-body .weibo-text {
  font-size: 14px; line-height: 1.7;
  margin: 4px 0 8px;
  color: var(--text-primary);
}
.weibo-body .tweet-content p {
  margin: 0 0 8px;
}
.weibo-body .tweet-content p:last-child {
  margin-bottom: 0;
}
.weibo-body .tweet-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 6px 0;
}
/* ---------- 微语九宫格图片（QQ空间风格） ---------- */
.tweet-grid {
  margin-top: 8px;
  max-width: 280px;
}
.tweet-grid-row {
  margin-bottom: 4px;
}
.tweet-grid-row:last-child {
  margin-bottom: 0;
}
.tweet-grid-item img {
  transition: opacity 0.3s, transform 0.3s;
  cursor: pointer;
}
.tweet-grid-item img:hover {
  opacity: 0.85;
  transform: scale(1.03);
}

/* ---------- 微语页/文章页双栏布局 ---------- */
.tweets-page-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  min-height: 400px;
}
.tweets-page-main {
  flex: 1;
  min-width: 0;
}
/* 微语窄屏卡片内边距优化 */
.tweets-page-main .card {
  padding: 28px 32px;
}
.tweets-page-main .section-title {
  font-size: 16px;
  margin-bottom: 16px;
}
.tweets-page-main .weibo-item {
  padding: 20px 0;
}
.tweets-page-main .weibo-text {
  font-size: 14px;
  line-height: 1.7;
}
/* 微语详情页 - 评论区域窄屏适配 */
.tweet-detail-comment {
  padding: 24px 32px;
}
.tweet-detail-comment .comment-form-textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  resize: vertical;
  min-height: 60px;
  font-family: var(--font-sans);
}
.tweet-detail-comment .comment-form-textarea:focus {
  border-color: var(--primary);
}
.tweet-detail-comment .comment-submit-btn {
  padding: 8px 28px;
  border-radius: 20px;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: opacity 0.3s;
}
.tweet-detail-comment .comment-submit-btn:hover {
  opacity: 0.85;
}
/* 回复列表项 */
.tweet-reply-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.tweet-reply-item:last-child {
  border-bottom: none;
}
.tweet-reply-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  flex-shrink: 0;
}
.tweet-reply-body {
  flex: 1;
  min-width: 0;
}
.tweet-reply-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.tweet-reply-content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  word-break: break-word;
}
.tweet-reply-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}
/* 返回按钮 */
.tweet-back-link {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  margin-right: 12px;
  transition: color 0.3s;
}
.tweet-back-link:hover {
  color: var(--primary);
}
/* 文章详情页窄屏适配 */
.tweets-page-main .article-header h1 {
  font-size: 26px;
  line-height: 1.35;
}
.tweets-page-main .article-body {
  font-size: 15px;
  line-height: 1.85;
}
.tweets-page-main .article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 12px auto;
  display: block;
}
/* 上下篇导航窄屏 */
.tweets-page-main .neighbor-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 24px 0;
}
.tweets-page-main .neighbor-nav a {
  flex: 1;
  padding: 20px;
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.3s;
}
.tweets-page-main .neighbor-nav a:hover {
  background: var(--bg-card-hover);
}
/* ---------- 右侧侧边栏 ---------- */
.tweets-sidebar {
  width: 340px;
  flex-shrink: 0;
  background:
    linear-gradient(135deg, rgba(10,10,46,0.92) 0%, rgba(10,10,46,0.76) 50%, rgba(10,10,46,0.92) 100%),
    var(--site-bg) center/cover no-repeat;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  padding: 24px 16px 24px 20px;
  gap: 16px;
}
.tweets-sidebar::-webkit-scrollbar {
  width: 3px;
}
.tweets-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 3px;
}
/* 侧边栏模块卡片 */
.tweets-sidebar .sidebar-section {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  transition: border-color 0.3s;
}
.tweets-sidebar .sidebar-section:hover {
  border-color: rgba(255,255,255,0.18);
}
/* 侧边栏模块标题 */
.tweets-sidebar .sidebar-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  letter-spacing: 0.3px;
}
.tweets-sidebar .sidebar-section-title i {
  color: var(--primary);
  font-size: 12px;
  width: 20px;
  text-align: center;
}
.tweets-sidebar .sidebar-divider {
  height: 1px;
  background: var(--border-glass);
  margin: 4px 0;
}
/* 侧边栏文章列表（最新/热门文章） */
.sidebar-post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-post-list li {
  margin-bottom: 10px;
  border-radius: 6px;
  transition: background 0.3s;
  padding: 4px;
  margin-left: -4px;
  margin-right: -4px;
}
.sidebar-post-list li:last-child {
  margin-bottom: 0;
}
.sidebar-post-list li:hover {
  background: rgba(255,255,255,0.06);
}
.sidebar-post-list li a {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
  transition: color 0.3s;
  text-decoration: none;
}
.sidebar-post-list li a:hover {
  color: var(--text-primary);
}
.sidebar-post-img {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}
.sidebar-post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.sidebar-post-list li:hover .sidebar-post-img img {
  transform: scale(1.08);
}
.sidebar-post-title {
  flex: 1;
  min-width: 0;
  word-break: break-all;
  padding-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 侧边栏分类列表 */
.sidebar-cat-list,
.sidebar-text-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-cat-list li {
  display: inline-block;
  margin: 0 6px 8px 0;
}
.sidebar-cat-list li a {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  text-decoration: none;
  transition: all 0.3s;
}
.sidebar-cat-list li a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
}
/* 侧边栏文本列表（最新评论、最新微语、归档） */
.sidebar-text-list li {
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 13px;
  transition: padding-left 0.3s;
}
.sidebar-text-list li:last-child {
  border-bottom: none;
}
.sidebar-text-list li:hover {
  padding-left: 4px;
}
.sidebar-text-list li a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s;
  display: block;
  line-height: 1.6;
}
.sidebar-text-list li a:hover {
  color: var(--primary);
}
/* 侧边栏标签云 */
.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sidebar-tags a {
  display: inline-block;
  padding: 4px 11px;
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  transition: all 0.3s;
  text-decoration: none;
}
.sidebar-tags a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  transform: translateY(-1px);
}
/* 侧边栏搜索 */
.tweets-sidebar .sidebar-section:has(form) form {
  display: flex;
  gap: 6px;
}
.tweets-sidebar .sidebar-section:has(form) input[type="text"] {
  flex: 1;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color 0.3s;
}
.tweets-sidebar .sidebar-section:has(form) input[type="text"]:focus {
  border-color: var(--primary);
}
.tweets-sidebar .sidebar-section:has(form) button {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  transition: opacity 0.3s;
}
.tweets-sidebar .sidebar-section:has(form) button:hover {
  opacity: 0.85;
}
/* 侧边栏博主信息 */
.tweets-sidebar .sidebar-section:has(.sidebar-blogger) {
  text-align: center;
}
.sidebar-blogger-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 4px auto 10px;
  overflow: hidden;
  border: 2px solid var(--border-glass);
  transition: border-color 0.3s;
}
.sidebar-blogger-avatar:hover {
  border-color: var(--primary);
}
.sidebar-blogger-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sidebar-blogger-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.sidebar-blogger-des {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.5;
}
.weibo-body .weibo-time { font-size: 11px; color: var(--text-muted); }

/* ---------- 侧边栏日历 ---------- */
#calendar {
  font-size: 12px;
  user-select: none;
}
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cal-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.cal-nav {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  font-size: 11px;
}
.cal-nav:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  color: #fff;
}
.cal-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}
.cal-table th {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cal-table td {
  padding: 3px 0;
  font-size: 12px;
}
.cal-table td a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.25s;
  font-size: 12px;
}
.cal-table td a:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}
.cal-other a {
  color: rgba(255,255,255,0.18) !important;
}
.cal-other a:hover {
  background: transparent !important;
}
.cal-today a {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  color: #fff !important;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(102,126,234,0.3);
}
.cal-has-post a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
}
.cal-has-post a {
  position: relative;
  font-weight: 600;
  color: var(--text-primary) !important;
}

.weibo-actions {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}
.weibo-actions span {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.weibo-actions span:hover { color: var(--primary); }

/* ======== 微语时间轴页面 ======== */
.timeline {
  position: relative;
  padding-left: 30px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--secondary), transparent);
}
.timeline-item {
  position: relative;
  margin-bottom: 28px;
  animation: fadeInUp 0.5s ease both;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -26px; top: 20px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 0 12px rgba(102, 126, 234, 0.5);
  border: 2px solid rgba(10, 10, 46, 0.9);
}

/* ======== 文章列表页 ======== */
.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.filter-bar .filter-btn {
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.filter-bar .filter-btn:hover {
  background: rgba(102, 126, 234, 0.15);
  color: var(--primary);
  border-color: rgba(102, 126, 234, 0.3);
}
.filter-bar .filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* ======== 文章详情页 ======== */
.article-header {
  margin-bottom: 32px;
  text-align: center;
}
.article-header h1 {
  font-size: 28px; font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
}
.article-header .article-meta {
  font-size: 13px;
  justify-content: center;
}

.article-body {
  line-height: 1.9;
  font-size: 15px;
  color: rgba(255,255,255,0.88);
}
.article-body h2 {
  font-size: 22px; font-weight: 700;
  margin: 32px 0 16px;
  color: var(--text-primary);
}
.article-body h3 {
  font-size: 18px; font-weight: 600;
  margin: 24px 0 12px;
  color: var(--text-primary);
}
.article-body p { margin-bottom: 16px; }
.article-body blockquote {
  border-left: 3px solid var(--primary);
  padding: 12px 20px;
  margin: 20px 0;
  background: rgba(102, 126, 234, 0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: italic;
}
.article-body pre {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 20px;
  overflow-x: auto;
  margin: 20px 0;
  font-size: 14px; line-height: 1.6;
}
.article-body code {
  font-family: 'Cascadia Code', 'Fira Code', monospace;
  background: rgba(102, 126, 234, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
.article-body pre code { background: none; padding: 0; }
.article-body img { border-radius: var(--radius-sm); margin: 20px 0; }

.article-tags {
  display: flex;
  gap: 8px;
  margin: 24px 0 32px;
  flex-wrap: wrap;
}
.article-tags span {
  padding: 4px 14px;
  border-radius: 20px;
  background: rgba(102, 126, 234, 0.12);
  color: var(--primary);
  font-size: 12px;
}

.comment-item {
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 14px;
}
.comment-item:last-child { border-bottom: none; }
.comment-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px; font-weight: 600;
}
.comment-body .comment-name { font-size: 13px; font-weight: 600; color: var(--primary); }
.comment-body .comment-text { font-size: 14px; margin: 4px 0; line-height: 1.6; }
.comment-body .comment-time { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 10px; }
.comment-reply-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}
.comment-reply-btn:hover {
  color: var(--primary);
}
.cancel-reply-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 12px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.cancel-reply-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.2);
}
.hidden { display: none !important; }

/* 评论回复列表 */
.comment-child-item {
  display: flex;
  gap: 10px;
  padding: 10px 0 10px 44px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.comment-child-item:last-child {
  border-bottom: none;
}
.comment-child-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px; font-weight: 600;
  flex-shrink: 0;
}
.comment-child-body {
  flex: 1;
  min-width: 0;
}
.comment-child-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.comment-child-at {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}
.comment-child-replyto {
  font-size: 12px;
  color: var(--accent);
  font-weight: 400;
}
.comment-child-text {
  font-size: 13px;
  margin: 2px 0;
  line-height: 1.5;
  color: var(--text-primary);
}
.comment-child-time {
  font-size: 11px;
  color: var(--text-muted);
}
.comment-count-bar {
  font-size: 13px;
  color: var(--text-muted);
  padding-bottom: 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border-glass);
}

/* ======== 关于页 ======== */
.about-hero {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 40px;
  margin-bottom: 24px;
}
.about-hero-img {
  width: 200px; height: 200px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-hero-img i { font-size: 70px; color: rgba(255,255,255,0.25); }
.about-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.about-hero-text h2 { font-size: 26px; font-weight: 700; margin-bottom: 12px; }
.about-hero-text p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 14px;
}

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.skill-cloud span {
  padding: 8px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.3s;
  cursor: default;
}
.skill-cloud span:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.15);
  transform: translateY(-2px);
}

.contact-links {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.contact-links a {
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  transition: all 0.3s;
}
.contact-links a:hover {
  background: linear-gradient(135deg, rgba(102,126,234,0.15), rgba(118,75,162,0.10));
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

/* ======== 分页 ======== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 32px;
}
.pagination a,
.pagination span {
  min-width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 14px;
  transition: all 0.3s;
}
.pagination a:hover {
  background: rgba(102, 126, 234, 0.15);
  color: var(--primary);
  border-color: rgba(102, 126, 234, 0.3);
  text-decoration: none;
}
.pagination span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  font-weight: 600;
}
.pagination em {
  font-style: normal;
  color: var(--text-muted);
  padding: 0 4px;
  font-size: 13px;
}
.pagination a.next { width: auto; padding: 0 16px; }

/* ======== 动画 ======== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes twinkle {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ======== QQ炫酷增强动效 ======== */
@keyframes borderPulse {
  0%, 100% { border-color: rgba(102, 126, 234, 0.12); box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
  50% { border-color: rgba(240, 147, 251, 0.25); box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 30px rgba(102,126,234,0.10); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes sparkleFloat {
  0% { transform: translateY(0) scale(0); opacity: 0; }
  20% { transform: translateY(-10px) scale(1); opacity: 0.9; }
  80% { opacity: 0.6; }
  100% { transform: translateY(-40px) scale(0); opacity: 0; }
}

@keyframes heroGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(102,126,234,0.0), inset 0 0 0 rgba(102,126,234,0); }
  50% { box-shadow: 0 0 40px rgba(102,126,234,0.15), inset 0 0 60px rgba(240,147,251,0.03); }
}

.sidebar-nav a.active i {
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { text-shadow: 0 0 15px rgba(102, 126, 234, 0.6); }
  50% { text-shadow: 0 0 25px rgba(240, 147, 251, 0.8), 0 0 50px rgba(102, 126, 234, 0.3); }
}

/* ======== 滚动条 ======== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.10); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.20); }

/* ======== 响应式 ======== */
@media (max-width: 1024px) {
  .home-grid { grid-template-columns: 1fr; }
  .about-hero { flex-direction: column; text-align: center; }
}
@media (max-width: 768px) {
  .layout { max-width: 100%; position: static; z-index: auto; }
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); width: 200px; z-index: 200; }
  .sidebar.open { transform: translateX(0); }
  .main-content { padding: 24px 16px 70px; }
  .hero-section { padding: 20px 24px; min-height: 200px; }
  .hero-content { flex-direction: column; text-align: center; }
  .hero-stats { justify-content: center; }
  .article-card { flex-direction: column; }
  .article-card-img { width: 100%; height: 140px; }
  .article-grid { grid-template-columns: 1fr; }
  .about-hero-img { width: 140px; height: 140px; }
  .mobile-nav-toggle { display: flex !important; }
  .mobile-bottom-bar { display: flex !important; }
  .tweets-page-layout { flex-direction: column; }
  .tweets-sidebar { display: none; }
}
@media (max-width: 480px) {
  .hero-text h1 { font-size: 24px; }
  .article-header h1 { font-size: 22px; }
  .card { padding: 18px; }
  .hero-stats { gap: 14px; flex-wrap: wrap; }
}

/* ======== 移动端导航 ======== */
.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 16px; left: 16px;
  z-index: 200;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(10, 10, 46, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-size: 18px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}
.mobile-nav-toggle:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: var(--primary);
}

.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 10, 46, 0.92);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-glass);
  padding: 6px 0 env(safe-area-inset-bottom, 6px);
  justify-content: space-around;
}
.mobile-bottom-bar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  color: var(--text-muted);
  font-size: 10px;
  transition: all 0.3s;
}
.mobile-bottom-bar a i { font-size: 18px; }
.mobile-bottom-bar a.active { color: var(--primary); }
.mobile-bottom-bar a.active i { text-shadow: 0 0 12px rgba(102, 126, 234, 0.4); }

.sidebar-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}
.sidebar-mask.show { display: block; }

/* ======== 通用工具类 ======== */
.mt-20 { margin-top: 20px; }
.mb-24 { margin-bottom: 24px; }
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}
.empty-state i { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-state p { font-size: 14px; }

/* ======== 评论表单 ======== */
.comment-form {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-glass);
}
.comment-form-row {
  display: flex;
  gap: 14px;
 margin-bottom: 14px;
}

.comment-form-row .form-input {
  flex: 1;
  width: auto;
  min-width: 0;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.form-input:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  resize: vertical;
  min-height: 90px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.form-submit {
  padding: 10px 28px;
  border-radius: 20px;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 14px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.3s ease;
}
.form-submit:hover {
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.35);
  transform: translateY(-1px);
}

/* ======== QR码弹窗 ======== */
.qr-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
}
.qr-modal.active {
  display: flex;
}
.qr-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}
.qr-modal-content {
  position: relative;
  background: linear-gradient(135deg, rgba(10,10,46,0.95), rgba(10,10,46,0.85));
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-card), 0 0 40px rgba(102,126,234,0.2);
  text-align: center;
  backdrop-filter: blur(20px);
}
.qr-modal-content img {
  width: 220px;
  height: 220px;
  border-radius: var(--radius-sm);
  display: block;
}
.qr-modal-close {
  position: absolute;
  top: 8px; right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  transition: color 0.3s;
  padding: 4px 8px;
}
.qr-modal-close:hover {
  color: var(--text-primary);
}
