

:root {
  --intro-font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --intro-font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --intro-mint: #78f1d1;
  --intro-mint-glow: rgba(120, 241, 209, 0.35);
  --intro-dark-bg: #070b17;
  --intro-panel-bg: rgba(12, 18, 42, 0.94);
  --intro-line: rgba(255, 255, 255, 0.12);
  --intro-text: #eef6ff;
  --intro-muted: #9faec6;
}


.game-shell,
.chess-shell,
.bounce-shell,
.snake-shell,
.pool-shell,
.ludo-shell,
.blocks-shell,
.tank-shell,
.flappy-shell,
.tictactoe-shell,
.dxball-shell,
.helicopter-shell,
.hen-shell,
.loderunner-shell,
.roadrunner-shell,
.candy-shell,
.duck-shell,
.club-shell {
  position: relative !important;
}


.game-intro-overlay {
  position: absolute;
  top: var(--intro-top-offset, 64px);
  bottom: 0;
  left: 0;
  right: 0;
  height: auto;
  min-height: 0;
  max-height: none;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 50px 24px;
  background: radial-gradient(circle at 75% 50%, var(--game-accent-glow, rgba(120, 241, 209, 0.18)) 0%, transparent 65%),
              linear-gradient(135deg, #090e22 0%, #0b132a 50%, #060915 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
  box-sizing: border-box;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
  overflow: hidden;
  font-family: var(--intro-font-sans);
  color: var(--intro-text);
}

.game-shell:fullscreen .game-intro-overlay,
.chess-shell:fullscreen .game-intro-overlay,
.bounce-shell:fullscreen .game-intro-overlay,
.snake-shell:fullscreen .game-intro-overlay,
.pool-shell:fullscreen .game-intro-overlay {
  top: 64px !important;
  bottom: 0 !important;
  height: auto !important;
  max-height: none !important;
}

.game-intro-overlay.intro-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}


.game-intro-overlay::before {
  content: "";
  position: absolute;
  top: 15%;
  right: 15%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--game-theme-glow, rgba(120, 241, 209, 0.15)) 0%, transparent 70%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 1;
}


.intro-content-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 5;
}


.intro-copy,
.intro-hero-left {
  position: relative;
  z-index: 5;
  width: 420px;
  max-width: 52%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: intro-fade-in 0.4s ease-out;
}

@keyframes intro-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.edition-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #b7c7df;
  font-family: var(--intro-font-sans);
  font-size: 10px;
  letter-spacing: 0.16em;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.edition-badge .edition-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--game-accent, var(--intro-mint));
  box-shadow: 0 0 10px var(--game-accent, var(--intro-mint));
  flex-shrink: 0;
  display: inline-block;
}


.intro-hero-heading {
  font-family: var(--intro-font-sans);
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.08;
  letter-spacing: -2px;
  font-weight: 850;
  margin: 10px 0 12px;
  color: #ffffff;
}

.intro-hero-heading em {
  font-style: normal;
  color: var(--game-accent, var(--intro-mint));
  text-shadow: 0 0 24px var(--game-accent-glow, var(--intro-mint-glow));
}


.intro-hero-description {
  color: var(--intro-muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 14px;
  max-width: 370px;
}


.intro-mode-switch {
  display: flex;
  flex-wrap: wrap;
  background: rgba(5, 11, 27, 0.7);
  border: 1px solid var(--intro-line);
  border-radius: 12px;
  padding: 4px;
  margin: 0 0 14px;
  max-width: 360px;
  gap: 4px;
  box-sizing: border-box;
}

.intro-mode-switch button,
.intro-mode-switch .intro-mode-btn {
  flex: 1 1 auto;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 750;
  color: #9eadc8;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--intro-font-sans);
  text-align: center;
  white-space: nowrap;
}

.intro-mode-switch button:hover,
.intro-mode-switch .intro-mode-btn:hover {
  color: #ffffff;
}

.intro-mode-switch button.active,
.intro-mode-switch .intro-mode-btn.active,
.intro-mode-switch button[aria-pressed="true"],
.intro-mode-switch .intro-mode-btn[aria-pressed="true"] {
  background: #243452;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}


.intro-primary-btn {
  border: 0;
  background: var(--game-accent, var(--intro-mint));
  color: #092025;
  border-radius: 12px;
  min-height: 44px;
  padding: 10px 20px;
  font-family: var(--intro-font-sans);
  font-weight: 850;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 24px var(--game-accent-glow, var(--intro-mint-glow));
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 320px;
  max-width: 100%;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  text-transform: uppercase;
}

.intro-primary-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--game-accent-glow, var(--intro-mint-glow));
}

.intro-primary-btn:active {
  transform: translateY(0);
}

.intro-primary-btn .btn-arrow {
  font-size: 18px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.intro-primary-btn:hover .btn-arrow {
  transform: translate(3px, -3px);
}


.intro-bottom-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  max-width: 320px;
}

.intro-skin-label {
  color: #8fa2c0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.intro-swatches-group,
.intro-swatches {
  display: flex;
  align-items: center;
  gap: 8px;
}

.intro-swatch {
  width: 22px;
  height: 22px;
  min-height: 0;
  border: 2px solid #142038;
  border-radius: 50%;
  padding: 0;
  background: var(--swatch-color, #ffffff);
  cursor: pointer;
  transition: transform 0.2s ease, outline 0.2s ease;
}

.intro-swatch:hover {
  transform: scale(1.15);
}

.intro-swatch.active,
.intro-swatch[aria-pressed="true"] {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.intro-sub-link {
  background: none;
  border: 0;
  padding: 4px 0;
  color: #becee5;
  font-size: 11.5px;
  font-weight: 700;
  margin-left: auto;
  cursor: pointer;
  transition: color 0.2s ease;
  font-family: var(--intro-font-sans);
}

.intro-sub-link:hover {
  color: var(--game-accent, var(--intro-mint));
  text-decoration: underline;
}


.intro-hero-art {
  position: relative;
  z-index: 4;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding-left: 20px;
}

.intro-mascot-visual {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: mascot-float 4.5s ease-in-out infinite alternate;
}

@keyframes mascot-float {
  0% {
    transform: translateY(0) scale(1);
  }
  100% {
    transform: translateY(-10px) scale(1.02);
  }
}

.intro-mascot-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.65));
}


.intro-hero-caption {
  position: absolute;
  bottom: 24px;
  right: 40px;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-align: right;
  color: #8396b9;
  text-transform: uppercase;
  font-family: var(--intro-font-sans);
  z-index: 6;
  pointer-events: none;
}

.intro-hero-caption b {
  display: block;
  color: #d9e6ff;
  letter-spacing: 0.08em;
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 800;
}


.game-instructions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9daec9;
  font-size: 11px;
  background: #0f182a;
  box-sizing: border-box;
  font-family: var(--intro-font-sans);
  width: 100%;
  z-index: 20;
}

.game-instructions-bar .key-group {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.game-instructions-bar .key-group span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #9daec9;
}

.game-instructions-bar kbd {
  font-family: var(--intro-font-mono);
  color: #d6e4f4;
  border: 1px solid rgba(107, 132, 169, 0.35);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 6px;
  background: #19263d;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 700;
}

.game-instructions-bar .save-note {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 10px;
  color: #7e94b2;
}

.game-instructions-bar .save-note::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--game-accent, var(--intro-mint));
  box-shadow: 0 0 6px var(--game-accent, var(--intro-mint));
  display: inline-block;
}


@media (max-width: 960px) {
  .game-intro-overlay {
    padding: 35px 30px 25px;
  }
  .intro-copy {
    width: 360px;
    max-width: 58%;
  }
  .intro-hero-heading {
    font-size: 38px;
  }
  .intro-mascot-visual {
    height: 300px;
  }
  .intro-hero-caption {
    right: 25px;
    bottom: 15px;
  }
}

@media (max-width: 768px), (max-height: 520px) and (orientation: landscape) {
  .game-intro-overlay {
    top: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 58px 10px 20px 10px !important;
    background: radial-gradient(circle at 50% 25%, var(--game-accent-glow, rgba(120, 241, 209, 0.18)) 0%, transparent 70%),
                linear-gradient(180deg, #090e22 0%, #0a1128 50%, #060916 100%) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .intro-content-wrap {
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    height: auto !important;
    width: 100% !important;
    max-width: 310px !important;
    margin: auto !important;
    gap: 4px !important;
  }
  .intro-copy,
  .intro-hero-left {
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  .edition-badge,
  .intro-edition-pill {
    font-size: 7.5px !important;
    padding: 2px 6px !important;
    margin-bottom: 2px !important;
  }
  .intro-hero-heading {
    font-size: 1.15rem !important;
    line-height: 1.15 !important;
    margin: 2px 0 4px !important;
  }
  .intro-hero-description {
    font-size: 0.68rem !important;
    line-height: 1.25 !important;
    margin-bottom: 5px !important;
    max-width: 280px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  .intro-mode-switch {
    max-width: 100% !important;
    margin-bottom: 5px !important;
    gap: 3px !important;
  }
  .intro-mode-switch button {
    font-size: 0.68rem !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    min-height: 26px !important;
  }
  .intro-primary-btn {
    width: 100% !important;
    max-width: 220px !important;
    min-height: 32px !important;
    font-size: 0.75rem !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    margin-bottom: 4px !important;
  }
  .intro-bottom-row {
    max-width: 100% !important;
    gap: 6px !important;
    font-size: 0.65rem !important;
    justify-content: center !important;
  }
  .intro-hero-art {
    display: none !important; 
  }
  .intro-hero-caption {
    display: none !important;
  }
  .game-instructions-bar .key-group {
    display: none !important;
  }
  .game-instructions-bar {
    justify-content: center !important;
  }
}
