/* ===== リセット & ベース ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue-light: #60a5fa;
  --blue-mid:   #3b82f6;
  --blue-dark:  #1d4ed8;
  --pink-light: #f9a8d4;
  --pink-mid:   #ec4899;
  --pink-dark:  #be185d;
  --bg-dark:    #0a0a1a;
  --bg-card:    rgba(255,255,255,0.05);
  --text-white: #f1f5f9;
  --text-muted: #94a3b8;
  --radius:     1.2rem;
  --shadow:     0 8px 40px rgba(0,0,0,0.4);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'M PLUS Rounded 1c', 'Zen Maru Gothic', sans-serif;
  background: var(--bg-dark);
  color: var(--text-white);
  overflow-x: hidden;
  line-height: 1.7;
}

/* ===== 背景キャンバス ===== */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ===== ヘッダー ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0.9rem 2rem;
  background: rgba(10, 10, 26, 0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.logo-icon { font-size: 1.5rem; }

.logo-accent {
  color: var(--blue-light);
  text-shadow: 0 0 14px rgba(96,165,250,0.7);
}

.header-nav {
  display: flex;
  gap: 1.8rem;
}

.header-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  transition: color 0.2s;
}

.header-nav a:hover { color: var(--text-white); }

/* ===== ヒーロー ===== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(59,130,246,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 70%, rgba(236,72,153,0.12) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 1.1rem;
  background: rgba(59,130,246,0.2);
  border: 1px solid rgba(96,165,250,0.4);
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--blue-light);
  margin-bottom: 1.4rem;
  letter-spacing: 0.05em;
  animation: fadeInDown 0.7s ease both;
}

.hero-title {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1.2rem;
  min-height: 1.3em;
  animation: fadeInDown 0.7s 0.1s ease both;
}

.cursor-blink {
  color: var(--blue-light);
  animation: blink 0.8s step-end infinite;
  font-weight: 300;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-muted);
  margin-bottom: 2.4rem;
  animation: fadeInDown 0.7s 0.2s ease both;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2.2rem;
  background: linear-gradient(135deg, var(--blue-mid), var(--blue-dark));
  color: #fff;
  text-decoration: none;
  border-radius: 99px;
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: 0 4px 24px rgba(59,130,246,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: fadeInDown 0.7s 0.3s ease both;
}

.hero-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 32px rgba(59,130,246,0.6);
}

/* 浮かぶキーアニメーション */
.hero-deco { pointer-events: none; }

.floating-key {
  position: absolute;
  left: var(--x);
  top: var(--y);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 0.5rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(255,255,255,0.3);
  animation: floatKey 4s var(--delay) ease-in-out infinite;
  backdrop-filter: blur(4px);
}

@keyframes floatKey {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%       { transform: translateY(-18px) rotate(3deg); }
}

/* ===== セクション共通 ===== */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  margin-bottom: 0.6rem;
}

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

/* ===== ゲーム一覧 ===== */
.games-section {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.2rem;
}

/* ゲームカード */
.game-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.game-card:hover {
  transform: translateY(-8px) scale(1.01);
}

.card-glow {
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius) + 2px);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 0;
}

.glow-blue  { background: linear-gradient(135deg, var(--blue-mid), transparent); box-shadow: 0 0 40px rgba(59,130,246,0.5); }
.glow-pink  { background: linear-gradient(135deg, var(--pink-mid), transparent); box-shadow: 0 0 40px rgba(236,72,153,0.5); }

.game-card:hover .card-glow { opacity: 1; }

.card-inner {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.game-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.icon-blue { background: linear-gradient(135deg, rgba(59,130,246,0.3), rgba(29,78,216,0.3)); border: 1px solid rgba(96,165,250,0.3); }
.icon-pink { background: linear-gradient(135deg, rgba(236,72,153,0.3), rgba(190,24,93,0.3)); border: 1px solid rgba(249,168,212,0.3); }

.game-badge {
  padding: 0.25rem 0.85rem;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.badge-blue { background: rgba(59,130,246,0.25); color: var(--blue-light); border: 1px solid rgba(96,165,250,0.4); }
.badge-pink { background: rgba(236,72,153,0.25); color: var(--pink-light); border: 1px solid rgba(249,168,212,0.4); }

.card-body { flex: 1; }

.game-title {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 0.6rem;
}

.game-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.1rem;
  line-height: 1.8;
}

.game-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.game-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

#card-taiping  .game-features li i { color: var(--blue-light); }
#card-mojipati .game-features li i { color: var(--pink-light); }

/* プレイボタン */
.play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  border-radius: 99px;
  font-size: 1rem;
  font-weight: 900;
  text-decoration: none;
  color: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-blue {
  background: linear-gradient(135deg, var(--blue-mid), var(--blue-dark));
  box-shadow: 0 4px 20px rgba(59,130,246,0.35);
}

.btn-pink {
  background: linear-gradient(135deg, var(--pink-mid), var(--pink-dark));
  box-shadow: 0 4px 20px rgba(236,72,153,0.35);
}

.play-btn:hover {
  transform: translateY(-2px) scale(1.03);
}

.btn-blue:hover  { box-shadow: 0 8px 30px rgba(59,130,246,0.6); }
.btn-pink:hover  { box-shadow: 0 8px 30px rgba(236,72,153,0.6); }

.btn-arrow {
  margin-left: auto;
  transition: transform 0.2s;
}

.play-btn:hover .btn-arrow { transform: translateX(4px); }

/* ===== 特徴セクション ===== */
.features-section {
  position: relative;
  z-index: 1;
  padding: 5rem 2rem 6rem;
  background: rgba(255,255,255,0.02);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.features-section .section-header { margin-bottom: 2.5rem; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.8rem;
  max-width: 1000px;
  margin: 0 auto;
}

.feature-item {
  text-align: center;
  padding: 2rem 1.4rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  transition: transform 0.25s, background 0.25s;
}

.feature-item:hover {
  transform: translateY(-5px);
  background: rgba(255,255,255,0.07);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
  display: block;
}

.feature-item h3 {
  font-size: 1.05rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
}

.feature-item p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ===== フッター ===== */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 3rem 2rem;
  text-align: center;
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.footer-logo {
  font-size: 1.15rem;
  font-weight: 900;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.88rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

.divider { color: rgba(255,255,255,0.2); }

/* ===== アニメーション ===== */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== レスポンシブ ===== */
@media (max-width: 640px) {
  .header-nav { display: none; }
  .hero { padding: 5rem 1.2rem 3rem; }
  .games-section { padding: 4rem 1.2rem; }
  .features-section { padding: 4rem 1.2rem 5rem; }
  .games-grid { grid-template-columns: 1fr; }
  .floating-key { display: none; }
}
