/* 全站背景 */
body {
  background: #f3f2ed;
  color: #2e3a27;
  font-family: 'Segoe UI', 'Arial', sans-serif;
  margin: 0;
  padding: 0;
}

/* 页面整体布局为flex，左侧导航，右侧内容 */
.body-layout {
  display: flex;
  min-height: 100vh;
  flex-direction: row;
}

/* 左侧导航栏 */
.navbar {
  position: sticky;
  top: 85px;           /* 距离头部高度 */
  left: 0;
  background: linear-gradient(135deg, #4b7156 0%, #b7e4c7 100%);
  color: #fff;
  width: 180px;
  height: auto;
  padding: 56px 0 0 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: 2px 0 8px rgba(75,113,86,0.10);
  border-radius: 20px;
  margin-top: 24px;    /* 让导航栏离头部有距离 */
  margin-right: 24px;
  margin-left: 220px; /* 新增：左侧留白 */
  z-index: 100;
  transition: box-shadow 0.3s;
}
.navbar:hover {
  box-shadow: 4px 4px 24px rgba(75,113,86,0.18), 2px 0 8px rgba(183,228,199,0.08);
  transform: translateY(-2px) scale(1.02);
  transition: box-shadow 0.3s, transform 0.2s;
}
.navbar a {
  display: block;
  color: #fff;
  margin: 18px 0;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1em;
  width: 100%;
  text-align: left; /* 文字靠左 */
  padding: 10px 0 10px 8px; /* 文字左边再留点空间 */
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.navbar a:hover {
  background: #e0e6d4;
  color: #4b7156;
}

/* 主体内容 */
.main-content {
  flex: 1;
  padding: 32px 0;
  box-sizing: border-box;
  min-width: 0;
}

/* 页眉、页脚不再有margin-left */
.header, .footer {
  margin-left: 0;
}

/* 页脚高度适配 */
.footer {
  min-height: 70px;
  margin-top: 40px;
  text-align: center;
  color: #4b7156;
  background: #fff;
  padding: 18px 0;
  font-size: 1em;
  letter-spacing: 1px;
  box-shadow: 0 -2px 8px rgba(75,113,86,0.06);
}
.darkred-footer {
  background: #4b7156;
  color: #fff;
  box-shadow: 0 -2px 8px rgba(75,113,86,0.06);
}

/* 头部整体样式 */
.header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(75,113,86,0.08);
  height: 80px;
  display: flex;
  align-items: center;
  padding: 0;
}

/* 头部内部flex布局，logo左，搜索栏更大更居中 */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* logo靠左 */
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 80px;
  gap: 48px; /* 增加logo和搜索栏间距 */
}

.logo {
  display: flex;
  align-items: center;
  height: 56px;
  padding-right: 24px;
  gap: 14px;
}
.logo img {
  height: 48px;
  width: auto;
  vertical-align: middle;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(142,202,230,0.10);
}
.logo-title {
  color: #4b7156;
  font-size: 1.4em;
  font-weight: bold;
  font-family: 'Comic Sans MS', 'Segoe UI', 'Arial', sans-serif;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(75,113,86,0.10);
}

/* 搜索栏更大更显眼，整体偏中间 */
.search-form {
  display: flex;
  align-items: center;
  min-width: 500px;
  max-width: 700px;
  width: 60vw;
  margin-left: 80px; /* 让搜索栏更偏中间 */
  justify-content: flex-start;
}
.search-input {
  padding: 14px 28px;
  font-size: 1.25em;
  border: 2px solid #b7e4c7;
  border-radius: 10px 0 0 10px;
  background: #f3f2ed;
  min-width: 300px;
  outline: none;
  transition: border 0.2s;
}
.search-input:focus {
  border-color: #4b7156;
}
.search-btn {
  padding: 14px 36px;
  font-size: 1.25em;
  border-radius: 0 10px 10px 0;
  background: #4b7156;
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}
.search-btn:hover {
  background: #b7e4c7;
  color: #2e3a27;
}

/* 自定义滚动条颜色为嫩绿 */
::-webkit-scrollbar {
  width: 16px;
  background: #f5f6ff;
}

::-webkit-scrollbar-thumb {
  background: #b7e4c7;
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4b7156;
}

/* Firefox */
* {
  scrollbar-width: thick;
  scrollbar-color: #b7e4c7 #f3f2ed;
}

/* 响应式：小屏幕下自动竖排 */
@media (max-width: 900px) {
  .search-form {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    margin-left: 0;
    justify-content: center;
  }
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    padding: 12px 8px;
    gap: 10px;
  }
  .logo {
    justify-content: center;
    margin-bottom: 8px;
  }
  .main-content {
    padding: 16px 0;
  }
  .section {
    padding: 16px 8px;
    margin: 16px auto;
  }
  .navbar {
    margin-left: 0;
  }
}

/* 板块 */
.section {
  background: #e0e6d4;
  padding: 28px 32px;
  margin: 32px 0;      /* 左右margin为0，内容不再居中 */
  border-radius: 14px;
  max-width: 900px;
  box-shadow: 0 2px 12px rgba(75,113,86,0.07);
}
.section h2, .section h3 {
  color: #4b7156;
  margin-top: 0;
}
.game-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0 0;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.game-list li {
  border: 1px solid #4b7156;
  color: #4b7156;
  background: #fff;
  box-shadow: 0 1px 4px rgba(75,113,86,0.04);
  transition: background 0.2s;
}
.game-list li:hover {
  background: #e0e6d4;
}

/* 卡片列表布局 */
.game-card-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin-top: 16px;
}

/* 单个卡片样式 */
.game-card {
  border: 1px solid #b7e4c7;
  box-shadow: 0 2px 8px rgba(75,113,86,0.07);
  border-radius: 12px;
  background: #fff;
  width: 140px;
  min-width: 140px;
  max-width: 140px;
  height: 140px; /* 卡片高度与图片一致 */
  display: inline-block;
  vertical-align: top;
  margin: 10px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.15s;
  cursor: pointer;
  padding: 0; /* 去除多余内边距 */
}

.game-card-thumb {
  width: 100%;
  height: 100%;
  display: block;
  background: #e0e6d4;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.game-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  transition: transform 0.28s cubic-bezier(.4,1.6,.6,1);
}

.game-card:hover .game-card-thumb img,
.game-card:focus .game-card-thumb img {
  transform: scale(1.08);
  z-index: 1;
}

/* 标题覆盖在图片上，悬停时渐显 */
.game-card-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  opacity: 0;
  background: rgba(75,113,86,0.78);
  color: #b7e4c7; /* 使用网站主色嫩绿色 */
  font-size: 1em;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.25s, color 0.2s;
  z-index: 2;
  padding: 0 6px;
}

.game-card:hover .game-card-title,
.game-card:focus .game-card-title {
  opacity: 1;
}

/* 新增游戏iframe样式 */
.game-iframe-wrapper {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  position: relative; /* 修复全屏按钮定位 */
}

.game-iframe {
  width: 100%;
  height: 480px;
  background: #3b4a1c;
  border-radius: 12px;
  border: none;
  display: block;
}

/* 游戏玩法演示图片样式 */
.guide-image {
  max-width: 720px;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(75,113,86,0.10);
  display: block;
  margin: 20px auto;
}

/* 全屏按钮样式（右下角） */
.fullscreen-btn {
  position: absolute;
  bottom: 18px;
  right: 18px;
  padding: 7px 20px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #4b7156 0%, #b7e4c7 100%);
  color: #fff;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(75,113,86,0.10);
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.fullscreen-btn:hover {
  background: #e0e6d4;
  color: #4b7156;
  box-shadow: 0 4px 16px rgba(75,113,86,0.18);
  transform: translateY(-2px) scale(1.04);
}

/* 社交分享按钮样式（文字风格匹配网站主色） */
.share-buttons {
  margin-top: 18px;
  text-align: center;
  font-family: 'Segoe UI', 'Arial', sans-serif;
  font-size: 1.08em;
  letter-spacing: 0.5px;
  color: #4b7156;
  font-weight: bold;
}
.share-buttons span {
  color: #4b7156;
  font-weight: bold;
  font-size: 1em;
}
.share-buttons a {
  display: inline-block;
  margin: 0 8px;
  border-radius: 8px;
  background: #fff;
  color: #4b7156;
  font-size: 1em;
  font-weight: bold;
  padding: 8px 18px;
  box-shadow: 0 2px 8px rgba(75,113,86,0.10);
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.15s, background 0.2s, color 0.2s;
  vertical-align: middle;
  font-family: 'Segoe UI', 'Arial', sans-serif;
  letter-spacing: 0.5px;
}
.share-buttons a:hover {
  background: #b7e4c7;
  color: #fff;
  box-shadow: 0 4px 16px rgba(75,113,86,0.18);
  transform: translateY(-2px) scale(1.08);
}