/* ==========================================================
   サイト全体の共通スタイル（白基調・テック/AIテイスト）
   ========================================================== */

:root {
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-surface-hover: #fbfbff;
  --color-border: #e4e8f1;
  --color-text: #14161f;
  --color-text-muted: #666f80;
  --color-accent: #4356e8;
  --color-accent-2: #06b6d4;
  --color-accent-soft: #eef1ff;
  --radius: 14px;
  --max-width: 1100px;
  --font-body: "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Inter", "Noto Sans JP", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  background-image:
    radial-gradient(circle, rgba(20, 22, 31, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 12% 15%, rgba(67, 86, 232, 0.09), transparent 42%),
    radial-gradient(circle at 88% 10%, rgba(6, 182, 212, 0.09), transparent 42%),
    radial-gradient(circle at 50% 100%, rgba(124, 58, 237, 0.06), transparent 45%);
  background-size: 26px 26px, auto, auto, auto;
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---- ヘッダー / ロゴ / 言語切替 ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.lang-toggle {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}

.lang-btn {
  background: none;
  border: none;
  padding: 7px 14px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-btn.active {
  background: var(--color-accent);
  color: #ffffff;
}

.lang-btn:not(.active):hover {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.tagline {
  max-width: var(--max-width);
  margin: 10px auto 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 16px 40px;
}

/* ---- ゲーム一覧（トップページ） ---- */

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

.game-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(20, 22, 31, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-accent);
  box-shadow: 0 14px 28px rgba(67, 86, 232, 0.14);
}

.game-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: var(--color-accent-soft);
}

.game-card-body {
  padding: 12px 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.game-card-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.game-card h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.game-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  flex: 1;
}

.empty-state,
.error-state {
  text-align: center;
  color: var(--color-text-muted);
  padding: 60px 20px;
}

/* ---- ゲーム個別ページ ---- */

.play-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.back-link {
  align-self: flex-start;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.back-link:hover {
  color: var(--color-accent-2);
}

.play-header h1 {
  margin: 0;
  font-size: 1.4rem;
}

.play-header p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.game-frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 80vh;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.game-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* 広告枠プレースホルダー（AdSense導入時にここへ差し替え） */
.ad-slot {
  margin-top: 20px;
  padding: 16px;
  text-align: center;
  color: var(--color-text-muted);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  font-size: 0.8rem;
}

/* ---- フッター ---- */

.site-footer {
  max-width: var(--max-width);
  margin: 20px auto 0;
  padding: 20px 16px 32px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--color-border);
}

.footer-links {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--color-accent);
}

/* ---- 長文ページ（プライバシーポリシー・利用規約など） ---- */

.legal-content {
  max-width: 760px;
  margin: 0 auto;
}

.legal-content h1 {
  font-size: 1.7rem;
  margin-bottom: 4px;
}

.legal-content .updated {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-bottom: 28px;
}

.legal-content h2 {
  font-size: 1.15rem;
  margin: 28px 0 8px;
}

.legal-content p,
.legal-content li {
  color: var(--color-text);
  font-size: 0.95rem;
  margin: 0 0 12px;
}

.legal-content a {
  color: var(--color-accent);
  text-decoration: underline;
}

@media (max-width: 480px) {
  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }

  .logo-text {
    font-size: 1.05rem;
  }
}
