/* 模板二 · CrazyGames 风（参考 crazygames.com）：深色 + 左侧导航栏 + 栏目横排 16:9 缩略图 */

:root {
  --bg: #161826;
  --bg-card: #22253a;
  --bg-card-hover: #2c3050;
  --text: #eef0fa;
  --text-dim: #8b90ad;
  --accent: #7f6cff;
}

body {
  background: #161826;
}

.site-header {
  background: rgba(22, 24, 38, 0.95);
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

main {
  max-width: 1500px;
}

/* 左侧导航栏布局 */
.tpl-with-sidebar {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.tpl-with-sidebar .breadcrumb {
  flex: 0 0 100%;
}

.tpl-sidebar {
  flex: 0 0 208px;
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
}

.side-link:hover {
  background: var(--bg-card);
  color: var(--text);
}

.side-title {
  margin: 16px 10px 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5d6383;
}

.side-cat-icon {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  object-fit: cover;
}

.side-cat .game-icon-placeholder {
  width: 20px !important;
  height: 20px !important;
  border-radius: 5px;
  font-size: 10px !important;
}

.side-text {
  padding: 6px 10px;
  font-size: 13px;
  color: #5d6383;
}

#view {
  flex: 1;
  min-width: 0;
}

/* 栏目：标题 + 可横滑缩略图行 */
.cg-section {
  margin-bottom: 28px;
}

.cg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cg-head h2 {
  font-size: 18px;
  font-weight: 700;
}

.cg-more {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 22px;
  line-height: 1;
  padding: 0 6px;
}

.cg-more:hover {
  color: #ffffff;
}

.cg-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
}

.cg-card {
  flex: 0 0 236px;
  cursor: pointer;
}

.cg-card.big {
  flex-basis: 486px;
}

.cg-thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-card);
}

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

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

.cg-card:hover .cg-thumb {
  outline: 2px solid var(--accent);
}

.cg-name {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text);
}

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

.play-btn {
  background: linear-gradient(120deg, #8f7bff, #6a4dff);
  box-shadow: 0 6px 18px rgba(127, 108, 255, 0.35);
}

.detail-cat-tag {
  background: rgba(127, 108, 255, 0.15);
  color: #a89aff;
}

.detail-cat-tag:hover {
  background: rgba(127, 108, 255, 0.28);
}

.player-bar {
  background: #0e1018;
}

@media (max-width: 900px) {
  .tpl-sidebar {
    display: none;
  }

  .cg-card {
    flex-basis: 200px;
  }

  .cg-card.big {
    flex-basis: 320px;
  }
}
