/* ==========================================================================
   Games hub (list / single player / homepage grid)
   Plain CSS so it does not depend on a Tailwind rebuild.
   ========================================================================== */

.gz-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.gz-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #60a5fa;
}

/* ---------- Hero ---------- */

.gz-hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 1.75rem 1.5rem;
  margin: 0.5rem 0 1.25rem;
  color: #f8fafc;
  background:
    radial-gradient(900px 320px at 8% -20%, rgba(59, 130, 246, 0.55), transparent 60%),
    radial-gradient(700px 320px at 100% 0%, rgba(14, 165, 233, 0.35), transparent 55%),
    linear-gradient(135deg, #0b1220 0%, #111c33 55%, #0b1220 100%);
  box-shadow: 0 18px 40px -24px rgba(15, 23, 42, 0.65);
}

.gz-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 70% 10%, #000 0%, transparent 70%);
  pointer-events: none;
}

.gz-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 46rem;
}

.gz-hero h1 {
  margin: 0.35rem 0 0.5rem;
  font-family: "M PLUS Rounded 1c", "Noto Sans JP", system-ui, sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.25;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.01em;
}

.gz-hero p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #cbd5e1;
}

.gz-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}

.gz-hero-stats li {
  font-size: 0.8rem;
  color: #cbd5e1;
}

.gz-hero-stats strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.2;
  color: #fff;
}

/* ---------- Toolbar / filters ---------- */

.gz-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.gz-search {
  position: relative;
  flex: 1 1 260px;
  min-width: 0;
}

.gz-search svg {
  position: absolute;
  top: 50%;
  left: 0.85rem;
  width: 1.05rem;
  height: 1.05rem;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.gz-search input {
  width: 100%;
  padding: 0.7rem 0.9rem 0.7rem 2.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  font-size: 0.9rem;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gz-search input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.gz-sort {
  padding: 0.62rem 2rem 0.62rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.7rem center / 1rem;
  appearance: none;
  font-size: 0.85rem;
  color: #334155;
  cursor: pointer;
}

.gz-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.gz-chip {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.gz-chip:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.gz-chip.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  box-shadow: 0 6px 14px -8px rgba(37, 99, 235, 0.9);
}

.gz-chip-fav.is-active {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #1f2937;
}

.gz-result-count {
  margin-left: auto;
  font-size: 0.8rem;
  color: #64748b;
  white-space: nowrap;
}

.gz-result-count strong {
  color: #0f172a;
  font-size: 1rem;
}

/* ---------- Cards ---------- */

.gz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.9rem;
}

@media (min-width: 640px) {
  .gz-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.1rem;
  }
}

.gz-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e8edf4;
  box-shadow: 0 2px 6px -3px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.gz-card:hover {
  transform: translateY(-3px);
  border-color: #bfdbfe;
  box-shadow: 0 18px 30px -20px rgba(37, 99, 235, 0.55);
}

.gz-card-media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.gz-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.gz-card:hover .gz-card-media img {
  transform: scale(1.06);
  opacity: 0.86;
}

.gz-cover-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.55), transparent 60%),
    linear-gradient(140deg, #111c33, #0b1220);
  color: rgba(248, 250, 252, 0.9);
  font-size: 2.4rem;
}

.gz-card-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  max-width: calc(100% - 3rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}

.gz-card-play {
  position: absolute;
  left: 50%;
  bottom: 0.7rem;
  transform: translate(-50%, 0.6rem);
  opacity: 0;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: #facc15;
  color: #1f2937;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.65);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.gz-card:hover .gz-card-play,
.gz-card:focus-within .gz-card-play {
  opacity: 1;
  transform: translate(-50%, 0);
}

.gz-card-body {
  padding: 0.6rem 0.7rem 0.7rem;
}

.gz-card-title {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  font-weight: 700;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gz-card-title a {
  color: inherit;
  text-decoration: none;
}

.gz-card-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.gz-card-meta {
  margin: 0.3rem 0 0;
  font-size: 0.72rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.gz-card-meta::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: #22c55e;
  flex: none;
}

.gz-fav {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.gz-fav:hover {
  background: rgba(15, 23, 42, 0.7);
  transform: scale(1.08);
}

.gz-card.is-fav .gz-fav {
  background: #facc15;
  color: #78350f;
}

.gz-card.is-hidden {
  display: none;
}

.gz-fav.is-pop,
[data-gz-fav].is-pop {
  animation: gz-pop 0.26s ease;
}

@keyframes gz-pop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.22);
  }
  100% {
    transform: scale(1);
  }
}

.gz-empty {
  display: none;
  padding: 3rem 1rem;
  text-align: center;
  color: #64748b;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  grid-column: 1 / -1;
}

.gz-empty.is-visible {
  display: block;
}

/* ---------- Homepage section ---------- */

.gz-home {
  margin: 0.5rem 0 1.5rem;
  padding: 1.25rem;
  border-radius: 22px;
  background:
    radial-gradient(700px 240px at 100% 0%, rgba(59, 130, 246, 0.12), transparent 60%),
    #ffffff;
  border: 1px solid #e8edf4;
  box-shadow: 0 12px 30px -26px rgba(15, 23, 42, 0.5);
}

.gz-home-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1rem;
}

.gz-home-head h2 {
  margin: 0.15rem 0 0.25rem;
  font-family: "M PLUS Rounded 1c", "Noto Sans JP", system-ui, sans-serif;
  font-size: clamp(1.25rem, 2.6vw, 1.65rem);
  font-weight: 800;
  color: #0f172a;
}

.gz-home-head p {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.7;
}

.gz-home .gz-grid {
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .gz-home .gz-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }
}

.gz-home .gz-card-body {
  padding: 0.5rem 0.6rem 0.6rem;
}

.gz-home .gz-card-title {
  font-size: 0.8rem;
}

/* ---------- Buttons ---------- */

.gz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.gz-btn:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.gz-btn:active {
  transform: translateY(1px);
}

.gz-btn-primary {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 10px 22px -14px rgba(37, 99, 235, 0.95);
}

.gz-btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.gz-btn-dark {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
}

.gz-btn-dark:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(148, 163, 184, 0.6);
  color: #fff;
}

.gz-btn-icon {
  width: 2.45rem;
  height: 2.45rem;
  padding: 0;
  font-size: 1rem;
}

/* ---------- Player page ---------- */

.gz-player-shell {
  margin: 0 0 1.5rem;
}

.gz-player-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.6rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f172a, #16233c);
  color: #e2e8f0;
}

.gz-player-bar .gz-player-heading {
  min-width: 0;
  flex: 1 1 auto;
}

.gz-player-bar .gz-eyebrow {
  font-size: 0.6rem;
  color: #7dd3fc;
}

.gz-player-title {
  margin: 0;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gz-player-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: none;
}

.gz-player-actions .gz-btn {
  padding: 0.5rem 0.75rem;
}

.gz-player-actions .gz-action-label {
  display: none;
}

@media (min-width: 900px) {
  .gz-player-actions .gz-action-label {
    display: inline;
  }
  .gz-player-actions .gz-btn {
    padding: 0.55rem 0.9rem;
  }
}

.gz-player-actions .gz-btn.is-fav {
  border-color: #facc15;
  background: #facc15;
  color: #78350f;
}

.gz-stage-wrap {
  position: relative;
}

.gz-stage {
  position: relative;
  height: clamp(420px, calc(100dvh - 250px), 920px);
  border-radius: 18px;
  overflow: hidden;
  background: #0b1220;
  border: 1px solid #1e293b;
  box-shadow: 0 24px 50px -32px rgba(15, 23, 42, 0.9);
  overscroll-behavior: contain;
}

.gz-stage iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0b1220;
}

.gz-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  background:
    radial-gradient(circle at 50% 40%, rgba(59, 130, 246, 0.16), transparent 60%),
    #0b1220;
  color: #cbd5e1;
  font-size: 0.85rem;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  z-index: 2;
}

.gz-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.gz-loader-fallback {
  font-size: 0.75rem;
  color: #94a3b8;
}

.gz-loader-fallback a {
  color: #7dd3fc;
  text-decoration: underline;
}

.gz-spinner {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 3px solid rgba(148, 163, 184, 0.25);
  border-top-color: #38bdf8;
  animation: gz-spin 0.9s linear infinite;
}

@keyframes gz-spin {
  to {
    transform: rotate(360deg);
  }
}

.gz-stage-hint {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin: 0.55rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
}

.gz-stage-hint svg {
  flex: none;
  width: 0.95rem;
  height: 0.95rem;
  color: #94a3b8;
}

.gz-game-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.gz-game-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 48%;
  padding: 0.5rem 0.8rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.gz-game-nav a:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

/* Immersive / focus mode (also used as fullscreen fallback) */

body.gz-immersive-lock {
  overflow: hidden;
}

.gz-player-shell.is-immersive {
  position: fixed;
  inset: 0;
  z-index: 9999;
  margin: 0;
  padding: 0.5rem;
  background: #070c15;
  overflow: hidden;
}

.gz-player-shell.is-immersive .gz-player-bar {
  margin-bottom: 0.5rem;
  background: #0f172a;
}

.gz-player-shell.is-immersive .gz-stage {
  height: calc(100dvh - 5.5rem);
  border-radius: 14px;
}

.gz-player-shell.is-immersive .gz-details,
.gz-player-shell.is-immersive .gz-stage-hint,
.gz-player-shell.is-immersive .gz-game-nav,
.gz-player-shell.is-immersive .gz-related {
  display: none;
}

.gz-stage:fullscreen {
  height: 100vh;
  border-radius: 0;
  border: 0;
}

.gz-stage:fullscreen iframe {
  height: 100vh;
}

/* ---------- Game details ---------- */

.gz-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

@media (min-width: 900px) {
  .gz-details {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }
}

.gz-panel {
  padding: 1.1rem 1.2rem;
  border-radius: 16px;
  border: 1px solid #e8edf4;
  background: #fff;
}

.gz-panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.gz-panel p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.8;
  color: #475569;
}

.gz-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.9rem;
  padding: 0;
  list-style: none;
}

.gz-tag {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}

.gz-tag:hover {
  background: #dbeafe;
  color: #1e40af;
}

.gz-tag.gz-tag-muted {
  background: #f1f5f9;
  color: #475569;
}

.gz-article #page-content {
  margin-top: 0;
}

.gz-article #page-content > :first-child {
  margin-top: 0;
}

.gz-info-list {
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.gz-info-list div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  border-bottom: 1px dashed #e2e8f0;
  padding-bottom: 0.5rem;
}

.gz-info-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.gz-info-list dt {
  color: #64748b;
  flex: none;
}

.gz-info-list dd {
  margin: 0;
  color: #0f172a;
  font-weight: 700;
  text-align: right;
}

.gz-side-card + .gz-side-card {
  margin-top: 0.75rem;
}

.gz-side-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.75;
}

.gz-kbd {
  display: inline-block;
  padding: 0.05rem 0.4rem;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  border-bottom-width: 2px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Related games */

.gz-related {
  margin-top: 1.5rem;
}

.gz-related-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.gz-related-head h2 {
  margin: 0;
  font-family: "M PLUS Rounded 1c", "Noto Sans JP", system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

/* Mobile tuning */

@media (max-width: 640px) {
  .gz-hero {
    border-radius: 16px;
    padding: 1.25rem 1.1rem;
    margin-top: 0;
  }

  .gz-player-bar {
    flex-wrap: wrap;
    gap: 0.5rem;
    border-radius: 14px;
  }

  .gz-player-bar > .gz-btn {
    padding: 0.45rem 0.7rem;
    font-size: 0.75rem;
  }

  .gz-player-title {
    white-space: normal;
    font-size: 0.95rem;
  }

  .gz-player-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .gz-stage {
    height: calc(100dvh - 235px);
    min-height: 360px;
    border-radius: 14px;
  }

  .gz-result-count {
    margin-left: 0;
  }

  .gz-toolbar {
    gap: 0.5rem;
  }

  .gz-sort {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gz-card,
  .gz-card-media img,
  .gz-card-play,
  .gz-fav,
  .gz-btn,
  .gz-chip {
    transition: none !important;
  }
  .gz-spinner {
    animation-duration: 2.5s;
  }
}
