/* Invaders Arcade — CSS scoped (ne casse pas ton thème) */

.invaders-wrap{
  --bg: #05060a;
  --fg: #eaf2ff;
  --muted: rgba(234,242,255,.75);
  --glow: rgba(120,220,255,.35);
  --accent: #7bf7c5;
  --warn: #ff5c7c;
  --line: rgba(255,255,255,.08);
  --scan: rgba(255,255,255,.06);
  --vignette: rgba(0,0,0,.65);
  --shadow: rgba(0,0,0,.55);

  color: var(--fg);
  font-family: "Press Start 2P", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  letter-spacing: .02em;

  background: radial-gradient(1200px 700px at 50% 10%, rgba(70,110,255,.08), transparent 55%),
              radial-gradient(900px 500px at 15% 85%, rgba(123,247,197,.06), transparent 55%),
              var(--bg);
  border-radius: 18px;
  padding: 16px;
}

.invaders-wrap *{ box-sizing: border-box; }

.inv-stage{
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  align-items: start;
  justify-items: center;
}

.inv-topbar{
  width: min(980px, 100%);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(10,12,18,.6);
  box-shadow: 0 18px 40px var(--shadow);
  backdrop-filter: blur(8px);
}
.inv-brand{
  font-size: 16px;
  text-shadow: 0 0 18px var(--glow);
}
.inv-hud{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 10px;
  color: var(--muted);
}
.inv-hud span{
  color: var(--fg);
  text-shadow: 0 0 16px rgba(123,247,197,.25);
}

.inv-cabinet{
  width: min(980px, 100%);
  background: linear-gradient(180deg, rgba(255,255,255,.04), transparent 55%),
              rgba(8,10,16,.55);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 35px 90px rgba(0,0,0,.55);
}

.inv-crt{
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: radial-gradient(900px 600px at 50% 15%, rgba(123,247,197,.08), transparent 60%),
              #02030a;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06),
              0 18px 60px rgba(0,0,0,.55);
}

#game{
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  transform: translateZ(0);
  filter: drop-shadow(0 0 18px rgba(123,247,197,.10));
}

.inv-overlay{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: var(--fg);
  text-shadow: 0 0 18px rgba(123,247,197,.18);
}
.inv-overlay-inner{
  width: min(540px, 90%);
  padding: 18px 16px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  background: rgba(0,0,0,.42);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
}
.inv-title{
  font-size: 22px;
  letter-spacing: .08em;
  margin-bottom: 10px;
}
.inv-subtitle{
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 14px;
}
.inv-instructions{
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 10px;
}
.inv-k{
  display: inline-block;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: var(--fg);
  margin: 0 2px;
}
.inv-cta{
  font-size: 10px;
  color: var(--accent);
  animation: inv-blink 1.1s steps(2, end) infinite;
  margin: 10px 0;
}
@keyframes inv-blink { 50% { opacity: .15; } }

.inv-auth{
  font-size: 9px;
  color: rgba(234,242,255,.70);
  margin-top: 6px;
}

.inv-lb{
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255,255,255,.14);
}
.inv-lb-title{
  font-size: 10px;
  color: rgba(234,242,255,.85);
  margin-bottom: 8px;
}
.inv-lb-list{
  margin: 0;
  padding-left: 18px;
  color: rgba(234,242,255,.70);
  font-size: 9px;
  line-height: 1.65;
}
.inv-lb-list li{
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.inv-lb-list .name{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
}
.inv-lb-list .pts{
  color: var(--fg);
}

.inv-fineprint{
  margin-top: 10px;
  font-size: 8px;
  color: rgba(234,242,255,.55);
}

/* CRT FX */
.inv-crt::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0) 0px,
      rgba(255,255,255,0) 3px,
      var(--scan) 4px
    );
  mix-blend-mode: overlay;
  opacity: .45;
}
.inv-crt::after{
  content:"";
  position:absolute;
  inset:-1px;
  pointer-events:none;
  background:
    radial-gradient(900px 700px at 50% 10%, rgba(255,255,255,.08), transparent 55%),
    radial-gradient(900px 700px at 50% 120%, rgba(0,0,0,.65), transparent 45%),
    radial-gradient(1200px 900px at 50% 50%, transparent 55%, var(--vignette) 100%);
  opacity: .9;
}

/* Mobile controls */
.inv-mobile-controls{
  display: none;
  gap: 12px;
  padding: 12px 0 0;
  justify-content: center;
}
.inv-btn{
  width: 64px;
  height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--fg);
  font-family: inherit;
  font-size: 18px;
  box-shadow: 0 12px 28px rgba(0,0,0,.45);
  user-select: none;
  touch-action: manipulation;
}
.inv-btn:active{
  transform: translateY(1px);
  border-color: rgba(123,247,197,.35);
  box-shadow: 0 0 0 2px rgba(123,247,197,.14), 0 12px 28px rgba(0,0,0,.45);
}

/* Responsive */
@media (max-width: 720px){
  .inv-hud{ font-size: 9px; }
  .inv-brand{ font-size: 14px; }
  .inv-mobile-controls{ display: flex; }
}
