/* =========================================================
   NovaPlay – Safe Gaming Landing Page
   ========================================================= */

:root {
  --bg: #07071a;
  --bg-2: #0e0c26;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --text: #eceaff;
  --muted: #a3a0c7;
  --primary: #7c5cff;
  --accent: #00e5ff;
  --pink: #ff4d9d;
  --gold: #ffd166;
  --danger: #ff5c7a;
  --success: #2ee6a6;
  --grad: linear-gradient(120deg, var(--primary), var(--accent));
  --radius: 18px;
  --shadow: 0 20px 50px -20px rgba(124, 92, 255, 0.45);
  --header-h: 76px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  font-family: "Poppins", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

.container { width: min(1200px, 100% - 40px); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1 { font-family: "Orbitron", sans-serif; font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: .5px; }
h2 { font-family: "Orbitron", sans-serif; font-size: clamp(1.7rem, 3.4vw, 2.6rem); letter-spacing: .4px; }
h3 { font-size: 1.2rem; }

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 12px; font-weight: 600; font-size: .95rem;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s;
  white-space: nowrap; position: relative; overflow: hidden;
}
.btn-lg { padding: 15px 30px; font-size: 1rem; }
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 10px 30px -10px rgba(124, 92, 255, .8);
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 36px -10px rgba(0, 229, 255, .7); }
.btn-ghost { border: 1px solid var(--border); background: var(--surface); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h);
  display: flex; align-items: center;
  transition: background .4s, box-shadow .4s, height .4s;
}
.header.scrolled {
  background: rgba(7, 7, 26, .82); backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border); --header-h: 66px; height: 66px;
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.logo { display: flex; align-items: center; gap: 10px; font-family: "Orbitron", sans-serif; font-size: 1.35rem; font-weight: 800; }
.logo b { color: var(--accent); font-weight: 800; }
.logo img { width: 40px; transition: transform .6s var(--ease); }
.logo:hover img { transform: rotate(60deg); }

.nav { display: flex; align-items: center; gap: 28px; }
.nav-list { display: flex; gap: 6px; }
.nav-link {
  position: relative; padding: 8px 14px; font-size: .93rem; font-weight: 500; color: var(--muted);
  transition: color .3s;
}
.nav-link::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  background: var(--grad); border-radius: 2px; transform: scaleX(0); transition: transform .35s var(--ease);
}
.nav-link:hover, .nav-link.active { color: #fff; }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

.menu-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); position: relative; }
.menu-toggle span {
  position: absolute; left: 12px; right: 12px; height: 2px; background: #fff; border-radius: 2px;
  transition: transform .35s var(--ease), opacity .25s, top .35s var(--ease);
}
.menu-toggle span:nth-child(1) { top: 15px; }
.menu-toggle span:nth-child(2) { top: 21px; }
.menu-toggle span:nth-child(3) { top: 27px; }
.menu-toggle.open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ---------- Banner ---------- */
.banner {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding: calc(var(--header-h) + 50px) 0 80px; overflow: hidden;
}
.banner-bg { position: absolute; inset: 0; z-index: -1; }
.banner-bg::after { content: ""; position: absolute; inset: auto 0 0; height: 180px; background: linear-gradient(to bottom, transparent, var(--bg)); }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; animation: float 12s ease-in-out infinite; }
.orb-1 { width: 480px; height: 480px; background: var(--primary); top: -120px; left: -120px; }
.orb-2 { width: 420px; height: 420px; background: var(--accent); bottom: -160px; right: -100px; opacity: .35; animation-delay: -6s; }
.grid-floor {
  position: absolute; inset: 55% -20% -10%;
  background-image:
    linear-gradient(rgba(124,92,255,.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,92,255,.25) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(500px) rotateX(60deg);
  mask-image: linear-gradient(to bottom, transparent, #000 40%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 40%, transparent);
  animation: gridMove 6s linear infinite;
}

.banner-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 50px; }
.banner-content > * + * { margin-top: 22px; }

.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: .85rem; color: var(--muted);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 var(--success); animation: pulse 2s infinite; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 540px; }
.banner-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Subscribe form */
.subscribe-form { max-width: 540px; }
.input-wrap {
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px;
  background: rgba(255,255,255,.06); border: 1px solid var(--border); border-radius: 14px;
  backdrop-filter: blur(10px); transition: border-color .3s, box-shadow .3s;
}
.input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0,229,255,.12); }
.input-wrap svg { width: 22px; height: 22px; color: var(--muted); flex-shrink: 0; }
.input-wrap input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff;
  font: inherit; font-size: .95rem; padding: 10px 4px;
}
.input-wrap input::placeholder { color: #7b78a3; }
.subscribe-form.has-error .input-wrap { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(255,92,122,.14); animation: shake .45s; }
.form-error {
  color: var(--danger); font-size: .87rem; margin-top: 8px; min-height: 1.3em;
  opacity: 0; transform: translateY(-4px); transition: opacity .3s, transform .3s;
}
.form-error.show { opacity: 1; transform: none; }
.form-error::before { content: "⚠ "; }
.form-error:empty::before { content: ""; }

.banner-stats { display: flex; gap: 36px; padding-top: 6px; }
.banner-stats li { display: flex; align-items: baseline; gap: 2px; flex-direction: column; }
.banner-stats strong { font-family: "Orbitron", sans-serif; font-size: 1.9rem; }
.banner-stats li > span { font-size: .85rem; color: var(--muted); }

.banner-visual img { width: 100%; animation: float 7s ease-in-out infinite; filter: drop-shadow(0 30px 50px rgba(124,92,255,.35)); }

/* ---------- Sections ---------- */
.section { padding: 60px 0; position: relative; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head > * + * { margin-top: 14px; }
.section-head p { color: var(--muted); }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--accent); padding: 5px 14px; border: 1px solid rgba(0,229,255,.3); border-radius: 99px;
  background: rgba(0,229,255,.06);
}

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.about-media { position: relative; }
.about-media img { border-radius: 28px; box-shadow: var(--shadow); }
.floating-card {
  position: absolute; right: -20px; bottom: -24px; padding: 18px 24px; border-radius: 16px;
  background: rgba(14,12,38,.85); border: 1px solid var(--border); backdrop-filter: blur(12px);
  display: flex; flex-direction: column; animation: float 6s ease-in-out infinite;
}
.floating-card strong { font-family: "Orbitron", sans-serif; font-size: 1.6rem; color: var(--accent); }
.floating-card span { font-size: .85rem; color: var(--muted); }
.about-content > * + * { margin-top: 20px; }
.about-content p { color: var(--muted); }
.check-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.check-list li { position: relative; padding-left: 30px; font-size: .95rem; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 6px;
  background: var(--grad); color: #fff; font-size: .75rem; display: grid; place-items: center; font-weight: 700;
}

/* Games */
.games { background: linear-gradient(180deg, transparent, var(--bg-2) 30%, var(--bg-2) 70%, transparent); }
.game-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.game-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  transition: transform .45s var(--ease), border-color .45s, box-shadow .45s;
}
.game-card:hover { transform: translateY(-10px); border-color: rgba(124,92,255,.6); box-shadow: var(--shadow); }
.game-thumb { position: relative; overflow: hidden; aspect-ratio: 400 / 260; }
.game-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.game-card:hover .game-thumb img { transform: scale(1.1) rotate(1deg); }
.tag {
  position: absolute; top: 12px; left: 12px; padding: 4px 12px; border-radius: 99px; font-size: .75rem; font-weight: 700;
  background: var(--pink); color: #fff; letter-spacing: .5px;
}
.tag-new { background: var(--success); color: #062a1f; }
.game-body { padding: 20px; }
.game-body p { color: var(--muted); font-size: .9rem; margin: 6px 0 16px; }
.game-meta { display: flex; justify-content: space-between; font-size: .82rem; color: var(--muted); }
.game-meta span:first-child { padding: 3px 10px; border-radius: 8px; background: var(--surface-2); }
.rating { color: var(--gold); font-weight: 600; }

/* Tournaments */
.tour-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tour-card {
  padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  position: relative; transition: transform .45s var(--ease), box-shadow .45s;
}
.tour-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.tour-card.featured {
  background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--grad) border-box;
  border: 1.5px solid transparent;
}
.tour-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; font-size: .82rem; }
.live { display: inline-flex; align-items: center; gap: 7px; color: var(--success); font-weight: 600; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 2s infinite; }
.tour-level { padding: 3px 10px; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.tour-card p { color: var(--muted); font-size: .92rem; margin: 8px 0 22px; }
.progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--grad); border-radius: inherit; transition: width 1.6s var(--ease); }
.tour-card.visible .progress span { width: var(--w); }
.tour-info { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: .83rem; color: var(--muted); }
.countdown { color: #fff; font-family: "Orbitron", sans-serif; font-weight: 600; letter-spacing: .5px; }

/* Why choose us */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature {
  padding: 32px 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  position: relative; overflow: hidden; transition: transform .45s var(--ease), border-color .45s;
}
.feature::before {
  content: ""; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(124,92,255,.18), transparent 40%);
  opacity: 0; transition: opacity .4s;
}
.feature:hover::before { opacity: 1; }
.feature:hover { transform: translateY(-8px); border-color: rgba(0,229,255,.4); }
.feature .icon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(124,92,255,.25), rgba(0,229,255,.18)); border: 1px solid var(--border);
  transition: transform .5s var(--ease);
}
.feature:hover .icon { transform: rotate(-8deg) scale(1.08); }
.feature .icon svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature p { color: var(--muted); font-size: .92rem; margin-top: 8px; }

/* FAQ */
.faq-wrap { max-width: 820px; }
.accordion { display: grid; gap: 14px; }
.acc-item { border-radius: 16px; background: var(--surface); border: 1px solid var(--border); transition: border-color .3s, background .3s; }
.acc-item.open { border-color: rgba(124,92,255,.55); background: var(--surface-2); }
.acc-btn {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 24px; text-align: left; font-weight: 600; font-size: 1rem;
}
.acc-icon { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); position: relative; flex-shrink: 0; transition: background .3s, transform .4s var(--ease); }
.acc-icon::before, .acc-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; background: #fff; transform: translate(-50%, -50%); transition: transform .4s var(--ease); }
.acc-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.acc-item.open .acc-icon { background: var(--grad); transform: rotate(180deg); }
.acc-item.open .acc-icon::after { transform: translate(-50%, -50%) rotate(0); }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.acc-panel > p { overflow: hidden; padding: 0 24px; color: var(--muted); }
.acc-item.open .acc-panel { grid-template-rows: 1fr; }
.acc-item.open .acc-panel > p { padding-bottom: 20px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-2); padding-top: 70px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 50px; }
.footer-brand > * + * { margin-top: 18px; }
.footer-brand p, .footer-col p { color: var(--muted); font-size: .92rem; }
.footer-col h4 { font-size: 1rem; margin-bottom: 18px; }
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { color: var(--muted); font-size: .93rem; transition: color .3s, padding .3s; }
.footer-col a:hover { color: var(--accent); padding-left: 6px; }
.age { display: flex; gap: 12px; align-items: flex-start; }
.age span {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--danger); color: var(--danger); font-weight: 700; font-size: .85rem;
}
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 22px 0; border-top: 1px solid var(--border); font-size: .88rem; color: var(--muted); }
.to-top { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 700; transition: transform .3s var(--ease); }
.to-top:hover { transform: translateY(-4px); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 200; max-width: 360px;
  display: flex; gap: 14px; align-items: flex-start; padding: 18px 44px 18px 18px;
  background: rgba(14,12,38,.95); border: 1px solid rgba(46,230,166,.45); border-radius: 16px;
  box-shadow: 0 20px 50px -15px rgba(46,230,166,.35); backdrop-filter: blur(14px);
  transform: translateY(140%); opacity: 0; transition: transform .6s var(--ease), opacity .4s;
}
.toast.show { transform: none; opacity: 1; }
.toast-icon { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--success); color: #062a1f; font-weight: 700; }
.toast p { color: var(--muted); font-size: .88rem; }
.toast-close { position: absolute; top: 8px; right: 12px; font-size: 1.3rem; color: var(--muted); }
.toast-close:hover { color: #fff; }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
@keyframes gridMove { to { background-position: 0 60px; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(46,230,166,.6); } 70% { box-shadow: 0 0 0 10px rgba(46,230,166,0); } 100% { box-shadow: 0 0 0 0 rgba(46,230,166,0); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Tablet landscape / small desktop */
@media (max-width: 1100px) {
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .nav { gap: 14px; }
  .nav-link { padding: 8px 10px; }
}

/* Tablet */
@media (max-width: 960px) {
  .menu-toggle { display: block; z-index: 110; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(340px, 85vw); flex-direction: column; align-items: stretch;
    justify-content: flex-start; gap: 24px; padding: 100px 28px 40px;
    background: rgba(10,9,30,.97); backdrop-filter: blur(18px); border-left: 1px solid var(--border);
    transform: translateX(100%); transition: transform .5s var(--ease); z-index: 105;
  }
  .nav.open { transform: none; box-shadow: -30px 0 60px rgba(0,0,0,.5); }
  .nav-list { flex-direction: column; gap: 4px; }
  .nav-link { display: block; font-size: 1.05rem; padding: 12px 14px; border-radius: 10px; }
  .nav-link::after { display: none; }
  .nav-link.active { background: var(--surface-2); }
  .nav-register { width: 100%; }
  body.menu-open { overflow: hidden; }

  .banner-grid { grid-template-columns: 1fr; text-align: center; }
  .banner-content { display: flex; flex-direction: column; align-items: center; }
  .banner-actions, .banner-stats { justify-content: center; }
  .subscribe-form { width: 100%; }
  .form-error { text-align: left; }
  .banner-visual { max-width: 440px; margin-inline: auto; order: -1; }

  .about-grid { grid-template-columns: 1fr; gap: 60px; }
  .about-media { max-width: 600px; margin-inline: auto; }
  .tour-grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 90px 0; }
}

/* Mobile */
@media (max-width: 600px) {
  .feature {
    padding: 25px 20px;
  }
  .container { width: calc(100% - 32px); }
  .banner { padding-top: calc(var(--header-h) + 30px); min-height: auto; }
  .banner-visual { max-width: 300px; order: 0; }
  .banner-actions { flex-direction: column; width: 100%; }
  .banner-actions .btn { width: 100%; }
  .input-wrap { flex-wrap: wrap; padding: 6px; }
  .input-wrap svg { margin-left: 10px; }
  .input-wrap input { flex: 1 1 calc(100% - 50px); }
  .input-wrap .btn { width: 100%; }
  .banner-stats { gap: 22px; }
  .banner-stats strong { font-size: 1.5rem; }
  .check-list { grid-template-columns: 1fr; }
  .floating-card { right: 10px; bottom: -20px; padding: 12px 18px; }
  .game-grid, .feature-grid { grid-template-columns: 1fr; }
  .game-grid { max-width: 420px; margin-inline: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-brand, .footer-col:last-child { grid-column: 1 / -1; }
  .section { padding: 40px 0; }
  .section-head { margin-bottom: 40px; }
  .toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }
  .acc-btn {
    padding: 14px 14px;
  }
  .acc-panel > p {
    padding: 0px 15px 100px;
  }
}
