* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #0f1117;
  color: #e2e8f0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* p5 画布若用作全屏背景时的穿透配置 */
canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}

.site-container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 64px 24px;
}

.site-header {
  text-align: center;
  margin-bottom: 40px;
}

.site-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #f8fafc;
}

.site-header .subtitle {
  font-size: 0.95rem;
  color: #94a3b8;
  margin-top: 6px;
}

/* 网格排版：自适应列宽，自动填满并在居中对齐 */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 552px));
  justify-content: center;
  gap: 24px;
}

/* iframe 容器：处理卡片边框、阴影与圆角切割 */
.game-wrapper {
  background: #1a1e29;
  border: 1px solid #2d3748;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
}

.game-wrapper:hover {
  transform: translateY(-2px);
  border-color: #4a5568;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.game-wrapper iframe {
  width: 100%;
  display: block;
}
.ng-card {
  display: flex;
  height: 167px;
  background: #222;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: #eee;
  font-family: sans-serif;
}
.ng-thumb {
  flex: 0 0 167px;
  background: #3a2a1a center / cover no-repeat;
}
.ng-info {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  min-width: 0;
}
.ng-title  { font-size: 18px; font-weight: 700; }
.ng-author { font-size: 12px; color: #aaa; margin-bottom: 6px; }
.ng-desc   { font-size: 12px; color: #ccc; flex: 1; overflow: hidden; }
.ng-meta   { font-size: 11px; color: #999; margin: 4px 0; }
.ng-btn {
  align-self: flex-start;
  background: #fda238;
  color: #111;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
}
.ng-card:hover .ng-btn { background: #ffb85c; }
@media (max-width: 420px) { .ng-thumb { flex-basis: 100px; } }