/* Custom Arcade Gacha Lab Theme */

/* Import premium monospace font for HUD numbers */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Outfit:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-darker: #060713;
  --bg-dark: #0a0d25;
  --bg-card: rgba(13, 16, 37, 0.6);
  --neon-cyan: #00f0ff;
  --neon-magenta: #ff007f;
  --arcade-gold: #ffd700;
  --neon-purple: #9d4edd;
  --success-emerald: #10b981;
  --warning-orange: #f97316;
  --border-neon: rgba(0, 240, 255, 0.25);
  --border-magenta: rgba(255, 0, 127, 0.25);
}

body {
  background: radial-gradient(circle at 50% 0%, #0e1236 0%, #050611 70%);
  color: #d1d5db;
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
}

.font-display {
  font-family: 'Outfit', sans-serif;
}

.font-hud {
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 0.05em;
}

/* Neon Cards & HUD Panels */
.neon-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37),
              inset 0 0 12px rgba(0, 240, 255, 0.03);
  transition: all 0.3s ease;
}

.neon-card:hover {
  border-color: rgba(0, 240, 255, 0.35);
  box-shadow: 0 12px 40px 0 rgba(0, 240, 255, 0.1),
              inset 0 0 20px rgba(0, 240, 255, 0.05);
}

.neon-card.magenta {
  border-color: rgba(255, 0, 127, 0.15);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37),
              inset 0 0 12px rgba(255, 0, 127, 0.03);
}

.neon-card.magenta:hover {
  border-color: rgba(255, 0, 127, 0.35);
  box-shadow: 0 12px 40px 0 rgba(255, 0, 127, 0.1),
              inset 0 0 20px rgba(255, 0, 127, 0.05);
}

.neon-card.gold {
  border-color: rgba(255, 215, 0, 0.15);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37),
              inset 0 0 12px rgba(255, 215, 0, 0.03);
}

.neon-card.gold:hover {
  border-color: rgba(255, 215, 0, 0.35);
  box-shadow: 0 12px 40px 0 rgba(255, 215, 0, 0.1),
              inset 0 0 20px rgba(255, 215, 0, 0.05);
}

/* Stat & Result Panels */
.stat-panel {
  background: rgba(6, 7, 19, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
}

.result-panel {
  background: linear-gradient(135deg, rgba(13, 16, 37, 0.9) 0%, rgba(6, 7, 19, 0.95) 100%);
  border: 2px solid var(--neon-cyan);
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.15),
              inset 0 0 15px rgba(0, 240, 255, 0.05);
}

.result-panel.warning {
  border-color: var(--neon-magenta);
  box-shadow: 0 0 20px rgba(255, 0, 127, 0.15),
              inset 0 0 15px rgba(255, 0, 127, 0.05);
}

.result-panel.success {
  border-color: var(--success-emerald);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15),
              inset 0 0 15px rgba(16, 185, 129, 0.05);
}

/* Gacha pity progress bar styling */
.pity-meter {
  width: 100%;
  height: 14px;
  background: rgba(6, 7, 19, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.pity-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-purple) 0%, var(--neon-cyan) 100%);
  border-radius: 9999px;
  box-shadow: 0 0 8px var(--neon-cyan);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.pity-meter-fill.magenta {
  background: linear-gradient(90deg, var(--neon-purple) 0%, var(--neon-magenta) 100%);
  box-shadow: 0 0 8px var(--neon-magenta);
}

/* Resource Badge Chips */
.resource-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
}

/* Arcade Cabinet Style Buttons */
.arcade-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: linear-gradient(180deg, #00f0ff 0%, #00a8b5 100%);
  color: #060713;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 12px;
  border: none;
  box-shadow: 0 4px 0 #007680,
              0 8px 20px rgba(0, 240, 255, 0.3);
  transition: all 0.1s ease;
  cursor: pointer;
}

.arcade-button:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 5px 0 #007680,
              0 10px 25px rgba(0, 240, 255, 0.4);
}

.arcade-button:active {
  transform: translateY(4px);
  box-shadow: 0 0px 0 #007680,
              0 4px 10px rgba(0, 240, 255, 0.2);
}

.arcade-button.magenta {
  background: linear-gradient(180deg, #ff007f 0%, #b50059 100%);
  box-shadow: 0 4px 0 #80003f,
              0 8px 20px rgba(255, 0, 127, 0.3);
}

.arcade-button.magenta:hover {
  box-shadow: 0 5px 0 #80003f,
              0 10px 25px rgba(255, 0, 127, 0.4);
}

.arcade-button.magenta:active {
  box-shadow: 0 0px 0 #80003f,
              0 4px 10px rgba(255, 0, 127, 0.2);
}

.arcade-button.gold {
  background: linear-gradient(180deg, #ffd700 0%, #cc9900 100%);
  box-shadow: 0 4px 0 #997300,
              0 8px 20px rgba(255, 215, 0, 0.3);
}

.arcade-button.gold:hover {
  box-shadow: 0 5px 0 #997300,
              0 10px 25px rgba(255, 215, 0, 0.4);
}

.arcade-button.gold:active {
  box-shadow: 0 0px 0 #997300,
              0 4px 10px rgba(255, 215, 0, 0.2);
}

/* Arcade slot indicator */
.arcade-slot {
  width: 24px;
  height: 6px;
  background: #000;
  border: 1.5px solid var(--neon-cyan);
  border-radius: 2px;
  box-shadow: 0 0 6px var(--neon-cyan);
  display: inline-block;
  vertical-align: middle;
  position: relative;
  overflow: hidden;
}

.arcade-slot::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #ff007f;
  animation: slot-pulse 1.5s infinite;
}

@keyframes slot-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Comic Comment Bubble */
.comic-bubble {
  position: relative;
  background: rgba(13, 16, 37, 0.95);
  border: 1px solid var(--neon-purple);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 4px 20px rgba(157, 78, 221, 0.15);
}

.comic-bubble::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 20px;
  border-width: 0 8px 8px;
  border-style: solid;
  border-color: var(--neon-purple) transparent;
  display: block;
  width: 0;
}

/* Footer / Notes formatting */
.danger-note {
  font-size: 11px;
  color: #ef4444;
  line-height: 1.4;
  display: flex;
  align-items: start;
  gap: 6px;
}

.local-note {
  font-size: 11px;
  color: #a1a1aa;
  line-height: 1.4;
}

/* Custom Grid layout for game layout */
.game-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #060713;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 240, 255, 0.4);
}

/* Scanline screen overlay effect for retro feels */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%,
    rgba(0, 0, 0, 0.12) 50%
  ), linear-gradient(
    90deg,
    rgba(255, 0, 0, 0.02),
    rgba(0, 255, 0, 0.01),
    rgba(0, 0, 255, 0.02)
  );
  background-size: 100% 4px, 6px 100%;
  z-index: 9999;
}

/* Audio toggle and arcade click FX */
.audio-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  border: 1px solid rgba(0, 240, 255, 0.4);
  border-radius: 10px;
  background: rgba(8, 47, 73, 0.44);
  color: #67e8f9;
  padding: 7px 11px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.08);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.audio-toggle-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 240, 255, 0.75);
  background: rgba(8, 47, 73, 0.72);
}

.audio-toggle-btn.muted {
  color: #a1a1aa;
  border-color: rgba(113, 113, 122, 0.5);
  background: rgba(24, 24, 27, 0.82);
}

.arcade-audio-dock {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10000;
}

.arcade-click-burst {
  position: fixed;
  width: 1px;
  height: 1px;
  pointer-events: none;
  z-index: 10001;
}

.burst-token {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  color: #67e8f9;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.75);
  animation: arcade-token-pop 720ms cubic-bezier(0.18, 0.8, 0.3, 1) forwards;
}

.arcade-click-burst.magenta .burst-token {
  color: #f9a8d4;
  text-shadow: 0 0 10px rgba(255, 0, 127, 0.75);
}

.arcade-click-burst.gold .burst-token {
  color: #fde68a;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.75);
}

@keyframes arcade-token-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.55) rotate(-8deg);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.25) rotate(10deg);
  }
}

.arcade-screen-bump {
  animation: arcade-screen-bump 220ms ease-out;
}

@keyframes arcade-screen-bump {
  0% { transform: translate3d(0, 0, 0); }
  20% { transform: translate3d(1px, -1px, 0); }
  45% { transform: translate3d(-1px, 1px, 0); }
  70% { transform: translate3d(1px, 0, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .burst-token,
  .arcade-screen-bump {
    animation: none;
  }
}
