/*
  assets/css/game.css
  Styles dédiées au hub de mini-jeux et à l'interface de sélection.
*/

:root {
  --bg: #000;
  --accent: #00ff88;
  --text: #e6f6ee;
  --muted: #7f9aa0;
  --panel: rgba(0, 255, 136, 0.05);
  --radius: 18px;
  --shadow: 0 0 30px rgba(0, 255, 136, 0.15);
  --glow: 0 0 12px rgba(0, 255, 136, 0.6);
  --ease: cubic-bezier(.2, .9, .2, 1);
}

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

body {
  font-family: "Fira Code", monospace;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

canvas.bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
}

.overlay,
.scanline {
  position: fixed;
  inset: 0;
  z-index: -2;
}

.overlay {
  background: radial-gradient(circle at 50% 30%, rgba(0, 255, 136, 0.05), transparent 70%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.9));
}

.scanline {
  background: repeating-linear-gradient(0deg, rgba(0, 255, 136, 0.03) 0px, transparent 1px, transparent 2px);
  mix-blend-mode: overlay;
  animation: scan 8s linear infinite;
}

@keyframes scan {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

header {
  padding: 60px 20px 40px;
  text-align: center;
  max-width: 1000px;
  margin: auto;
}

.name {
  font-size: clamp(2.6rem, 5vw, 3.2rem);
  color: var(--accent);
  text-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
  animation: glowPulse 3s infinite ease-in-out;
}

.lead {
  color: var(--muted);
  margin-top: 12px;
  font-size: 1rem;
}

.header-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.lang-toggle {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.lang-btn {
  border: 1px solid rgba(0, 255, 136, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.lang-btn.active,
.lang-btn:hover {
  background: rgba(0, 255, 136, 0.16);
  border-color: var(--accent);
  color: var(--accent);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.25s var(--ease);
}

.cta:hover {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

main {
  max-width: 900px;
  margin: auto;
  padding: 0 20px 80px;
}

section {
  margin: 40px 0;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.05);
  overflow: hidden;
}

.section-title {
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: inline-block;
}

.card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(0, 255, 136, 0.12);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.05);
}

.card h2 {
  font-size: clamp(1.5rem, 2.5vw, 1.9rem);
  margin-bottom: 12px;
}

.card p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.game-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(0, 255, 136, 0.12);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s var(--ease);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.05);
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 255, 136, 0.3);
  box-shadow: 0 8px 32px rgba(0, 255, 136, 0.15);
}

.game-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: rgba(0, 255, 136, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(0, 255, 136, 0.2);
}

.game-icon i {
  font-size: 28px;
  color: var(--accent);
}

.game-card h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--text);
}

.game-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.game-btn {
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 255, 136, 0.05));
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  border: 1px solid rgba(0, 255, 136, 0.2);
}

.game-btn:hover {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.8), rgba(0, 255, 136, 0.6));
  color: #000;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 255, 136, 0.3);
}

.challenge-option h2 {
  color: var(--accent);
  margin-bottom: 12px;
  font-size: 1.4rem;
}

.challenge-option p {
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 40px;
}

@media (prefers-reduced-motion: reduce) {
  .scanline,
  .name {
    animation: none !important;
    transition: none !important;
  }
}
