/* ================================================
   PLAYZONE – Dark / Neon Cyberpunk Theme
   ================================================ */

/* ---------- RESET & VARIABLES ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:        #0a0a1a;
  --bg-card:   #11112b;
  --surface:   #161638;
  --border:    #1e1e4a;
  --text:      #e0e0f0;
  --text-dim:  #8888aa;
  --accent:    #00f0ff;
  --accent2:   #ff00e6;
  --accent3:   #7b2dff;
  --success:   #00ff88;
  --font-display: 'Orbitron', sans-serif;
  --font-body:    'Rajdhani', sans-serif;
  --nav-h: 70px;
  --radius: 14px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* ---------- ANIMATED BACKGROUND PHOTO ---------- */
body::before {
  content: '';
  position: fixed;
  inset: -20%;          /* oversize to allow pan room */
  z-index: -2;
  background: url('bg-photo.jpg') center / cover no-repeat;
  animation: ken-burns 25s ease-in-out infinite alternate;
  will-change: transform;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  /* light overlay — photo ~80% visible */
  background: linear-gradient(
    180deg,
    rgba(10, 10, 26, .22) 0%,
    rgba(10, 10, 26, .18) 40%,
    rgba(10, 10, 26, .25) 100%
  );
}
@keyframes ken-burns {
  0% {
    transform: scale(1) translate(0, 0);
  }
  33% {
    transform: scale(1.12) translate(-2%, -1%);
  }
  66% {
    transform: scale(1.08) translate(1.5%, -2%);
  }
  100% {
    transform: scale(1.15) translate(-1%, 1.5%);
  }
}

a { color: var(--accent); text-decoration: none; }
ul { list-style: none; }

.accent { color: var(--accent); }

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--accent), var(--accent2));
  border-radius: 4px;
}

/* ---------- NAVBAR ---------- */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1rem, 4vw, 3rem);
  height: var(--nav-h);
  background: rgba(10, 10, 26, .85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.logo { display: flex; align-items: center; gap: .5rem; }
.logo-icon { font-size: 1.6rem; }
.logo-text {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 900;
  letter-spacing: 2px; color: var(--text);
}

.nav-links {
  display: flex; gap: 2rem;
}
.nav-links a {
  font-family: var(--font-display);
  font-size: .85rem; letter-spacing: 1px;
  color: var(--text-dim);
  position: relative; padding: .25rem 0;
  transition: color .3s;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  transition: width .3s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span {
  width: 26px; height: 2px; background: var(--accent);
  transition: .3s;
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed; top: var(--nav-h); right: -100%;
    flex-direction: column; gap: 0;
    width: 260px; height: calc(100vh - var(--nav-h));
    background: var(--bg-card); padding: 2rem;
    border-left: 1px solid var(--border);
    transition: right .4s cubic-bezier(.77,0,.18,1);
  }
  .nav-links.open { right: 0; }
  .nav-links a { padding: .75rem 0; font-size: 1rem; }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 2rem) 1.5rem 4rem;
  overflow: hidden;
}

.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 30% 40%, rgba(0, 240, 255, .15) 0%, transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(255, 0, 230, .12) 0%, transparent 55%);
  mix-blend-mode: screen;
}

.hero-particles {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.particle {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  animation: float-up linear infinite;
}
@keyframes float-up {
  0%   { opacity: 0; transform: translateY(0) scale(1); }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-100vh) scale(.3); }
}

.hero-content { position: relative; z-index: 2; max-width: 800px; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 4.2rem);
  font-weight: 900; letter-spacing: 3px;
  line-height: 1.15;
  margin-bottom: 1.2rem;
  text-shadow: 0 0 20px rgba(0,0,0,.7), 0 2px 6px rgba(0,0,0,.5);
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--text-dim);
  max-width: 600px; margin: 0 auto 2rem;
  text-shadow: 0 1px 8px rgba(0,0,0,.6);
}

.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-display);
  font-size: .9rem; font-weight: 700;
  letter-spacing: 1px;
  padding: .85rem 2rem;
  border-radius: 50px; border: none; cursor: pointer;
  transition: transform .25s, box-shadow .25s;
}
.btn:hover { transform: translateY(-3px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  color: #000;
  box-shadow: 0 0 20px rgba(0,240,255,.3);
}
.btn-primary:hover { box-shadow: 0 0 30px rgba(0,240,255,.55); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px rgba(0,240,255,.15);
}
.btn-outline:hover {
  background: rgba(0,240,255,.08);
  box-shadow: 0 0 24px rgba(0,240,255,.3);
}

.btn-lg { padding: 1.1rem 2.8rem; font-size: 1.05rem; }

/* ---------- SECTION TITLES ---------- */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: 2px;
  text-shadow: 0 0 16px rgba(0,0,0,.6), 0 2px 4px rgba(0,0,0,.4);
}

/* ---------- FEATURES ---------- */
.features {
  padding: 6rem clamp(1rem, 5vw, 4rem);
  max-width: 1200px; margin: auto;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: transform .35s, box-shadow .35s, border-color .35s;
}
.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 30px rgba(0,240,255,.15);
  border-color: var(--accent);
}
.feature-icon {
  font-size: 2.8rem; margin-bottom: 1rem;
  filter: drop-shadow(0 0 8px rgba(0,240,255,.4));
}
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem; margin-bottom: .6rem; letter-spacing: 1px;
}
.feature-card p { color: var(--text-dim); font-size: .95rem; }

/* ---------- TRENDING SCROLL ---------- */
.trending {
  padding: 5rem clamp(1rem, 5vw, 4rem);
  max-width: 1300px; margin: auto;
}
.trending-scroll {
  display: flex; gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
}
.trending-scroll::-webkit-scrollbar { height: 6px; }
.trending-scroll::-webkit-scrollbar-thumb {
  background: var(--accent3); border-radius: 3px;
}

.game-card {
  flex: 0 0 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  scroll-snap-align: start;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.game-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 24px rgba(0,240,255,.2);
  border-color: var(--accent);
}
.game-img {
  height: 160px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(
    135deg,
    hsl(var(--hue, 200) 70% 15%),
    hsl(var(--hue, 200) 90% 30%)
  );
}
.game-emoji { font-size: 3.5rem; filter: drop-shadow(0 0 12px rgba(255,255,255,.3)); }
.game-info { padding: 1rem; }
.game-info h4 { font-family: var(--font-display); font-size: .95rem; letter-spacing: 1px; }
.badge {
  display: inline-block;
  font-size: .7rem; letter-spacing: 1px;
  padding: .2rem .6rem; margin-top: .3rem;
  border: 1px solid var(--accent); border-radius: 50px;
  color: var(--accent);
}
.rating { margin-top: .4rem; font-size: .85rem; color: var(--text-dim); }

/* ---------- STATS ---------- */
.stats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 3rem;
  padding: 5rem 2rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat { text-align: center; }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  display: block; font-size: .95rem; color: var(--text-dim);
  letter-spacing: 1px; margin-top: .3rem;
}

/* ---------- PAGE HEADER (Categories / Download) ---------- */
.page-header {
  padding: calc(var(--nav-h) + 4rem) 1.5rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 80%, rgba(0,240,255,.08) 0%, transparent 60%);
  pointer-events: none;
}

/* ---------- FILTER BAR ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem;
  padding: 0 1.5rem 3rem;
  max-width: 900px; margin: auto;
}
.filter-btn {
  font-family: var(--font-display);
  font-size: .8rem; letter-spacing: 1px;
  padding: .55rem 1.4rem;
  border-radius: 50px; border: 1px solid var(--border);
  background: transparent; color: var(--text-dim);
  cursor: pointer;
  transition: .3s;
}
.filter-btn:hover,
.filter-btn.active {
  background: rgba(0,240,255,.1);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(0,240,255,.2);
}

/* ---------- CATEGORIES GRID ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  padding: 0 clamp(1rem, 5vw, 4rem) 5rem;
  max-width: 1300px; margin: auto;
}
.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform .35s, box-shadow .35s, border-color .35s;
}
.cat-card.hidden {
  display: none;
}
.cat-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 0 24px rgba(0,240,255,.12);
}
.cat-icon {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  border-radius: 16px;
  margin-bottom: 1.2rem;
  background: linear-gradient(
    135deg,
    hsl(var(--hue,200) 70% 15%),
    hsl(var(--hue,200) 90% 28%)
  );
  box-shadow: 0 0 16px hsl(var(--hue,200) 80% 40% / .3);
}
.cat-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem; letter-spacing: 1px; margin-bottom: .5rem;
}
.cat-card p { color: var(--text-dim); font-size: .9rem; margin-bottom: 1rem; }
.cat-games { margin-bottom: 1rem; }
.cat-games li {
  padding: .3rem 0; font-size: .9rem; color: var(--text);
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.cat-count {
  font-family: var(--font-display);
  font-size: .8rem; letter-spacing: 1px;
  color: var(--accent); opacity: .8;
}

/* ---------- DOWNLOAD SECTION ---------- */
.download-section {
  padding: 4rem clamp(1rem, 5vw, 4rem);
  max-width: 1300px; margin: auto;
}
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}
.platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: transform .35s, box-shadow .35s, border-color .35s;
}
.platform-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(0,240,255,.15);
}
.platform-icon { font-size: 3rem; margin-bottom: 1rem; }
.platform-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem; margin-bottom: .5rem; letter-spacing: 1px;
}
.platform-card p { color: var(--text-dim); font-size: .9rem; margin-bottom: 1rem; }
.platform-req {
  font-size: .78rem; color: var(--text-dim);
  background: rgba(0,240,255,.05);
  border-radius: 8px;
  padding: .5rem 1rem; margin-bottom: 1.5rem;
  display: inline-block;
}
.btn-download { width: 100%; justify-content: center; }
.dl-arrow {
  font-size: 1.1rem; font-weight: 900;
  animation: bounce-arrow 1.5s ease-in-out infinite;
}
@keyframes bounce-arrow {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}
.dl-size { display: block; margin-top: .6rem; font-size: .8rem; color: var(--text-dim); }

/* ---------- HOW IT WORKS ---------- */
.how-it-works {
  padding: 5rem clamp(1rem, 5vw, 4rem);
  max-width: 900px; margin: auto;
}
.steps-row {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 1rem;
}
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem; text-align: center;
  flex: 1 1 200px; max-width: 250px;
  transition: border-color .3s, box-shadow .3s;
}
.step:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(0,240,255,.12);
}
.step-num {
  font-family: var(--font-display);
  font-size: 2.2rem; font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: .5rem;
}
.step h4 {
  font-family: var(--font-display);
  font-size: 1rem; letter-spacing: 1px; margin-bottom: .5rem;
}
.step p { color: var(--text-dim); font-size: .88rem; }
.step-connector {
  width: 40px; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  box-shadow: 0 0 8px rgba(0,240,255,.3);
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .steps-row { flex-direction: column; }
  .step-connector { width: 2px; height: 30px; }
}

/* ---------- TESTIMONIALS ---------- */
.testimonials {
  padding: 5rem clamp(1rem, 5vw, 4rem);
  max-width: 1100px; margin: auto;
}
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform .3s, border-color .3s;
}
.testimonial-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}
.testimonial-stars { margin-bottom: .8rem; }
.testimonial-card p { color: var(--text-dim); font-size: .95rem; margin-bottom: 1.2rem; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: .8rem; }
.author-avatar { font-size: 2rem; }
.testimonial-author strong { display: block; font-size: .95rem; }
.testimonial-author span { font-size: .8rem; color: var(--text-dim); }

/* ---------- CTA SECTION ---------- */
.cta-section {
  text-align: center;
  padding: 5rem 2rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.cta-glow {
  position: absolute; top: 50%; left: 50%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,240,255,.08) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.cta-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  margin-bottom: .8rem;
  position: relative;
}
.cta-section p { color: var(--text-dim); margin-bottom: 2rem; font-size: 1.1rem; position: relative; }
.cta-section .btn { position: relative; }

/* ---------- TOAST ---------- */
.toast {
  position: fixed; bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--accent);
  color: #000;
  font-family: var(--font-display);
  font-size: .85rem; font-weight: 700;
  letter-spacing: 1px;
  padding: .8rem 2rem;
  border-radius: 50px;
  box-shadow: 0 0 24px rgba(0,240,255,.4);
  transition: transform .4s cubic-bezier(.34,1.56,.64,1);
  z-index: 9999;
  pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ---------- FOOTER ---------- */
.footer {
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-inner { max-width: 600px; margin: auto; }
.footer .logo-text { font-size: 1.2rem; display: block; margin-bottom: .5rem; }
.footer p { color: var(--text-dim); font-size: .85rem; margin-bottom: .8rem; }
.footer-links { display: flex; gap: 1.5rem; justify-content: center; }
.footer-links a {
  color: var(--text-dim); font-size: .85rem;
  transition: color .3s;
}
.footer-links a:hover { color: var(--accent); }

/* ================================================
   ANIMATIONS
   ================================================ */

/* ---- Glitch title ---- */
.anim-glitch {
  position: relative;
  animation: glitch-skew 4s infinite linear alternate-reverse;
}
.anim-glitch::before,
.anim-glitch::after {
  content: attr(data-text);
  position: absolute; top: 0; left: 0; width: 100%;
  overflow: hidden;
  pointer-events: none;
}
.anim-glitch::before {
  color: var(--accent2);
  animation: glitch-clip 3s infinite linear alternate-reverse;
  clip-path: inset(40% 0 20% 0);
  transform: translate(-3px, -2px);
}
.anim-glitch::after {
  color: var(--accent);
  animation: glitch-clip2 3.5s infinite linear alternate-reverse;
  clip-path: inset(60% 0 10% 0);
  transform: translate(3px, 2px);
}
@keyframes glitch-skew {
  0%   { transform: skew(0deg); }
  2%   { transform: skew(2deg); }
  4%   { transform: skew(0deg); }
  100% { transform: skew(0deg); }
}
@keyframes glitch-clip {
  0%   { clip-path: inset(40% 0 20% 0); }
  25%  { clip-path: inset(10% 0 60% 0); }
  50%  { clip-path: inset(70% 0 5% 0); }
  75%  { clip-path: inset(25% 0 30% 0); }
  100% { clip-path: inset(55% 0 15% 0); }
}
@keyframes glitch-clip2 {
  0%   { clip-path: inset(55% 0 15% 0); }
  25%  { clip-path: inset(25% 0 50% 0); }
  50%  { clip-path: inset(5% 0 70% 0); }
  75%  { clip-path: inset(65% 0 10% 0); }
  100% { clip-path: inset(35% 0 25% 0); }
}

/* ---- Fade up ---- */
.anim-fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .7s cubic-bezier(.22,1,.36,1),
              transform .7s cubic-bezier(.22,1,.36,1);
}
.anim-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Scale in ---- */
.anim-scale-in {
  opacity: 0;
  transform: scale(.85);
  transition: opacity .6s cubic-bezier(.22,1,.36,1),
              transform .6s cubic-bezier(.22,1,.36,1);
}
.anim-scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* ---- Stagger delays ---- */
.delay-1 { transition-delay: .12s; }
.delay-2 { transition-delay: .24s; }
.delay-3 { transition-delay: .36s; }
.delay-4 { transition-delay: .48s; }

/* ---- Scroll-driven entry (progressive enhancement) ---- */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes scroll-fade-in {
      from {
        opacity: 0;
        transform: translateY(30px);
      }
    }

    .feature-card,
    .cat-card,
    .platform-card,
    .testimonial-card,
    .step {
      animation: scroll-fade-in auto linear backwards;
      animation-timeline: view();
      animation-range: entry 0% entry 30%;
    }
  }
}

/* ---- Neon border pulse on cards ---- */
@keyframes neon-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(0,240,255,.08); }
  50%      { box-shadow: 0 0 20px rgba(0,240,255,.18); }
}
.feature-card,
.cat-card,
.platform-card,
.game-card {
  animation: neon-pulse 4s ease-in-out infinite;
}

/* ---- Navbar scroll state ---- */
.navbar.scrolled {
  background: rgba(10,10,26,.95);
  box-shadow: 0 2px 20px rgba(0,0,0,.4);
}
