/* ===== Games Page Styles ===== */

/* Header variant for games page */
.header--games{background:rgba(12,6,21,.85);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border-bottom:1px solid var(--border)}
.nav-link--active{color:var(--gold)!important}

/* ===== Hero Banner with Marquee ===== */
.games-hero{
  position:relative;
  height:75vh;
  min-height:500px;
  max-height:700px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  padding-top:72px;
}

.games-hero-bg{
  position:absolute;
  inset:0;
  background:
    radial-gradient(ellipse at 30% 40%,rgba(124,58,237,.12) 0%,transparent 60%),
    radial-gradient(ellipse at 70% 60%,rgba(245,197,24,.06) 0%,transparent 50%),
    var(--bg);
}

/* Marquee rows */
.icon-marquee{
  position:absolute;
  left:0;
  right:0;
  overflow:hidden;
  display:flex;
}

.marquee-row-1{top:18%}
.marquee-row-2{top:46%}
.marquee-row-3{top:74%}

.icon-track{
  display:flex;
  gap:30px;
  will-change:transform;
}

.marquee-icon{
  width:150px;
  height:150px;
  border-radius:34px;
  object-fit:cover;
  flex-shrink:0;
  opacity:.3;
  box-shadow:0 4px 20px rgba(0,0,0,.3);
  pointer-events:none;
  user-select:none;
}

/* Animation keyframes */
.track-left{
  animation:scroll-left 25s linear infinite;
}

.track-right{
  animation:scroll-right 35s linear infinite;
}

.track-left-slow{
  animation:scroll-left 25s linear infinite;
}

@keyframes scroll-left{
  0%{transform:translateX(0)}
  100%{transform:translateX(-50%)}
}

@keyframes scroll-right{
  0%{transform:translateX(-50%)}
  100%{transform:translateX(0)}
}

/* Hero text overlay */
.games-hero-content{
  position:relative;
  z-index:10;
  text-align:center;
}

.games-hero-title{
  font-size:clamp(2.5rem,7vw,5rem);
  font-weight:900;
  letter-spacing:-.04em;
  line-height:1;
  margin-bottom:12px;
  text-shadow:0 4px 40px rgba(0,0,0,.6);
}

.games-hero-sub{
  font-size:clamp(1rem,2vw,1.3rem);
  color:var(--muted);
  font-weight:500;
  text-shadow:0 2px 20px rgba(0,0,0,.5);
}

/* Bottom fade */
.games-hero-fade{
  position:absolute;
  bottom:0;
  left:0;
  right:0;
  height:180px;
  background:linear-gradient(to bottom,transparent,var(--bg));
  z-index:5;
  pointer-events:none;
}

/* ===== Featured Games Row ===== */
/* ===== Section spacing ===== */
#featured-games{padding-bottom:56px}
#all-games{padding-top:56px}

/* ===== Featured Games Carousel ===== */
.fg-carousel{
  display:flex;
  align-items:center;
}

.fg-slides{
  flex:1;
  min-width:0;
  overflow:hidden;
  display:grid;
  grid-template-columns:1fr;
}

.fg-slide{
  grid-area:1/1;
  display:flex;
  align-items:center;
  gap:40px;
  background:#181528;
  border:1px solid rgba(155,120,245,.18);
  border-radius:28px;
  padding:32px 36px;
  overflow:hidden;
  transition:transform .55s cubic-bezier(.4,0,.2,1);
  box-shadow:
    0 1px 0 0 rgba(155,120,245,.2) inset,
    0 24px 60px rgba(0,0,0,.65),
    0 6px 20px rgba(0,0,0,.4);
}

.fg-img-side{
  flex:0 0 46%;
  max-width:46%;
  border-radius:16px;
  overflow:hidden;
  background:#181528;
  aspect-ratio:4/3;
  box-shadow:
    0 16px 48px rgba(0,0,0,.6),
    0 4px 16px rgba(0,0,0,.4),
    0 0 0 1px rgba(255,255,255,.06);
}

.fg-screenshot{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.fg-info-side{
  flex:1;
  min-width:0;
}

.fg-title{
  font-size:clamp(1.5rem,2.5vw,2.2rem);
  font-weight:800;
  letter-spacing:-.02em;
  margin-bottom:14px;
  line-height:1.15;
}

.fg-rating{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:24px;
}

.fg-score{
  font-size:1.5rem;
  font-weight:800;
  letter-spacing:-.02em;
}

.fg-stars{
  color:var(--gold);
  font-size:1.1rem;
  letter-spacing:3px;
}

.fg-count{
  font-size:.85rem;
  color:var(--muted);
  white-space:nowrap;
}

.fg-app-row{
  display:flex;
  gap:16px;
  align-items:flex-start;
  margin-bottom:28px;
}

.fg-icon{
  width:76px;
  height:76px;
  border-radius:18px;
  flex-shrink:0;
  object-fit:cover;
  border:1px solid var(--border);
}

.fg-blurb{
  font-size:.9rem;
  color:var(--muted);
  line-height:1.7;
}

.fg-badges{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.fg-badge-link{
  display:block;
  transition:opacity .2s;
}

.fg-badge-link:hover{
  opacity:.85;
}

.fg-badge-img{
  height:44px;
  width:auto;
  border-radius:8px;
  display:block;
}

.fg-nav{
  flex-shrink:0;
  width:48px;
  height:48px;
  background:#181528;
  border:1px solid rgba(155,120,245,.3);
  border-radius:50%;
  color:rgba(255,255,255,.9);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:background .2s var(--ease),border-color .2s var(--ease),color .2s var(--ease),transform .2s var(--ease),box-shadow .2s var(--ease);
  box-shadow:0 0 0 4px rgba(155,120,245,.08), 0 0 18px rgba(155,120,245,.18), 0 2px 10px rgba(0,0,0,.5);
}

.fg-nav:hover{
  background:rgba(155,120,245,.18);
  border-color:rgba(155,120,245,.6);
  color:#fff;
  transform:scale(1.1);
  box-shadow:0 0 0 6px rgba(155,120,245,.12), 0 0 28px rgba(155,120,245,.35), 0 4px 16px rgba(0,0,0,.4);
}

.fg-prev{margin-right:32px}
.fg-next{margin-left:32px}

.fg-dots{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  margin-top:28px;
}

.fg-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:rgba(255,255,255,.35);
  border:none;
  cursor:pointer;
  transition:all .25s var(--ease);
  padding:8px;
  box-sizing:content-box;
}

.fg-dot:hover{
  background:rgba(255,255,255,.55);
}

.fg-dot.active{
  width:24px;
  border-radius:4px;
  background:var(--gold);
}

/* ===== All Games Section Background (matches home) ===== */
#all-games.section-dark{
  position:relative;
  overflow:hidden;
  background:var(--bg);
}
#all-games.section-dark::before{
  content:'';
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(ellipse 60% 45% at 20% 30%,rgba(245,197,24,.05),transparent 60%),
    radial-gradient(ellipse 55% 40% at 85% 70%,rgba(124,58,237,.05),transparent 65%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size:auto,auto,160px 160px;
  z-index:0;
}
#all-games.section-dark .container{position:relative;z-index:1}

/* ===== All Games Portrait Grid ===== */
.all-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:28px;
}

.game-portrait{
  position:relative;
  display:block;
  border-radius:22px;
  overflow:hidden;
  cursor:pointer;
  text-decoration:none;
  color:var(--text);
  aspect-ratio:3/4;
  background:var(--bg2);
  border:1px solid var(--border);
  box-shadow:0 6px 20px rgba(0,0,0,.25);
  transition:transform .4s var(--ease),box-shadow .4s var(--ease),border-color .4s var(--ease);
}

/* subtle gold ring that appears on hover */
.game-portrait::after{
  content:'';
  position:absolute;
  inset:0;
  border-radius:inherit;
  pointer-events:none;
  box-shadow:inset 0 0 0 1px rgba(245,197,24,.0),0 0 0 0 rgba(245,197,24,0);
  transition:box-shadow .4s var(--ease);
  z-index:3;
}

.game-portrait:hover{
  border-color:rgba(245,197,24,.25);
  transform:translateY(-8px);
  box-shadow:0 26px 60px rgba(0,0,0,.55),0 0 40px rgba(245,197,24,.08);
}

.game-portrait:hover::after{
  box-shadow:inset 0 0 0 1px rgba(245,197,24,.35),0 0 0 4px rgba(245,197,24,.06);
}

.gp-img-wrap{
  position:absolute;
  inset:0;
}

.gp-img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .5s var(--ease),filter .4s var(--ease);
}

.game-portrait:hover .gp-img{
  transform:scale(1.08);
  filter:saturate(1.08) contrast(1.02);
}

.gp-overlay{
  position:absolute;
  bottom:0;
  left:0;
  right:0;
  padding:44px 20px 22px;
  background:linear-gradient(to top,rgba(8,4,16,.96) 0%,rgba(8,4,16,.72) 45%,rgba(8,4,16,.0) 100%);
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  transform:translateY(10px);
  transition:opacity .35s var(--ease),transform .35s var(--ease);
  z-index:2;
}

.game-portrait:hover .gp-overlay{
  opacity:1;
  transform:translateY(0);
}

.gp-link{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:.88rem;
  font-weight:800;
  letter-spacing:.01em;
  color:#1a0f00;
  background:linear-gradient(180deg,#FFE45C 0%,#F5C518 55%,#E0A900 100%);
  padding:12px 22px 12px 24px;
  border-radius:100px;
  border:1px solid rgba(255,255,255,.22);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.45),
    inset 0 -1px 0 rgba(0,0,0,.15),
    0 10px 26px rgba(245,197,24,.38),
    0 2px 6px rgba(0,0,0,.35);
  transition:transform .25s var(--ease),box-shadow .25s var(--ease),filter .25s var(--ease);
}

.gp-link svg{
  transition:transform .25s var(--ease);
}

.game-portrait:hover .gp-link{
  transform:translateY(-1px);
  filter:brightness(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),
    inset 0 -1px 0 rgba(0,0,0,.18),
    0 14px 32px rgba(245,197,24,.5),
    0 2px 6px rgba(0,0,0,.4);
}

.game-portrait:hover .gp-link svg{
  transform:translateX(4px);
}

/* ===== CTA Box ===== */
.games-cta-box{
  text-align:center;
  padding:80px 48px;
  border-radius:24px;
  background:linear-gradient(135deg,var(--bg3),var(--bg2));
  border:1px solid var(--border);
  position:relative;
  overflow:hidden;
}

.games-cta-box::before{
  content:'';
  position:absolute;
  top:-80px;
  left:50%;
  transform:translateX(-50%);
  width:400px;
  height:400px;
  background:radial-gradient(circle,rgba(245,197,24,.05),transparent 60%);
  pointer-events:none;
}

.games-cta-sub{
  font-size:1rem;
  color:var(--muted);
  margin:12px auto 32px;
  max-width:400px;
  position:relative;
}

.nl-form{position:relative;width:100%;max-width:480px;margin:0 auto}
.nl-row{display:flex;gap:10px;width:100%}
.nl-input{
  flex:1;
  min-width:0;
  padding:14px 20px;
  border-radius:12px;
  border:1px solid var(--border);
  background:var(--bg3);
  color:var(--text);
  font-size:.95rem;
  outline:none;
  transition:border-color .2s;
}
.nl-input::placeholder{color:var(--muted)}
.nl-input:focus{border-color:var(--gold)}
.nl-btn{border-radius:12px;white-space:nowrap;padding:14px 28px}
.nl-success{
  margin-top:12px;
  font-size:.88rem;
  color:var(--gold);
  min-height:1.2em;
  text-align:center;
}

/* ===== Responsive ===== */
@media(max-width:1024px){
  .fg-nav{width:44px;height:44px;font-size:1.8rem}
  .fg-prev{margin-right:16px}
  .fg-next{margin-left:16px}
  .fg-slide{gap:32px}
  .all-grid{grid-template-columns:repeat(3,1fr)}
  .marquee-icon{width:110px;height:110px;border-radius:22px}
}

@media(max-width:768px){
  .games-hero{height:60vh;min-height:400px}
  .marquee-icon{width:100px;height:100px;border-radius:20px}
  .icon-track{gap:14px}

  /* ── Featured carousel: full-width card, arrows overlaid on image ── */
  .fg-carousel{
    position:relative;
    /* bleed past the 24px container padding so card spans full viewport */
    margin-left:-24px;
    margin-right:-24px;
  }
  /* arrows: absolute, vertically centred on the 16/9 image */
  .fg-nav{
    display:flex;
    position:absolute;
    /* top = half of image height = (100vw × 9/16) / 2 = 100vw × 9/32 */
    top:calc(100vw * 9 / 32);
    transform:translateY(-50%);
    z-index:10;
    margin:0;
    width:40px;
    height:40px;
    background:rgba(8,4,16,.72);
    border:1px solid rgba(255,255,255,.14);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
    border-radius:10px;
  }
  .fg-prev{left:10px}
  .fg-next{right:10px}
  /* card: no padding — image fills the top edge */
  .fg-slide{
    flex-direction:column;
    gap:0;
    padding:0;
    border-radius:0; /* card goes edge-to-edge */
    border-left:none;
    border-right:none;
  }
  .fg-img-side{
    flex:none;
    max-width:100%;
    width:100%;
    aspect-ratio:16/9;
    border-radius:0;
    box-shadow:none;
  }
  /* info section below the image */
  .fg-info-side{
    padding:18px 20px 22px;
    text-align:center;
  }
  .fg-title{font-size:1.45rem;margin-bottom:10px}
  .fg-rating{justify-content:center;gap:8px;margin-bottom:14px}
  .fg-score{font-size:1.2rem}
  .fg-count{font-size:.8rem}
  /* hide app icon, keep centred blurb only */
  .fg-icon{display:none}
  .fg-app-row{justify-content:center;margin-bottom:18px;gap:0}
  .fg-blurb{font-size:.88rem;line-height:1.68;text-align:center}
  .fg-badges{justify-content:center;gap:8px;flex-wrap:nowrap}
  .fg-badge-img{height:38px;width:auto}
  .fg-dots{margin-top:20px}

  .all-grid{grid-template-columns:repeat(2,1fr);gap:16px}
  .game-portrait{border-radius:18px}
  .gp-overlay{opacity:1;transform:translateY(0);padding:36px 16px 18px}
  .games-cta-box{padding:48px 24px}
  .nl-row{flex-direction:column}
  .nl-btn{width:100%}
}

@media(max-width:480px){
  .all-grid{grid-template-columns:repeat(2,1fr);gap:12px}
  .game-portrait{aspect-ratio:3/4;border-radius:16px}
  .gp-link{font-size:.78rem;padding:10px 16px}
  .marquee-icon{width:80px;height:80px;border-radius:16px}
  .games-hero{height:50vh;min-height:350px}
  .fg-badge-img{height:36px}
}
