:root {
  --primary-color: #222;
  --card-bg: #fff;
  --card-radius: 12px;
  --card-shadow: 0 2px 12px rgba(0,0,0,0.08), 0 1.5px 6px rgba(0,0,0,0.03);
  --card-shadow-hover: 0 8px 32px 0 #22222222, 0 2px 32px 0 #22222211;
  --card-border: #e5e5e5;
  --card-title: #111;
  --card-desc: #444;
}
a {
  text-decoration: none;
}
body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f5f5f5;
  color: #222;
}
header {
  background: #222;
  color: #fff;
  padding: 0 0 0 0;
}
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.5em 1em;
}
nav .logo {
  font-size: 1.5em;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 1.5em;
  margin: 0;
  padding: 0;
}
nav ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 1em;
  transition: color 0.2s;
}
nav ul li a:hover {
  color: #ff9800;
}
main {
  max-width: 1000px;
  margin: 1em auto;
  padding: 1em;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.hero {
  text-align: center;
  margin-bottom: 2em;
}
.recommended, .game-list {
  margin-top: 2em;
}
/* PC端游戏卡片整体居中 */
.game-list {
  display: flex;
  gap: 2em;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 auto;
}

.game-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  width: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  min-height: 260px;
  box-sizing: border-box;
  padding: 1em;
  text-align: center;
  text-decoration: none;
  color: #222;
  transition: box-shadow 0.25s, transform 0.18s, border-color 0.18s;
  cursor: pointer;
  border: 1.5px solid var(--card-border);
  position: relative;
}
.game-card:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: var(--primary-color);
  transform: translateY(-6px) scale(1.04);
  z-index: 2;
}
.game-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: calc(var(--card-radius) - 4px);
  margin-bottom: 0.7em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  transition: transform 0.18s;
}
.game-card:hover img {
  transform: scale(1.04) rotate(-1deg);
}
.game-card h3, .game-card h4 {
  margin: 0.5em 0 0.2em 0;
  font-size: 1.12em;
  font-weight: bold;
  color: var(--card-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 1px;
}
.game-card p {
  font-size: 0.98em;
  color: var(--card-desc);
  margin: 0 0 0.5em 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 移除所有重复/冲突的 .game-card 样式 */
/* 移除 .game-card .card-content, .game-card a 内部按钮等无用样式 */
.game-card .card-content, .game-card a {
  all: unset;
}

.game-detail {
  display: flex;
  gap: 2em;
  align-items: flex-start;
  margin-bottom: 2em;
}
.game-detail img {
  width: 240px;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
}
.game-info {
  flex: 1;
}
.game-embed {
  margin: 2em 0;
  text-align: center;
}
.embed-placeholder {
  width: 100%;
  height: 300px;
  background: #eee;
  border: 2px dashed #ccc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 1.2em;
}
.back-link {
  display: inline-block;
  margin-top: 1em;
  color: #ff9800;
  text-decoration: none;
}
footer {
  text-align: center;
  padding: 1.5em 0 1em 0;
  color: #888;
  background: none;
  font-size: 0.95em;
}

.category-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2em;
  margin: 2em 0 0.5em 0;
  flex-wrap: wrap;
}
.category-nav > div {
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
}
.cat-btn {
  display: inline-block;
  padding: 0.45em 1.3em;
  background: #f5f5f5;
  color: #222;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.08em;
  transition: background 0.2s, color 0.2s;
  border: 1px solid #e5e5e5;
  min-width: 80px;
  text-align: center;
}
.cat-btn:hover, .cat-btn.active {
  background: #222;
  color: #fff;
}
.category-nav form {
  display: flex;
  gap: 0.5em;
  align-items: center;
  margin-left: 2em;
}
.category-nav input[type="text"] {
  padding: 0.5em 1em;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1.08em;
  min-width: 120px;
  max-width: 180px;
}
.category-nav button[type="submit"] {
  background: #222;
  color: #fff;
  padding: 0.5em 1.2em;
  border: none;
  border-radius: 8px;
  font-size: 1.08em;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.18s;
}
.category-nav button[type="submit"]:hover {
  background: #111;
}
@media (max-width: 900px) {
  .category-nav {
    gap: 1.2em;
  }
  .cat-btn {
    font-size: 1em;
    min-width: 70px;
    padding: 0.4em 1em;
  }
  .category-nav input[type="text"] {
    min-width: 90px;
    max-width: 120px;
    font-size: 1em;
  }
  .category-nav button[type="submit"] {
    font-size: 1em;
    padding: 0.4em 1em;
  }
}
@media (max-width: 700px) {
  .category-nav {
    flex-direction: column;
    gap: 1em;
    align-items: stretch;
  }
  .category-nav form {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }
  .category-nav > div {
    justify-content: flex-start;
    gap: 0.7em;
  }
  .cat-btn {
    width: 100%;
    min-width: 0;
    margin-bottom: 0.3em;
    font-size: 1em;
    padding: 0.5em 0.8em;
  }
  .category-nav input[type="text"] {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    font-size: 1em;
  }
  .category-nav button[type="submit"] {
    width: 100%;
    font-size: 1em;
    padding: 0.5em 0.8em;
  }
}
@media (max-width: 400px) {
  .category-nav {
    gap: 0.5em;
    margin: 1em 0 0.2em 0;
  }
  .cat-btn {
    font-size: 0.98em;
    padding: 0.4em 0.5em;
    border-radius: 6px;
  }
  .category-nav input[type="text"] {
    font-size: 0.98em;
    padding: 0.4em 0.5em;
    border-radius: 6px;
  }
  .category-nav button[type="submit"] {
    font-size: 0.98em;
    padding: 0.4em 0.5em;
    border-radius: 6px;
  }
}

.category-section {
  margin-top: 3em;
}
.category-section h2 {
  margin-bottom: 1.2em;
  font-size: 1.4em;
  color: #222;
}
.category-block {
  margin-bottom: 2.5em;
}
.category-block h3 {
  display: flex;
  align-items: center;
  font-size: 1.15em;
  margin-bottom: 0.7em;
  gap: 0.5em;
}
.cat-more {
  font-size: 0.95em;
  color: #ff9800;
  text-decoration: none;
  margin-left: 0.5em;
  font-weight: normal;
}
.cat-more:hover {
  text-decoration: underline;
}
.category-block .game-list {
  margin-top: 0.2em;
}
.category-block .game-card h4 {
  margin: 0.5em 0 0.2em 0;
  font-size: 1.08em;
}

.game-card h3, .game-card h4, .game-card p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 移除所有重复/冲突的 .game-card 样式 */
/* 移除 .game-card .card-content, .game-card a 内部按钮等无用样式 */
.game-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2em;
  justify-items: center;
  margin: 0 auto;
}
.game-card {
  width: 100%;
  max-width: 220px;
  min-width: 0;
  background: #fafafa;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  min-height: 260px;
  box-sizing: border-box;
  padding: 1em;
  text-align: center;
}
@media (max-width: 700px) {
  nav {
    flex-direction: column;
    align-items: center;
    padding: 1.2em 0.2em 0.2em 0.2em;
  }
  nav .logo {
    margin-bottom: 1.1em;
    font-size: 2em;
    font-weight: 800;
    color: #222;
    text-align: center;
    width: 100%;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px #fff, 0 1px 0 #eee;
  }
  nav ul {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.5em;
    width: 100%;
    justify-content: flex-start;
    margin: 0;
    padding: 0 0.2em 0.2em 0.2em;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  nav ul::-webkit-scrollbar {
    display: none;
  }
  nav ul li {
    margin: 0;
    flex: 0 0 auto;
  }
  nav ul li a {
    display: block;
    padding: 0.5em 1em;
    background: #f8f8f8;
    color: #444;
    border-radius: 12px;
    font-size: 1.08em;
    font-weight: 500;
    margin-bottom: 0.2em;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    box-shadow: none;
  }
  nav ul li a:hover, nav ul li a.active {
    background: #ff9800;
    color: #fff;
  }
  .game-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1em;
    justify-items: center;
  }
  .game-card {
    max-width: 170px;
    min-height: 180px;
    padding: 0.5em;
    font-size: 0.98em;
  }
  .game-card img {
    height: 80px;
  }
}

@media (max-width: 400px) {
  nav .logo {
    font-size: 1.1em;
  }
  .game-card img {
    height: 120px;
  }
  .embed-placeholder {
    height: 100px;
    font-size: 0.9em;
  }
  main {
    padding: 0.2em;
  }
} 

.search-form {
  display: flex;
  justify-content: center;
  gap: 0.5em;
  margin-bottom: 2em;
}
.search-input {
  flex: 1;
  min-width: 0;
  max-width: 320px;
  padding: 0.5em 1em;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
}
.search-btn {
  padding: 0.5em 1.2em;
  background: #ff9800;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
.search-btn:hover {
  background: #e65100;
}
.search-result, .search-noresult {
  margin-top: 2em;
  text-align: center;
}
.search-noresult p {
  color: #888;
  font-size: 1.1em;
  margin-top: 1em;
} 

.detail-hero {
  display: flex;
  gap: 2.5em;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 2.5em;
}
.detail-hero-left {
  flex: 0 0 320px;
  max-width: 320px;
  width: 100%;
  text-align: center;
}
.detail-hero-left .cover {
  border-radius: 12px;
  box-shadow: 0 2px 12px #0001;
  width: 100%;
  margin-bottom: 1em;
}
.detail-hero-left .tags {
  margin-top: 1em;
}
.detail-hero-left .tag {
  background: #222;
  color: #fff;
  padding: 0.3em 1em;
  border-radius: 16px;
  font-size: 0.98em;
  display: inline-block;
}
.star-rating {
  margin: 1.2em 0 0.7em 0;
  font-size: 1.1em;
  color: var(--primary-color, #222);
  font-weight: bold;
}
.detail-hero-left .primary-btn {
  margin-top: 1.2em;
  width: 90%;
  background: #222;
  color: #fff;
  border-radius: 8px;
  font-size: 1.1em;
  padding: 0.7em 0;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.18s;
}
.detail-hero-left .primary-btn:hover {
  background: #111;
}
.detail-hero-right {
  flex: 1 1 320px;
  min-width: 260px;
}
.detail-hero-right .title {
  font-size: 2em;
  margin-bottom: 0.5em;
  color: var(--card-title);
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.2;
}
.detail-hero-right .game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2em 2.2em;
  font-size: 1em;
  color: #666;
  margin-bottom: 1.2em;
}
.detail-hero-right .game-meta div {
  min-width: 110px;
}
.tags-list {
  margin-bottom: 1em;
}
.tags-list .tag {
  background: #f5f5f5;
  color: #222;
  padding: 0.2em 0.8em;
  border-radius: 12px;
  margin-right: 0.4em;
  font-size: 0.95em;
  display: inline-block;
}
.desc-block {
  margin-bottom: 1.5em;
}
.desc-block h3 {
  margin: 1.2em 0 0.3em 0;
  font-size: 1.1em;
  color: var(--primary-color, #222);
}
.desc-block ul {
  color: #444;
  font-size: 0.98em;
  line-height: 1.7;
  margin: 0 0 0.7em 1.2em;
}
.desc-block p {
  margin: 0 0 0.7em 0;
}
.screenshots {
  margin: 1.5em 0;
}
.screenshots h3 {
  color: var(--primary-color, #222);
  font-size: 1.1em;
  margin-bottom: 0.7em;
}
.screenshots-list {
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
}
.screenshot-img {
  width: 160px;
  border-radius: 8px;
  box-shadow: 0 2px 8px #0001;
}
@media (max-width: 900px) {
  .detail-hero {
    flex-direction: column;
    gap: 1.5em;
  }
  .detail-hero-left {
    max-width: 100%;
  }
} 

/* PC端：标题、分类、搜索同一行 */
@media (min-width: 701px) {
  header.site-header-flex {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5em;
    padding: 2em 0 1em 0;
    background: none;
    text-align: center;
  }
  .site-header-flex h1 {
    font-size: 2.2em;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--primary-color,#222);
    margin: 0;
    flex: 0 0 auto;
  }
  .category-nav {
    flex: 0 0 auto;
    margin: 0;
    gap: 1.5em;
  }
  .category-nav form {
    margin-left: 1.5em;
  }
}

/* 移动端：顶部只显示菜单按钮，点击弹出抽屉菜单 */
@media (max-width: 700px) {
  header.site-header-flex {
    display: block;
    padding: 1.2em 0 0.5em 0;
    position: relative;
    background: none;
    text-align: center;
  }
  .site-header-flex h1 {
    font-size: 1.5em;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--primary-color,#222);
    margin: 0 0 0.5em 0;
  }
  .menu-toggle-mobile {
    display: inline-block;
    position: absolute;
    right: 1em;
    /* top: 1.2em; */
    font-size: 2em;
    background: none;
    border: none;
    color: #222;
    cursor: pointer;
    z-index: 1001;
  }
  .category-nav {
    display: none;
    position: fixed;
    left: 0; right: 0; top: 0;
    background: #fff;
    box-shadow: 0 4px 24px #0002;
    z-index: 1000;
    flex-direction: column;
    align-items: flex-start;
    padding: 2.5em 1.5em 1.5em 1.5em;
    gap: 1.2em;
    border-radius: 0 0 16px 16px;
    animation: slideDownMenu 0.3s;
  }
  .category-nav.active {
    display: flex;
  }
  @keyframes slideDownMenu {
    from { transform: translateY(-40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
} 

.menu-overlay-mobile {
  display: none;
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(0,0,0,0.25);
  z-index: 999;
}
.menu-overlay-mobile.active {
  display: block;
}

/* 头部一行横排，logo左边距 */
.header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5em;
  width: 100%;
  min-height: 4.5em;
}
.header-row h1 {
  margin-left: 20px;
  font-size: 2.2em;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--primary-color,#222);
  margin-top: 0;
  margin-bottom: 0;
  white-space: nowrap;
}
.menu-toggle-mobile {
  display: none;
  font-size: 2em;
  background: none;
  border: none;
  color: #222;
  cursor: pointer;
}
.category-nav {
  display: flex;
  align-items: center;
  gap: 1.5em;
}
.cat-group {
  display: flex;
  gap: 1em;
}
.category-nav form {
  display: flex;
  gap: 0.5em;
  align-items: center;
}
.category-nav input[type="text"] {
  padding: 0.5em 1em;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1.08em;
  min-width: 120px;
  max-width: 180px;
}
.category-nav button[type="submit"] {
  background: #222;
  color: #fff;
  padding: 0.5em 1.2em;
  border: none;
  border-radius: 8px;
  font-size: 1.08em;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.18s;
}
.category-nav button[type="submit"]:hover {
  background: #111;
}
@media (max-width: 700px) {
  .header-row {
    flex-direction: row;
    justify-content: flex-start;
    gap: 1em;
    min-height: 3em;
  }
  .header-row h1 {
    margin-left: 20px !important;
    font-size: 1.5em;
    letter-spacing: 1px;
  }
  .menu-toggle-mobile {
    display: inline-block;
    position: absolute;
    right: 1em;
    /* top: 1.2em; */
    z-index: 1001;
  }
  .category-nav {
    display: none;
    position: fixed;
    left: 0; right: 0; top: 0;
    background: #fff;
    box-shadow: 0 4px 24px #0002;
    z-index: 1000;
    flex-direction: column;
    align-items: flex-start;
    padding: 4em 1.5em 1.5em 1.5em;
    gap: 1.2em;
    border-radius: 0 0 16px 16px;
    animation: slideDownMenu 0.3s;
  }
  .category-nav.active {
    display: flex;
  }
  @keyframes slideDownMenu {
    from { transform: translateY(-40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
}

@media (max-width: 700px) {
  main {
    max-width: 100vw;
    padding: 0.7em 0.7em 1.2em 0.7em;
    border-radius: 0;
    box-shadow: none;
  }
} 

footer nav ul li a {
  color: #222;
  text-decoration: none;
  font-size: 1em;
  transition: color 0.2s;
  font-weight: 500;
}
footer nav ul li a:hover {
  color: var(--primary-color, #111);
  text-decoration: underline;
} 