body.kb-redesign.game-open { overflow: hidden; }
body.kb-redesign.game-open .site-header { display: none; }
body.kb-redesign.game-open .sidebar { z-index: 1601; }

body.kb-redesign #gameModal {
  display: none;
  position: fixed;
  inset: 0 0 0 72px;
  z-index: 1500;
  align-items: stretch;
  justify-content: stretch;
  background: #080b0f;
  border-left: 1px solid var(--kb-border);
}
body.kb-redesign #gameModal .modal-content {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #080b0f;
}
body.kb-redesign #gameModal .modal-header {
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(14px, 1.6vw, 24px);
  background: #10161c;
  border-bottom: 1px solid var(--kb-border);
}
body.kb-redesign #gameModal .modal-header::after { display: none; }
body.kb-redesign #gameModal .game-heading { display: flex; align-items: center; min-width: 0; gap: 10px; }
body.kb-redesign #gameModal .game-heading::before { display: none; }
body.kb-redesign #gameModal .game-brand { color: var(--kb-accent); font: 750 15px/1 "Golos Text", sans-serif; letter-spacing: -.03em; padding-right: 13px; border-right: 1px solid var(--kb-border); }
body.kb-redesign #gameModal .game-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--kb-text);
  font: 600 13px/1.3 "Golos Text", sans-serif;
}
body.kb-redesign #gameModal .game-controls { display: flex; gap: 8px; flex: none; }
body.kb-redesign #gameModal .modal-btn {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--kb-border);
  border-radius: 6px;
  background: #18212a;
  color: var(--kb-text);
  font: 600 12px/1 "Golos Text", sans-serif;
  letter-spacing: 0;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}
body.kb-redesign #gameModal .modal-btn:hover,
body.kb-redesign #gameModal .modal-btn:focus-visible { border-color: var(--kb-accent); color: var(--kb-accent); background: #202a33; }
body.kb-redesign #gameModal .game-layout { display: grid; grid-template-columns: minmax(220px, 18vw) minmax(0, 1fr) minmax(200px, 16vw); gap: 12px; flex: 1; min-height: 0; padding: 12px; }
body.kb-redesign #gameModal .game-stage { min-width: 0; min-height: 0; overflow: hidden; border: 1px solid var(--kb-border); border-radius: 9px; background: #050608; }
body.kb-redesign #gameModal #gameIframe { display: block; width: 100%; height: 100%; min-height: 0; border: 0; background: #090b0d; }
body.kb-redesign #gameModal .game-side { min-width: 0; overflow-y: auto; padding: 16px 12px; border: 1px solid var(--kb-border); border-radius: 9px; background: #10161d; }
.game-side-kicker { display: inline-block; margin-bottom: 9px; color: var(--kb-accent); font: 750 10px/1.2 "Golos Text", sans-serif; text-transform: uppercase; letter-spacing: .13em; }
body.kb-redesign #gameModal .game-side h2 { margin: 0 0 12px; color: var(--kb-text); font: 700 15px/1.25 "Golos Text", sans-serif; letter-spacing: -.02em; }
body.kb-redesign #gameModal .game-wins h2 { display: flex; align-items: center; gap: 8px; }
body.kb-redesign #gameModal .game-side p { margin: 0; color: var(--kb-text-muted); font: 400 11px/1.45 "Golos Text", sans-serif; }
.kb-win-live { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--kb-success); box-shadow: 0 0 0 0 rgba(66, 199, 134, .45); animation: kb-win-pulse 1.8s ease-out infinite; }
@keyframes kb-win-pulse {
  70% { box-shadow: 0 0 0 7px rgba(66, 199, 134, 0); }
  100% { box-shadow: 0 0 0 0 rgba(66, 199, 134, 0); }
}
.kb-win-showcase { margin: 8px 0 36px; }
.kb-win-showcase .section-header { margin-bottom: 14px; }
.kb-win-showcase .section-label { margin: 0; }
.game-win-list, .kb-win-grid { display: grid; gap: 8px; }
.kb-win-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.game-win-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 3px 10px; min-width: 0; padding: 12px 14px; border: 1px solid var(--kb-border); border-radius: 12px; background: var(--kb-surface); }
.game-win-item.is-new { animation: kb-win-in .4s ease; }
@keyframes kb-win-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.game-win-player { min-width: 0; overflow: hidden; color: var(--kb-text); font: 600 13px/1.3 "Golos Text", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.game-win-amount { color: var(--kb-success); font: 700 13px/1.3 "Golos Text", sans-serif; white-space: nowrap; }
.game-win-meta { grid-column: 1 / -1; min-width: 0; overflow: hidden; color: var(--kb-text-subtle); font: 500 11px/1.35 "Golos Text", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
body.kb-redesign #gameModal .game-win-list { gap: 7px; }
body.kb-redesign #gameModal .game-win-item { padding: 9px 10px; border-radius: 8px; background: #17202a; }
body.kb-redesign #gameModal .game-win-player, body.kb-redesign #gameModal .game-win-amount { font-size: 12px; }
.game-related-list { display: grid; gap: 9px; }
@media (prefers-reduced-motion: reduce) {
  .kb-win-live, .game-win-item.is-new { animation: none; }
}
body.kb-redesign #gameModal .game-related-card { display: grid; grid-template-columns: 64px minmax(0,1fr); align-items: center; gap: 9px; width: 100%; padding: 5px; background: #17202a; color: var(--kb-text); border: 1px solid var(--kb-border); border-radius: 7px; text-align: left; font: 600 11px/1.25 "Golos Text", sans-serif; cursor: pointer; }
body.kb-redesign #gameModal .game-related-card:hover, body.kb-redesign #gameModal .game-related-card:focus-visible { border-color: var(--kb-accent); }
body.kb-redesign #gameModal .game-related-card img { display: block; width: 64px; height: 42px; object-fit: contain; background: #0b1117; border-radius: 4px; }
body.kb-redesign #gameModal:fullscreen { inset: 0; border: 0; }

@media (max-width: 1200px) {
  body.kb-redesign #gameModal .game-layout { grid-template-columns: minmax(200px, 20vw) minmax(0,1fr) minmax(180px,16vw); gap: 8px; padding: 8px; }
  body.kb-redesign .kb-win-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 1024px) {
  body.kb-redesign #gameModal { left: 0; border-left: 0; }
  body.kb-redesign #gameModal .modal-content { overflow-y: auto; }
  body.kb-redesign #gameModal .game-layout { display: flex; flex-direction: column; overflow: visible; }
  body.kb-redesign #gameModal .game-stage { order: 0; flex: 0 0 auto; height: min(65vh, 650px); }
  body.kb-redesign #gameModal .game-wins { order: 1; }
  body.kb-redesign #gameModal .game-related { order: 2; }
  body.kb-redesign #gameModal .game-side { overflow: visible; }
  body.kb-redesign #gameModal .game-win-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  body.kb-redesign #gameModal .game-related-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 680px) {
  body.kb-redesign #gameModal .game-stage { height: min(62vh, 470px); }
  body.kb-redesign #gameModal .game-win-list { grid-template-columns: 1fr; }
  body.kb-redesign #gameModal .game-related-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.kb-redesign .kb-win-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  body.kb-redesign #gameModal .modal-header { padding-inline: 12px; gap: 8px; }
  body.kb-redesign #gameModal .modal-btn { min-width: 32px; justify-content: center; padding: 5px; font-size: 0; }
  body.kb-redesign #gameModal .modal-btn i { font-size: 14px; }
  body.kb-redesign #gameModal .game-title { font-size: 12px; }
}
