/*
 * Professional gameplay preview treatment for Habit Pause Free Games.
 * Renders full, recognizable 16:10 / 16:9 gameplay illustrations without
 * artificial squircle badge clipping, fake scanlines, or distracting tilts.
 */

.game-art {
  --game-icon-a: var(--icon-a, var(--accent, #8af0cb));
  --game-icon-b: var(--icon-b, var(--accent-2, #9b8cff));
  --game-icon-ink: var(--icon-ink, #081524);
  --game-icon-paper: var(--icon-paper, #f7fbff);
  --game-icon-glow: var(--icon-glow, rgba(138, 240, 203, 0.42));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 0.75rem 0.75rem 0 0;
  background: #091322;
  isolation: isolate;
}

html[data-theme="light"] .game-art {
  --game-icon-scene: #edf4fa;
  --game-icon-border: rgba(10, 30, 51, 0.15);
  background: #edf2f7;
}

.game-art::before,
.game-art::after,
.site-shell .game-art::before,
.site-shell .game-art::after {
  display: none !important;
}

.game-art .game-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-inline-size: 100%;
  max-block-size: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  overflow: hidden;
}

.game-art .game-icon::before,
.game-art .game-icon::after {
  display: none !important;
}

.game-art .game-icon-svg {
  display: block;
  width: 100%;
  height: 100%;
  inline-size: 100%;
  block-size: 100%;
  max-inline-size: 100%;
  max-block-size: 100%;
  overflow: visible;
  color: var(--game-icon-ink);
  fill: currentColor;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: none;
  transform: none;
  transform-origin: center;
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.game-art .game-icon-svg :where(path, circle, ellipse, rect, polygon, polyline, line) {
  vector-effect: non-scaling-stroke;
}

/* Hover and focus transitions: subtle scale without clipping */
.game-tile:is(:hover, :focus-within) .game-art .game-icon-svg,
.hero-card:is(:hover, :focus-within) .hero-art .game-icon-svg,
.recent-card:is(:hover, :focus-visible) .game-icon-svg,
.favorite-card:is(:hover, :focus-visible) .game-icon-svg {
  transform: scale(1.03);
}

/* Hero featured spotlight preview */
.hero-art {
  width: 100%;
  min-height: unset;
  aspect-ratio: 16 / 9;
  max-height: 380px;
  border-radius: 0.85rem;
  overflow: hidden;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

html[data-theme="light"] .hero-art {
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

/* Modal detail preview */
.modal-art {
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 280px;
  border-radius: 0.85rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mini thumbnail previews in Recent & Shelf lists */
.mini-art {
  width: 68px;
  height: 48px;
  min-width: 68px;
  aspect-ratio: 68 / 48;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

html[data-theme="light"] .mini-art {
  border-color: rgba(0, 0, 0, 0.1);
}

.mini-art .game-icon-svg {
  width: 100%;
  height: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .game-art .game-icon-svg {
    transition: none !important;
    transform: none !important;
  }
}
