/* Warm paper texture + retro CRT scanlines + aged wood theme */
:root {
  --bg-paper: #ecd8aa;
  --bg-card: #f5e6c8;
  --text-main: #4a3728;
  --text-muted: #7a6552;
  --accent: #b85c38;
  --shadow: rgba(74, 55, 40, 0.15);
  --radius: 12px;
  --wood-dark: #8b5a2b;
  --wood-light: #a06b33;
  --crt-line: rgba(74, 55, 40, 0.06);
}

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

body {
  background-color: var(--bg-paper);
  color: var(--text-main);
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", "Microsoft JhengHei", serif;
  line-height: 1.6;
  min-height: 100vh;
  /* Aged paper texture + subtle scanline CRT strips */
  background-image:
    repeating-linear-gradient(0deg, var(--crt-line) 0px, var(--crt-line) 1px, transparent 1px, transparent 4px),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
}

/* Vintage wooden header bar */
header {
  background: linear-gradient(180deg, var(--wood-light), var(--wood-dark));
  border-radius: 8px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.2), inset 0 -3px 0 rgba(0,0,0,0.25), 0 4px 12px var(--shadow);
  padding: 1.2rem 1.5rem;
  color: #f5e6c8;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}

/* Page container */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

h1 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  color: #f5e6c8; /* cream text on wood bar */
  text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}

.subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.game-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid rgba(74, 55, 40, 0.08);
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px var(--shadow);
}

.game-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  line-height: 1;
}

.game-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.game-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer {
  text-align: center;
  margin-top: 4rem;
  padding-bottom: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Mobile-first adjustments */
@media (max-width: 480px) {
  .container { padding: 1.5rem 1rem; }
  .game-grid { grid-template-columns: 1fr; gap: 1rem; }
  .game-card { padding: 1.5rem 1rem; }
  h1 { margin-bottom: 0.25rem; }
}
