/* Neko Arcade — Soft Paws Hard Mode · arcade flare */

.section.game {
  padding-bottom: 12px;
}

.arcade-night-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 4px 12px 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(245, 180, 50, 0.35);
  background: linear-gradient(90deg, rgba(196, 92, 38, 0.4), rgba(245, 180, 50, 0.14));
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  box-shadow: 0 0 18px rgba(245, 180, 50, 0.3);
}

.arcade-night-chip .chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e8887a;
  box-shadow: 0 0 8px #e8887a;
  animation: arcade-blink 0.9s steps(2, end) infinite;
}

@keyframes arcade-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0.15;
  }
}

.game-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.arcade-cabinet {
  position: relative;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(500px 180px at 80% 0%, rgba(196, 92, 38, 0.25), transparent 60%),
    linear-gradient(180deg, #1a140e 0%, #0a0806 100%);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(245, 180, 50, 0.14),
    0 0 28px rgba(245, 180, 50, 0.35),
    0 0 48px rgba(196, 92, 38, 0.2),
    inset 0 0 0 1px rgba(245, 180, 50, 0.08);
  overflow: hidden;
  animation: cabinet-glow 2.8s ease-in-out infinite;
}

@keyframes cabinet-glow {
  0%,
  100% {
    box-shadow:
      0 24px 60px rgba(0, 0, 0, 0.45),
      0 0 0 1px rgba(245, 180, 50, 0.14),
      0 0 22px rgba(245, 180, 50, 0.28),
      0 0 40px rgba(196, 92, 38, 0.16),
      inset 0 0 0 1px rgba(245, 180, 50, 0.08);
  }
  50% {
    box-shadow:
      0 24px 60px rgba(0, 0, 0, 0.45),
      0 0 0 1px rgba(252, 211, 77, 0.35),
      0 0 36px rgba(245, 180, 50, 0.55),
      0 0 64px rgba(196, 92, 38, 0.3),
      inset 0 0 0 1px rgba(245, 180, 50, 0.14);
  }
}

.arcade-bezel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.35);
}

.arcade-bezel .cab-title {
  color: var(--accent-hot);
  font-weight: 600;
  text-shadow: 0 0 10px rgba(245, 180, 50, 0.5);
}

.arcade-bezel .cab-score {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(245, 180, 50, 0.4);
}

.arcade-bezel .cab-score #game-score,
.arcade-bezel .cab-score #game-treats,
.arcade-bezel .cab-score #game-combo {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.arcade-bezel .cab-score #game-score {
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.55);
}

.arcade-bezel .cab-score #game-combo {
  color: #fbbf24;
  min-width: 1.8em;
  display: inline-block;
  text-align: center;
}

.arcade-bezel .cab-score #game-combo.hot {
  color: #fbbf24;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.7);
  animation: combo-pulse 0.45s ease-out;
}

@keyframes combo-pulse {
  0% {
    transform: scale(1.35);
  }
  100% {
    transform: scale(1);
  }
}

.arcade-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #080604;
}

#neko-game {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: pointer;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* CRT scanlines + vignette + subtle chromatic fringe */
.arcade-crt {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 42%, rgba(0, 0, 0, 0.55) 100%),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 2px,
      rgba(0, 0, 0, 0.18) 2px,
      rgba(0, 0, 0, 0.18) 3px
    );
  mix-blend-mode: multiply;
  opacity: 0.55;
  z-index: 2;
}

.arcade-crt::before,
.arcade-crt::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.06;
}

.arcade-crt::before {
  background: linear-gradient(90deg, rgba(232, 136, 122, 0.35), transparent 8%, transparent 92%, rgba(245, 180, 50, 0.35));
  transform: translateX(-0.6px);
}

.arcade-crt::after {
  background: linear-gradient(90deg, rgba(245, 180, 50, 0.25), transparent 10%, transparent 90%, rgba(196, 92, 38, 0.3));
  transform: translateX(0.6px);
}

.arcade-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}

.arcade-hint {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.arcade-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Coin-slot Start */
.btn.coin-slot {
  position: relative;
  padding-left: 28px;
  border-color: rgba(251, 191, 36, 0.45);
  background: linear-gradient(180deg, #d97706 0%, #92400e 100%);
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.2),
    0 0 18px rgba(245, 180, 50, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: coin-pulse 1.8s ease-in-out infinite;
}

.btn.coin-slot::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 10px;
  height: 14px;
  margin-top: -7px;
  border-radius: 2px;
  border: 1.5px solid rgba(251, 191, 36, 0.85);
  background: linear-gradient(180deg, #0a0806 40%, rgba(251, 191, 36, 0.25) 40%, rgba(251, 191, 36, 0.25) 58%, #0a0806 58%);
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.45);
}

@keyframes coin-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(251, 191, 36, 0.2),
      0 0 14px rgba(245, 180, 50, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(251, 191, 36, 0.45),
      0 0 28px rgba(245, 180, 50, 0.55),
      0 0 40px rgba(196, 92, 38, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.16);
  }
}

.game-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.game-panel {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(24, 20, 16, 0.75);
}

.game-panel h3 {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--accent-hot);
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.game-panel p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.pb-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.pb-row strong {
  color: var(--accent);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(245, 180, 50, 0.45);
}

.score-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.score-form input {
  flex: 1 1 120px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #080604;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  outline: none;
}

.score-form input:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(245, 180, 50, 0.18);
}

.lb-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  vertical-align: middle;
}

.lb-badge.shared {
  color: var(--accent);
  border-color: rgba(245, 180, 50, 0.4);
  background: rgba(245, 180, 50, 0.1);
}

.lb-badge.local {
  color: var(--warn);
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
}

.lb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lb-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid transparent;
  font-family: var(--mono);
  font-size: 12px;
}

.lb-list li.top3 {
  border-color: rgba(245, 180, 50, 0.3);
  background: rgba(245, 180, 50, 0.08);
}

.lb-list li.rank-gold {
  border-color: rgba(251, 191, 36, 0.55);
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.16), rgba(0, 0, 0, 0.2));
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.12);
}

.lb-list li.rank-silver {
  border-color: rgba(203, 213, 225, 0.45);
  background: linear-gradient(90deg, rgba(203, 213, 225, 0.12), rgba(0, 0, 0, 0.2));
}

.lb-list li.rank-bronze {
  border-color: rgba(217, 119, 6, 0.5);
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.14), rgba(0, 0, 0, 0.2));
}

.lb-rank {
  color: var(--accent-hot);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.lb-medal {
  font-size: 12px;
  line-height: 1;
}

.lb-name {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-score {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(245, 180, 50, 0.3);
}

.lb-list li.rank-gold .lb-score {
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.45);
}

.lb-empty {
  color: var(--muted);
  font-size: 13px;
  font-family: var(--mono);
  margin: 0;
}

.game-fine {
  margin: 12px 0 0;
  color: #7a7068;
  font-size: 11px;
  font-family: var(--mono);
}

@media (max-width: 900px) {
  .game-shell {
    grid-template-columns: 1fr;
  }
  .arcade-stage {
    aspect-ratio: 4 / 3;
  }
  .arcade-bezel {
    flex-wrap: wrap;
    font-size: 10px;
  }
  .arcade-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .arcade-actions {
    justify-content: stretch;
  }
  .arcade-actions .btn {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .arcade-cabinet,
  .btn.coin-slot,
  .arcade-night-chip .chip-dot,
  .arcade-bezel .cab-score #game-combo.hot {
    animation: none;
  }
}
