:root {
  --game-frame-width: 1440px;
  --game-frame-height: 900px;
  --game-frame-sidebar-width: 320px;
  --game-frame-gap: 20px;
  --game-frame-padding: 20px;
  --game-frame-surface-padding: 18px;
}

.game-shell-stage {
  width: 100%;
}

.game-shell-stage:fullscreen {
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  background: #030814;
}

.game-shell-stage:fullscreen::backdrop {
  background: #030814;
}

.game-shell-host {
  position: relative;
  width: 100%;
  height: var(--game-shell-scaled-height, var(--game-frame-height));
}

.game-shell-stage:fullscreen .game-shell-host {
  width: 100%;
  height: 100%;
}

.game-shell-scale {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--game-frame-width);
  height: var(--game-frame-height);
  transform: translateX(-50%) scale(var(--game-shell-scale, 1));
  transform-origin: top center;
}

.game-shell-stage:fullscreen .game-shell-scale {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(var(--game-shell-scale, 1));
  transform-origin: center;
}

.game-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr) var(--game-frame-sidebar-width);
  gap: var(--game-frame-gap);
  width: var(--game-frame-width);
  height: var(--game-frame-height);
  padding: var(--game-frame-padding);
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(133, 164, 255, 0.15), transparent 34%),
    linear-gradient(165deg, rgba(10, 16, 30, 0.96), rgba(7, 12, 26, 0.94));
  box-shadow:
    inset 0 0 0 1px rgba(164, 191, 255, 0.14),
    0 24px 64px rgba(4, 9, 20, 0.38);
}

.game-shell__toolbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(11, 17, 32, 0.94);
  box-shadow: inset 0 0 0 1px rgba(164, 191, 255, 0.1);
}

.game-shell__toolbar-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.game-shell__button,
.game-shell__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.72rem 1.18rem;
  border-radius: 999px;
  border: 1px solid rgba(164, 191, 255, 0.24);
  background: rgba(21, 32, 58, 0.92);
  color: #eef4ff;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.game-shell__button:hover,
.game-shell__toggle:hover {
  transform: translateY(-1px);
  background: rgba(33, 52, 92, 0.96);
  border-color: rgba(186, 209, 255, 0.5);
}

.game-shell__button--primary {
  background: linear-gradient(135deg, rgba(79, 123, 255, 0.96), rgba(59, 90, 196, 0.96));
  border-color: rgba(198, 217, 255, 0.4);
}

.game-shell__button--ghost {
  background: rgba(11, 17, 32, 0.72);
}

.game-shell__toggle {
  gap: 8px;
}

.game-shell__toggle input {
  accent-color: #76a1ff;
}

.game-shell__toolbar-stat {
  display: inline-grid;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(18, 28, 49, 0.88);
  box-shadow: inset 0 0 0 1px rgba(164, 191, 255, 0.08);
}

.game-shell__toolbar-label {
  color: #9db3de;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.game-shell__toolbar-value {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.1;
}

.game-shell__toolbar-preview {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(18, 28, 49, 0.88);
  box-shadow: inset 0 0 0 1px rgba(164, 191, 255, 0.08);
}

.game-shell__toolbar-preview span {
  color: #9db3de;
  font-size: 1.25rem;
  font-weight: 700;
}

.game-shell__play {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: var(--game-frame-surface-padding);
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent),
    rgba(9, 15, 29, 0.9);
  box-shadow:
    inset 0 0 0 1px rgba(164, 191, 255, 0.12),
    inset 0 22px 40px rgba(255, 255, 255, 0.02);
}

.game-shell__surface {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
}

.game-shell__sidebar {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(168, 196, 255, 0.08), transparent 20%),
    rgba(14, 21, 38, 0.96);
  color: #eaf2ff;
  box-shadow: inset 0 0 0 1px rgba(164, 191, 255, 0.12);
}

.game-shell__sidebar--placeholder {
  position: relative;
  background:
    linear-gradient(180deg, rgba(168, 196, 255, 0.08), transparent 20%),
    rgba(14, 21, 38, 0.74);
}

.game-shell__sidebar--placeholder::before {
  content: '';
  position: absolute;
  inset: 18px;
  border-radius: 14px;
  border: 1px dashed rgba(164, 191, 255, 0.16);
  background:
    radial-gradient(circle at 20% 20%, rgba(124, 154, 255, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

.game-page > .game-info.card,
.game-page > .game-info.game-panel {
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f5f7fb);
  border: 1px solid rgba(187, 200, 223, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 14px 32px rgba(11, 19, 35, 0.08);
}

.game-info__panel {
  padding: 28px 30px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 22%),
    rgba(31, 39, 56, 0.96);
  border: 1px solid rgba(111, 127, 159, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 24px rgba(7, 12, 24, 0.18);
}

.game-page > .game-info .game-info__panel h2 {
  margin: 0 0 0.95rem;
  color: #edf2fd;
  font-size: clamp(1.9rem, 2.5vw, 2.35rem);
  font-weight: 800;
  line-height: 1.12;
}

.game-page > .game-info .game-info__panel h3 {
  margin: 1.45rem 0 0.6rem;
  color: #c4d0e8;
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.25;
}

.game-page > .game-info .game-info__panel p {
  margin: 0.48rem 0;
  color: #eef3fb;
  font-size: 1.06rem;
  line-height: 1.78;
}

.game-page > .game-info .game-info__panel strong {
  color: #ffffff;
  font-weight: 800;
}

@media (max-width: 820px) {
  .game-page > .game-info.card,
  .game-page > .game-info.game-panel {
    padding: 12px;
    border-radius: 18px;
  }

  .game-info__panel {
    padding: 22px 20px;
    border-radius: 16px;
  }

  .game-page > .game-info .game-info__panel h2 {
    font-size: clamp(1.7rem, 5vw, 2rem);
  }

  .game-page > .game-info .game-info__panel h3 {
    font-size: 1.18rem;
  }

  .game-page > .game-info .game-info__panel p {
    font-size: 1rem;
    line-height: 1.68;
  }
}
