:root {
  --surface: rgba(255, 255, 255, 0.92);
  --surface-muted: rgba(255, 255, 255, 0.75);
  --text: #1e293b;
  --text-muted: #64748b;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.12);
  --radius: 16px;
}

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

html, body {
  min-height: 100%;
  min-height: 100dvh;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  overflow-x: hidden;
}

.silk-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #7b7481;
  pointer-events: none;
}

.silk-bg.silk-fallback {
  background: linear-gradient(160deg, #7b7481 0%, #6b6570 50%, #8a8390 100%);
}

#silk-canvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.app {
  position: relative;
  z-index: 10;
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.back-link {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 14px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.back-link:hover {
  color: #fff;
}

.hero {
  text-align: center;
  margin: 12px 0 28px;
}

.hero h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.hero p {
  margin-top: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
}

.game-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.game-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.5);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

.game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.2);
}

.game-card:active {
  transform: translateY(-1px);
}

.game-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.game-icon-2048 {
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
}

.game-icon-snake {
  background: linear-gradient(135deg, #bbf7d0, #86efac);
}

.game-icon-memory {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
}

.game-icon-spider {
  background: linear-gradient(135deg, #ede9fe, #c4b5fd);
}

.game-icon-flappy {
  background: linear-gradient(135deg, #bae6fd, #7dd3fc);
}

.game-icon-dino {
  background: linear-gradient(135deg, #e7e5e4, #d6d3d1);
}

.game-icon-minesweeper {
  background: linear-gradient(135deg, #cffafe, #67e8f9);
}

.game-icon-ddx {
  background: linear-gradient(135deg, #dcfce7, #86efac);
}

.game-info h2 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}

.game-info p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.game-tag {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.footer-note {
  margin-top: 32px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
}

@media (min-width: 420px) {
  .game-grid {
    grid-template-columns: 1fr;
  }
}
