:root {
  --ggm2-orange: #ff7a26;
  --ggm2-purple: #a96cff;
  --ggm2-bg: #050711;
  --ggm2-line: rgba(255, 255, 255, 0.10);
  --ggm2-text: #ffffff;
  --ggm2-muted: #aeb9cf;
}

.ggm2-overlay,
.ggm2-overlay *,
.ggm2-overlay *::before,
.ggm2-overlay *::after {
  box-sizing: border-box;
}

.ggm2-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 8px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  font-family: "Outfit", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.ggm2-overlay.is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.ggm2-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 122, 38, 0.13), transparent 30%),
    radial-gradient(circle at 86% 16%, rgba(169, 108, 255, 0.14), transparent 32%),
    rgba(2, 4, 10, 0.97);
  backdrop-filter: blur(16px);
}

.ggm2-shell {
  position: relative;
  width: min(910px, calc(100vw - 16px));
  max-height: calc(100vh - 16px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(16,22,41,0.99), rgba(6,9,20,0.995));
  box-shadow:
    0 35px 110px rgba(0,0,0,0.68),
    0 0 70px rgba(169,108,255,0.07);
  color: var(--ggm2-text);
  transform: translateY(16px) scale(0.985);
  opacity: 0;
  transition:
    transform 0.34s cubic-bezier(0.22, 0.82, 0.24, 1),
    opacity 0.26s ease;
}

.ggm2-overlay.is-active .ggm2-shell {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.ggm2-header {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 10px 7px 17px;
  border-bottom: 1px solid var(--ggm2-line);
  background: rgba(255,255,255,0.018);
}

.ggm2-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-size: 0.67rem;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.ggm2-brand small {
  padding-left: 9px;
  border-left: 1px solid rgba(255,255,255,0.12);
  color: rgba(174,185,207,0.56);
  font-size: 0.56rem;
}

.ggm2-brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--ggm2-orange);
  box-shadow: 0 0 16px rgba(255,122,38,0.82);
}

.ggm2-header-actions {
  display: flex;
  gap: 6px;
}

.ggm2-icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 11px;
  background: rgba(255,255,255,0.035);
  color: #fff;
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
}

.ggm2-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 18px 9px;
}

.ggm2-eyebrow {
  margin: 0 0 3px;
  color: #ff9f5f;
  font-size: 0.53rem;
  font-weight: 950;
  letter-spacing: 0.14em;
}

.ggm2-intro h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.25rem, 2.2vw, 1.9rem);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 1000;
}

.ggm2-intro > p {
  max-width: 330px;
  margin: 0;
  color: var(--ggm2-muted);
  font-size: 0.69rem;
  line-height: 1.45;
  font-weight: 650;
  text-align: right;
}

.ggm2-game-frame {
  position: relative;
  width: min(672px, calc(100% - 24px));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 17px;
  background: #050812;
  box-shadow:
    0 22px 55px rgba(0,0,0,0.40),
    0 0 0 1px rgba(255,122,38,0.025) inset;
}

.ggm2-canvas {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 164px);
  margin: 0 auto;
  aspect-ratio: 672 / 790;
  background: #050812;
}

.ggm2-scanlines {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0.11;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 3px,
      rgba(255,255,255,0.03) 4px
    );
  mix-blend-mode: screen;
}

.ggm2-screen {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at center, rgba(15,22,45,0.50), rgba(4,7,14,0.82));
  backdrop-filter: blur(7px);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.ggm2-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ggm2-screen-card {
  width: min(430px, 100%);
  padding: 23px;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 21px;
  background: linear-gradient(145deg, rgba(20,27,49,0.96), rgba(9,13,26,0.96));
  box-shadow: 0 24px 70px rgba(0,0,0,0.52);
  text-align: center;
}

.ggm2-mini-label {
  display: inline-flex;
  padding: 6px 9px;
  border: 1px solid rgba(255,122,38,0.26);
  border-radius: 999px;
  background: rgba(255,122,38,0.08);
  color: #ffa66e;
  font-size: 0.54rem;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.ggm2-screen-card h3 {
  margin: 12px 0 0;
  color: #fff;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 1000;
}

.ggm2-screen-card p {
  margin: 10px auto 0;
  max-width: 390px;
  color: var(--ggm2-muted);
  font-size: 0.76rem;
  line-height: 1.55;
  font-weight: 650;
}

.ggm2-main-button,
.ggm2-ghost-button {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 17px;
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 950;
  cursor: pointer;
}

.ggm2-main-button {
  border: 1px solid rgba(255,145,82,0.60);
  background: linear-gradient(135deg, #ff7a26, #b36aff);
  box-shadow: 0 14px 36px rgba(255,122,38,0.20);
}

.ggm2-ghost-button {
  border: 1px solid rgba(255,255,255,0.13);
  background: rgba(255,255,255,0.05);
}

.ggm2-result-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ggm2-result-score {
  width: 130px;
  margin: 15px auto 0;
  padding: 9px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  background: rgba(255,255,255,0.035);
}

.ggm2-result-score span {
  display: block;
  color: rgba(174,185,207,0.58);
  font-size: 0.52rem;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.ggm2-result-score strong {
  display: block;
  margin-top: 1px;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 1000;
}

.ggm2-countdown {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(3,5,12,0.60);
  color: #fff;
  font-size: clamp(4rem, 12vw, 8rem);
  line-height: 1;
  letter-spacing: -0.08em;
  font-weight: 1000;
  text-shadow:
    0 0 35px rgba(255,122,38,0.35),
    0 0 70px rgba(169,108,255,0.26);
}

.ggm2-countdown.is-hidden,
.ggm2-ghost-button.is-hidden {
  display: none !important;
}

.ggm2-footer {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 6px 18px 8px;
  color: rgba(174,185,207,0.64);
  font-size: 0.61rem;
  font-weight: 750;
}

.ggm2-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ggm2-controls strong {
  margin-left: 5px;
  font-weight: 750;
}

.ggm2-key {
  min-width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  background: rgba(255,255,255,0.045);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 950;
}

.ggm2-status-note {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ggm2-status-note span {
  color: #fff;
  font-weight: 950;
}

html.ggm2-active,
body.ggm2-active {
  overflow: hidden !important;
}

@media (max-height: 820px) {
  .ggm2-intro {
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .ggm2-intro > p {
    display: none;
  }

  .ggm2-canvas {
    max-height: calc(100vh - 138px);
  }

  .ggm2-footer {
    min-height: 31px;
    padding-top: 4px;
    padding-bottom: 5px;
  }
}

@media (max-width: 899px), (pointer: coarse), (hover: none) {
  .ggm2-overlay {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ggm2-overlay,
  .ggm2-shell {
    transition: none !important;
  }

  .ggm2-scanlines {
    display: none !important;
  }
}
