/* =========================================================
   Games · slot tiles & game showcase
   ========================================================= */

.games-section {
  background:
    radial-gradient(circle at 10% 10%, rgba(184, 35, 58, 0.05), transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(245, 185, 66, 0.06), transparent 40%),
    #fff;
}

.games-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  margin-bottom: 28px;
}

.games-tab {
  padding: 8px 18px;
  background: transparent;
  border: none;
  border-radius: var(--r-pill);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.games-tab:hover { color: var(--text); }

.games-tab.is-active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(184, 35, 58, 0.3);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

@media (max-width: 1100px) { .games-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 720px)  { .games-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px)  { .games-grid { grid-template-columns: repeat(2, 1fr); } }

.game-tile {
  position: relative;
  background: var(--bg-dark);
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.25s ease, outline-color 0.18s ease;
  border: 1px solid rgba(255, 255, 255, 0.04);
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.game-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(245, 185, 66, 0.4);
  outline-color: var(--accent-gold);
}

.game-tile:active {
  transform: translateY(-2px) scale(0.985);
}

/* Subtle shimmer band on hover */
.game-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.7s ease;
  pointer-events: none;
  z-index: 4;
}
.game-tile:hover::after { transform: translateX(100%); }

.game-tile.is-filtering-out {
  opacity: 0.18;
  filter: grayscale(0.8);
  pointer-events: none;
}

.game-tile__art {
  position: absolute;
  inset: 0;
  display: block;
  transition: transform 0.4s ease;
}

.game-tile:hover .game-tile__art {
  transform: scale(1.06);
}

.game-tile__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
  z-index: 2;
}

.game-tile__badge--hot { background: var(--accent-red); color: #fff; }
.game-tile__badge--new { background: var(--accent-green); color: #fff; }
.game-tile__badge--top { background: var(--accent-gold); color: #2a1d00; }
.game-tile__badge--jp  { background: linear-gradient(135deg, #ffd84a, #f5b942); color: #2a1d00; }

.game-tile__rtp {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 7px;
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  z-index: 2;
}

.game-tile__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.9) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  z-index: 1;
}

.game-tile__name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.game-tile__provider {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
}

.game-tile__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: grid; place-items: center;
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease, background 0.18s ease;
  z-index: 3;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(245, 185, 66, 0.5);
  animation: none;
}

.game-tile__play svg { width: 22px; height: 22px; color: var(--primary); margin-left: 3px; }

.game-tile:hover .game-tile__play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  animation: playPulse 1.6s ease-out infinite;
}

@keyframes playPulse {
  0%   { box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 0 0 rgba(245, 185, 66, 0.55); }
  70%  { box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 0 18px rgba(245, 185, 66, 0); }
  100% { box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 0 0 rgba(245, 185, 66, 0); }
}

/* Provider strip */
.providers-strip {
  margin-top: 36px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.providers-strip__label {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 18px;
}

.providers-strip__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 28px 44px;
}

.provider-logo {
  height: 28px;
  color: var(--text-soft);
  transition: color 0.18s ease, transform 0.18s ease;
}

.provider-logo:hover { color: var(--text); transform: scale(1.05); }
.provider-logo svg { height: 100%; width: auto; display: block; }

/* =========================================================
   Game Modal
   ========================================================= */
.game-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 36, 0.78);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.game-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.game-modal__panel {
  background: #fff;
  width: 100%;
  max-width: 860px;
  max-height: 92vh;
  border-radius: var(--r-xl);
  overflow: hidden;
  display: grid;
  grid-template-columns: 360px 1fr;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.28s cubic-bezier(0.22, 1.2, 0.36, 1);
}

.game-modal.is-open .game-modal__panel { transform: translateY(0) scale(1); }

.game-modal__visual {
  position: relative;
  background: var(--bg-dark);
  min-height: 420px;
  overflow: hidden;
}

.game-modal__visual svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.game-modal__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, transparent 40%);
}

.game-modal__visual-tag {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 5px 12px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  z-index: 2;
}

.game-modal__body {
  padding: 32px 32px 28px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.game-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  display: grid; place-items: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.15s ease, transform 0.15s ease;
}

.game-modal__close:hover { background: #fff; transform: rotate(90deg); }
.game-modal__close svg { width: 16px; height: 16px; color: var(--text); }

.game-modal__provider {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}

.game-modal__title {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 14px;
}

.game-modal__rating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.game-modal__rating .stars { font-size: 1rem; }

.game-modal__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.game-stat {
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
}

.game-stat__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.game-stat__value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  margin-top: 4px;
}

.game-modal__desc {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.game-modal__features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.feat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: var(--r-pill);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-700);
}

.game-modal__cta {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.game-modal__cta .btn { flex: 1; }

.btn--secondary {
  background: var(--bg-card-alt);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn--secondary:hover { background: var(--border); }

@media (max-width: 720px) {
  .game-modal__panel {
    grid-template-columns: 1fr;
    max-height: 96vh;
  }
  .game-modal__visual { min-height: 220px; }
  .game-modal__body { padding: 22px; }
  .game-modal__title { font-size: 1.4rem; }
}

/* Toast for "added to favourites" feedback */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 200;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast svg { width: 16px; height: 16px; color: var(--accent-green); }
