/* ===== 黑料官网 全站样式 ===== */
:root {
  --primary: #e94560;
  --primary-dark: #c62a45;
  --secondary: #fbbf24;
  --dark-bg: #1a1a2e;
  --dark-bg2: #16213e;
  --dark-bg3: #0f3460;
  --accent-purple: #533483;
  --light-bg: #f8f9fc;
  --light-card: #ffffff;
  --dark-card: #1e1e2f;
  --dark-card2: #1f2937;
  --text-light: #1f2937;
  --text-dark: #e5e7eb;
  --text-muted: #6b7280;
  --text-muted-dark: #9ca3af;
  --border-light: #e5e7eb;
  --border-dark: #333333;
  --glass-bg: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.6s ease;
  --font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Microsoft YaHei', sans-serif;
}

/* ===== 基础重置与全局 ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background: var(--light-bg);
  color: var(--text-light);
  line-height: 1.7;
  transition: background var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

body.dark {
  background: #121212;
  color: var(--text-dark);
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input {
  font-family: inherit;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--accent-purple));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ===== 头部导航 ===== */
header {
  background: linear-gradient(145deg, var(--dark-bg), var(--dark-bg2));
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 1px;
  color: #fff;
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: scale(1.02);
}

.logo svg {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 2px 4px rgba(233, 69, 96, 0.4));
}

.logo span {
  color: var(--secondary);
  text-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

nav ul {
  display: flex;
  gap: 1.8rem;
  list-style: none;
}

nav a {
  color: #ddd;
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
  padding: 4px 0;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: width var(--transition-normal);
}

nav a:hover {
  color: var(--secondary);
}

nav a:hover::after {
  width: 100%;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--dark-bg3);
  border-radius: 40px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-box:focus-within {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  padding: 6px 10px;
  width: 160px;
  font-size: 0.9rem;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.search-box button {
  background: var(--primary);
  border: none;
  border-radius: 30px;
  padding: 6px 16px;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.search-box button:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.menu-toggle {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  color: #fff;
  background: none;
  border: none;
  transition: transform var(--transition-fast);
}

.menu-toggle:hover {
  transform: rotate(90deg);
}

/* ===== 面包屑 ===== */
.breadcrumb {
  background: #eef2f7;
  padding: 10px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

body.dark .breadcrumb {
  background: var(--dark-card2);
  color: #ccc;
}

.breadcrumb a {
  color: #2563eb;
  text-decoration: none;
  transition: color var(--transition-fast);
}

body.dark .breadcrumb a {
  color: #60a5fa;
}

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

.breadcrumb span {
  color: var(--text-muted);
}

/* ===== Banner 首屏 ===== */
.banner {
  background: linear-gradient(135deg, var(--dark-bg3), var(--accent-purple), var(--dark-bg3));
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
  color: #fff;
  padding: 60px 0;
  text-align: center;
  border-radius: 0 0 60px 60px;
  position: relative;
  overflow: hidden;
}

.banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.1) 0%, transparent 60%);
  animation: float 20s ease-in-out infinite;
}

.banner .container {
  position: relative;
  z-index: 1;
}

.banner h1 {
  font-size: 2.8rem;
  margin-bottom: 16px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.8s ease;
}

.banner p {
  font-size: 1.3rem;
  max-width: 800px;
  margin: 0 auto 30px;
  opacity: 0.9;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.banner .btn {
  background: var(--secondary);
  color: var(--dark-bg);
  padding: 12px 34px;
  border-radius: 50px;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
  animation: fadeInUp 0.8s ease 0.4s both;
}

.banner .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(251, 191, 36, 0.4);
}

/* ===== 卡片网格 ===== */
.section-title {
  font-size: 2rem;
  margin: 40px 0 20px;
  border-left: 8px solid var(--primary);
  padding-left: 20px;
  position: relative;
  transition: color var(--transition-normal);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 20px;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 3px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--light-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

body.dark .card {
  background: var(--dark-card);
  border-color: var(--border-dark);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-normal);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.card:hover::before {
  transform: scaleX(1);
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  transition: color var(--transition-fast);
}

.card p {
  color: var(--text-muted);
  line-height: 1.6;
}

body.dark .card p {
  color: #bbb;
}

.badge {
  background: var(--primary);
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  display: inline-block;
  margin-bottom: 10px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(233, 69, 96, 0.3);
}

/* ===== 文章列表 ===== */
.article-item {
  display: flex;
  gap: 20px;
  background: var(--light-card);
  padding: 18px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  border: 1px solid var(--border-light);
  cursor: pointer;
}

body.dark .article-item {
  background: var(--dark-card);
  border-color: var(--border-dark);
}

.article-item:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

.article-item svg {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: transform var(--transition-normal);
}

.article-item:hover svg {
  transform: scale(1.05) rotate(-2deg);
}

.article-item .info {
  flex: 1;
}

.article-item .info h4 {
  font-size: 1.2rem;
  margin-bottom: 6px;
  transition: color var(--transition-fast);
  line-height: 1.4;
}

.article-item .info h4:hover {
  color: var(--primary);
}

.article-item .meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

body.dark .article-item .meta {
  color: var(--text-muted-dark);
}

.article-item .info p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

body.dark .article-item .info p {
  color: #bbb;
}

/* ===== FAQ ===== */
details {
  background: var(--light-card);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  border: 1px solid var(--border-light);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

body.dark details {
  background: var(--dark-card);
  border-color: var(--border-dark);
}

details:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

details[open] {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 30px;
  transition: color var(--transition-fast);
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--primary);
  transition: transform var(--transition-normal);
}

details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

summary:hover {
  color: var(--primary);
}

details p {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  line-height: 1.6;
}

body.dark details p {
  border-top-color: var(--border-dark);
  color: #bbb;
}

/* ===== HowTo 教程 ===== */
.howto-step {
  background: #f3f4f6;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 12px;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  border: 1px solid transparent;
}

body.dark .howto-step {
  background: var(--dark-card2);
}

.howto-step:hover {
  transform: translateX(5px);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.step-num {
  background: var(--primary);
  color: #fff;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: bold;
  margin-right: 8px;
  box-shadow: 0 2px 8px rgba(233, 69, 96, 0.3);
  transition: transform var(--transition-fast);
}

.howto-step:hover .step-num {
  transform: scale(1.1);
}

.howto-step strong {
  margin-right: 4px;
}

/* ===== 联系我们 ===== */
#contact {
  background: #eef2f7;
  padding: 30px;
  border-radius: 20px;
  margin-top: 30px;
  transition: background var(--transition-normal);
}

body.dark #contact {
  background: var(--dark-card2);
}

#contact h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  border-left: 6px solid var(--primary);
  padding-left: 15px;
}

#contact p {
  margin-bottom: 12px;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

body.dark #contact p {
  background: rgba(0, 0, 0, 0.2);
}

#contact p:hover {
  background: rgba(255, 255, 255, 0.8);
}

body.dark #contact p:hover {
  background: rgba(0, 0, 0, 0.4);
}

/* ===== 友情链接 ===== */
section p {
  line-height: 1.8;
}

/* ===== 页脚 ===== */
footer {
  background: var(--dark-bg);
  color: #aaa;
  padding: 40px 0 20px;
  margin-top: 60px;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent-purple));
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.footer-grid h4 {
  color: #fff;
  margin-bottom: 15px;
  font-size: 1.1rem;
  position: relative;
  padding-bottom: 8px;
}

.footer-grid h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--primary);
}

.footer-grid a {
  color: #ccc;
  display: block;
  margin-bottom: 8px;
  text-decoration: none;
  transition: color var(--transition-fast), padding-left var(--transition-fast);
}

.footer-grid a:hover {
  color: var(--secondary);
  padding-left: 5px;
}

.copyright {
  text-align: center;
  border-top: 1px solid #333;
  margin-top: 30px;
  padding-top: 20px;
  font-size: 0.9rem;
}

/* ===== 返回顶部 ===== */
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 30px;
  background: var(--primary);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.6rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 999;
  transition: all var(--transition-normal);
  border: none;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(233, 69, 96, 0.4);
  background: var(--primary-dark);
}

/* ===== 暗黑模式切换按钮 ===== */
.theme-toggle {
  position: fixed;
  bottom: 100px;
  right: 30px;
  z-index: 999;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  background: var(--dark-bg2);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-normal);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-toggle:hover {
  transform: rotate(30deg) scale(1.1);
}

/* ===== 滚动动画 ===== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 动画关键帧 ===== */
@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(10%, 5%) rotate(5deg);
  }
  50% {
    transform: translate(-5%, 10%) rotate(-5deg);
  }
  75% {
    transform: translate(5%, -5%) rotate(3deg);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* ===== 玻璃拟态效果 ===== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

/* ===== 卡片悬浮光效 ===== */
.card, .article-item, .howto-step {
  position: relative;
}

.card::after, .article-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}

.card:hover::after, .article-item:hover::after {
  left: 100%;
}

/* ===== 响应式布局 ===== */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .banner h1 {
    font-size: 2.3rem;
  }
  
  .banner p {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  nav ul {
    display: none;
    flex-direction: column;
    background: var(--dark-bg2);
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    padding: 20px;
    gap: 1rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-radius: 0 0 20px 20px;
    animation: fadeInUp 0.3s ease;
  }
  
  nav ul.active {
    display: flex;
  }
  
  nav a {
    padding: 10px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
  }
  
  nav a:hover {
    background: rgba(255, 255, 255, 0.05);
  }
  
  nav a::after {
    display: none;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .header-inner {
    flex-wrap: wrap;
    position: relative;
  }
  
  .search-box {
    order: 3;
    width: 100%;
    margin-top: 10px;
  }
  
  .search-box input {
    width: 100%;
  }
  
  .banner {
    padding: 40px 0;
    border-radius: 0 0 40px 40px;
  }
  
  .banner h1 {
    font-size: 1.8rem;
  }
  
  .banner p {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .article-item {
    flex-direction: column;
    gap: 12px;
  }
  
  .article-item svg {
    width: 100%;
    height: auto;
    max-height: 120px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }
  
  .theme-toggle {
    bottom: 70px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
  
  #contact {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.4rem;
  }
  
  .logo svg {
    width: 32px;
    height: 32px;
  }
  
  .banner h1 {
    font-size: 1.5rem;
  }
  
  .banner p {
    font-size: 0.9rem;
  }
  
  .banner .btn {
    padding: 10px 24px;
    font-size: 0.9rem;
  }
  
  .section-title {
    font-size: 1.3rem;
    margin: 30px 0 15px;
  }
  
  .card h3 {
    font-size: 1.1rem;
  }
  
  .article-item .info h4 {
    font-size: 1rem;
  }
  
  .search-box button {
    padding: 6px 12px;
    font-size: 0.85rem;
  }
}

/* ===== 暗色模式细节优化 ===== */
body.dark .search-box {
  background: rgba(0, 0, 0, 0.3);
}

body.dark .search-box input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

body.dark .banner {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

body.dark .card, 
body.dark .article-item,
body.dark details {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark .card:hover,
body.dark .article-item:hover,
body.dark details:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ===== 打印样式 ===== */
@media print {
  header,
  footer,
  .back-to-top,
  .theme-toggle,
  .search-box,
  .menu-toggle,
  .banner .btn {
    display: none !important;
  }
  
  body {
    background: #fff;
    color: #000;
  }
  
  .card,
  .article-item,
  details,
  .howto-step {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* ===== 预加载动画 ===== */
@keyframes preloaderSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== 焦点可见性 ===== */
:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 2px;
}

/* ===== 减少动效偏好 ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== 链接下划线动画 ===== */
.link-underline {
  position: relative;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition-normal);
}

.link-underline:hover::after {
  width: 100%;
}

/* ===== 图片加载占位 ===== */
.img-placeholder {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 1000px 100%;
  animation: shimmer 1.5s infinite;
}

body.dark .img-placeholder {
  background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a 75%);
  background-size: 1000px 100%;
}

/* ===== 辅助文本 ===== */
.text-muted {
  color: var(--text-muted);
  font-size: 0.9rem;
}

body.dark .text-muted {
  color: var(--text-muted-dark);
}

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

.text-secondary {
  color: var(--secondary);
}

/* ===== 间距工具 ===== */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

/* ===== 弹性布局工具 ===== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* ===== 文本工具 ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }

/* ===== 边框工具 ===== */
.rounded { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 9999px; }

/* ===== 阴影工具 ===== */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* ===== 渐变背景 ===== */
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
}

.bg-gradient-warm {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.bg-gradient-cool {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

/* ===== 毛玻璃卡片 ===== */
.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--transition-normal);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

body.dark .glass-card {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
}

/* ===== 文章卡片特殊效果 ===== */
.article-item:nth-child(odd) {
  border-left: 4px solid var(--primary);
}

.article-item:nth-child(even) {
  border-left: 4px solid var(--secondary);
}

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

.tag {
  background: #f3f4f6;
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-light);
}

body.dark .tag {
  background: var(--dark-card2);
  color: #bbb;
  border-color: var(--border-dark);
}

.tag:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: scale(1.05);
}

/* ===== 统计数字 ===== */
.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

body.dark .stat-number {
  color: var(--secondary);
}

/* ===== 分割线 ===== */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  margin: 30px 0;
  border: none;
}

/* ===== 加载状态 ===== */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: preloaderSpin 0.8s linear infinite;
}

body.dark .loading {
  border-color: rgba(255, 255, 255, 0.1);
  border-top-color: var(--secondary);
}