/* ============================================
   Modern Theme v2 - 全屏背景 + 左侧栏布局
   ============================================ */

:root {
  --primary: #6c5ce7;
  --primary-light: #a29bfe;
  --accent: #fd79a8;
  --bg: #f5f6fa;
  --text: #2d3436;
  --text-secondary: #636e72;
  --text-muted: #b2bec3;
  --border: rgba(255,255,255,0.18);
  --card-bg: rgba(255,255,255,0.75);
  --shadow: 0 8px 32px rgba(0,0,0,0.06);
  --radius: 16px;
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="dark"] {
  --bg: #0a0a0f;
  --text: #e8e8f0;
  --text-secondary: #a0a0b8;
  --text-muted: #6c6c8a;
  --card-bg: rgba(26,26,46,0.85);
  --border: rgba(255,255,255,0.08);
  --shadow: 0 8px 32px rgba(0,0,0,0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-light); }
img { max-width: 100%; border-radius: 12px; }

/* ===== 封面页 ===== */
.hero-cover {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--bg);
  text-align: center;
}

.hero-content {
  animation: fade-up 0.8s ease both;
}

.hero-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 32px;
  font-size: 1.8rem;
  color: var(--primary);
}

.hero-title-outline {
  font-size: 4.5rem;
  font-weight: 900;
  letter-spacing: 6px;
  color: transparent;
  -webkit-text-stroke: 2px var(--text);
  text-stroke: 2px var(--text);
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  letter-spacing: 2px;
}

.hero-social {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
}

.hero-social a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: all var(--transition);
}

.hero-social a:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.hero-nav {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 32px;
  border-radius: 50px;
  border: 1.5px solid var(--text);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 1px;
  transition: all var(--transition);
  background: transparent;
}

.hero-btn:hover {
  background: var(--text);
  color: var(--bg);
}

.scroll-down {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 1.2rem;
  animation: scroll-bounce 2s ease-in-out infinite;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.4; }
  50% { transform: translateX(-50%) translateY(8px); opacity: 1; }
}

/* ===== 主布局 ===== */
/* ===== 主布局 ===== */
.main-layout {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 40px;
  gap: 40px;
  min-height: 100vh;
  position: relative;
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  box-sizing: border-box;
}

.main-layout::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.60);
  z-index: 0;
  pointer-events: none;
}

[data-theme="dark"] .main-layout::before {
  background: rgba(10,10,15,0.40);
}

/* ===== 毛玻璃通用 ===== */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ===== 左侧栏 ===== */
.sidebar-left {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 40px;
  height: fit-content;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  z-index: 1;
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-content::-webkit-scrollbar { width: 4px; }
.sidebar-content::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 2px; }

/* 站点卡片 */
.site-card {
  padding: 32px 24px;
  text-align: center;
}

.site-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 搜索框 */
.search-box {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box i {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.9rem;
  color: var(--text);
  width: 100%;
  font-family: var(--font-sans);
}

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

/* 统计卡片 */
.stats-card {
  padding: 20px;
  display: flex;
  justify-content: space-around;
}

.stat-item {
  text-align: center;
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 导航 */
.nav-links {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition);
}

.nav-item:hover {
  background: rgba(108,92,231,0.08);
  color: var(--primary);
}

.nav-item.active {
  background: rgba(108,92,231,0.12);
  color: var(--primary);
  font-weight: 600;
}

.nav-item i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

/* ===== 小组成员卡片 ===== */
.team-card {
  padding: 20px;
}

.team-header {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-header i {
  color: var(--primary);
  font-size: 1rem;
}

.team-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.team-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: all var(--transition);
  cursor: default;
}

.team-member:hover {
  background: rgba(108,92,231,0.06);
  color: var(--primary);
  transform: translateX(4px);
}

.member-avatar i {
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.team-member:hover .member-avatar i {
  color: var(--primary);
}

/* ===== 内容区 ===== */
.content-area {
  flex: 1;
  min-width: 0;
  z-index: 1;
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 文章卡片 */
.post-card {
  display: flex;
  overflow: hidden;
  transition: all var(--transition);
  animation: fade-up 0.6s ease both;
}

.post-card:nth-child(1) { animation-delay: 0.1s; }
.post-card:nth-child(2) { animation-delay: 0.2s; }
.post-card:nth-child(3) { animation-delay: 0.3s; }

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.post-card:has(.post-cover) .post-body {
  width: 60%;
}

.post-cover {
  width: 40%;
  min-height: 180px;
  overflow: hidden;
}

.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform 0.5s ease;
}

.post-card:hover .post-cover img {
  transform: scale(1.05);
}

.post-body {
  padding: 28px;
  flex: 1;
}

.post-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

.post-title a {
  color: var(--text);
}

.post-title a:hover {
  color: var(--primary);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.post-meta i {
  margin-right: 4px;
}

.post-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* 分页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  margin-top: 20px;
}

.page-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all var(--transition);
  font-size: 0.85rem;
}

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

.page-info {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== 动画 ===== */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 文章详情页 ===== */
.post-detail {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
}

.post-detail .post-header {
  margin-bottom: 32px;
}

.post-detail .post-title {
  font-size: 2rem;
  margin-bottom: 16px;
}

.post-content {
  font-size: 1.05rem;
  line-height: 1.9;
}

.post-content h2 { font-size: 1.6rem; margin: 2em 0 1em; }
.post-content h3 { font-size: 1.35rem; margin: 1.8em 0 0.8em; }
.post-content p { margin-bottom: 1.5em; }
.post-content blockquote {
  margin: 2em 0;
  padding: 20px 24px;
  border-left: 4px solid var(--primary);
  background: var(--card-bg);
  border-radius: 0 var(--radius-sm,8px) var(--radius-sm,8px) 0;
}
.post-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 2px 8px;
  background: var(--card-bg);
  border-radius: 4px;
  color: var(--accent);
}
.post-content pre {
  margin: 2em 0;
  padding: 20px 24px;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow-x: auto;
  border: 1px solid var(--border);
}

/* ===== 归档页 ===== */
.archive-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
}

.archive-year-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
}

.archive-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px 20px;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.archive-item-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.archive-item-title {
  font-size: 1rem;
  font-weight: 500;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .main-layout {
    flex-direction: column;
    padding: 20px 16px;
  }
  .sidebar-left {
    width: 100%;
    position: static;
    max-height: none;
  }
  .sidebar-content {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .sidebar-content > * {
    flex: 1;
    min-width: 200px;
  }
  .post-card {
    flex-direction: column;
  }
  .post-card:has(.post-cover) .post-body,
  .post-cover {
    width: 100%;
  }
  .post-cover {
    min-height: 150px;
    max-height: 200px;
  }
}

@media (max-width: 600px) {
  .stats-card {
    flex-wrap: wrap;
    gap: 12px;
  }
  .site-title {
    font-size: 1.3rem;
  }
  .post-body {
    padding: 20px;
  }
}

/* ===== 加载动画 ===== */
#loader-wrapper {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s;
}
#loader-wrapper.loaded {
  opacity: 0;
  pointer-events: none;
}
.loader {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
