/* ============================================
   NoRules PvP — Feuille de style principale
   ============================================ */

:root {
  --bg: #0a0a0f;
  --bg-alt: #101018;
  --surface: #15151f;
  --surface-hover: #1c1c28;
  --border: #2a2a3a;

  --neon-red: #ff2323;
  --neon-purple: #b3001b;
  --neon-cyan: #2de3ff;

  --text: #f2f2f7;
  --text-dim: #9a9ab0;
  --text-faint: #5c5c72;

  --radius: 14px;
  --radius-sm: 8px;

  --font-display: "Rajdhani", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

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

::selection {
  background: var(--neon-red);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

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

/* ---------- Background FX ---------- */

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 35, 35, 0.18), transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(179, 0, 27, 0.18), transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(45, 227, 255, 0.08), transparent 40%);
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 30%, black, transparent 75%);
}

main, header, footer {
  position: relative;
  z-index: 1;
}

/* ---------- Navbar ---------- */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.75);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.5px;
}

.brand .logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 0 18px rgba(255, 35, 35, 0.55);
}

.foot-brand .logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
  box-shadow: 0 0 14px rgba(255, 35, 35, 0.5);
}

.brand span.accent {
  background: linear-gradient(90deg, var(--neon-red), var(--neon-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  position: relative;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-red), var(--neon-purple));
  transition: width 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  background: linear-gradient(90deg, var(--neon-red), var(--neon-purple));
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 45, 85, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(255, 45, 85, 0.55);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Hero ---------- */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 0 80px;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 28px;
  opacity: 0;
  animation: fade-up 0.7s ease forwards;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2dff8e;
  box-shadow: 0 0 8px #2dff8e;
  animation: pulse 1.8s ease-in-out infinite;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.8rem, 8vw, 6rem);
  line-height: 1.02;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0;
  animation: fade-up 0.8s ease 0.1s forwards;
}

.hero h1 .glitch {
  position: relative;
  display: inline-block;
  background: linear-gradient(90deg, #ff8a3d, var(--neon-red), var(--neon-purple));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-shift 6s ease infinite;
}

.hero h1 .glitch::before,
.hero h1 .glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #ff8a3d, var(--neon-red), var(--neon-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
}

.hero h1 .glitch:hover::before {
  opacity: 0.8;
  animation: glitch-1 0.35s steps(2, end) infinite;
}

.hero h1 .glitch:hover::after {
  opacity: 0.8;
  animation: glitch-2 0.35s steps(2, end) infinite;
}

.hero p.tagline {
  margin-top: 22px;
  margin-inline: auto;
  max-width: 620px;
  font-size: 1.1rem;
  color: var(--text-dim);
  opacity: 0;
  animation: fade-up 0.8s ease 0.2s forwards;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 38px;
  opacity: 0;
  animation: fade-up 0.8s ease 0.3s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: linear-gradient(90deg, var(--neon-red), var(--neon-purple));
  color: #fff;
  box-shadow: 0 0 30px rgba(255, 45, 85, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 4px 40px rgba(255, 45, 85, 0.6);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--neon-cyan);
  transform: translateY(-3px);
}

.btn svg {
  width: 18px;
  height: 18px;
}

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 0;
  right: 0;
  margin-inline: auto;
  width: fit-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0;
  animation: fade-up 0.8s ease 0.5s forwards;
}

.scroll-cue .line {
  width: 1px;
  height: 36px;
  background: linear-gradient(var(--text-faint), transparent);
  animation: scroll-line 1.8s ease-in-out infinite;
}

/* ---------- Stats ---------- */

.stats {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.015), transparent);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-card {
  padding: 20px;
  opacity: 0;
  transform: translateY(20px);
}

.stat-card.in-view {
  animation: fade-up 0.6s ease forwards;
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  background: linear-gradient(90deg, #ff5b3d, var(--neon-red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-card .live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2dff8e;
  margin-right: 6px;
  box-shadow: 0 0 8px #2dff8e;
  animation: pulse 1.8s ease-in-out infinite;
}

/* ---------- Section shared ---------- */

section {
  padding: 110px 0;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 60px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--neon-cyan);
  margin-bottom: 14px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-head p {
  margin-top: 14px;
  color: var(--text-dim);
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Features ---------- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  position: relative;
  padding: 32px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--neon-red), transparent 40%, var(--neon-cyan) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-6px);
  background: var(--surface-hover);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255, 35, 35, 0.2), rgba(179, 0, 27, 0.2));
  border: 1px solid var(--border);
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---------- Discord CTA ---------- */

.discord-cta {
  position: relative;
  padding: 64px 48px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(179, 0, 27, 0.18), rgba(255, 35, 35, 0.12));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  overflow: hidden;
  flex-wrap: wrap;
}

.discord-cta::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(179, 0, 27, 0.35), transparent 70%);
  top: -120px;
  right: -80px;
  pointer-events: none;
}

.discord-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  text-transform: uppercase;
}

.discord-cta p {
  margin-top: 10px;
  color: var(--text-dim);
  max-width: 420px;
}

.discord-cta .btn-primary {
  background: linear-gradient(90deg, #5865f2, #8b2dff);
  box-shadow: 0 0 30px rgba(88, 101, 242, 0.4);
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

footer .foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
}

footer .foot-links {
  display: flex;
  gap: 24px;
}

footer .foot-links a {
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

footer .foot-links a:hover {
  color: var(--neon-cyan);
}

footer small {
  color: var(--text-faint);
}

/* ---------- Boutique page ---------- */

.shop-hero {
  padding: 150px 0 60px;
  text-align: center;
}

.shop-hero .eyebrow {
  color: var(--neon-red);
}

.shop-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  text-transform: uppercase;
}

.shop-hero p {
  margin-top: 16px;
  color: var(--text-dim);
  max-width: 560px;
  margin-inline: auto;
}

.nocoin-balance {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 700;
}

.nocoin-balance .coin {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: contain;
  box-shadow: 0 0 14px rgba(255, 45, 45, 0.5);
}

.shop-notice {
  max-width: 720px;
  margin: 0 auto 50px;
  padding: 16px 22px;
  border-radius: var(--radius-sm);
  background: rgba(255, 45, 85, 0.08);
  border: 1px solid rgba(255, 45, 85, 0.3);
  color: var(--text-dim);
  font-size: 0.9rem;
  text-align: center;
}

.shop-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.filter-btn {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--neon-cyan);
}

.filter-btn.active {
  color: #fff;
  background: linear-gradient(90deg, var(--neon-red), var(--neon-purple));
  border-color: transparent;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  padding-bottom: 100px;
}

.shop-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.shop-card:hover {
  transform: translateY(-6px);
  border-color: var(--neon-purple);
}

.shop-card .card-media {
  aspect-ratio: 1 / 1;
  background:
    linear-gradient(135deg, rgba(255, 45, 85, 0.15), rgba(45, 227, 255, 0.12)),
    var(--bg-alt);
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  position: relative;
}

.shop-card .rarity-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.rarity-common { color: #b7b7c9; }
.rarity-rare { color: var(--neon-cyan); }
.rarity-epic { color: var(--neon-purple); }
.rarity-legendary { color: #ffd23f; }

.shop-card .card-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shop-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.shop-card .card-desc {
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.5;
  flex: 1;
}

.shop-card .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.price-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.price-tag .coin {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: contain;
}

.buy-btn {
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-faint);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: not-allowed;
}

/* ---------- Animations ---------- */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes glitch-1 {
  0% { clip-path: inset(0 0 90% 0); transform: translate(-2px, -1px); }
  50% { clip-path: inset(40% 0 30% 0); transform: translate(2px, 1px); }
  100% { clip-path: inset(80% 0 5% 0); transform: translate(-1px, 2px); }
}

@keyframes glitch-2 {
  0% { clip-path: inset(60% 0 5% 0); transform: translate(2px, 0); }
  50% { clip-path: inset(10% 0 70% 0); transform: translate(-2px, 1px); }
  100% { clip-path: inset(30% 0 40% 0); transform: translate(1px, -2px); }
}

@keyframes scroll-line {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  50.01% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  .navbar.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.97);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }

  .navbar.open .nav-cta {
    display: inline-flex;
    margin: 0 24px 24px;
  }

  .discord-cta { flex-direction: column; text-align: center; padding: 40px 24px; }
  .discord-cta::after { display: none; }
}

@media (max-width: 560px) {
  .features-grid, .shop-grid, .stats-grid { grid-template-columns: 1fr; }
  section { padding: 70px 0; }
}

/* ---------- Toast notification ---------- */
.nr-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(18, 18, 26, 0.95);
  border: 1px solid var(--accent);
  color: #fff;
  padding: 14px 22px;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 45, 85, 0.3);
  z-index: 9999;
  display: none;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(10px);
  animation: toastIn 0.3s ease-out;
  max-width: 90vw;
}

.nr-toast.visible {
  display: flex;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
