/* ============================================================
   style.css  –  NeonPlay Game Portal
   Dark neon-arcade aesthetic
   Fonts: Orbitron (display), Syne (body)
   ============================================================ */

/* ---- CSS Custom Properties ---- */
:root {
  --bg:          #0a0b0f;
  --bg-surface:  #11131a;
  --bg-card:     #15171f;
  --border:      rgba(255,255,255,0.07);

  --accent:      #00f5c4;       /* neon mint */
  --accent-dim:  rgba(0,245,196,0.15);
  --accent-glow: rgba(0,245,196,0.35);

  --purple:      #9b5de5;
  --purple-dim:  rgba(155,93,229,0.2);

  --text-primary:   #e8eaf0;
  --text-secondary: #8b8fa8;
  --text-muted:     #4a4e66;

  --radius:    12px;
  --radius-lg: 20px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  --nav-height: 64px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ---- Typography ---- */
h1, h2, h3 {
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.02em;
  line-height: 1.15;
}


/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  background: rgba(10, 11, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

/* Logo */
.logo {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  text-transform: uppercase;
}
.logo span { color: var(--accent); }

/* Nav links */
.nav-links {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}
.nav-links a {
  padding: 0.4rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: var(--accent-dim);
}

/* Hamburger toggle (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}


/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #0a0b0f;
}
.btn-primary:hover {
  background: #00ddb0;
  box-shadow: 0 0 28px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}


/* ============================================================
   HERO  (index.html)
   ============================================================ */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
  min-height: calc(100vh - var(--nav-height));
  padding: 4rem clamp(1.25rem, 7vw, 6rem);
  overflow: hidden;
}

/* Background perspective grid */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,245,196,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,245,196,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

/* Soft glow orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}
.orb-1 {
  width: 500px; height: 500px;
  top: -100px; left: -80px;
  background: var(--purple-dim);
  opacity: 0.6;
}
.orb-2 {
  width: 400px; height: 400px;
  bottom: -80px; right: 10%;
  background: var(--accent-dim);
  opacity: 0.5;
}

/* Hero text side */
.hero-content { position: relative; z-index: 1; }

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}
.hero-title .accent {
  color: var(--accent);
  text-shadow: 0 0 30px var(--accent-glow);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 40ch;
}

/* Hero visual / card stack */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

.card-stack {
  position: relative;
  width: 240px;
  height: 300px;
}

.stack-card {
  position: absolute;
  width: 200px;
  height: 260px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.stack-c {
  background: var(--bg-card);
  top: 30px; left: 30px;
  transform: rotate(8deg);
  opacity: 0.4;
}
.stack-b {
  background: var(--bg-surface);
  top: 15px; left: 15px;
  transform: rotate(4deg);
  opacity: 0.7;
}
.stack-a {
  background: linear-gradient(145deg, #1a1d2e, #0f1118);
  top: 0; left: 0;
  transform: rotate(0deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: 0 0 40px rgba(0,245,196,0.12), 0 20px 60px rgba(0,0,0,0.5);
  border-color: rgba(0,245,196,0.2);
  animation: float 4s ease-in-out infinite;
}
.stack-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent);
}
.stack-a p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}


/* ============================================================
   FEATURES  (index.html)
   ============================================================ */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 3rem clamp(1.25rem, 7vw, 6rem) 5rem;
}

.feature-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  transition: border-color var(--transition), transform var(--transition);
}
.feature-item:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}
.feature-item h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}
.feature-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}


/* ============================================================
   PAGE HEADER (games.html + game.html)
   ============================================================ */
.page-header {
  padding: 3.5rem clamp(1.25rem, 7vw, 6rem) 2rem;
  text-align: center;
}
.page-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 0.5rem;
}
.page-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}


/* ============================================================
   GAMES GRID (games.html)
   ============================================================ */
.games-section {
  padding: 1rem clamp(1.25rem, 7vw, 6rem) 5rem;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

/* Individual game card */
.game-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  animation: fadeUp 0.5s ease both;
  animation-delay: var(--card-delay, 0s);
}
.game-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(0,245,196,0.1);
}

/* Card thumbnail */
.card-thumb {
  position: relative;
  height: 150px;
  background: hsl(var(--thumb-hue, 200), 60%, 14%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.thumb-emoji { font-size: 3.5rem; }

/* Hover overlay with play button */
.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}
.game-card:hover .card-overlay { opacity: 1; }

.play-btn {
  background: var(--accent);
  color: #0a0b0f;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Card body */
.card-body {
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.card-title {
  font-size: 0.9rem;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-tag {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  white-space: nowrap;
}

/* card-link makes the whole card clickable */
.card-link {
  display: block;
  position: relative;
}


/* ============================================================
   GAME PAGE (game.html)
   ============================================================ */
.game-page {
  padding: 2rem clamp(1.25rem, 7vw, 6rem) 5rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.game-nav { margin-bottom: 1.5rem; }

.game-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 1.5rem;
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
}

/* Game container – replace placeholder with your iframe/canvas */
.game-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-surface);
  margin-bottom: 2.5rem;
  position: relative;
}

.game-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 1rem;
  color: var(--text-muted);
}
.game-placeholder p { font-size: 1rem; font-weight: 600; }
.game-placeholder small { font-size: 0.8rem; color: var(--text-muted); }

/* Loading spinner */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Game info section */
.game-info { max-width: 700px; }

.info-heading {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}
.game-desc {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

/* Metadata chips */
.game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.meta-chip {
  font-size: 0.78rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}


/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}


/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 3rem;
    padding-bottom: 3rem;
    min-height: auto;
  }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-visual { display: none; }

  .features {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .features {
    grid-template-columns: 1fr;
  }

  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Show hamburger menu */
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    gap: 0.25rem;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; text-align: center; padding: 0.6rem; }
}

@media (max-width: 400px) {
  .games-grid { grid-template-columns: 1fr; }
}
.game-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.game-wrapper iframe {
  width: 100%;
  height: 500px;
  border: none;
}