#ogu-arcade-machine,
#ogu-arcade-machine * {
  box-sizing: border-box;
}

html,
body.ogu-arcade-body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  background: #06070b;
}

body.ogu-arcade-body {
  color: #f7fbff;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ogu-arcade-desktop,
.ogu-arcade-desktop * {
  box-sizing: border-box;
}

.ogu-arcade-desktop {
  min-height: 100svh;
  padding: 34px 16px 56px;
  color: #f7fbff;
  background:
    linear-gradient(rgba(0, 60, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 60, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(0, 102, 255, 0.26), transparent 42%),
    #06070b;
  background-size: 18px 18px, 18px 18px, auto, auto;
}

.ogu-arcade-desktop-shell {
  width: min(980px, 100%);
  margin: 0 auto;
}

.ogu-arcade-desktop-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 28px;
}

.ogu-arcade-desktop-title {
  margin: 0;
  color: #fff;
  font-size: clamp(32px, 7vw, 68px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 0 0 20px rgba(0, 102, 255, 0.7);
}

.ogu-arcade-desktop-home {
  color: #f7fbff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.ogu-arcade-desktop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.ogu-arcade-desktop-card {
  min-height: 290px;
  border: 2px solid #005cff;
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 242, 0, 0.16), transparent 17%),
    linear-gradient(145deg, rgba(0, 92, 255, 0.22), rgba(255, 255, 255, 0.03)),
    #090b12;
  box-shadow: 0 0 0 3px rgba(0, 92, 255, 0.18), 0 18px 42px rgba(0, 0, 0, 0.35);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ogu-arcade-desktop-card h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: 0;
}

.ogu-arcade-desktop-card p {
  margin: 0;
  color: #fff200;
  font-size: 16px;
  font-weight: 850;
  text-transform: uppercase;
}

.ogu-arcade-desktop-preview {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 22px 0;
  border: 2px solid rgba(0, 92, 255, 0.72);
  border-radius: 6px;
  object-fit: cover;
  image-rendering: pixelated;
  box-shadow: 0 0 24px rgba(0, 92, 255, 0.28);
}

.ogu-arcade-desktop-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border: 0;
  border-radius: 6px;
  background: #fff200;
  color: #050505;
  font-size: 15px;
  font-weight: 950;
  text-decoration: none;
  text-transform: uppercase;
}

#ogu-arcade-machine {
  --screen-left: 15.05%;
  --screen-top: 10.05%;
  --screen-width: 69.9%;
  --screen-height: 42.25%;
  display: none;
  min-height: 100svh;
  padding: max(10px, env(safe-area-inset-top)) 10px max(18px, env(safe-area-inset-bottom));
  place-items: center;
  background:
    radial-gradient(circle at 50% 12%, rgba(123, 33, 214, 0.15), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #f2f1f7 100%);
  touch-action: pan-y;
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#ogu-arcade-machine[data-input-active="true"] {
  touch-action: none;
}

.ogu-arcade-device {
  position: relative;
  width: min(94vw, 520px);
  aspect-ratio: 853 / 1280;
}

.ogu-arcade-handheld {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.ogu-arcade-screen {
  position: absolute;
  left: var(--screen-left);
  top: var(--screen-top);
  width: var(--screen-width);
  height: var(--screen-height);
  border-radius: 2.6%;
  overflow: hidden;
  background: #040505;
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.72);
  z-index: 2;
}

.ogu-arcade-screen::before,
.ogu-arcade-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.ogu-arcade-screen::before {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.16) 0%, transparent 28%),
    linear-gradient(rgba(255, 255, 255, 0.025) 50%, rgba(0, 0, 0, 0.02) 50%);
  background-size: auto, 100% 4px;
  mix-blend-mode: screen;
}

.ogu-arcade-screen::after {
  box-shadow: inset 0 0 18px rgba(115, 23, 206, 0.16), inset 0 0 38px rgba(0, 0, 0, 0.62);
}

.ogu-arcade-screen.is-on {
  box-shadow:
    0 0 16px rgba(60, 161, 255, 0.22),
    inset 0 0 28px rgba(0, 0, 0, 0.64);
}

.ogu-arcade-lcd {
  position: absolute;
  inset: 0;
  display: grid;
  overflow: hidden;
  background: #030404;
  color: #f7fbff;
}

.ogu-arcade-off,
.ogu-arcade-boot,
.ogu-arcade-library,
.ogu-arcade-loading,
.ogu-arcade-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 4.8%;
}

.ogu-arcade-off {
  background: #030404;
}

.ogu-arcade-boot {
  background:
    radial-gradient(circle at 50% 45%, rgba(17, 136, 255, 0.24), transparent 38%),
    #030707;
  animation: ogu-arcade-boot-flash 1180ms ease both;
}

.ogu-arcade-boot-mark {
  color: #0aa7ff;
  font-size: clamp(44px, 8.7vw, 72px);
  line-height: 0.9;
  font-weight: 950;
  letter-spacing: 0;
  text-shadow:
    0 0 12px rgba(0, 149, 255, 0.78),
    0 0 28px rgba(0, 76, 255, 0.48);
}

.ogu-arcade-boot-logo {
  display: block;
  width: min(58%, 250px);
  height: auto;
  mix-blend-mode: screen;
  filter:
    drop-shadow(0 0 10px rgba(0, 149, 255, 0.75))
    drop-shadow(0 0 24px rgba(0, 76, 255, 0.46));
}

.ogu-arcade-library {
  grid-template-rows: auto 1fr auto auto;
  align-content: stretch;
  gap: min(2.7vh, 14px);
  background:
    linear-gradient(rgba(75, 145, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(75, 145, 255, 0.12) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(101, 38, 203, 0.3), transparent 46%),
    #050712;
  background-size: 14px 14px, 14px 14px, auto, auto;
}

.ogu-arcade-library-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 22px;
  color: #ffffff;
  font-size: clamp(12px, 2vw, 15px);
  line-height: 1;
  font-weight: 950;
  text-transform: uppercase;
}

.ogu-arcade-library-counter {
  color: #fff200;
}

.ogu-arcade-carousel {
  position: relative;
  width: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
}

.ogu-arcade-game-card {
  position: absolute;
  width: min(68%, 270px);
  aspect-ratio: 1 / 1;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
  background: #090b12;
  box-shadow: 0 0 24px rgba(0, 92, 255, 0.2);
  opacity: 0;
  transform: translateX(0) scale(0.72);
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
  cursor: pointer;
}

.ogu-arcade-game-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  pointer-events: none;
}

.ogu-arcade-game-card.is-selected {
  opacity: 1;
  transform: translateX(0) scale(1);
  z-index: 3;
  box-shadow: 0 0 0 3px rgba(255, 242, 0, 0.22), 0 0 34px rgba(0, 116, 255, 0.52);
}

.ogu-arcade-game-card.is-prev {
  opacity: 0.45;
  transform: translateX(-62%) scale(0.66);
  z-index: 2;
}

.ogu-arcade-game-card.is-next {
  opacity: 0.45;
  transform: translateX(62%) scale(0.66);
  z-index: 2;
}

.ogu-arcade-game-title {
  margin: 0;
  width: 100%;
  color: #fff;
  font-size: clamp(22px, 4.6vw, 34px);
  line-height: 0.95;
  font-weight: 950;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 0 16px rgba(0, 92, 255, 0.7);
}

.ogu-arcade-game-subtitle {
  margin: -5px 0 0;
  color: #fff200;
  font-size: clamp(11px, 2vw, 14px);
  font-weight: 950;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}

.ogu-arcade-help {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  color: #cfe6ff;
  font-size: clamp(9px, 1.8vw, 12px);
  line-height: 1.15;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.ogu-arcade-help span {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  padding: 3px 7px;
}

.ogu-arcade-loading,
.ogu-arcade-error {
  gap: 14px;
  align-content: center;
  background: #030707;
  text-align: center;
}

.ogu-arcade-message-title {
  margin: 0;
  color: #fff;
  font-size: clamp(22px, 4.8vw, 36px);
  line-height: 1;
  font-weight: 950;
}

.ogu-arcade-message-copy {
  margin: 0;
  color: #cfe6ff;
  font-size: clamp(11px, 2.1vw, 14px);
  line-height: 1.35;
  font-weight: 850;
}

.ogu-arcade-game-frame {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #030707;
}

.ogu-arcade-pause {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 7%;
  background: rgba(2, 4, 10, 0.8);
}

.ogu-arcade-pause-panel {
  width: min(82%, 330px);
  border: 2px solid rgba(255, 242, 0, 0.76);
  border-radius: 9px;
  background: rgba(4, 8, 18, 0.96);
  padding: 16px;
  box-shadow: 0 0 0 3px rgba(255, 242, 0, 0.13), 0 0 28px rgba(0, 92, 255, 0.28);
}

.ogu-arcade-pause-title {
  margin: 0 0 12px;
  color: #fff;
  font-size: clamp(22px, 4.7vw, 34px);
  line-height: 1;
  font-weight: 950;
  text-align: center;
}

.ogu-arcade-pause-option {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
  font-size: clamp(12px, 2.1vw, 15px);
  font-weight: 950;
  text-transform: uppercase;
  cursor: pointer;
}

.ogu-arcade-pause-option + .ogu-arcade-pause-option {
  margin-top: 7px;
}

.ogu-arcade-pause-option.is-selected {
  background: #fff200;
  color: #050505;
}

.ogu-arcade-hit {
  position: absolute;
  z-index: 3;
  border: 0;
  padding: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
  touch-action: none;
}

.ogu-arcade-hit::after {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.32);
  opacity: 0;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.55);
  transform: scale(1.02);
  transition: opacity 80ms ease, transform 80ms ease;
}

.ogu-arcade-hit.is-pressed::after,
.ogu-arcade-hit:active::after {
  opacity: 1;
  transform: scale(0.96);
}

.ogu-arcade-hit:focus-visible {
  outline: 3px solid rgba(255, 242, 0, 0.9);
  outline-offset: 3px;
}

.ogu-arcade-hit-up {
  left: 18.1%;
  top: 62.3%;
  width: 9.5%;
  height: 8.6%;
  border-radius: 10px 10px 5px 5px;
}

.ogu-arcade-hit-down {
  left: 18.1%;
  top: 72.5%;
  width: 9.5%;
  height: 8.8%;
  border-radius: 5px 5px 10px 10px;
}

.ogu-arcade-hit-left {
  left: 10.2%;
  top: 67.6%;
  width: 10.4%;
  height: 8.7%;
  border-radius: 10px 5px 5px 10px;
}

.ogu-arcade-hit-right {
  left: 25.7%;
  top: 67.6%;
  width: 10.4%;
  height: 8.7%;
  border-radius: 5px 10px 10px 5px;
}

.ogu-arcade-hit-b {
  left: 62.6%;
  top: 67.4%;
  width: 14.1%;
  height: 9.4%;
  border-radius: 999px;
}

.ogu-arcade-hit-a {
  left: 76.4%;
  top: 62.8%;
  width: 14.1%;
  height: 9.4%;
  border-radius: 999px;
}

.ogu-arcade-hit-select {
  left: 37.7%;
  top: 83.1%;
  width: 13.7%;
  height: 4.5%;
  border-radius: 999px;
}

.ogu-arcade-hit-start {
  left: 52.9%;
  top: 83.1%;
  width: 13.7%;
  height: 4.5%;
  border-radius: 999px;
}

@keyframes ogu-arcade-boot-flash {
  0% {
    filter: brightness(0.05);
    opacity: 0.2;
  }
  12% {
    filter: brightness(1.8);
    opacity: 1;
  }
  24% {
    filter: brightness(0.68);
  }
  100% {
    filter: brightness(1);
  }
}

@media (max-height: 720px) and (min-width: 760px) {
  .ogu-arcade-device {
    width: min(74vh, 520px);
  }
}

@media (max-width: 767px) {
  body.ogu-arcade-body {
    background: #f8f8fb;
  }

  .ogu-arcade-desktop {
    display: none;
  }

  #ogu-arcade-machine {
    display: grid;
  }
}

@media (max-width: 420px) {
  #ogu-arcade-machine {
    padding-left: 4px;
    padding-right: 4px;
  }

  .ogu-arcade-device {
    width: min(98vw, 520px);
  }

  .ogu-arcade-library {
    gap: 7px;
  }

  .ogu-arcade-game-card {
    width: 64%;
  }
}
