:root {
  --bg: #07080d;
  --surface: rgba(18, 20, 32, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f1f3f9;
  --muted: #8b92a8;
  --accent: #00d4aa;
  --accent2: #6366f1;
  --game-accent: #00d4aa;
  --danger: #f43f5e;
  --radius: 16px;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--game-accent, var(--accent));
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #fff;
}

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

/* Animated background */
.bg-effects {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: float 18s ease-in-out infinite;
}

.orb-1 {
  width: 420px;
  height: 420px;
  background: var(--game-accent, var(--accent));
  top: -120px;
  left: -80px;
}

.orb-2 {
  width: 360px;
  height: 360px;
  background: var(--accent2);
  bottom: -100px;
  right: -60px;
  animation-delay: -6s;
}

.orb-3 {
  width: 280px;
  height: 280px;
  background: #ec4899;
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.2;
  animation-delay: -12s;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  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(ellipse at center, black 20%, transparent 75%);
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -25px) scale(1.05);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(7, 8, 13, 0.6);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
}

.logo:hover {
  color: var(--text);
  text-decoration: none;
}

.logo-icon {
  color: var(--game-accent, var(--accent));
  font-size: 1.4rem;
}

.logo-accent {
  color: var(--game-accent, var(--accent));
}

.nav-trust {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.trust-pill {
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  }
  50% {
    opacity: 0.7;
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

/* Home hero */
.home-hero {
  text-align: center;
  padding: 3rem 0 2.5rem;
  animation: fadeUp 0.8s ease;
}

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

.home-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--game-accent, var(--accent)), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-hero .lead {
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.stat-item {
  text-align: center;
  animation: fadeUp 0.8s ease backwards;
}

.stat-item:nth-child(2) {
  animation-delay: 0.1s;
}
.stat-item:nth-child(3) {
  animation-delay: 0.2s;
}

.stat-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--game-accent, var(--accent));
}

.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Glass */
.glass {
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Game grid home */
.section-title {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.game-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.game-card-link:hover {
  color: inherit;
  text-decoration: none;
}

.game-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  opacity: 1;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s, box-shadow 0.3s;
  animation: fadeUp 0.6s ease both;
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 40px color-mix(in srgb, var(--card-accent, var(--accent)) 25%, transparent);
}

.game-card-thumb {
  position: relative;
  height: 140px;
  overflow: hidden;
}

.game-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.game-card:hover .game-card-thumb img {
  transform: scale(1.08);
}

.game-card-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(7, 8, 13, 0.95));
}

.game-card-body {
  padding: 1rem 1.15rem 1.15rem;
}

.game-card h2 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.game-card p {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag-seo {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.7rem;
  background: color-mix(in srgb, var(--card-accent, var(--accent)) 18%, transparent);
  color: color-mix(in srgb, var(--card-accent, var(--accent)) 80%, #fff);
  border: 1px solid color-mix(in srgb, var(--card-accent, var(--accent)) 35%, transparent);
}

.card-emoji-thumb {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.2));
}

.page-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: 0.5rem;
  vertical-align: middle;
}

.home-hero-compact {
  margin-bottom: 1.5rem;
}

.home-hero-compact h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.home-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2.5rem 0 1rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.page-nums {
  display: flex;
  gap: 0.5rem;
}

.page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border: 1px solid var(--border);
  transition: background 0.2s, color 0.2s;
}

.page-num:hover,
.page-num.is-active {
  background: var(--accent);
  color: #07080d;
  border-color: var(--accent);
}

.page-arrow {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.page-arrow:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.grid-loading,
.grid-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
}

.grid-error strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.grid-error a {
  color: var(--accent);
}

.grid-error code {
  font-size: 0.9em;
  color: var(--accent);
}

.btn-card {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.7rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  background: linear-gradient(135deg, var(--card-accent, var(--accent)), color-mix(in srgb, var(--card-accent, var(--accent)) 60%, var(--accent2)));
  color: #fff;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--card-accent, var(--accent)) 40%, transparent);
  color: #fff;
  text-decoration: none;
}

/* Generator page */
.page-wrap {
  padding-top: 1.5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--text);
}

.game-hero {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  animation: fadeUp 0.7s ease;
}

.hero-visual {
  position: relative;
  flex-shrink: 0;
}

.hero-img {
  width: 120px;
  height: 120px;
  border-radius: 20px;
  border: 3px solid var(--border);
  position: relative;
  z-index: 1;
  animation: heroBob 4s ease-in-out infinite;
}

@keyframes heroBob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.hero-glow {
  position: absolute;
  inset: -20%;
  background: var(--game-accent);
  filter: blur(40px);
  opacity: 0.35;
  border-radius: 50%;
  animation: glowPulse 3s ease infinite;
}

@keyframes glowPulse {
  0%,
  100% {
    opacity: 0.25;
  }
  50% {
    opacity: 0.5;
  }
}

.game-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
}

.hero-sub {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.35rem;
}

.hero-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

.badge-hot {
  background: rgba(244, 63, 94, 0.2);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-players {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.layout-two-col {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .layout-two-col {
    grid-template-columns: 1fr;
  }
}

.seo-article {
  padding: 1.5rem 1.75rem;
  animation: fadeUp 0.8s ease 0.1s backwards;
}

.seo-article h2 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.seo-article h3 {
  font-size: 1rem;
  margin: 1.25rem 0 0.5rem;
  color: var(--game-accent);
}

.seo-article p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}

.reward-list {
  margin: 0.75rem 0 1rem 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.reward-list li {
  margin-bottom: 0.35rem;
}

.reward-list li::marker {
  color: var(--game-accent);
}

.seo-footer-note {
  font-size: 0.85rem !important;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* Generator panel */
.gen-panel {
  padding: 1.35rem;
  position: sticky;
  top: 5rem;
  animation: fadeUp 0.8s ease 0.2s backwards;
}

.gen-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.gen-panel-head h2 {
  font-size: 1.1rem;
}

.gen-status {
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--muted);
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  opacity: 0.6;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.5rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group select {
  padding-left: 1rem;
  cursor: pointer;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--game-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--game-accent) 25%, transparent);
}

.btn-glow {
  position: relative;
  width: 100%;
  padding: 0.95rem 1.25rem;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  overflow: hidden;
  background: linear-gradient(135deg, var(--game-accent), color-mix(in srgb, var(--game-accent) 50%, var(--accent2)));
  color: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-glow:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--game-accent) 45%, transparent);
}

.btn-glow:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  animation: shine 3s ease infinite;
}

@keyframes shine {
  0% {
    left: -100%;
  }
  40%,
  100% {
    left: 150%;
  }
}

.progress-wrap {
  display: none;
  margin-top: 1.25rem;
}

.progress-wrap.active {
  display: block;
}

.progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--game-accent), #fff);
  border-radius: 999px;
  transition: width 0.35s ease;
  box-shadow: 0 0 12px var(--game-accent);
}

.progress-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.5rem;
}

.console {
  display: none;
  margin-top: 1rem;
  padding: 0.75rem;
  background: #030406;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.7rem;
  max-height: 160px;
  overflow-y: auto;
}

.console.active {
  display: block;
}

.console .line {
  margin: 0.12rem 0;
  animation: lineIn 0.25s ease;
}

@keyframes lineIn {
  from {
    opacity: 0;
    transform: translateX(-4px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.console .ok {
  color: #4ade80;
}
.console .info {
  color: #60a5fa;
}
.console .warn {
  color: #fbbf24;
}

.verify-box {
  display: none;
  text-align: center;
  padding: 1.25rem;
  margin-top: 1rem;
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--game-accent) 50%, transparent);
  background: rgba(0, 0, 0, 0.25);
}

.verify-box.active {
  display: block;
}

.verify-ring {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.75rem;
  border: 3px solid var(--border);
  border-top-color: var(--game-accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.verify-sub {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.reveal-panel {
  display: none;
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.reveal-panel.active {
  display: block;
  animation: fadeUp 0.5s ease;
}

.reveal-panel h2 {
  font-size: 0.95rem;
  color: #fb7185;
  margin-bottom: 0.5rem;
}

.reveal-panel ul {
  margin: 0.5rem 0 0.5rem 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.reveal-demo {
  font-size: 0.78rem;
  margin-top: 0.5rem;
  color: #fbbf24;
}

.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

/* Trust section home */
.trust-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2.5rem 0;
}

.trust-card {
  padding: 1.25rem;
  text-align: center;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.3s;
}

.trust-card:hover {
  transform: translateY(-4px);
}

.trust-card .icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.trust-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.trust-card p {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Barre recherche jeux */
.game-search-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem 1rem;
  position: relative;
  z-index: 120;
}

.page-generator .game-search-wrap {
  padding-top: 0.5rem;
  padding-bottom: 0.75rem;
}

.game-search-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.game-search-icon {
  font-size: 1.1rem;
  opacity: 0.7;
  flex-shrink: 0;
}

.game-search-inner input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  outline: none;
  min-width: 0;
}

.game-search-inner input::placeholder {
  color: var(--muted);
}

.game-search-results {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  top: calc(100% + 0.35rem);
  max-height: 320px;
  overflow-y: auto;
  border-radius: 14px;
  background: rgba(12, 14, 22, 0.98);
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.game-search-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.15s;
}

.game-search-item:last-child {
  border-bottom: none;
}

.game-search-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-decoration: none;
}

.game-search-item img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.game-search-emoji {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.game-search-item span {
  font-weight: 600;
  font-size: 0.9rem;
}

.game-search-empty {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}

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