/*
Theme Name: 球动天下
Theme URI: https://yourdomain.com/
Author: 你的名字
Description: 全球足球赛事资讯、录像回放、精彩点评的现代化WordPress主题
Version: 1.0
Tags: football, sports, news, responsive
Text Domain: qiudongtianxia
*/

/* ===== 全局防缩放规则 ===== */
* {
    -webkit-text-size-adjust: 100% !important;
    -ms-text-size-adjust: 100% !important;
    -moz-text-size-adjust: 100% !important;
    transform: none !important;
    transform-origin: top left !important;
    transition: none !important;
    zoom: 1 !important;
}

html, body {
    zoom: 1 !important;
    -webkit-text-size-adjust: 100% !important;
    -ms-text-size-adjust: 100% !important;
    -moz-text-size-adjust: 100% !important;
    transform: none !important;
    transform-origin: top left !important;
    transition: none !important;
    overflow-x: hidden !important;
}

/* 防止所有容器缩放 */
.container, .main-container, main, .articles-container, #articles-container, .post-card, .tab-item2, a, img {
    transform: none !important;
    transform-origin: top left !important;
    zoom: 1 !important;
    transition: none !important;
    will-change: auto !important;
}

/* 移除所有悬停缩放效果 */
.post-card:hover,
.quick-links .card:hover,
.tab-item2:hover,
.back-btn:hover,
.post-thumb-area img:hover,
a:hover {
    transform: none !important;
    scale: none !important;
}

/* 移除所有激活状态的缩放效果 */
.post-card:active,
.quick-links .card:active,
.tab-item2:active,
.back-btn:active,
.post-thumb-area img:active,
a:active {
    transform: none !important;
    scale: none !important;
}

/* ===== 布局稳定规则 ===== */
/* 确保容器布局绝对稳定 */
.container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    position: relative !important;
}

.main-container {
    display: flex !important;
    gap: 32px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    margin-top: 0 !important;
    position: relative !important;
}

main {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
}

aside {
    max-width: 340px !important;
    flex-shrink: 0 !important;
    position: relative !important;
}

#articles-container {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    min-height: 600px !important;
    position: relative !important;
    overflow-y: auto !important;
}

/* 确保文章卡片布局稳定 - 合并重复规则 */
.post-card {
    margin-bottom: 24px !important;
    display: flex !important;
    gap: 15px !important;
    padding: 20px !important;
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(33,186,69,0.06) !important;
    box-sizing: border-box !important;
    position: relative !important;
    transition: none !important; /* 移除过渡效果 */
}

/* 确保标签导航布局稳定 */
.article-tab-nav {
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    padding: 4px 0 !important;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(33,186,69,0.06) !important;
    overflow-x: auto !important;
    margin-bottom: 0 !important;
    position: relative !important;
}

/* 确保分页布局稳定 */
.pagination {
    margin-top: auto !important;
    padding-top: 20px !important;
    flex-shrink: 0 !important;
    text-align: center !important;
    position: relative !important;
}

/* 确保搜索页面布局稳定 */
.search-results-info {
    margin-bottom: 20px !important;
    padding: 15px !important;
    background: #f8f9fa !important;
    border-radius: 8px !important;
    border-left: 4px solid #21ba45 !important;
    position: relative !important;
}

/* 确保加载状态布局稳定 */
#articles-container.loading {
    min-height: 600px !important;
    overflow: hidden !important;
    position: relative !important;
}

.loading-message {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    text-align: center !important;
    padding: 40px 20px !important;
    color: #666 !important;
    font-size: 14px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    z-index: 10 !important;
    white-space: nowrap !important;
    border: 1px solid #e0e0e0 !important;
}

/* 响应式布局稳定 */
@media (max-width: 768px) {
    .container {
        padding: 0 10px !important;
        padding-top: 15px !important;
        padding-bottom: 30px !important;
    }
    
    .main-container {
        flex-direction: column !important;
        gap: 20px !important;
    }
    
    aside {
        max-width: none !important;
    }
    
    .post-card {
        margin-bottom: 16px !important;
        border-radius: 8px !important;
    }
}

body {
  font-family: 'Roboto', 'PingFang SC', Arial, sans-serif;
  background: #f7f7f7;
  color: #222;
  margin: 0;
  padding: 0;
  /* 防止页面缩放 */
  zoom: 1;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  /* 防止页面跳动 */
  overflow-x: hidden;
  /* 固定视口 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 统一容器样式 - 确保页面内容居中 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* 主页布局容器 */
.main-container {
  display: flex;
  gap: 32px;
  box-sizing: border-box;
  width: 100%;
  margin-top: 0;
}

/* 响应式容器 */
@media (max-width: 1240px) {
  .container {
    max-width: 100%;
    padding: 0 15px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 10px;
    padding-top: 15px;
    padding-bottom: 30px;
  }
  
  /* 移动端布局调整 */
  .main-container {
    flex-direction: column;
    gap: 20px;
  }
  
  .single-main-wrapper {
    flex-direction: column;
    gap: 20px;
  }
  
  .single-main-content {
    order: 1;
  }
  
  .single-sidebar {
    order: 2;
    min-width: auto;
    max-width: none;
  }
  
  /* 移动端文章卡片优化 */
  .post-card {
    margin-bottom: 16px;
    border-radius: 8px;
  }
  
  /* 移动端侧边栏优化 */
  aside {
    max-width: none;
  }
}

/* 确保页面内容始终居中 */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* 防止页面缩放 */
  zoom: 1;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  /* 防止页面跳动 */
  overflow-x: hidden;
}

/* 确保侧边栏不会过宽 */
aside {
  max-width: 340px;
  flex-shrink: 0;
}

/* 页面整体布局优化 */
.hero {
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
}

.article-tab-nav {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 4px 0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(33,186,69,0.06);
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  margin-bottom: 0;
}

.article-tab-nav::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

.update-stats-bar {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  padding: 1px 0;
  background: #f8f9fa;
  color: #666;
  font-size: 13px;
  margin: 0;
}

/* 确保所有内容都在容器内 */
.post-card,
.widget,
.ad-widget {
  box-sizing: border-box;
}

/* 统一页面内容间距 */
.container {
  padding-top: 5px;
  padding-bottom: 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0; /* 确保容器可以收缩 */
}

/* 确保页面整体布局一致 */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* 确保footer始终在底部 */
.footer {
  margin-top: auto;
  flex-shrink: 0;
  background: #222;
  color: #fff;
  padding: 20px 0 12px 0;
  border-top: 1px solid #333;
}

/* 主要内容区域自动填充剩余空间 */
main {
  flex: 1;
  min-width: 0; /* 防止flex项目溢出 */
  display: flex;
  flex-direction: column;
}

/* 文章容器自动填充剩余空间 */
.articles-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-top: 0;
  padding-top: 0;
}

/* 文章卡片统一样式 - 已合并到上方规则 */

/* 第一个文章卡片与更新统计栏之间的间距 */
.post-card:first-child {
  margin-top: 0;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(33,186,69,0.12);
}

/* 分页样式优化 */
.pagination {
  margin-top: auto;
  padding-top: 20px;
  flex-shrink: 0;
}

/* 加载状态样式 */
.loading-message {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-size: 14px;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #21ba45;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-message {
  text-align: center;
  padding: 40px 20px;
  color: #e74c3c;
  font-size: 14px;
}

/* 防止页面跳动 - 使用更稳定的方案 */
#articles-container {
  position: relative;
  height: 600px; /* 使用固定高度，防止缩放 */
  overflow-y: auto; /* 内容超出时显示滚动条 */
  transition: none; /* 移除所有过渡效果，防止动画导致的缩放 */
  /* 防止容器缩放 */
  transform: none;
  transform-origin: top left;
  zoom: 1;
  /* 防止内容溢出 */
  box-sizing: border-box;
  /* 固定滚动条样式 */
  scrollbar-width: thin;
  scrollbar-color: #21ba45 #f0f0f0;
}

/* 加载状态容器 - 优化显示 */
.loading-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 10;
  white-space: nowrap;
  border: 1px solid #e0e0e0;
}

/* 确保文章容器在加载时保持稳定 */
#articles-container.loading {
  height: 600px;
  overflow: hidden;
}

/* 文章卡片容器稳定化 - 已合并到上方规则 */

/* 分页容器稳定化 */
.pagination {
  margin-top: auto;
  padding-top: 20px;
  flex-shrink: 0;
  transition: none; /* 移除过渡效果 */
}

/* 确保主容器布局稳定 */
main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: none; /* 移除过渡效果 */
  transform: none; /* 防止变换导致的缩放 */
  zoom: 1; /* 固定缩放比例 */
  /* 防止容器缩放 */
  transform-origin: top left;
  /* 固定尺寸 */
  box-sizing: border-box;
  /* 防止内容溢出 */
  overflow: visible;
}

/* 确保文章列表容器稳定 */
.articles-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-top: 0;
  padding-top: 0;
  transition: none; /* 移除过渡效果 */
  transform: none; /* 防止变换导致的缩放 */
  zoom: 1; /* 固定缩放比例 */
  /* 防止容器缩放 */
  transform-origin: top left;
  /* 固定尺寸 */
  box-sizing: border-box;
  /* 防止内容溢出 */
  overflow: visible;
}

/* 防止页面整体缩放 */
body {
  overflow-x: hidden; /* 防止水平滚动 */
  zoom: 1; /* 固定缩放比例 */
  -webkit-text-size-adjust: 100%; /* 防止iOS缩放 */
  -ms-text-size-adjust: 100%; /* 防止IE缩放 */
  -moz-text-size-adjust: 100%; /* 防止Firefox缩放 */
  /* 防止页面跳动 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 固定视口 */
  transform: none;
  transform-origin: top left;
}

/* 确保容器不会因为内容变化而改变尺寸 */
.container, .main-container {
  transition: none; /* 移除过渡效果 */
  transform: none; /* 防止变换导致的缩放 */
  zoom: 1; /* 固定缩放比例 */
  /* 防止容器缩放 */
  transform-origin: top left;
  /* 固定尺寸 */
  box-sizing: border-box;
  /* 防止内容溢出 */
  overflow: visible;
}

/* 右侧栏统一按钮样式 */
.sidebar .widget .more-btn {
  display: inline-block;
  padding: 8px 16px;
  background: #21ba45;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 13px;
  transition: all 0.2s ease;
  text-align: center;
  margin-top: 15px;
  cursor: pointer;
  border: none;
  outline: none;
}

.sidebar .widget .more-btn:hover {
  background: #16a34a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(33,186,69,0.3);
  color: #fff;
  text-decoration: none;
}

.sidebar .widget .more-btn-container {
  text-align: center;
  margin-top: 15px;
}

/* 移动端按钮优化 */
@media (max-width: 768px) {
  .sidebar .widget .more-btn {
    padding: 10px 20px;
    font-size: 14px;
    width: 100%;
    max-width: 200px;
  }
  
  .sidebar .widget .more-btn-container {
    margin-top: 20px;
  }
}
a {
  color: #21ba45;
  text-decoration: none;
}
a:hover {
  color: #e74c3c;
}
.header, .footer {
  background: #222;
  color: #fff;
}

/* Footer 整体样式优化 */
.footer {
  margin-top: auto;
  flex-shrink: 0;
}

.footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.footer-left p {
  margin: 6px 0;
  font-size: 14px;
  line-height: 1.5;
  color: #ccc;
}

.footer-left a {
  color: #21ba45;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-left a:hover {
  color: #16a34a;
  text-decoration: underline;
}

.footer-right a {
  color: #ccc;
  text-decoration: none;
  margin-right: 16px;
  transition: color 0.3s ease;
}

.footer-right a:hover {
  color: #21ba45;
}
.hero {
  background: linear-gradient(90deg, #21ba45 60%, #e74c3c 100%);
  color: #fff;
  padding: 48px 0 32px 0;
  text-align: center;
}
.quick-links {
  display: flex;
  gap: 16px;
  margin: 32px 0;
  justify-content: center;
}
.quick-links .card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  padding: 24px 32px;
  min-width: 120px;
  text-align: center;
  transition: box-shadow 0.2s;
}
.quick-links .card:hover {
  box-shadow: 0 4px 16px rgba(33,186,69,0.15);
}
/* 文章卡片样式 - 已合并到上方规则 */
.post-card:not(:last-child) {
    margin-bottom: 22px;
}
.post-card:hover {
    box-shadow: 0 4px 24px rgba(33,186,69,0.10);
    border: 1px solid #21ba45;
}
.post-content-area {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.post-thumb-area {
    width: 180px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-left: 12px;
    transition: box-shadow 0.2s;
}
.post-thumb-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}
.cat {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    font-size: 0.95em;
    border-radius: 6px;
    padding: 2px 12px;
    margin-right: 8px;
    text-decoration: none;
}
.cat:hover {
    background: #21ba45;
}
.desc {
    color: #222;
    margin: 10px 0 0 0;
    font-size: 1.05em;
    line-height: 1.7;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.info {
    font-size: 0.98em;
    color: #888;
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}
.video-badge {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 13px;
    padding: 2px 8px 2px 6px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 3px;
}
.video-badge svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}
.update-stats {
    color: #888;
    font-size: 1em;
    margin: 18px 0 18px 0;
    text-align: center;
    letter-spacing: 1px;
}
@media (max-width: 900px) {
    .post-card {
        flex-direction: column;
        padding: 14px 6px;
        min-height: 0;
    }
    .post-thumb-area {
        width: 100%;
        height: 180px;
        margin-left: 0;
        margin-bottom: 10px;
    }
}
.tab-nav {
    display: flex;
    gap: 0;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 4px;
}
.tab-item {
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
    font-weight: 500;
}
.tab-item:hover {
    color: #21ba45;
    background: rgba(33,186,69,0.1);
}
.tab-item.active {
    background: #21ba45;
    color: #fff;
    box-shadow: 0 2px 8px rgba(33,186,69,0.3);
}
.article-tab-nav {
    display: flex;
    gap: 32px;
    justify-content: center;
    margin: 32px 0;
}
.tab-item2 {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 48px;
    background: #fff;
    color: #21ba45;
    font-size: 1em;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(33,186,69,0.06);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: 2px solid transparent;
    flex-shrink: 0;
    white-space: nowrap;
}
.tab-item2:hover {
    background: #f7f7f7;
    color: #e74c3c;
}
.tab-item2.active {
    border: 2px solid #21ba45;
    background: #f7fff9;
    color: #21ba45;
    box-shadow: 0 4px 16px rgba(33,186,69,0.10);
}
.main-search-form {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 6px auto 0 auto;
    max-width: 480px;
    background: #fff;
    border-radius: 32px;
    box-shadow: 0 2px 12px rgba(33,186,69,0.08);
    padding: 6px 10px;
}
.main-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1em;
    padding: 8px 16px;
    border-radius: 32px;
    background: transparent;
}
.main-search-btn {
    background: #21ba45;
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 6px 18px;
    font-size: 1em;
    margin-left: 8px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.main-search-btn:hover {
    background: #16a34a;
}
.search-icon {
    font-size: 1.2em;
}
.update-stats-bar {
    text-align: center;
    color: #888;
    font-size: 1.08em;
    margin: 0;
    letter-spacing: 1px;
    background: #f7f7f7;
    border-radius: 8px;
    padding: 10px 0;
    box-shadow: 0 1px 6px rgba(33,186,69,0.04);
}
.single-main-wrapper {
    display: flex;
    gap: 32px;
    margin: 32px 0 0 0;
    align-items: flex-start;
}

.single-main-content {
    flex: 3;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(33,186,69,0.06);
    padding: 32px 36px 24px 36px;
    margin-bottom: 32px;
    min-width: 0; /* 防止flex项目溢出 */
}

.single-sidebar {
    flex: 1;
    min-width: 260px;
    max-width: 340px;
    align-self: flex-start; /* 确保侧边栏始终在顶部对齐 */
}
.breadcrumb {
    font-size: 0.98em;
    color: #888;
    margin-bottom: 12px;
}
.breadcrumb a { color: #21ba45; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.single-title {
    font-size: 1.6em;
    font-weight: bold;
    margin-bottom: 8px;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 10px;
}
.single-title .icon-article {
    color: #21ba45;
    font-size: 1.2em;
}
.single-meta {
    color: #888;
    font-size: 0.98em;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 18px;
}
.single-meta .icon-meta {
    color: #21ba45;
    margin-right: 3px;
}
.post-content {
    font-size: 1.13em;
    line-height: 1.9;
    color: #222;
    margin-bottom: 32px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 24px;
}
.single-tags {
    margin: 24px 0 0 0;
    padding-bottom: 18px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.single-tags .icon-tag {
    color: #21ba45;
    font-size: 1.1em;
}
.post-tag {
    display: inline-block;
    background: #f7f7f7;
    color: #21ba45;
    border-radius: 6px;
    padding: 3px 12px;
    margin-right: 8px;
    font-size: 0.98em;
}
.share-bar {
    margin: 18px 0 0 0;
    padding-bottom: 18px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.share-bar .icon-share {
    color: #21ba45;
    font-size: 1.1em;
    margin-right: 3px;
}
.share-bar a {
    color: #21ba45;
    margin: 0 4px;
    text-decoration: none;
    font-size: 1.05em;
    transition: color 0.2s;
}
.share-bar a:hover { color: #e74c3c; }
.post-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 18px 0 24px 0;
    padding-bottom: 18px;
    border-bottom: 1px solid #f0f0f0;
    color: #21ba45;
    font-size: 1.05em;
}
.related-posts {
    margin-bottom: 32px;
}
.related-posts h3 {
    font-size: 1.1em;
    color: #21ba45;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.related-posts .icon-like {
    color: #21ba45;
    font-size: 1.1em;
}
.related-posts-list {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.related-posts-list a {
    display: block;
    width: 22%;
    min-width: 140px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(33,186,69,0.06);
    overflow: hidden;
    text-decoration: none;
    transition: box-shadow 0.2s;
}
.related-posts-list a:hover {
    box-shadow: 0 4px 16px rgba(33,186,69,0.13);
}
.related-posts-list img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    background: #f7f7f7;
}
.related-posts-list .related-title {
    padding: 8px 10px 10px 10px;
    color: #222;
    font-size: 0.98em;
    line-height: 1.5;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}






/* ===== 返回顶部按钮 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #21ba45;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(33,186,69,0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(33,186,69,0.4);
}

/* ===== 图片灯箱 ===== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: #f0f0f0;
}

/* ===== 触摸优化 ===== */
.touch-active {
    transform: scale(0.98);
    opacity: 0.8;
}

/* ===== 滚动优化 ===== */
.scrolling {
    pointer-events: none;
}

.scrolling * {
    pointer-events: none;
}

/* ===== 加载动画 ===== */
.post-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.post-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

body.loaded .post-card {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 灯箱打开时的body样式 ===== */
body.lightbox-open {
    overflow: hidden;
}

/* ===== 字体加载优化 ===== */
body.fonts-loaded {
    font-display: swap;
}

/* ===== 无障碍支持 ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 5px;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: #21ba45;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

/* ===== AJAX加载状态 ===== */
.tab-item2.loading {
    opacity: 0.7;
    pointer-events: none;
}

.tab-item2.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 10px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top: 2px solid #21ba45;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== 加载提示样式 ===== */
.loading-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

/* 确保文章容器正确显示 */
#articles-container {
    height: 600px;
    position: relative;
    transition: none; /* 移除过渡效果，防止缩放 */
    overflow-y: auto;
    /* 防止容器缩放 */
    transform: none;
    transform-origin: top left;
    zoom: 1;
    /* 防止内容溢出 */
    box-sizing: border-box;
}

/* 全局防缩放规则 */
* {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
}

/* 防止所有容器缩放 */
.container, .main-container, main, .articles-container, #articles-container {
    transform: none !important;
    transform-origin: top left !important;
    zoom: 1 !important;
    transition: none !important;
}

/* 防止页面整体缩放 */
html, body {
    zoom: 1 !important;
    -webkit-text-size-adjust: 100% !important;
    -ms-text-size-adjust: 100% !important;
    -moz-text-size-adjust: 100% !important;
    transform: none !important;
    transform-origin: top left !important;
}

/* 防止AJAX加载时的缩放 */
#articles-container.loading {
    transform: none !important;
    transform-origin: top left !important;
    zoom: 1 !important;
    transition: none !important;
}

/* 防止加载状态时的缩放 */
.loading-message {
    transform: none !important;
    transform-origin: top left !important;
    zoom: 1 !important;
}

#articles-container:empty::after {
    content: '暂无内容';
    display: block;
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* 分页样式优化 */
.pagination {
    margin-top: 30px;
    text-align: center;
}

.pagination-info {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.pagination-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-block;
    padding: 8px 12px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}

.page-link:hover {
    background: #21ba45;
    color: #fff;
}

.page-link.active {
    background: #21ba45;
    color: #fff;
}

/* 错误消息样式 */
.error-message {
    text-align: center;
    padding: 40px;
    color: #dc3545;
    background: #f8d7da;
    border-radius: 8px;
    margin: 20px 0;
}

.loading-message .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #21ba45;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #e74c3c;
    background: #fdf2f2;
    border-radius: 8px;
    margin: 20px 0;
}

/* ===== 统一返回按钮样式 ===== */
.back-navigation {
    margin: 20px 0;
    padding: 0;
    position: relative;
    z-index: 1;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #21ba45 0%, #16a34a 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(33, 186, 69, 0.2);
    border: none;
    cursor: pointer;
}

.back-btn:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 186, 69, 0.3);
}

.back-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(33, 186, 69, 0.2);
}

.back-icon {
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
}

.back-text {
    font-size: 14px;
    line-height: 1;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .back-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .back-icon {
        font-size: 14px;
    }
    
    .back-text {
        font-size: 13px;
    }
}

/* ===== 分页样式 ===== */
.pagination {
    margin: 30px 0;
    text-align: center;
}

.pagination-info {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.pagination-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-block;
    padding: 8px 12px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.page-link:hover {
    background: #21ba45;
    color: #fff;
    border-color: #21ba45;
    text-decoration: none;
}

.page-link.active {
    background: #21ba45;
    color: #fff;
    border-color: #21ba45;
}

.page-link:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 移动端分页优化 */
@media (max-width: 768px) {
    .pagination-links {
        gap: 4px;
    }
    
    .page-link {
        padding: 6px 10px;
        min-width: 36px;
        font-size: 14px;
    }
}

/* ===== 加载指示器 ===== */
#loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #21ba45, #e74c3c);
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

/* ===== Single页面布局修复 ===== */

/* 基础布局样式 - 使用更高优先级的选择器 */
body.single .single-main-wrapper,
.single .single-main-wrapper {
    display: flex !important;
    flex-direction: row !important;
    gap: 32px !important;
    max-width: 1200px !important;
    margin: 32px auto 0 auto !important;
    align-items: flex-start !important;
    position: relative !important;
    min-height: 0 !important;
}

body.single .single-main-content,
.single .single-main-content {
    flex: 1 1 auto !important;
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 12px rgba(33,186,69,0.06) !important;
    padding: 32px 36px 24px 36px !important;
    margin-bottom: 32px !important;
    min-width: 0 !important;
    position: relative !important;
    z-index: 1 !important;
}

body.single .single-sidebar,
.single .single-sidebar {
    flex: 0 0 auto !important;
    min-width: 260px !important;
    max-width: 340px !important;
    align-self: flex-start !important;
    position: relative !important;
    z-index: 1 !important;
    height: fit-content !important;
}

.single-topbar {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

/* 移动端响应式布局 */
@media (max-width: 900px) {
    body.single .single-main-wrapper,
    .single .single-main-wrapper {
        flex-direction: column !important;
        gap: 24px !important;
        margin: 16px auto 0 auto !important;
    }
    
    body.single .single-main-content,
    .single .single-main-content {
        order: 1 !important;
        width: 100% !important;
        padding: 20px 16px 16px 16px !important;
        margin-bottom: 0 !important;
    }
    
    body.single .single-sidebar,
    .single .single-sidebar {
        order: 2 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-top: 0 !important;
    }
}

/* 确保布局稳定性 */
.single-main-wrapper * {
    box-sizing: border-box;
}

/* 强制覆盖任何可能的冲突样式 */
body.single .single-main-wrapper main,
body.single .single-main-wrapper aside,
.single .single-main-wrapper main,
.single .single-main-wrapper aside {
    all: unset;
}

/* 确保single页面布局的绝对优先级 */
body.single .single-main-wrapper {
    all: unset;
    display: flex !important;
    flex-direction: row !important;
    gap: 32px !important;
    max-width: 1200px !important;
    margin: 32px auto 0 auto !important;
    align-items: flex-start !important;
    position: relative !important;
    box-sizing: border-box !important;
    min-height: 0 !important;
}

body.single .single-main-content {
    all: unset;
    flex: 1 1 auto !important;
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 12px rgba(33,186,69,0.06) !important;
    padding: 32px 36px 24px 36px !important;
    margin-bottom: 32px !important;
    min-width: 0 !important;
    position: relative !important;
    z-index: 1 !important;
    box-sizing: border-box !important;
    display: block !important;
}

body.single .single-sidebar {
    all: unset;
    flex: 0 0 auto !important;
    min-width: 260px !important;
    max-width: 340px !important;
    align-self: flex-start !important;
    position: relative !important;
    z-index: 1 !important;
    box-sizing: border-box !important;
    display: block !important;
    height: fit-content !important;
}

/* Footer ICP备案信息样式 */
.footer-icp {
    border-top: 1px solid #333;
    padding-top: 12px;
    text-align: center;
    margin-top: 0;
}

.footer-icp p {
    color: #999;
    font-size: 12px;
    margin: 0;
    line-height: 1.5;
}

.footer-icp a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s ease;
    margin: 0 8px;
}

.footer-icp a:hover {
    color: #21ba45;
    text-decoration: underline;
}

/* 移动端Footer优化 */
@media (max-width: 768px) {
    .footer {
        padding: 16px 0 10px 0;
        margin-top: auto;
    }
    
    .footer .container {
        padding: 0 15px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .footer-left p {
        font-size: 13px;
        margin: 4px 0;
    }
    
    .footer-right {
        margin-top: 8px;
    }
    
    .footer-right a {
        margin: 0 8px;
    }
    
    .footer-icp p {
        font-size: 11px;
        line-height: 1.6;
    }
    
    .footer-icp a {
        display: inline-block;
        margin: 2px 4px;
    }
    
    /* 移动端容器优化 */
    .container {
        padding-bottom: 20px;
    }
    
    /* 移动端hero优化 */
@media (max-width: 768px) {
    .hero {
        border-radius: 8px;
        margin-bottom: 15px;
    }
}

/* 移动端导航栏优化 */
@media (max-width: 768px) {
    .article-tab-nav {
        gap: 6px;
        padding: 3px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-item2 {
        min-width: 100px;
        height: 44px;
        font-size: 0.95em;
        border-radius: 10px;
    }
    
    .update-stats-bar {
        padding: 1px 0;
        font-size: 12px;
        margin: 0;
    }
    
    .container {
        padding-top: 3px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .article-tab-nav {
        gap: 4px;
        padding: 2px 0;
    }
    
    .tab-item2 {
        min-width: 90px;
        height: 40px;
        font-size: 0.9em;
        border-radius: 8px;
    }
    
    .update-stats-bar {
        padding: 0;
        font-size: 11px;
        margin: 0;
    }
    
    .container {
        padding-top: 2px;
    }
}
}

/* 热门赛事榜样式优化 */
.match-item:hover {
    background: #e9ecef !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(33,186,69,0.1);
}

.match-item .match-title a:hover {
    color: #21ba45 !important;
}

.match-item .match-rank {
    transition: all 0.3s ease;
}

.match-item:hover .match-rank {
    transform: scale(1.1);
}

.match-item .match-thumb img {
    transition: transform 0.3s ease;
}

.match-item:hover .match-thumb img {
    transform: scale(1.05);
}

/* 移动端热门赛事榜优化 */
@media (max-width: 768px) {
    .match-item {
        padding: 6px !important;
        gap: 8px !important;
    }
    
    .match-item .match-rank {
        width: 20px !important;
        height: 20px !important;
        font-size: 10px !important;
    }
    
    .match-item .match-thumb {
        width: 35px !important;
        height: 26px !important;
    }
    
    .match-item .match-title {
        font-size: 12px !important;
    }
    
    .match-item .match-meta {
        font-size: 10px !important;
    }
}