/* 模板四 · Y8 风（参考 y8.com）：白底 + 每个分类一行（彩色分类磁贴 + 缩略图横条 + 滚动箭头） */

:root {
  --bg: #ffffff;
  --bg-card: #f2f3f5;
  --bg-card-hover: #e8eaee;
  --text: #1f2933;
  --text-dim: #7b8794;
  --accent: #29b473;
}

body {
  background: #ffffff;
}

.site-header {
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid #eceff1;
}

.search-box input {
  background: #f2f4f6;
  border: none;
  color: #222222;
}

.lang-toggle {
  background: #29b473;
  border: none;
  color: #ffffff;
}

.tpl-back {
  color: #7b8794;
}

main {
  max-width: 1100px;
}

/* 分类行：左侧彩色磁贴 + 缩略图横条 + 更多箭头 */
.y8-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 16px;
}

.y8-cat {
  flex: 0 0 190px;
  border-radius: 10px;
  padding: 14px;
  color: #ffffff;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 96px;
  box-shadow: inset 0 -40px 60px rgba(0, 0, 0, 0.18);
}

.y8-cat:hover {
  filter: brightness(1.05);
}

.y8-cat-name {
  font-size: 17px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.y8-cat-count {
  font-size: 12px;
  opacity: 0.92;
  margin-top: 4px;
}

.y8-strip {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.tile {
  position: relative;
  flex: 0 0 96px;
  height: 96px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #f2f3f5;
  transition: transform 0.15s;
}

.tile:hover {
  transform: scale(1.04);
}

.tile-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.tile .game-icon-placeholder {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
  font-size: 34px !important;
}

.tile-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 5px;
}

.y8-more {
  flex: 0 0 auto;
  align-self: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #eef1f4;
  color: #7b8794;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 18px;
}

.y8-more:hover {
  background: #29b473;
  color: #ffffff;
}

/* 分类 / 详情页元素 */
.game-card,
.cat-card {
  background: #ffffff;
  border: 1px solid #eceff1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.game-card:hover,
.cat-card:hover {
  background: #f7f9fa;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.detail-head {
  background: #ffffff;
  border: 1px solid #eceff1;
}

.info-table {
  background: #ffffff;
  border: 1px solid #eceff1;
}

.info-table td {
  border-top-color: #f0f2f4;
}

.detail-cat-tag {
  background: rgba(41, 180, 115, 0.12);
  color: #1e9e62;
}

.detail-cat-tag:hover {
  background: rgba(41, 180, 115, 0.22);
}

.detail-section h3 {
  border-left-color: var(--accent);
}

.play-btn {
  background: #29b473;
  box-shadow: none;
}

.player-bar {
  background: #1f2933;
}

@media (max-width: 640px) {
  .y8-cat {
    flex-basis: 120px;
    min-height: 80px;
    padding: 10px;
  }

  .y8-cat-name {
    font-size: 14px;
  }
}
