:root {
  --header-bg: #234250;
  --page-bg: #8ad4f3;
  --outer-content-bg: #7cbeda;
  --inner-content-bg: #ececec;
  --section-white: #ffffff;
  --nav-accent: #3897cf;
  --footer-bg: #6ca6be;
  --text-accent: #00596d;
  --hover-accent: #e05033;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4, h5, h6 {
  font-weight: normal;
}

body {
  background-color: var(--page-bg);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #333;
  line-height: 1.5;
  
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header Fixed */
header {
  background-color: var(--header-bg);
  height: 50px;
  display: flex;
  align-items: center;
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.logo h1 a, .logo strong a {
  text-decoration: none;
  display: flex; /* 核心：开启flex */
  align-items: center; /* 核心：垂直居中 */
  gap: 0.6rem;
  
}
.logo h1 a span, .logo strong a span {
  color: #ccc;
  font-weight: 900;
  font-size: 1.8rem;
  line-height: 1.8rem;
  text-shadow: 0 2px 2px #44a4cf;
}

.search-container {
  display: flex;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  overflow: hidden;
  height: 36px;
  padding: 2px;
}
.search-container input {
  border: none;
  padding: 0 15px;
  outline: none;
  width: 160px;
  background: transparent;
  color: white;
  font-size: 14px;
}
.search-container button {
  border: none;
  background: white;
  color: var(--header-bg);
  padding: 0 15px;
  cursor: pointer;
  border-radius: 30px;
  font-weight: bold;
}

nav.sub-nav {
  background-color: var(--nav-accent);
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 50px;
  z-index: 999;
}
.sub-nav .container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: center;
}
.sub-nav a {
  color: white;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 18px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.sub-nav a:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.sub-nav a.active {
  background-color: #ffffff;
  color: var(--nav-accent);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  border-color: #ffffff;
  transform: translateY(0);
}

.wrapper-outer {
  background-color: var(--outer-content-bg);
  padding: 15px;
  margin: 20px 0;
  border-radius: 8px;
}
.inner-content-wrapper {
  background-color: var(--inner-content-bg);
  padding: 20px 20px 20px 20px; /* 底部补齐 padding */
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.top-ad-slot {
  width: 100%;
  min-height: 90px;
  background-color: rgba(255, 255, 255, 0.5);
  border: 1px dashed #999;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #666;
  border-radius: 4px;
}

.layout {
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 992px) {
  .layout {
    display: grid;
    grid-template-columns: 9fr 3fr;
  }
}

.section-white-box {
  background-color: var(--section-white);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.section-title {
  color: var(--text-accent);
  font-weight: 700;
  font-size: 1.3rem;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.mobile-focus-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 576px) {
  .mobile-focus-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .mobile-focus-grid article:nth-child(4) {
    display: none;
  }
}

.game-grid.large {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 576px) {
  .game-grid.large {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

/* 针对极窄手机 (如宽度小于 360px) 的适配 */
@media (max-width: 380px) {
  .mobile-focus-grid {
    grid-template-columns: 1fr; /* 改为单列排列，防止溢出 */
  }
  .game-grid.large {
    grid-template-columns: 1fr;
  }
}

.page-content img {
  max-width: 700px;;
}

@media (max-width: 576px) {
  .page-content img {
  max-width: 250px;;
}
}

.game-card {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: var(--transition);
  position: relative;
  top: 0;
}
.img-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: #ddd;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}
.img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
  display: block;
}

.game-name {
  font-size: 0.95rem;
  text-align: center;
  color: var(--text-accent);
  padding: 4px 0;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 7em;
  margin: 0 auto;
}
@media (min-width: 768px){
  .game-name{
    max-width: 10em;
  }
}
@media (max-width: 380px){
  .game-name{
    max-width: 15em;
  }
}

.game-rating{
  text-align: center;
  margin-bottom: -8px;
}

.pagination, .more-btn-wrapper {
  display: flex;
  /* gap: 8px; */
  margin-top: 15px;
}
.pagination {max-width: 100%; justify-content: center; }
.more-btn-wrapper { justify-content: flex-end; }

.pagination .nav-links {
  gap: 8px;
  margin-top: 15px;
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
flex-wrap: wrap !important;
}

.pagination .nav-links a, .pagination .nav-links span, .more-btn-wrapper a {
  padding: 8px 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  color: var(--text-accent);
  font-weight: 600;
  font-size: 0.95rem;
  background: #fff;
  transition: all 0.2s;
  display: inline-block;
  margin: 5px 0;

  white-space: nowrap;
}

.pagination .nav-links a:hover, .more-btn-wrapper a:hover {
  background: #f0f0f0;
  color: var(--hover-accent);
  border-color: #ccc;
}

.pagination .nav-links span.current {
  background: var(--nav-accent);
  color: white;
  border-color: var(--nav-accent);
}

.side-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.side-game-item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  position: relative;
  top: 0;
  padding: 5px;
  border-radius: 8px;
  border-bottom: 1px solid #eee;
}
.side-img-wrapper {
  width: 55px;
  height: 55px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #eee;
}
.side-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
  display: block;
}

.side-info h3 {
  display: inline-block;
  font-size: 0.95rem;
  color: var(--text-accent);
  transition: color 0.2s;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 12em;
}
@media (max-width: 380px) {
  .side-info h3 {
    display:inline-block;
    width: 11em;
  }
}

.gray-i-text {
  font-size: 0.85rem;
  color: #666;
  font-style: italic;
}

.comment-item {
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #eee;
}
.user-name {
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--nav-accent);
  display: block;
  margin-bottom: 4px;
}
.comment-text {
  font-size: 0.95rem;
  color: #666;
  font-style: italic;
  border-left: 2px solid #ddd;
  padding-left: 8px;
}

.site-intro-txt, .category-long-desc {
  font-size: 0.95rem;
  color: #666;
  /* font-style: italic; */
  /* border-left: 2px solid #ddd; */
  padding-left: 8px;
  padding-bottom: 6px;
}

.comment-game-link, .blog-title-link {
  display: inline-block;
  font-size: 0.95rem;
  color: var(--text-accent);
  text-decoration: none;
  transition: color 0.2s;
}

@media (hover: hover) {
  .game-card:hover {
    top: -4px;
  }
  .game-card:hover img {
    transform: scale(1.1);
  }
  .game-card:hover .game-name {
    color: var(--hover-accent);
  }
  .side-game-item:hover {
    top: -3px;
    background-color: rgba(0, 0, 0, 0.02);
  }
  .side-game-item:hover .side-img {
    transform: scale(1.1);
  }
  .side-game-item:hover span {
    color: var(--hover-accent);
  }
  .comment-game-link:hover, .blog-title-link:hover {
    color: var(--hover-accent);
    text-decoration: underline;
  }
}

/* 核心改动部分 */
footer.inner-footer {
  background-color: var(--footer-bg);
  color: white;
  padding: 25px 0 15px 0;
  text-align: center;
  margin: 10px 0 0 0; /* 移除了负边距 */
  width: 100%;        /* 修正了 calc 宽度 */
  font-size: 0.90rem;
}
footer.inner-footer a {
  font-size: 0.95rem;
  color: white;
  text-decoration: none;
  margin: 0 5px;
}

@media (max-width: 576px) {
  .header-flex {
    flex-direction: column;
    gap: 10px;
  }
  header {
    height: auto;
    padding: 15px 0;
    position: sticky;
    top: 0;
  }
  nav.sub-nav {
    position: sticky;
    top: 106px;
    z-index: 999;
    padding: 10px 0;
  }
}

.breadcrumb { color: #666; margin-bottom: 15px; }
.breadcrumb a { color: var(--text-accent); text-decoration: none; font-weight: 700; }
.breadcrumb a:hover { color: var(--hover-accent); text-decoration: underline; }


.game-header { text-align: center; margin-bottom: 15px; }
.game-header h1 { color: var(--text-accent); font-weight: 700; font-size: 1.6rem; margin-bottom: 15px; }
.tag-cloud { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-bottom: 15px; }
.tag-link { background: white; border: 1px solid #ddd; color: var(--text-accent); padding: 2px 12px; border-radius: 20px; text-decoration: none; transition: var(--transition); }
.tag-link:hover { color: var(--hover-accent); border-color: var(--hover-accent); }

.player-container { 
  width: 100%; aspect-ratio: 16 / 10; background: #4791b4; border-radius: 10px; 
  position: relative; overflow: hidden; margin-bottom: 20px;
}
.player-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.play-thumb { width: 90px; height: 90px; border-radius: 15px; border: 3px solid white; margin-bottom: 15px; object-fit: cover; }
.play-btn { background: white; color: var(--header-bg); padding: 12px 50px; border-radius: 6px; font-weight: 900; border: none; cursor: pointer; box-shadow: 0 4px 0 #bbb; font-size: 1.2rem; transition: var(--transition); }
.play-btn:hover { background: #f0f0f0; transform: scale(1.05); }

.game-info-grid { display: grid; grid-template-columns: 1fr; gap: 20px; padding-bottom: 20px; }
@media (min-width: 992px) { .game-info-grid { grid-template-columns: 7.5fr 4.5fr; } }

.card { background: var(--section-white); border-radius: 8px; padding: 20px; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.card-title { color: var(--text-accent); font-weight: 700; font-size: 1.3rem; border-bottom: 2px solid #f0f0f0; padding-bottom: 12px; margin-bottom: 15px; display: flex; align-items: center; gap: 8px; }

.share-btns-container { display: flex; gap: 10px; flex-wrap: wrap; }
.share-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: white; text-decoration: none; font-weight: bold; transition: var(--transition); }
.bg-fb { background-color: var(--fb); } .bg-tw { background-color: var(--tw); } .bg-pt { background-color: var(--pt); } .bg-wa { background-color: var(--wa); }

.details-list { list-style: none; }
.details-item { display: flex; font-size: 15px; margin-bottom: 8px; color: #666; border-bottom: 1px dashed #eee; padding-bottom: 8px; }
.details-label { font-weight: bold; color: #333; min-width: 80px; }
.details-value a { color: var(--text-accent); text-decoration: none; font-weight: 700; transition: color 0.2s; }
.details-value a:hover{ color: var(--hover-accent); text-decoration: underline; }

.hot-list { display: flex; flex-direction: column; gap: 5px; }
.hot-item { 
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  color: inherit; transition: var(--transition); position: relative; top: 0;
  padding: 5px; border-radius: 8px; border-bottom: 1px solid #eee;
}
.hot-item img { width: 55px; height: 55px; border-radius: 8px; flex-shrink: 0; object-fit: cover; transition: transform 0.5s; }
.hot-info span { font-size: 0.95rem; color: var(--text-accent); transition: color 0.2s; margin-bottom: 2px; }
.plays-text { font-size: 0.85rem; color: #666; font-style: italic; }

@media (hover: hover) {
  .hot-item:hover { top: -3px; background-color: rgba(0, 0, 0, 0.02); }
  .hot-item:hover img { transform: scale(1.1); }
  .hot-item:hover span { color: var(--hover-accent); }
}

.comment-box textarea { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; background: #f9f9f9; margin-bottom: 10px; font-family: inherit; }
.submit-btn { background: var(--header-bg); color: white; border: none; padding: 10px 25px; border-radius: 6px; cursor: pointer; font-weight: bold; transition: var(--transition); }

/* --- 基础隔离 --- */
#mobile-menu-btn { display: none; }

@media (max-width: 768px) {
    /* 1. Header 布局修复：确保搜索按钮可见 */
    header {
        height: auto !important;
        min-height: 50px;
        padding: 8px 0 !important;
        position: fixed !important; /* Header 也固定在最顶端 */
        width: 100%;
        top: 0;
        z-index: 1001;
    }
    .header-flex {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        padding: 0 15px !important;
    }

    /* 2. 三横线图标样式 */
    #mobile-menu-btn {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 25px;
        height: 18px;
        cursor: pointer;
    }
    #mobile-menu-btn span {
        width: 100%;
        height: 3px;
        background-color: #fff;
        border-radius: 2px;
    }

    /* 3. 搜索框适配：占满第二行 */
    .search-container {
        width: 100% !important;
        margin-top: 8px !important;
        display: flex !important;
    }
    .search-container input { flex: 1; }

    /* 4. 导航栏固定定位：点击后固定在页面不动 */
    nav.sub-nav {
        display: none !important;
        position: fixed !important; /* 关键：固定定位 */
        top: 100px !important; /* 位于固定 Header 的下方 */
        left: 0 !important;
        width: 100% !important;
        height: auto !important;
        max-height: calc(100vh - 104px); /* 防止菜单太长超出屏幕 */
        overflow-y: auto !important;     /* 允许菜单内部滚动 */
        background-color: var(--nav-accent) !important;
        z-index: 1000;
        padding: 15px 0 !important;
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    }

    /* 5. 展开逻辑 */
    #menu-toggle:checked + nav.sub-nav {
        display: block !important;
    }

    /* 6. 保持原有的胶囊按钮样式 */
    .sub-nav .container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 10px !important;
    }

    /* 给 body 增加间距防止内容被固定的 Header 遮挡 */
    body { padding-top: 110px !important; }
}

/* 桌面端恢复 */
@media (min-width: 769px) {
    nav.sub-nav {
        display: block !important;
        position: sticky !important;
        top: 50px;
    }
    body { padding-top: 0 !important; }
}

/* 分类页头部 SEO 区块 */
.category-info-box {
    background-color: var(--section-white);
    padding: 5px 0px 15px 25px;
    margin-bottom: 20px;
    border-radius: 4px; /* 匹配你图片卡片的微圆角 */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.category-main-title {
    font-size: 25px;
    color: var(--text-accent);
    /* margin-bottom: 15px; */
    font-weight: bold;
    display: block;
}

.category-main-description {
    font-size: 15px;
    line-height: 1.6;
    color: #444;
}

.category-main-description strong {
    color: var(--header-bg);
}

/* 适配移动端 */
@media (max-width: 768px) {
    .category-info-box {
        padding: 15px;
        margin: 15px 0;
    }
    .category-main-title {
        font-size: 22px;
    }
}