/* =========================================================
   GameVerse — Custom Styles
   Tailwind handles layout/utility classes; this file only
   covers things Tailwind utilities can't express cleanly:
   glassmorphism, glow, keyframe animations, and scrollbars.
   ========================================================= */

:root {
  --accent-purple: #8B5CF6;
  --accent-blue: #3B82F6;
  --bg-dark: #0B0F19;
  --bg-panel: #151B2E;
}

* {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent-purple);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 0.5rem 0;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Navbar ---------- */
#navbar {
  background: rgba(11, 15, 25, 0);
  backdrop-filter: blur(0px);
}
#navbar.scrolled {
  background: rgba(11, 15, 25, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 30px -12px rgba(0, 0, 0, 0.5);
}

.nav-link {
  position: relative;
  padding: 0.5rem 0.9rem;
  border-radius: 9999px;
  transition: color 0.25s ease, background-color 0.25s ease;
}
.nav-link:hover,
.nav-link:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.75rem;
  border-radius: 0.75rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.drawer-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

/* ---------- Section typography helpers ---------- */
.eyebrow {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-purple);
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}
@media (min-width: 768px) {
  .section-title { font-size: 2.25rem; }
}

.footer-heading {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  color: #fff;
}
.footer-link {
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.footer-link:hover {
  color: #fff;
  padding-left: 4px;
}

.social-icon {
  height: 2.25rem;
  width: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.25s ease;
}
.social-icon:hover {
  color: #fff;
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.15);
  box-shadow: 0 0 20px -6px rgba(139, 92, 246, 0.6);
  transform: translateY(-2px);
}

/* ---------- Glassmorphism ---------- */
.glass-panel {
  background: rgba(21, 27, 46, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ---------- Ambient glow orbs (hero + newsletter signature motif) ---------- */
.orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 1;
  animation: float 10s ease-in-out infinite;
}
.orb-purple {
  width: 480px;
  height: 480px;
  background: var(--accent-purple);
  top: -10%;
  left: -8%;
}
.orb-blue {
  width: 420px;
  height: 420px;
  background: var(--accent-blue);
  bottom: -15%;
  right: -8%;
  animation-delay: -5s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.08); }
}

/* ---------- Hero slider ---------- */
#hero-slider { z-index: 0; }
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
.hero-slide.active {
  opacity: 1;
  z-index: 5;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--bg-dark) 2%, rgba(11,15,25,0.35) 45%, rgba(11,15,25,0.15) 100%),
    linear-gradient(to right, rgba(11,15,25,0.85) 0%, rgba(11,15,25,0.25) 55%, transparent 100%);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  height: 2.75rem;
  width: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: #fff;
  transition: all 0.25s ease;
}
.hero-arrow:hover {
  background: rgba(139, 92, 246, 0.35);
  border-color: var(--accent-purple);
  box-shadow: 0 0 24px -4px rgba(139, 92, 246, 0.7);
}

.hero-dot {
  height: 8px;
  width: 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
}
.hero-dot.active {
  width: 28px;
  background: linear-gradient(to right, var(--accent-purple), var(--accent-blue));
}

/* ---------- Reveal-on-scroll ---------- */
.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Category cards ---------- */
.category-card {
  position: relative;
  border-radius: 1rem;
  padding: 1.25rem 1rem;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.category-card:hover,
.category-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.2);
}
.category-card.active {
  border-color: var(--accent-purple);
  box-shadow: 0 0 30px -6px rgba(139, 92, 246, 0.55);
}
.category-card .cat-icon {
  transition: transform 0.35s ease;
}
.category-card:hover .cat-icon {
  transform: scale(1.15) rotate(-6deg);
}

/* ---------- Game icon tiles (Play Store / Xbox app-icon style) ---------- */
.game-card {
  position: relative;
  background: rgba(21, 27, 46, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 1.1rem;
  overflow: visible;
  backdrop-filter: blur(10px);
  padding: 0.65rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}
.game-card:hover,
.game-card:focus-within {
  transform: translateY(-5px) scale(1.035);
  border-color: rgba(139, 92, 246, 0.55);
  background: rgba(21, 27, 46, 0.85);
  box-shadow: 0 18px 34px -16px rgba(0,0,0,0.65), 0 0 28px -8px rgba(139, 92, 246, 0.5);
  z-index: 5;
}
.game-card .thumb-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 0.85rem;
}
.game-card .thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.game-card:hover .thumb-wrap img {
  transform: scale(1.1);
}

/* Hover overlay with quick actions, like tapping an app icon in a store */
.tile-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(11, 15, 25, 0.55);
  opacity: 0;
  transition: opacity 0.25s ease;
  border-radius: 0.85rem;
}
.game-card:hover .tile-overlay,
.game-card:focus-within .tile-overlay {
  opacity: 1;
}
.tile-play-btn {
  height: 2.6rem;
  width: 2.6rem;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: linear-gradient(to right, var(--accent-purple), var(--accent-blue));
  transform: scale(0.8);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}
.game-card:hover .tile-play-btn {
  transform: scale(1);
  box-shadow: 0 0 20px -2px rgba(139, 92, 246, 0.8);
}

.rating-chip {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 2;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.4rem;
  border-radius: 9999px;
  background: rgba(11, 15, 25, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  color: #fbbf24;
}

.wishlist-btn {
  height: 2.6rem;
  width: 2.6rem;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  transition: all 0.25s ease;
  flex-shrink: 0;
}
.wishlist-btn:hover {
  background: rgba(244, 63, 94, 0.18);
  border-color: rgba(244, 63, 94, 0.5);
}
.wishlist-btn i {
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55), color 0.25s ease;
}
.wishlist-btn.active {
  border-color: #f43f5e;
  background: rgba(244, 63, 94, 0.15);
}
.wishlist-btn.active i {
  color: #f43f5e;
  transform: scale(1.2);
}
.wishlist-btn.pulse i {
  animation: pulse-heart 0.4s ease;
}
@keyframes pulse-heart {
  0% { transform: scale(1); }
  40% { transform: scale(1.5); }
  100% { transform: scale(1.2); }
}

.demo-badge {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  background: linear-gradient(to right, var(--accent-purple), var(--accent-blue));
  color: #fff;
  z-index: 2;
}

/* ---------- Skeleton loading ---------- */
.skeleton-card {
  border-radius: 1.1rem;
  aspect-ratio: 1 / 1.55;
  background: linear-gradient(100deg, rgba(255,255,255,0.04) 30%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.04) 70%);
  background-size: 250% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  0% { background-position: 150% 0; }
  100% { background-position: -150% 0; }
}

/* ---------- Trending horizontal scroll ---------- */
#trending-track {
  animation: trending-scroll 40s linear infinite;
}
#trending-track.paused {
  animation-play-state: paused;
}
.trending-card {
  flex: 0 0 auto;
  width: 150px;
}
@keyframes trending-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- Collections banners ---------- */
.collection-card {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.collection-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -18px rgba(0,0,0,0.6);
}
.collection-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.collection-card:hover img {
  transform: scale(1.08);
}
.collection-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11,15,25,0.92) 10%, rgba(11,15,25,0.35) 60%, rgba(11,15,25,0.1) 100%);
}
.collection-card span {
  position: relative;
  z-index: 2;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
}

/* ---------- Stats ---------- */
.stat-number {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  background: linear-gradient(to right, var(--accent-purple), var(--accent-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (min-width: 768px) {
  .stat-number { font-size: 3rem; }
}
.stat-label {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* ---------- Hide scrollbars where needed ---------- */
#trending-track::-webkit-scrollbar { display: none; }
#trending-track { -ms-overflow-style: none; scrollbar-width: none; }

/* ---------- Custom global scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--accent-purple), var(--accent-blue));
  border-radius: 9999px;
}

/* ---------- Top Charts ranked rows ---------- */
.chart-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0.6rem;
  border-radius: 0.85rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.chart-row:hover,
.chart-row:focus-visible {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}
.chart-rank {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  width: 2.2rem;
  flex-shrink: 0;
  text-align: center;
  background: linear-gradient(to bottom, var(--accent-purple), var(--accent-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.85;
}
.chart-row:nth-child(-n+3) .chart-rank {
  font-size: 1.9rem;
  opacity: 1;
}
.chart-icon {
  height: 3.25rem;
  width: 3.25rem;
  border-radius: 0.85rem;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.chart-get-btn {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  transition: all 0.25s ease;
}
.chart-get-btn:hover {
  background: linear-gradient(to right, var(--accent-purple), var(--accent-blue));
  border-color: transparent;
  box-shadow: 0 0 18px -4px rgba(139, 92, 246, 0.7);
}

/* ---------- Game quick-view modal ---------- */
#modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
#game-modal.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
body.modal-open {
  overflow: hidden;
}
.modal-screenshot {
  flex: 0 0 auto;
  width: 180px;
  aspect-ratio: 16 / 10;
  border-radius: 0.75rem;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
}