/* ==================== */
/*  MuscleLove Games    */
/*  Portal – style.css  */
/* ==================== */

:root {
  --bg: #0d0d14;
  --surface: #16162a;
  --pink: #ff2d8a;
  --cyan: #00e5ff;
  --pink-glow: rgba(255, 45, 138, .45);
  --cyan-glow: rgba(0, 229, 255, .35);
  --text: #eee;
  --text-muted: #aaa;
  --radius: 14px;
}

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

body {
  font-family: 'Segoe UI', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ---- Floating particles ---- */
.bg-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  bottom: -40px;
  animation: floatUp linear infinite;
}

@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-110vh) rotate(360deg); }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 60px 20px 36px;
}

.hero-title {
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--pink), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  line-height: 1.3;
}

.hero-title .emoji {
  -webkit-text-fill-color: initial;
}

.hero-subtitle {
  margin-top: 12px;
  font-size: clamp(1rem, 3vw, 1.3rem);
  color: var(--text-muted);
  letter-spacing: 1px;
}

.hero-subtitle-en {
  margin-top: 4px;
  font-size: clamp(.78rem, 2.2vw, 1rem);
  color: #777;
  letter-spacing: .5px;
  font-style: italic;
}

/* ---- Games Section ---- */
.games-section {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px 60px;
}

.games-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

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

/* ---- Game Card ---- */
.game-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .25s, box-shadow .3s;
}

.game-card:hover,
.game-card:focus-visible {
  transform: translateY(-6px) scale(1.02);
  box-shadow:
    0 0 20px var(--pink-glow),
    0 0 40px var(--cyan-glow);
  outline: none;
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.game-card:hover .card-image img {
  transform: scale(1.08);
}

.card-body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
}

.card-genre {
  display: inline-block;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--cyan);
  border: 1px solid var(--cyan);
  border-radius: 4px;
  padding: 2px 8px;
  width: fit-content;
}

.card-desc {
  font-size: .92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 4px;
  flex: 1;
}

.card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 10px 0;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--pink), #c2185b);
  color: #fff;
  transition: background .3s, box-shadow .3s;
}

.game-card:hover .card-btn {
  background: linear-gradient(135deg, #ff4da6, var(--pink));
  box-shadow: 0 0 16px var(--pink-glow);
}

/* ---- Footer ---- */
.footer {
  position: relative;
  z-index: 1;
  background: rgba(0,0,0,.5);
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 40px 20px;
  text-align: center;
}

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

.patreon-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  background: linear-gradient(135deg, #ff424d, #e8430a);
  color: #fff;
  text-decoration: none;
  transition: transform .2s, box-shadow .3s;
}

.patreon-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 24px rgba(255, 66, 77, .5);
}

.patreon-icon {
  flex-shrink: 0;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-hashtag {
  font-size: .95rem;
  color: var(--cyan);
  font-weight: 600;
}

.twitter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 50px;
  background: #1d1d1d;
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  transition: background .2s, border-color .2s;
}

.twitter-btn:hover {
  background: #2a2a2a;
  border-color: rgba(255,255,255,.25);
}

.footer-copy {
  font-size: .78rem;
  color: #555;
}

/* ---- Bilingual English sub-text ---- */
.card-desc-en {
  display: block;
  margin-top: 4px;
  font-size: .8rem;
  color: #777;
  font-style: italic;
  line-height: 1.4;
}

.btn-en {
  font-size: .8em;
  color: rgba(255, 255, 255, .65);
  font-weight: 500;
}

/* ==================================================== */
/*  B-1: Genre-based card accents                       */
/* ==================================================== */
/* base: every card has its own border-top accent       */
.game-card {
  border-top: 4px solid rgba(255,255,255,.08);
  position: relative;
}

/* Puzzle (Match-3 / Slide / 2048 / Sokoban / Maze / Bubble) */
.game-card.cat-puzzle { border-top-color: #38BDF8; }
.game-card.cat-puzzle .card-genre { color: #38BDF8; border-color: #38BDF8; }
.game-card.cat-puzzle:hover {
  border-top-color: #7DD3FC;
  box-shadow: 0 0 18px rgba(56,189,248,.35), 0 0 36px rgba(56,189,248,.18);
}

/* Action (Tower Stack / Reaction / Catch / Whack / Darts / Pong / Snake / Breakout / Tetris / Pinball / Invaders) */
.game-card.cat-action { border-top-color: #FB923C; }
.game-card.cat-action .card-genre { color: #FB923C; border-color: #FB923C; }
.game-card.cat-action:hover {
  border-top-color: #FDBA74;
  box-shadow: 0 0 18px rgba(251,146,60,.35), 0 0 36px rgba(251,146,60,.18);
}

/* Quiz (Quiz / Typing / Hangman / Wordle / Spot Diff / Memory / Simon / Tsum) */
.game-card.cat-quiz { border-top-color: #FACC15; }
.game-card.cat-quiz .card-genre { color: #FACC15; border-color: #FACC15; }
.game-card.cat-quiz:hover {
  border-top-color: #FDE047;
  box-shadow: 0 0 18px rgba(250,204,21,.35), 0 0 36px rgba(250,204,21,.18);
}

/* Fortune (Gacha / Roulette / Slots / Fortune / Personality / Daily / Tier List / Before-After / VS / Flick / Calendar / Omikuji / Shindan / Rhythm) */
.game-card.cat-fortune { border-top-color: #C084FC; }
.game-card.cat-fortune .card-genre { color: #C084FC; border-color: #C084FC; }
.game-card.cat-fortune:hover {
  border-top-color: #D8B4FE;
  box-shadow: 0 0 18px rgba(192,132,252,.35), 0 0 36px rgba(192,132,252,.18);
}

/* RPG (Roguelike RPG / Tower Defense / Battle / Othello / Minesweeper / Connect4) */
.game-card.cat-rpg { border-top-color: #F87171; }
.game-card.cat-rpg .card-genre { color: #F87171; border-color: #F87171; }
.game-card.cat-rpg:hover {
  border-top-color: #FCA5A5;
  box-shadow: 0 0 18px rgba(248,113,113,.35), 0 0 36px rgba(248,113,113,.18);
}

/* 3D (FPS 3D / Action 3D / Endless Runner 3D / 3D Tetris) — flagship */
.game-card.cat-3d { border-top-color: #FF2D3A; border-top-width: 5px; }
.game-card.cat-3d .card-genre { color: #FF2D3A; border-color: #FF2D3A; }
.game-card.cat-3d {
  box-shadow: 0 0 14px rgba(255,45,58,.18);
}
.game-card.cat-3d:hover {
  transform: translateY(-8px) scale(1.05);
  border-top-color: #FF6B73;
  box-shadow:
    0 0 24px rgba(255,45,58,.55),
    0 0 48px rgba(255,45,58,.30),
    0 0 80px rgba(242,201,76,.18);
}

/* Other (default fallback) */
.game-card.cat-other { border-top-color: #94A3B8; }
.game-card.cat-other .card-genre { color: #94A3B8; border-color: #94A3B8; }
.game-card.cat-other:hover {
  border-top-color: #CBD5E1;
  box-shadow: 0 0 18px rgba(148,163,184,.30);
}

/* common card transition tuning */
.game-card { transition: transform .3s ease, box-shadow .3s ease, border-top-color .3s ease; }

/* ==================================================== */
/*  B-2: NEW 3D ribbon                                  */
/* ==================================================== */
.game-card.is-new-3d { overflow: hidden; }

.ribbon-new-3d {
  position: absolute;
  top: 14px;
  right: -42px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #F2C94C, #E0A800);
  color: #1a1a1a;
  font-weight: 900;
  font-size: .72rem;
  letter-spacing: 1.5px;
  padding: 5px 50px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.55), 0 0 12px rgba(242,201,76,.45);
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
  z-index: 5;
  pointer-events: none;
  border-top: 1px solid rgba(255,255,255,.45);
  border-bottom: 1px solid rgba(0,0,0,.25);
}

/* ==================================================== */
/*  B-3: 3D featured hero section                       */
/* ==================================================== */
.featured-3d {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 16px auto 36px;
  padding: 32px 20px 36px;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at top left, rgba(255,45,58,.18), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(242,201,76,.14), transparent 60%),
    linear-gradient(135deg, #1a0a0e 0%, #20141a 50%, #1a0e08 100%);
  border: 1px solid rgba(242,201,76,.22);
  box-shadow: 0 0 30px rgba(255,45,58,.18), inset 0 0 40px rgba(0,0,0,.5);
}

.featured-title {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 900;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 22px;
  background: linear-gradient(135deg, #FF2D3A 0%, #F2C94C 60%, #FF2D3A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(255,45,58,.35);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.featured-badge {
  display: inline-block;
  font-size: .72rem;
  letter-spacing: 1.5px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 50px;
  background: linear-gradient(135deg, #F2C94C, #E0A800);
  color: #1a1a1a;
  -webkit-text-fill-color: #1a1a1a;
  box-shadow: 0 0 16px rgba(242,201,76,.55);
  text-shadow: none;
}

.featured-grid {
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
}

.featured-grid .game-card {
  flex: 1 1 300px;
  max-width: 340px;
  border-top-width: 5px;
  background: linear-gradient(180deg, #1c1014 0%, #16162a 100%);
  box-shadow: 0 0 18px rgba(255,45,58,.25), 0 0 36px rgba(242,201,76,.10);
}

.featured-grid .game-card .card-image {
  aspect-ratio: 16 / 11;
}

.featured-grid .game-card .card-image img {
  transition: transform .5s ease;
}

.featured-grid .game-card:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow:
    0 0 28px rgba(255,45,58,.65),
    0 0 56px rgba(255,45,58,.35),
    0 0 90px rgba(242,201,76,.25);
  border-color: rgba(242,201,76,.6);
}

.featured-grid .game-card:hover .card-image img {
  transform: scale(1.12);
}

.featured-grid .game-card .card-title {
  font-size: 1.45rem;
}

/* mobile: featured grid stacks vertically */
@media (max-width: 640px) {
  .featured-grid {
    flex-direction: column;
    align-items: center;
  }
  .featured-grid .game-card {
    width: 100%;
    max-width: 480px;
    flex: 1 1 auto;
  }
  .featured-3d {
    margin: 8px 12px 28px;
    padding: 24px 14px 28px;
  }
}
