/* ──────────────────────────────────────────────────────────────
   Paigon game shell — chrome for the game overlay (all 5 games)
   Injected + driven by game-shell.js
   ────────────────────────────────────────────────────────────── */

.game-overlay { --shell-accent: #00ff88; }

/* Control cluster, top-right of the overlay card */
.shell-chrome {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.game-overlay.active .shell-chrome {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
/* Fade the cluster back while the player is busy in the game,
   bring it to full strength on hover so it never fights the game UI */
.shell-chrome.is-dimmed { opacity: .35; }
.shell-chrome.is-dimmed:hover,
.shell-chrome.is-dimmed:focus-within { opacity: 1; }

/* Live status pill */
.shell-status {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(6,6,12,0.78);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
  transition: color .2s, border-color .2s, background .2s;
}
.shell-status[hidden] { display: none; }
.shell-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.shell-status[data-state="queue"] {
  color: #fbbf24;
  border-color: rgba(251,191,36,0.32);
  background: rgba(251,191,36,0.08);
}
.shell-status[data-state="live"] {
  color: var(--shell-accent);
  border-color: color-mix(in srgb, var(--shell-accent) 36%, transparent);
  background: color-mix(in srgb, var(--shell-accent) 9%, transparent);
}
.shell-status[data-state="queue"] .shell-dot,
.shell-status[data-state="live"] .shell-dot {
  animation: shell-pulse 1.4s ease-in-out infinite;
}
@keyframes shell-pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.72); }
}

/* Icon buttons */
.shell-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background: rgba(6,6,12,0.78);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.shell-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-1px);
}
.shell-btn:focus-visible {
  outline: 2px solid var(--shell-accent);
  outline-offset: 2px;
}
.shell-btn[hidden] { display: none; }
.shell-btn--close:hover {
  background: rgba(239,68,68,0.16);
  border-color: rgba(239,68,68,0.5);
  color: #fca5a5;
}
.shell-btn svg { width: 15px; height: 15px; display: block; }

/* Tooltip on hover */
.shell-btn { position: relative; }
.shell-btn::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(0,0,0,0.9);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .15s, transform .15s;
}
.shell-btn:hover::after { opacity: 1; transform: none; }

/* ── Leave-match confirmation ── */
.shell-confirm {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3,3,8,0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.shell-confirm.is-open { opacity: 1; pointer-events: auto; }
.shell-confirm-card {
  width: min(400px, 100%);
  padding: 26px 24px 20px;
  border-radius: 16px;
  background: #0b0b14;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 30px 80px rgba(0,0,0,0.7);
  text-align: center;
  transform: scale(0.95) translateY(8px);
  transition: transform .2s ease;
}
.shell-confirm.is-open .shell-confirm-card { transform: none; }
.shell-confirm-icon {
  width: 46px; height: 46px;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  color: #f87171;
  font-size: 1.2rem;
}
.shell-confirm-title {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 8px;
}
.shell-confirm-body {
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
}
.shell-confirm-actions { display: flex; gap: 10px; }
.shell-confirm-btn {
  flex: 1;
  padding: 11px 14px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.shell-confirm-btn:hover { transform: translateY(-1px); }
.shell-confirm-btn:focus-visible {
  outline: 2px solid var(--shell-accent);
  outline-offset: 2px;
}
.shell-confirm-btn--primary {
  background: var(--shell-accent);
  color: #04040a;
}
.shell-confirm-btn--primary:hover { filter: brightness(1.08); }
.shell-confirm-btn--danger {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.34);
  color: #fca5a5;
}
.shell-confirm-btn--danger:hover {
  background: rgba(239,68,68,0.2);
  border-color: rgba(239,68,68,0.6);
  color: #fff;
}
.shell-confirm-hint {
  margin-top: 12px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.22);
}

/* ── Hint line along the bottom of the overlay ── */
.shell-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(6,6,12,0.7);
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}
.game-overlay.active .shell-hint { opacity: 1; }
.shell-hint.is-hidden { opacity: 0; }
.shell-hint kbd {
  font-family: inherit;
  font-weight: 800;
  color: rgba(255,255,255,0.6);
}

/* The old inline close button and esc hint are replaced by the shell */
.overlay-close, .overlay-esc { display: none !important; }

/* Overlay card fills the screen while in browser fullscreen */
.overlay-inner:fullscreen,
.overlay-inner:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  border-radius: 0;
  border-color: transparent;
}

@media (max-width: 640px) {
  .shell-status { display: none; }
  .shell-chrome { top: 8px; right: 8px; gap: 6px; }
  .shell-hint { display: none; }
}
