/* =====================================================================
 * 共通スタイル (shared/style.css)
 * ランチャー・各ゲーム共通の見た目をまとめています。
 * ===================================================================== */

:root {
  --bg: #0e1116;
  --bg-soft: #161b22;
  --card: #1c2230;
  --card-hover: #232b3d;
  --border: #2a3242;
  --text: #e6edf3;
  --text-dim: #9aa7b8;
  --accent: #4f8cff;
  --accent-2: #ff5d8f;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- 共通ボタン ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--card-hover); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }

/* =====================================================================
 * ランチャー (index.html)
 * ===================================================================== */
.launcher {
  max-width: 980px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.launcher header { margin-bottom: 32px; }
.launcher h1 {
  margin: 0 0 6px;
  font-size: 32px;
  letter-spacing: .02em;
}
.launcher .subtitle { color: var(--text-dim); font-size: 15px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .12s, background .15s, border-color .15s;
}
.card:hover {
  transform: translateY(-4px);
  background: var(--card-hover);
  border-color: var(--accent);
  text-decoration: none;
}
.card .thumb {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  background: linear-gradient(135deg, #243049, #161b22);
}
.card .body { padding: 14px 16px 18px; }
.card .title { font-size: 17px; font-weight: 600; margin: 0 0 4px; }
.card .desc { font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.card .tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.card .tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(79, 140, 255, .12);
  color: var(--accent);
}

.empty {
  margin-top: 40px;
  padding: 40px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
}

/* =====================================================================
 * ゲーム画面共通レイアウト
 * ===================================================================== */
.game-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px;
}
.game-topbar {
  width: 100%;
  max-width: 640px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.game-topbar h1 { font-size: 18px; margin: 0; }
#game canvas {
  display: block;
  border-radius: 10px;
  box-shadow: var(--shadow);
  background: #000;
  touch-action: none;
  max-width: 100%;
  height: auto;
}
.game-hint { color: var(--text-dim); font-size: 13px; text-align: center; }
