/*
 * OldGames Nexus shell for the standalone PSP player.
 * This sits above the bundled PPSSPP Web CSS without changing the emulator core.
 */

:root {
  --psp-bg: #050711;
  --psp-panel: rgba(9, 12, 28, 0.86);
  --psp-panel-strong: rgba(13, 18, 38, 0.94);
  --psp-border: rgba(118, 145, 230, 0.28);
  --psp-border-hot: rgba(99, 229, 255, 0.66);
  --psp-text: #f4f7ff;
  --psp-muted: #98a3c5;
  --psp-cyan: #63e5ff;
  --psp-pink: #ff4da6;
  --psp-green: #8cff6a;
  --psp-gold: #ffc857;
  --psp-radius: 18px;
  --psp-ui: "Rajdhani", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --psp-display: "Orbitron", Inter, system-ui, sans-serif;
}

html[data-oldgames-psp],
html[data-oldgames-psp] body {
  background:
    linear-gradient(rgba(99, 229, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 229, 255, 0.024) 1px, transparent 1px),
    radial-gradient(circle at 20% 18%, rgba(99, 229, 255, 0.14), transparent 28%),
    radial-gradient(circle at 82% 36%, rgba(255, 77, 166, 0.12), transparent 30%),
    linear-gradient(180deg, #070a19 0%, #050711 48%, #03040a 100%) !important;
  background-size: 46px 46px, 46px 46px, auto, auto, auto !important;
}

body.psp-player-page {
  color: var(--psp-text);
  font-family: var(--psp-ui);
}

body.psp-player-page::before {
  display: none !important;
}

body.psp-player-page app-root {
  position: relative;
  gap: 12px;
  padding: 14px 18px 18px;
}

body.psp-player-page app-root::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 44%, rgba(255, 255, 255, 0.035) 45%, transparent 47% 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 72px);
  opacity: 0.55;
  transform: skewY(-3deg);
}

body.psp-player-page header,
body.psp-player-page .body-main,
body.psp-player-page #oldgamesPspQuickbar,
body.psp-player-page #oldgamesPspHint {
  position: relative;
  z-index: 2;
}

body.psp-player-page header {
  min-height: 72px;
  height: auto;
  padding: 11px 14px;
  border: 1px solid var(--psp-border);
  border-radius: var(--psp-radius);
  background:
    linear-gradient(180deg, rgba(16, 20, 44, 0.96), rgba(8, 10, 24, 0.92)),
    rgba(7, 10, 24, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 18px 44px rgba(0, 0, 0, 0.46),
    0 0 28px rgba(99, 229, 255, 0.07);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body.psp-player-page .logo {
  min-width: 230px;
  padding: 0 12px 0 4px;
  gap: 10px;
  font-family: var(--psp-display);
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  color: var(--psp-text);
  text-transform: uppercase;
}

body.psp-player-page .logo svg {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 0 12px rgba(99, 229, 255, 0.52));
}

.og-psp-mark {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  color: var(--psp-cyan);
  isolation: isolate;
}

.og-psp-mark::before {
  content: "";
  position: absolute;
  inset: 18%;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(99, 229, 255, 0.32), transparent 66%),
    radial-gradient(circle at 72% 72%, rgba(255, 77, 166, 0.2), transparent 54%);
  filter: blur(1px);
  animation: ogPspPulse 2.4s ease-in-out infinite;
}

.og-psp-mark .og-psp-mark-svg {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  overflow: visible;
  filter: drop-shadow(0 0 13px rgba(99, 229, 255, 0.4));
}

.og-psp-ring {
  fill: none;
  stroke: rgba(126, 137, 255, 0.42);
  stroke-width: 2;
  stroke-dasharray: 5 9;
  transform-origin: center;
  animation: ogPspOrbit 16s linear infinite;
}

.og-psp-arc {
  fill: none;
  stroke-linecap: round;
  transform-origin: center;
}

.og-psp-arc-a {
  stroke: var(--psp-cyan);
  stroke-width: 3;
  filter: drop-shadow(0 0 8px rgba(99, 229, 255, 0.74));
  animation: ogPspOrbit 5s linear infinite reverse;
}

.og-psp-arc-b {
  stroke: var(--psp-pink);
  stroke-width: 2.35;
  opacity: 0.9;
  filter: drop-shadow(0 0 7px rgba(255, 77, 166, 0.64));
  animation: ogPspOrbit 8s linear infinite;
}

.og-psp-orb-group {
  transform-origin: center;
  animation: ogPspOrbit 5s linear infinite reverse;
}

.og-psp-orb {
  fill: #ffffff;
  filter: drop-shadow(0 0 7px var(--psp-cyan));
}

.og-psp-mono {
  fill: none;
  stroke: url(#ogPspGrad);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 120;
  animation: ogPspDraw 4.2s ease-in-out infinite;
}

.og-psp-mono-g {
  animation-delay: 0.25s;
}

@keyframes ogPspOrbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ogPspDraw {
  0% {
    opacity: 0;
    stroke-dashoffset: 120;
  }
  12% {
    opacity: 1;
  }
  38%,
  72% {
    opacity: 1;
    stroke-dashoffset: 0;
  }
  92%,
  100% {
    opacity: 0;
    stroke-dashoffset: -120;
  }
}

@keyframes ogPspPulse {
  0%,
  100% {
    opacity: 0.58;
    transform: scale(0.84);
  }
  50% {
    opacity: 1;
    transform: scale(1.16);
  }
}

body.psp-player-page .hbar-sep {
  width: 1px;
  height: 34px;
  background: linear-gradient(180deg, transparent, rgba(99, 229, 255, 0.42), transparent);
}

body.psp-player-page .hbar-group {
  gap: 8px;
}

body.psp-player-page #launchGroup {
  flex: 0 0 auto;
}

body.psp-player-page button,
body.psp-player-page label.btn,
body.psp-player-page a.btn,
body.psp-player-page select.btn,
body.psp-player-page .top-official-link {
  min-height: 42px;
  border-radius: 12px;
  border-color: rgba(118, 145, 230, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0)),
    rgba(9, 12, 28, 0.9);
  color: var(--psp-text);
  font-family: var(--psp-display);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

body.psp-player-page button:hover,
body.psp-player-page label.btn:hover,
body.psp-player-page a.btn:hover,
body.psp-player-page .top-official-link:hover {
  border-color: var(--psp-border-hot);
  background:
    linear-gradient(180deg, rgba(99, 229, 255, 0.13), rgba(255, 77, 166, 0.045)),
    rgba(12, 16, 35, 0.94);
  color: #ffffff;
}

body.psp-player-page button.primary,
body.psp-player-page #idleStartBtn {
  border-color: rgba(99, 229, 255, 0.78);
  background:
    linear-gradient(135deg, rgba(99, 229, 255, 0.98), rgba(126, 137, 255, 0.92));
  color: #06101f;
  box-shadow:
    0 0 22px rgba(99, 229, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

body.psp-player-page button.primary:hover,
body.psp-player-page #idleStartBtn:hover {
  background: linear-gradient(135deg, #8ff1ff, #ff75bd);
  border-color: rgba(255, 255, 255, 0.72);
}

body.psp-player-page #runtimeIsoLabel {
  border-color: rgba(255, 200, 87, 0.46);
  background:
    linear-gradient(135deg, rgba(255, 200, 87, 0.18), rgba(99, 229, 255, 0.06)),
    rgba(9, 12, 28, 0.95);
}

body.psp-player-page #runtimeIsoLabel[style*="display: none"] {
  display: none !important;
}

body.psp-player-page #displayGroup {
  flex: 0 1 auto;
}

body.psp-player-page #gamepadSelect,
body.psp-player-page #gpuSelect {
  width: 188px;
  max-width: 188px;
}

body.psp-player-page .badge {
  min-height: 34px;
  border-radius: 999px;
  border-color: rgba(99, 229, 255, 0.18);
  background: rgba(5, 7, 17, 0.82);
  color: var(--psp-muted);
  font-family: var(--psp-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

body.psp-player-page .badge.active {
  color: var(--psp-green);
  border-color: rgba(140, 255, 106, 0.42);
  background: rgba(140, 255, 106, 0.08);
}

body.psp-player-page .top-official-link span {
  color: inherit;
}

body.psp-player-page .og-psp-header-nav {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

body.psp-player-page .og-psp-header-nav .og-psp-nav-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  gap: 7px;
}

body.psp-player-page .og-psp-header-nav .og-psp-nav-btn svg {
  width: 18px;
  height: 18px;
}

body.psp-player-page .og-psp-header-nav .og-psp-nav-btn span {
  display: inline-block;
}

body.psp-player-page .og-psp-user-section {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
}

body.psp-player-page .og-psp-avatar-btn,
body.psp-player-page .og-psp-signin-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(99, 229, 255, 0.48);
  color: var(--psp-text);
  background:
    radial-gradient(circle at 32% 18%, rgba(99, 229, 255, 0.2), transparent 46%),
    linear-gradient(135deg, rgba(16, 26, 58, 0.94), rgba(5, 7, 17, 0.98));
  box-shadow:
    0 0 0 3px rgba(99, 229, 255, 0.07),
    0 0 18px rgba(99, 229, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

body.psp-player-page .og-psp-avatar-btn:hover,
body.psp-player-page .og-psp-signin-btn:hover {
  transform: translateY(-1px);
  border-color: var(--psp-border-hot);
  box-shadow:
    0 0 0 3px rgba(99, 229, 255, 0.12),
    0 0 24px rgba(99, 229, 255, 0.28);
}

body.psp-player-page .og-psp-avatar-btn img[data-og-avatar-ui="1"] {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
  border-radius: inherit !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body.psp-player-page .og-psp-signin-btn {
  width: auto;
  padding: 0 12px;
  gap: 7px;
  border-radius: 13px;
}

body.psp-player-page .og-psp-signin-btn svg {
  width: 17px;
  height: 17px;
}

body.psp-player-page .og-psp-signin-btn span {
  display: inline-block;
}

body.psp-player-page .og-psp-avatar-skeleton {
  pointer-events: none;
  position: relative;
}

body.psp-player-page .og-psp-avatar-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 28%, rgba(255, 255, 255, 0.16) 50%, transparent 72%);
  animation: ogPspAvatarShimmer 1.35s linear infinite;
}

body.psp-player-page .og-psp-avatar-skeleton span {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

@keyframes ogPspAvatarShimmer {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

.og-psp-profile-dropdown {
  position: fixed;
  top: var(--og-psp-pd-top, 76px);
  left: var(--og-psp-pd-left, 12px);
  z-index: 2147483200;
  display: none;
  padding: 7px;
  border: 1px solid rgba(99, 229, 255, 0.3);
  border-radius: 16px;
  background:
    radial-gradient(circle at 20% 0%, rgba(99, 229, 255, 0.15), transparent 42%),
    linear-gradient(180deg, rgba(14, 18, 40, 0.98), rgba(5, 7, 17, 0.98));
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.62),
    0 0 34px rgba(99, 229, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.og-psp-profile-dropdown.open {
  display: block;
}

.og-psp-pd-header {
  padding: 10px 11px 8px;
  margin-bottom: 5px;
  border-bottom: 1px solid rgba(118, 145, 230, 0.18);
}

.og-psp-pd-name {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-family: var(--psp-display);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.og-psp-pd-email {
  min-width: 0;
  margin-top: 3px;
  overflow: hidden;
  color: rgba(186, 197, 231, 0.7);
  font: 700 0.75rem/1.2 var(--psp-ui);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.og-psp-pd-item {
  width: 100%;
  min-height: 39px;
  justify-content: flex-start;
  gap: 9px;
  padding: 0 11px;
  border: 0;
  border-radius: 11px;
  color: var(--psp-text);
  background: transparent;
  box-shadow: none;
  font-family: var(--psp-ui);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: none;
}

.og-psp-pd-item svg {
  width: 17px;
  height: 17px;
  color: var(--psp-cyan);
}

.og-psp-pd-item:hover {
  background: rgba(99, 229, 255, 0.1);
}

.og-psp-pd-item.danger {
  color: #ff93b7;
}

.og-psp-pd-item.danger svg {
  color: #ff75a9;
}

body.psp-player-page .body-main {
  min-height: 0;
  border: 1px solid rgba(118, 145, 230, 0.2);
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(12, 16, 36, 0.75), rgba(4, 5, 12, 0.78)),
    rgba(5, 7, 17, 0.86);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 24px 70px rgba(0, 0, 0, 0.56);
}

body.psp-player-page .stage {
  background:
    radial-gradient(circle at 50% 52%, rgba(99, 229, 255, 0.1), transparent 38%),
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    #050711;
  background-size: auto, 42px 42px, 42px 42px, auto;
  padding: clamp(16px, 2.4vw, 34px);
}

body.psp-player-page canvas {
  border: 1px solid rgba(99, 229, 255, 0.28);
  border-radius: 14px;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.72),
    0 0 42px rgba(99, 229, 255, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

body.psp-player-page #idleOverlay {
  border: 1px solid rgba(99, 229, 255, 0.26);
  border-radius: 18px;
  background:
    radial-gradient(circle at 22% 22%, rgba(99, 229, 255, 0.22), transparent 28%),
    radial-gradient(circle at 82% 78%, rgba(255, 77, 166, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(9, 16, 38, 0.96), rgba(4, 6, 16, 0.98));
}

body.psp-player-page .idle-content {
  grid-template-columns: minmax(150px, 260px) minmax(240px, 430px);
  justify-content: center;
}

body.psp-player-page .idle-psp {
  display: none !important;
}

.og-psp-idle-brand {
  display: grid;
  justify-items: center;
  gap: 15px;
  align-self: center;
  justify-self: center;
  min-width: 0;
}

.og-psp-idle-mark {
  width: clamp(104px, 14vw, 154px);
  height: clamp(104px, 14vw, 154px);
}

.og-psp-wordmark {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  font-family: var(--psp-display);
  text-transform: uppercase;
}

.og-psp-glitch {
  position: relative;
  display: inline-block;
  color: #ffffff;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 900;
  letter-spacing: 0.2em;
  line-height: 1;
  text-shadow: 0 0 22px rgba(99, 229, 255, 0.34);
}

.og-psp-glitch::before,
.og-psp-glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.og-psp-glitch::before {
  color: var(--psp-cyan);
  clip-path: inset(0 0 56% 0);
  animation: ogPspGlitchA 3.2s steps(2) infinite;
}

.og-psp-glitch::after {
  color: var(--psp-pink);
  clip-path: inset(54% 0 0 0);
  animation: ogPspGlitchB 2.7s steps(2) infinite;
}

.og-psp-system {
  color: rgba(186, 197, 231, 0.72);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.28em;
}

@keyframes ogPspGlitchA {
  0%,
  86%,
  100% {
    opacity: 0;
    transform: translate(0, 0);
  }
  88% {
    opacity: 0.85;
    transform: translate(-4px, -2px);
  }
  92% {
    opacity: 0.85;
    clip-path: inset(18% 0 42% 0);
    transform: translate(3px, 1px);
  }
  96% {
    opacity: 0.65;
    transform: translate(-2px, 0);
  }
}

@keyframes ogPspGlitchB {
  0%,
  82%,
  100% {
    opacity: 0;
    transform: translate(0, 0);
  }
  84% {
    opacity: 0.85;
    transform: translate(4px, 2px);
  }
  90% {
    opacity: 0.85;
    clip-path: inset(40% 0 25% 0);
    transform: translate(-3px, -1px);
  }
  95% {
    opacity: 0.65;
    transform: translate(2px, 0);
  }
}

body.psp-player-page .idle-kicker,
body.psp-player-page .idle-title,
body.psp-player-page .panel-section-label,
body.psp-player-page .info-group h3 {
  font-family: var(--psp-display);
  letter-spacing: 0.13em;
}

body.psp-player-page .idle-kicker {
  color: var(--psp-cyan);
}

body.psp-player-page .idle-title {
  color: #ffffff;
  text-transform: uppercase;
}

body.psp-player-page .idle-subtitle {
  color: #bac5e7;
  font-family: var(--psp-ui);
  font-size: clamp(0.92rem, 1.35vw, 1.08rem);
}

body.psp-player-page .idle-repo-link,
body.psp-player-page .idle-powered {
  display: none !important;
}

body.psp-player-page .idle-actions {
  grid-template-columns: repeat(2, minmax(128px, 1fr));
}

body.psp-player-page #stageMini,
body.psp-player-page #fpsBadge {
  border-color: rgba(99, 229, 255, 0.22);
  background: rgba(3, 5, 12, 0.8);
  color: var(--psp-cyan);
  font-family: var(--psp-display);
}

body.psp-player-page aside {
  border-left: 1px solid rgba(118, 145, 230, 0.24);
  background:
    linear-gradient(180deg, rgba(13, 18, 38, 0.98), rgba(5, 7, 17, 0.98));
}

body.psp-player-page #panelTabSelect option:not([value="library"]):not([value="saves"]),
body.psp-player-page .tab[data-tab]:not([data-tab="library"]):not([data-tab="saves"]),
body.psp-player-page #tabNetwork,
body.psp-player-page #tabDrive,
body.psp-player-page #tabStorage,
body.psp-player-page #tabInfo,
body.psp-player-page #tabLog,
body.psp-player-page #tabAbout,
body.psp-player-page #driveBadge {
  display: none !important;
}

body.psp-player-page .status-bar,
body.psp-player-page .panel-tab-select-wrap,
body.psp-player-page .log-toolbar {
  border-color: rgba(118, 145, 230, 0.18);
  background: rgba(5, 7, 17, 0.62);
}

body.psp-player-page .panel-tab-select,
body.psp-player-page input,
body.psp-player-page #logFilter {
  border-color: rgba(118, 145, 230, 0.26);
  background-color: rgba(4, 6, 16, 0.9);
  color: var(--psp-text);
  font-family: var(--psp-ui);
}

body.psp-player-page .library-grid,
body.psp-player-page #savesList {
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 229, 255, 0.5) rgba(5, 7, 17, 0.4);
}

body.psp-player-page .game-card,
body.psp-player-page .save-card,
body.psp-player-page .save-state-card {
  border-color: rgba(118, 145, 230, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0)),
    rgba(8, 11, 25, 0.82);
}

body.psp-player-page .game-card:hover {
  border-color: rgba(99, 229, 255, 0.62);
  transform: translateY(-2px);
}

body.psp-player-page.psp-local-rom-hit #loadOverlay.visible {
  border: 1px solid rgba(140, 255, 106, 0.42);
  background:
    radial-gradient(circle at 50% 40%, rgba(140, 255, 106, 0.16), transparent 32%),
    rgba(4, 5, 10, 0.9);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.055),
    0 0 38px rgba(140, 255, 106, 0.13);
}

body.psp-player-page.psp-local-rom-hit .spinner {
  border-top-color: var(--psp-green);
  box-shadow: 0 0 22px rgba(140, 255, 106, 0.22);
}

body.psp-player-page.psp-local-rom-hit #progressBar {
  background: linear-gradient(90deg, var(--psp-green), var(--psp-cyan));
}

#oldgamesPspQuickbar {
  position: fixed !important;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9965;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(118, 145, 230, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(14, 18, 40, 0.92), rgba(5, 7, 17, 0.92)),
    rgba(5, 7, 17, 0.9);
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#oldgamesPspQuickbar .og-psp-qb-btn {
  width: 52px;
  height: 52px;
  min-width: 52px;
  min-height: 52px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(118, 145, 230, 0.3);
  color: var(--psp-text);
  background:
    radial-gradient(circle at 30% 20%, rgba(99, 229, 255, 0.16), transparent 48%),
    rgba(8, 11, 25, 0.92);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

#oldgamesPspQuickbar .og-psp-qb-btn:hover {
  transform: translateX(-2px);
  border-color: var(--psp-border-hot);
  background:
    radial-gradient(circle at 28% 18%, rgba(99, 229, 255, 0.28), transparent 48%),
    radial-gradient(circle at 75% 80%, rgba(255, 77, 166, 0.18), transparent 42%),
    rgba(9, 13, 30, 0.96);
}

#oldgamesPspQuickbar .og-psp-qb-btn svg {
  width: 22px;
  height: 22px;
}

#oldgamesPspQuickbar .og-psp-qb-nav,
#oldgamesPspQuickbar .og-psp-qb-user {
  display: none;
}

#oldgamesPspQuickbar .og-psp-qb-user {
  width: 52px;
  height: 52px;
  min-width: 52px;
  min-height: 52px;
  align-items: center;
  justify-content: center;
}

#oldgamesPspQuickbar .og-psp-avatar-btn,
#oldgamesPspQuickbar .og-psp-signin-btn {
  width: 52px;
  height: 52px;
  min-width: 52px;
  min-height: 52px;
  border-radius: 14px;
}

#oldgamesPspQuickbar .og-psp-signin-btn {
  padding: 0;
}

#oldgamesPspQuickbar .og-psp-signin-btn span {
  display: none;
}

#oldgamesPspQuickbar .og-psp-signin-btn svg {
  width: 22px;
  height: 22px;
}

#oldgamesPspQuickbar .og-psp-qb-load {
  color: #07111d;
  border-color: rgba(99, 229, 255, 0.75);
  background: linear-gradient(135deg, var(--psp-cyan), #7d89ff);
}

#oldgamesPspQuickbar .og-psp-qb-load:hover {
  color: #050711;
  background: linear-gradient(135deg, #91f2ff, #ff7ac0);
}

body.psp-player-page.panel-open #oldgamesPspQuickbar {
  display: none !important;
}

#oldgamesPspHint {
  position: fixed;
  right: 90px;
  top: 50%;
  z-index: 9966;
  max-width: min(320px, calc(100vw - 120px));
  padding: 12px 14px;
  border: 1px solid rgba(99, 229, 255, 0.32);
  border-radius: 14px;
  color: var(--psp-text);
  background: rgba(8, 11, 25, 0.94);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.52);
  font: 700 0.92rem/1.25 var(--psp-ui);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

#oldgamesPspHint.is-visible {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

body.psp-player-page #chatToggleBtn,
body.psp-player-page #chatToggleBtn.chat-toggle-btn {
  right: 22px !important;
  bottom: 22px !important;
}

body.psp-player-page #liveChat,
body.psp-player-page #liveChat.live-chat {
  right: 22px !important;
  bottom: 82px !important;
}

@media (max-width: 1320px) {
  body.psp-player-page .logo {
    min-width: 172px;
    font-size: 0.86rem;
  }

  body.psp-player-page .gpu-sep,
  body.psp-player-page #gpuBadge,
  body.psp-player-page #gpuSelectWrap {
    display: none !important;
  }
}

@media (max-width: 1180px) {
  body.psp-player-page #displayGroup {
    display: none !important;
  }
}

@media (max-width: 1100px) {
  body.psp-player-page #gamepadBadge,
  body.psp-player-page .top-official-link {
    display: none !important;
  }
}

@media (max-width: 900px) and (min-width: 821px) {
  body.psp-player-page .logo {
    min-width: 42px;
    width: 42px;
    padding: 0;
  }

  body.psp-player-page .logo span,
  body.psp-player-page .og-psp-header-nav .og-psp-nav-btn span {
    display: none;
  }

  body.psp-player-page .og-psp-header-nav .og-psp-nav-btn {
    width: 42px;
    padding: 0;
  }
}

@media (max-width: 820px) {
  body.psp-player-page app-root {
    padding: 8px;
    gap: 8px;
  }

  body.psp-player-page header {
    display: grid !important;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    min-height: 62px;
    padding: 8px;
    border-radius: 16px;
  }

  body.psp-player-page .logo {
    grid-column: 1;
    min-width: 42px;
    width: 42px;
    padding: 0;
  }

  body.psp-player-page .logo span {
    display: none;
  }

  body.psp-player-page .og-psp-header-nav,
  body.psp-player-page .og-psp-header-user {
    display: none !important;
  }

  body.psp-player-page #launchGroup {
    grid-column: 2;
    display: flex;
    justify-content: center;
  }

  body.psp-player-page .hbar-end {
    grid-column: 3;
  }

  body.psp-player-page .hbar-sep,
  body.psp-player-page #gamepadBadge,
  body.psp-player-page #gpuBadge,
  body.psp-player-page .top-official-link {
    display: none !important;
  }

  body.psp-player-page .btn-lbl {
    display: none;
  }

  body.psp-player-page #fileLabel,
  body.psp-player-page #startBtn,
  body.psp-player-page #runtimeIsoLabel,
  body.psp-player-page #fullscreenBtn,
  body.psp-player-page #panelToggleBtn {
    width: 44px;
    min-width: 44px;
    padding: 0;
  }

  body.psp-player-page .stage {
    padding: 0;
  }

  body.psp-player-page #idleOverlay {
    inset: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    transform: none;
    align-items: stretch;
    justify-content: stretch;
    padding: 18px 16px 154px;
    border-radius: 16px;
    overflow-y: auto;
  }

  body.psp-player-page.emulator-started #idleOverlay {
    transform: scale(0.985);
  }

  body.psp-player-page .idle-content {
    width: 100%;
    min-height: 100%;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 18px;
  }

  body.psp-player-page .idle-psp {
    order: -1;
    width: min(72%, 250px);
    margin-inline: auto;
  }

  body.psp-player-page .idle-copy {
    max-width: none;
  }

  body.psp-player-page .idle-title {
    font-size: clamp(2rem, 12vw, 3rem);
    line-height: 1.06;
  }

  body.psp-player-page .idle-subtitle {
    font-size: 1rem;
    max-width: 25rem;
  }

  body.psp-player-page .idle-actions {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  body.psp-player-page .idle-actions .btn,
  body.psp-player-page .idle-actions button {
    width: 100%;
    min-height: 46px;
  }

  #oldgamesPspQuickbar {
    left: 50%;
    right: auto;
    top: auto;
    bottom: 82px;
    transform: translateX(-50%);
    flex-direction: row;
    border-radius: 999px;
  }

  #oldgamesPspQuickbar .og-psp-qb-nav,
  #oldgamesPspQuickbar .og-psp-qb-user {
    display: inline-flex;
  }

  #oldgamesPspQuickbar .og-psp-qb-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 999px;
  }

  #oldgamesPspQuickbar .og-psp-qb-user,
  #oldgamesPspQuickbar .og-psp-avatar-btn,
  #oldgamesPspQuickbar .og-psp-signin-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 999px;
  }

  #oldgamesPspHint {
    left: 14px;
    right: 14px;
    top: auto;
    bottom: 150px;
    max-width: none;
    transform: translateY(10px);
  }

  #oldgamesPspHint.is-visible {
    transform: translateY(0);
  }

  body.psp-player-page #chatToggleBtn,
  body.psp-player-page #chatToggleBtn.chat-toggle-btn {
    right: 14px !important;
    bottom: 14px !important;
  }

  body.psp-player-page #liveChat,
  body.psp-player-page #liveChat.live-chat {
    right: 10px !important;
    bottom: 72px !important;
    width: calc(100vw - 20px) !important;
    height: min(520px, calc(100vh - 96px)) !important;
  }
}

@media (max-height: 640px) and (orientation: landscape) {
  body.psp-player-page .og-psp-header-nav,
  body.psp-player-page .og-psp-header-user {
    display: none !important;
  }

  #oldgamesPspQuickbar {
    right: 12px;
    gap: 6px;
    padding: 7px;
  }

  #oldgamesPspQuickbar .og-psp-qb-nav,
  #oldgamesPspQuickbar .og-psp-qb-user {
    display: inline-flex;
  }

  #oldgamesPspQuickbar .og-psp-qb-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  #oldgamesPspQuickbar .og-psp-qb-user,
  #oldgamesPspQuickbar .og-psp-avatar-btn,
  #oldgamesPspQuickbar .og-psp-signin-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
  }

  body.psp-player-page header {
    min-height: 58px;
  }
}
