/* 合并CSS文件 - 优化加载性能 */

/* ==== 基础样式重置 ==== */
html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  font-size: 16px; /* 设置基础字体大小 */
  zoom: 1; /* 确保缩放正常 */
}

/* 确保在所有浏览器中都能正确缩放 */
* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 防止页面在缩放时出现意外滚动 */
html, body {
  overflow-x: hidden;
}

body {
  margin: 0;
  background-color: #FFF;
  color: #444;
  font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "WenQuanYi Micro Hei","Microsoft Yahei", sans-serif;
}

a {
  background-color: transparent;
  color: #3354AA;
  text-decoration: none;
}

a:hover, a:active {
  color: #444;
}

img {
  border-style: none;
  max-width: 100%;
  height: auto;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}

/* ==== 网格系统 ==== */
.container, .row > [class*="col-"] {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

.container {
  margin-left: auto;
  margin-right: auto;
  padding-left: 10px;
  padding-right: 10px;
}

.row {
  margin-right: -10px;
  margin-left: -10px;
}

.row > [class*="col-"] {
  float: left;
  min-height: 1px;
  padding-right: 10px;
  padding-left: 10px;
}

/* 移动端网格 */
.col-mb-1 { width: 8.33333%; }
.col-mb-2 { width: 16.66667%; }
.col-mb-3 { width: 25%; }
.col-mb-4 { width: 33.33333%; }
.col-mb-5 { width: 41.66667%; }
.col-mb-6 { width: 50%; }
.col-mb-7 { width: 58.33333%; }
.col-mb-8 { width: 66.66667%; }
.col-mb-9 { width: 75%; }
.col-mb-10 { width: 83.33333%; }
.col-mb-11 { width: 91.66667%; }
.col-mb-12 { width: 100%; }

/* 平板网格 */
@media (min-width: 768px) {
  .container { max-width: 728px; }
  .col-tb-1 { width: 8.33333%; }
  .col-tb-2 { width: 16.66667%; }
  .col-tb-3 { width: 25%; }
  .col-tb-4 { width: 33.33333%; }
  .col-tb-5 { width: 41.66667%; }
  .col-tb-6 { width: 50%; }
  .col-tb-7 { width: 58.33333%; }
  .col-tb-8 { width: 66.66667%; }
  .col-tb-9 { width: 75%; }
  .col-tb-10 { width: 83.33333%; }
  .col-tb-11 { width: 91.66667%; }
  .col-tb-12 { width: 100%; }
}

/* 桌面网格 */
@media (min-width: 992px) {
  .container { max-width: 940px; }
  .col-1 { width: 8.33333%; }
  .col-2 { width: 16.66667%; }
  .col-3 { width: 25%; }
  .col-4 { width: 33.33333%; }
  .col-5 { width: 41.66667%; }
  .col-6 { width: 50%; }
  .col-7 { width: 58.33333%; }
  .col-8 { width: 66.66667%; }
  .col-9 { width: 75%; }
  .col-10 { width: 83.33333%; }
  .col-11 { width: 91.66667%; }
  .col-12 { width: 100%; }
}

/* ==== 页面布局 ==== */
#header {
  padding-top: 35px;
  border-bottom: 1px solid #EEE;
}

#logo img {
  max-height: 64px;
}

/* 导航菜单 */
#nav-menu {
  margin: 25px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  width: calc(100% - 300px); /* 为右上角翻译按钮留出空间 */
  max-width: 100%;
}

/* 新增：顶部导航栏样式 */
#top-nav-bar {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 15px 0;
  position: relative;
  z-index: 1000;
}

.nav-menu-section {
  display: flex;
  justify-content: flex-start;
}

.nav-menu {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
  align-items: center;
}

.nav-menu a {
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.3s ease;
  color: #495057;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
}

.nav-menu a:hover {
  background-color: #e9ecef;
  color: #007bff;
  text-decoration: none;
}

.nav-menu a.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.nav-menu a.active:hover {
  background-color: #0056b3;
  border-color: #0056b3;
  color: white;
}

.language-section {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* 右上角语言选择器样式 */
.language-section-top-right {
  position: absolute;
  top: 15px;
  right: 25%;
  z-index: 1001;
  background-color: transparent;
  margin-right: 10px;
  transform: translateX(0);
}

.language-section-top-right .language-selector {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.language-section-top-right .language-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.language-section-top-right .language-btn:hover {
  border-color: #007cba;
  box-shadow: 0 2px 6px rgba(0, 124, 186, 0.2);
  background: #f8f9fa;
}

.language-section-top-right .language-btn.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.language-section-top-right .language-btn.active:hover {
  background-color: #0056b3;
  border-color: #0056b3;
}

/* 响应式设计 */
@media (max-width: 768px) {
  #top-nav-bar {
    padding: 10px 0;
  }
  
  /* 移动端调整导航菜单宽度 */
  #nav-menu {
    width: 100%;
    margin-bottom: 10px;
  }
  
  .nav-menu {
    gap: 15px;
  }
  
  .nav-menu a {
    padding: 6px 12px;
    font-size: 14px;
  }
  
  /* 移动端右上角翻译按钮调整 */
  .language-section-top-right {
    position: relative;
    top: auto;
    right: auto;
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 10px;
  }
  
  .language-section-top-right .language-selector {
    justify-content: center;
  }
  
  .language-section-top-right .language-btn {
    padding: 8px 14px;
    font-size: 13px;
  }
}

/* 语言选择器样式 */
.language-selector {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.language-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.language-btn:hover {
  border-color: #007cba;
  box-shadow: 0 0 3px rgba(0, 124, 186, 0.2);
  background: #f8f9fa;
}

.language-btn.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.language-btn.active:hover {
  background-color: #0056b3;
  border-color: #0056b3;
}

/* 语言选择器样式 */
.language-section {
  text-align: center;
  margin: 15px 0;
}

.language-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  font-size: 14px;
  min-width: 140px;
  cursor: pointer;
}

.language-select:hover {
  border-color: #007cba;
  box-shadow: 0 0 3px rgba(0, 124, 186, 0.2);
}

.language-select:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 3px rgba(0, 124, 186, 0.3);
}

.language-select option {
    padding: 8px;
    background: #ffffff;
    color: #333;
}

/* 工具栏样式 - 右上角显示 */
.site-tools {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

.toolbar {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
}

.toolbar form {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.toolbar .language-section {
    display: flex;
    justify-content: flex-end;
}

.toolbar .language-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 12px;
    min-width: 120px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toolbar .language-select:hover {
    border-color: #007cba;
}

.toolbar .language-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

/* 优化移动端工具栏显示 */
  @media (max-width: 767px) {
      
      /* 工具栏移动端样式 */
      .site-tools {
          margin-top: 10px;
          text-align: center;
      }
      
      .toolbar {
          align-items: center;
          width: 100%;
      }
      
      .toolbar form {
          flex-direction: column;
          align-items: center;
          gap: 6px;
          width: 100%;
      }
      

      
      .toolbar .language-section {
          width: 100%;
          display: flex;
          justify-content: center;
      }
      
      .toolbar .language-select {
          width: 100%;
          max-width: 280px;
          font-size: 16px; /* 防止iOS自动缩放 */
          padding: 10px 12px;
      }
  }

#nav-menu a {
  display: block;
  margin-right: -1px;
  padding: 0 16px;
  border: 1px solid #EEE;
  border-bottom: none;
  height: 32px;
  line-height: 32px;
  color: #444;
  float: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  min-width: 0;
}

#nav-menu a:hover {
  background: #F6F6F6;
  color: #333;
}



/* 主要内容 */
#body {
  padding: 20px 0;
}

.post-content {
  line-height: 1.5;
}

/* 站点地址样式 */
.site-address {
  text-align: center;
  margin: 20px 0 30px;
  font-size: 1.1em;
}

.site-address span {
  margin: 0 15px;
}

/* 服务器列表样式 */
.server-list {
  margin: 2rem 0;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.server-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 1rem;
  margin-bottom: 1rem;
  background-color: #f8f8f8;
  border-radius: 6px;
  transition: background-color 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.server-item:hover {
  background-color: #f0f0f0;
}

.server-name {
  font-weight: 500;
  margin-right: 1rem;
  min-width: 120px;
  flex: 1;
  word-break: break-all;
  word-wrap: break-word;
}

.server-ip {
  margin-right: 1rem;
  position: relative;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex: 1;
  min-width: 150px;
  word-break: break-all;
}

.server-ip:hover {
  background-color: #e8e8e8;
}

.copy-hint {
  font-size: 0.8rem;
  color: #666;
  margin-left: 8px;
  opacity: 0.7;
  transition: all 0.2s ease;
  display: inline-block;
  font-family: inherit;
}

.server-ip:hover .copy-hint {
  opacity: 1;
}

/* 服务器Ping显示样式 */
.server-ping {
  margin-right: 1rem;
  margin-bottom: 5px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 120px;
}

.ping-icon {
  margin-right: 6px;
  font-size: 1rem;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ping-low {
  color: #27ae60;
  background-color: rgba(39, 174, 96, 0.1);
}

.ping-medium {
  color: #f39c12;
  background-color: rgba(243, 156, 18, 0.1);
}

.ping-high {
  color: #e74c3c;
  background-color: rgba(231, 76, 60, 0.1);
}

.ping-timeout {
  color: #95a5a6;
  background-color: rgba(149, 165, 166, 0.1);
}

.server-group {
  margin-right: 1rem;
  flex: 1;
  min-width: 120px;
  display: block;
  font-size: 16px;
  color: #666;
}

.server-note {
  color: #999;
  font-size: 0.9em;
  width: 100%;
  display: block;
}

/* 横幅网格样式 */
.banner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.banner-grid a {
  display: block;
  padding: 15px;
  background: #f8f8f8;
  border: 1px solid #eaeaea;
  border-radius: 4px;
  text-align: center;
  transition: all 0.3s ease;
}

.banner-grid a:hover {
  background: #f0f0f0;
  border-color: #ddd;
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.server-stats {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3498db;
}

.server-stats h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #2c3e50;
}

.server-stats p {
    margin: 0;
    color: #7f8c8d;
    font-size: 14px;
}

.server-filters {
    margin-bottom: 25px;
}

.server-filters h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #2c3e50;
}

.filter-link {
    display: inline-block;
    padding: 8px 15px;
    margin-right: 10px;
    margin-bottom: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    color: #7f8c8d;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid #ddd;
}

.filter-link:hover {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.filter-link.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

/* 服务器列表样式 */
.server-list {
  margin: 20px 0;
}

.server-item {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.server-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.server-name {
    display: block;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #333;
    width: 100%;
}

.server-type-badge {
    display: inline-block;
    padding: 3px 8px;
    margin-right: 10px;
    font-size: 12px;
    font-weight: normal;
    border-radius: 12px;
    color: white;
    vertical-align: middle;
}

.server-type-badge[data-type="original"] {
    background-color: #27ae60;
}

.server-type-badge[data-type="mod"] {
    background-color: #e74c3c;
}

.server-type-badge[data-type="store"] {
    background-color: #f39c12;
}

.server-latency {
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
    color: #555;
    width: 100%;
}

.latency-item {
    margin-right: 1rem;
    margin-bottom: 5px;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.05);
}

.server-group {
    display: block;
    font-size: 16px;
    color: #666;
    margin-bottom: 12px;
    width: 100%;
}

.server-ip {
    display: block;
    font-size: 16px;
    margin-bottom: 12px;
    color: #666;
    width: 100%;
}

.server-group b,
.server-ip b {
    color: #2c3e50;
}

.server-note {
    display: block;
    font-size: 14px;
    color: #e74c3c;
    margin-top: 5px;
    font-style: italic;
}

.no-servers {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    color: #7f8c8d;
    font-size: 16px;
}

/* 确保body可以正常滚动，不被任何元素遮挡 */
body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  padding: 0 0 100px 0; /* 底部添加100px的内边距，确保页脚不会与内容重叠 */
  box-sizing: border-box;
  font-size: 1rem; /* 使用相对单位 */
}

/* 主要内容区域，确保有足够的底部间距 */
#body {
  padding: 20px 0 80px 0; /* 底部添加80px的内边距，增加间距 */
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%; /* 确保内容不超出视口 */
}

/* 优化页脚样式，确保它不会覆盖任何内容 */
#footer {
  position: static; /* 完全静态定位，跟随文档流 */
  width: 100%;
  padding: 2rem 1rem; /* 使用相对单位，增加水平内边距 */
  line-height: 1.5;
  text-align: center;
  color: #999;
  border-top: 1px solid #EEE;
  background-color: #fff;
  font-size: 0.9rem;
  margin-top: 3rem; /* 使用相对单位，增加与内容的距离 */
  box-sizing: border-box;
  clear: both; /* 清除浮动，确保不与内容重叠 */
  z-index: 10; /* 确保页脚在内容之上 */
  overflow: visible; /* 确保内容不会被隐藏 */
  display: block;
}

/* 为移动设备添加更彻底的间距保障 */
@media (max-width: 767px) {
  /* 进一步增加内容区域底部内边距 */
  #body {
    padding-bottom: 150px;
  }
  
  /* 服务器列表底部添加更大间距 */
  .server-list {
    margin-bottom: 100px;
  }
  
  /* 侧边栏底部添加更大间距 */
  #sidebar {
    margin-bottom: 100px;
  }
}

/* 加群链接样式 */
.join-group {
  text-align: center;
  margin: 20px 0;
  padding: 15px;
  background-color: #f0f7ff;
  border-radius: 8px;
  border: 1px solid #d0e3ff;
}

.group-link {
  display: inline-block;
  background-color: #12b7f5;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
  margin: 0 5px;
}

.group-link {
  display: block;
  width: 100%;
}

.group-link:hover {
  background-color: #0e98d5;
  color: white;
}

/* 确保最后一个服务器项有足够间距 */
.server-item:last-child {
  margin-bottom: 50px;
}

  
  /* 确保内容容器有足够底部内边距 */
  .post-content {
    padding-bottom: 80px;
    display: block;
    overflow: visible;
  }
  
  /* 页脚字体调小，减少高度占用 */
  #footer {
    font-size: 0.8em;
    padding: 0.5em 0;
  }
  
  /* 确保所有元素都正确显示，不被隐藏 */
  * {
    overflow-anchor: auto;
  }
/* 修复：移除多余的大括号，避免语法错误 */

/* 为桌面浏览器添加额外的间距保障 */
@media (min-width: 992px) {
  /* 确保容器在不同缩放比例下都能正常显示 */
  .container {
    max-width: 940px;
    padding-left: 20px;
    padding-right: 20px;
  }
  
  /* 增加服务器列表与页脚之间的距离 */
  .server-list {
    margin-bottom: 3rem !important;
    padding-bottom: 2rem;
  }
  
  /* 确保最后一个服务器项有足够的底部间距 */
  .server-item:last-child {
    margin-bottom: 2rem !important;
    padding-bottom: 1rem;
  }
  
  /* 确保主内容区域有足够的底部空间 */
  .post-content {
    padding-bottom: 3rem !important;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }
  
  /* 确保页脚与内容完全分离 */
  #footer {
    position: static;
    margin-top: 3rem !important;
    padding: 2rem 2rem !important;
    clear: both;
    float: none;
    display: block;
    width: 100%;
    background-color: #fff;
    border-top: 1px solid #EEE;
    z-index: 100;
    font-size: 0.9rem;
  }
  
  /* 确保主要内容容器有足够空间 */
  #body > .container {
    margin-bottom: 2rem;
    width: 100%;
  }
  
  /* 确保服务器项在桌面端不会重叠 */
  .server-item {
    min-height: auto;
    overflow: visible;
  }
  
  /* 优化导航菜单在桌面端的显示 */
  #nav-menu {
    flex-direction: row;
    flex-wrap: nowrap;
  }
}

/* 响应式调整 */
@media (max-width: 767px) {
  .banner-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
  
  .server-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 0.8rem;
  }
  
  .server-name {
    min-width: auto;
    width: 100%;
    margin-right: 0;
  }
  
  .server-ip {
    min-width: auto;
    width: 100%;
    margin-right: 0;
    padding: 4px 6px;
  }
  
  .server-group {
    min-width: auto;
    width: 100%;
    margin-right: 0;
  }
  
  /* 移动端语言选择器优化 */
  .language-section {
    margin: 10px 0;
  }
  
  .language-select {
    padding: 10px 15px;
    font-size: 16px; /* 防止iOS缩放 */
    min-width: 150px;
    border-radius: 6px;
    border: 2px solid #ddd; /* 增加边框宽度，便于触摸 */
  }
  
  /* 确保导航菜单在移动端正常显示 */
  #nav-menu {
    flex-direction: column;
  }
  
  #nav-menu a {
    float: none;
    border-bottom: 1px solid #EEE;
    margin-right: 0;
    padding: 0 12px;
    min-height: 44px; /* 增加触摸目标大小 */
    line-height: 44px;
  }
}

/* 清除浮动 */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* 隐藏元素 */
.kit-hidden-tb {
  display: none;
}

@media (min-width: 768px) {
  .kit-hidden-tb {
    display: block;
  }
}