body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #181a1b;
  color: #eaffd0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.container {
  width: 80vw;
  max-width: 900px;
  padding: 2rem 1rem 3.5rem 1rem;
  background: #232826;
  border-radius: 32px 32px 32px 32px/24px 24px 24px 24px;
  box-shadow:
    0 4px 24px rgba(34, 61, 34, 0.2),
    0 0 0 8px #181a1b,
    0 12px 48px 0 #000a;
  border: 6px solid #181a1b;
  position: relative;
  overflow: visible;
  margin-bottom: 60px;
}
.container::before {
  content: '';
  display: none;
}
.container::after {
  display: none;
}
h1 {
  text-align: center;
  color: #b6ff7a;
  margin-bottom: 2rem;
}
.auth-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.auth-form input {
  flex: 1;
  padding: 0.75rem;
  border: none;
  border-radius: 8px;
  background: #2e4d2e;
  color: #eaffd0;
}
.auth-form button {
  padding: 0.75rem 1.5rem;
  background: #b6ff7a;
  color: #1a2e1a;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
.auth-form button:hover {
  background: #a0e66a;
}
.input-block {
  margin-bottom: 2rem;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.input-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.input-block label {
  display: block;
  margin-bottom: 0.5rem;
  color: #ffffff;
}
.input-block textarea {
  flex: 1;
  min-height: 44px;
  max-height: 200px;
  resize: vertical;
  padding: 0.75rem;
  border: none;
  border-radius: 8px;
  background: #2e4d2e;
  color: #eaffd0;
  font-size: 1rem;
  margin-bottom: 0;
  box-sizing: border-box;
  width: 100%;
  transition: min-height 0.2s;
}
#joke-btn {
  width: 100%;
  min-width: 0;
  max-width: none;
  text-align: center;
}
#joke-response {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1rem auto;
}
.input-block button {
  min-width: 140px;
  max-width: 180px;
  padding: 0.75rem 1.5rem;
  background: #b6ff7a;
  color: #1a2e1a;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, min-width 0.2s;
  align-self: flex-end;
  height: 100%;
  box-sizing: border-box;
  font-size: 1rem;
}
.input-block button:hover {
  background: #a0e66a;
}
.response {
  font-size: 0.97em;
  margin-top: 0.5rem;
  min-height: 2rem;
  color: #eaffd0;
  word-break: break-word;
  /* line-height: 1.6; */
}
.response, .response p, .response li, .response ul, .response ol {
  line-height: 1.18;
}
.response p, .response ul, .response ol {
  margin: 0.35em 0 0.35em 0;
}
.response h1, .response h2, .response h3, .response h4, .response h5, .response h6 {
  margin: 0.7em 0 0.3em 0;
  line-height: 1.12;
}
.response strong, .response b {
  color: #ffffff;
  font-weight: bold;
}

.response em, .response i {
  font-style: italic;
}

.response code {
  background: #2e4d2e;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  color: #a0e66a;
}

.response blockquote {
  border-left: 3px solid #b6ff7a;
  padding-left: 1em;
  margin: 1em 0;
  color: #d4e6a0;
}
.loader {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid #b6ff7a;
  border-top: 3px solid #232826;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  vertical-align: middle;
  margin-left: 0.5rem;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.hidden {
  display: none;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  min-width: 220px;
  max-width: 90vw;
  background: #232826ee;
  color: #b6ff7a;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(34, 61, 34, 0.25);
  padding: 1rem 2rem;
  font-size: 1.1rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 1;
  transition: opacity 0.4s;
}
.toast.hidden {
  opacity: 0;
  pointer-events: none;
}
.toast .toast-code {
  color: #ffb6b6;
  font-size: 0.95em;
  margin-top: 0.5em;
  word-break: break-all;
}
#bg-animals {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}
body, html {
  background: #181a1b;
}
.container, .toast {
  position: relative;
  z-index: 1;
}
.menu-tabs {
  display: none !important;
}
.tab-btn {
  background: #232826;
  color: #b6ff7a;
  border: 2px solid #b6ff7a;
  border-radius: 8px;
  padding: 0.7rem 2.2rem;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.tab-btn.active, .tab-btn:hover {
  background: #b6ff7a;
  color: #232826;
}
.tab-content {
  display: none;
}
.tab-content:not(.hidden) {
  display: block;
}
.tv-ticker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.5em;
  background: linear-gradient(90deg, #000000 0%, #1a1a1a 50%, #000000 100%);
  color: #b6ff7a;
  font-size: 1.1em;
  font-weight: 600;
  letter-spacing: 0.03em;
  overflow: hidden;
  border-radius: 0 0 32px 32px/0 0 60px 60px;
  z-index: 10;
  box-shadow: 0 2px 12px #0006 inset;
  display: flex;
  align-items: center;
  border-top: 2px solid #333333;
}
.tv-ticker-inner {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: ticker-move 45s linear infinite;
  text-shadow: 0 0 8px rgba(255, 255, 0, 0.3);
}
@keyframes ticker-move {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
@media (max-width: 600px) {
  .tv-ticker {
    font-size: 1em;
    height: 2.2em;
    font-weight: 500;
  }
  .container {
    width: 98vw;
    max-width: 100vw;
    min-width: 0;
    padding: 1.2rem 0.5rem 3.5rem 0.5rem;
    border-radius: 18px 18px 28px 28px/14px 14px 40px 40px;
    margin-bottom: 32px;
  }
  .menu-tabs {
    gap: 0.3rem;
    margin-top: 1.2rem;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    padding: 0 0.2rem;
  }
  .tab-btn {
    flex: 1 1 18%;
    min-width: 0;
    padding: 0.6rem 0.2rem;
    font-size: 0.98rem;
    margin: 0 0.1rem;
    box-sizing: border-box;
  }
  .input-block {
    margin-bottom: 1.2rem;
    min-height: 90px;
    width: 100%;
    padding: 0;
  }
  .input-row {
    flex-direction: column;
    gap: 0.4rem;
    align-items: stretch;
  }
  .input-block textarea {
    width: 100%;
    min-width: 0;
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
  }
  .input-block button {
    width: 100%;
    min-width: 0;
    max-width: none;
    align-self: stretch;
    margin-top: 0.1rem;
    height: 2.5em;
    font-size: 1.05rem;
  }
}
@media (min-width: 600px) {
  .container {
    max-width: 600px;
    padding: 3rem 2rem 4.5rem 2rem;
  }
  .container::after {
    width: 110px;
    height: 34px;
    bottom: -44px;
  }
}
@media (min-width: 1024px) {
  .container {
    max-width: 800px;
    padding: 4rem 3rem 5.5rem 3rem;
  }
  .container::after {
    width: 140px;
    height: 40px;
    bottom: -52px;
  }
  h1 {
    font-size: 2.5rem;
  }
} 
.meme-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.5em;
}
.meme-img {
  max-width: 100%;
  max-height: 50vh;
  border-radius: 8px;
  box-shadow: 0 2px 8px #0003;
  margin-bottom: 0.7em;
  display: block;
}
.meme-caption {
  font-size: 1.1em;
  color: #eaffd0;
  text-align: center;
  margin-top: 0;
} 
.menu-hamburger {
  display: flex;
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  z-index: 2001;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  padding: 0;
}
.menu-hamburger span {
  display: block;
  width: 28px;
  height: 4px;
  margin: 4px 0;
  background: #b6ff7a;
  border-radius: 2px;
  transition: 0.3s;
}
.sidebar-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: fixed;
  top: 0;
  right: 0;
  width: 82vw;
  max-width: 340px;
  height: 98vh;
  margin: 1vh 1vw 1vh 0;
  background: #232826ee;
  border-radius: 32px 32px 38px 38px/24px 24px 60px 60px;
  border: 3px solid #b6ff7a44;
  box-shadow: -4px 0 32px #000a, 0 0 0 6px #181a1b;
  z-index: 1200;
  padding: 1.2rem 0.7rem 1.2rem 0.7rem;
  gap: 0.7rem;
  transition: transform 0.3s;
  transform: translateX(100%);
}
.remote-header {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.2em;
}
.remote-logo {
  background: #b6ff7a;
  color: #232826;
  font-weight: bold;
  font-size: 1.18em;
  border-radius: 12px;
  padding: 0.25em 1.2em;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px #0002;
}
.remote-row {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.2em;
}
.remote-row-top {
  gap: 0.7em;
  margin-bottom: 0.5em;
}
.remote-row-arrows {
  flex-direction: column;
  gap: 0.2em;
  margin-bottom: 0.5em;
}
.remote-arrows-middle {
  display: flex;
  gap: 0.2em;
  justify-content: center;
  align-items: center;
  margin: 0.15em 0;
}
.remote-row-volume {
  gap: 0.4em;
  margin-bottom: 0.7em;
}
.remote-vol-label {
  color: #b6ff7a;
  font-size: 0.98em;
  padding: 0 0.3em;
  min-width: 90px;
  text-align: center;
  display: inline-block;
}
.remote-row-main {
  flex-direction: column;
  gap: 0.1em;
  width: 100%;
  margin-top: 0.3em;
}
.remote-btn {
  border: none;
  outline: none;
  background: #232826;
  color: #b6ff7a;
  font-size: 1.15em;
  font-weight: bold;
  border-radius: 50%;
  width: 2.3em;
  height: 2.3em;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px #0002;
  margin: 0 0.1em;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.remote-btn-power {
  background: #ffb6b6;
  color: #232826;
}
.remote-btn-info {
  background: #7af7ff;
  color: #232826;
}
.remote-btn-arrow {
  background: #232826;
  color: #b6ff7a;
  font-size: 1.1em;
  border-radius: 50%;
}
.remote-btn-ok {
  background: #b6ff7a;
  color: #232826;
  border-radius: 50%;
  font-size: 1.05em;
  width: 2.3em;
  height: 2.3em;
}
.remote-btn-vol {
  background: #232826;
  color: #b6ff7a;
  font-size: 1.1em;
  border-radius: 50%;
}
.remote-btn:hover, .remote-btn:focus {
  background: #b6ff7a;
  color: #232826;
  box-shadow: 0 2px 12px #b6ff7a44;
}
.remote-row-main .tab-btn {
  width: 100%;
  font-size: 1.05rem;
  padding: 0.45em 0 0.35em 0;
  margin: 0;
  border-radius: 8px;
  background: #181a1b;
  color: #b6ff7a;
  border: 1.5px solid #3a4d3a;
  text-align: left;
  transition: background 0.18s, color 0.18s;
  box-shadow: none;
  height: auto;
  margin-bottom: 0.18em;
}
.remote-row-main .tab-btn.active, .remote-row-main .tab-btn:hover {
  background: none;
  color: #fff;
}
.sidebar-menu:not(.hidden) {
  transform: translateX(0);
}
.sidebar-menu .tab-btn {
  width: 100%;
  font-size: 1.05rem;
  padding: 0.45em 0 0.35em 0;
  margin: 0;
  border-radius: 0;
  background: none;
  color: #b6ff7a;
  border: none;
  border-bottom: 1px solid #3a4d3a;
  text-align: left;
  transition: background 0.18s, color 0.18s;
  box-shadow: none;
  height: auto;
}
.sidebar-menu .tab-btn:last-child {
  border-bottom: none;
}
.sidebar-menu .tab-btn.active, .sidebar-menu .tab-btn:hover {
  color: white;
}
@media (max-width: 600px) {
  .container {
    padding-top: 3.2rem;
  }
}
@media (min-width: 601px) {
  /* убираем скрытие бургера и сайдбара */
} 
.remote-row-player {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4em;
  margin-bottom: 0.2em;
}
.remote-row-player .remote-btn {
  font-size: 1.25em;
  width: 2.4em;
  height: 2.4em;
  border-radius: 50%;
  background: #b6ff7a;
  color: #232826;
  border: 2px solid #b6ff7a;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.remote-row-player .remote-btn:hover, .remote-row-player .remote-btn:focus {
  background: #a0e66a;
  color: #232826;
  box-shadow: 0 2px 12px #b6ff7a44;
}
.remote-row-player .remote-btn:active {
  background: #8cd65a;
  color: #232826;
}
.remote-player-info {
  width: 100%;
  text-align: center;
  font-size: 0.98em;
  color: #b6ff7a;
  margin-bottom: 0.2em;
  min-height: 2.2em;
  word-break: break-word;
}
.remote-player-title {
  font-weight: bold;
  color: #fff;
}
.remote-player-artist {
  color: #7af7ff;
  font-size: 0.97em;
} 
.remote-player-time {
  color: #b6ff7a;
  font-size: 0.97em;
  margin: 0.1em 0 0.1em 0;
  letter-spacing: 0.02em;
}
.remote-player-bar {
  width: 90%;
  height: 22px;
  background: #232826;
  border-radius: 8px;
  margin: 0.15em auto 0.1em auto;
  box-shadow: 0 1px 4px #0002;
  overflow: hidden;
  cursor: pointer;
}
.remote-player-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, #b6ff7a 0%, #7af7ff 100%);
  border-radius: 8px;
  transition: width 0.2s;
}
input.error {
  border: 2px solid #ff4d4d !important;
  background: #fff0f0 !important;
  color: #b00 !important;
}
body:not(.auth-ok) .menu-hamburger, body:not(.auth-ok) .sidebar-menu {
  display: none !important;
} 
/* Стили для SpaceInvaders3D удалены по запросу пользователя */
.tetris-side-panel {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1.2em;
  min-width: 120px;
  max-width: 160px;
  justify-content: flex-end;
  height: 100%;
}
#game-content:not(.hidden) .tetris-side-panel,
#spaceinvaders3d-content:not(.hidden) .tetris-side-panel {
  display: flex;
}
#tetris-next {
  width: 110px;
  height: 110px;
  min-width: 110px;
  min-height: 110px;
  max-width: 110px;
  max-height: 110px;
  background: #181a1b;
  border-radius: 16px;
  box-shadow: 0 2px 8px #0002;
  font-size: 1.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
#tetris-next canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.tetris-controls-diamond {
  display: grid;
  grid-template-columns: 48px 48px 48px;
  grid-template-rows: 48px 48px 48px;
  gap: 0;
  width: 144px;
  height: 144px;
  margin: 2.2em auto 0 auto;
  position: relative;
}
.tetris-controls-diamond .tetris-btn-round {
  grid-column: 2; grid-row: 1; /* up */
}
.tetris-controls-diamond .tetris-btn-round[data-action="left"] {
  grid-column: 1; grid-row: 2;
}
.tetris-controls-diamond .tetris-btn-round[data-action="down"] {
  grid-column: 2; grid-row: 3;
}
.tetris-controls-diamond .tetris-btn-round[data-action="right"] {
  grid-column: 3; grid-row: 2;
}
.tetris-controls-diamond .tetris-btn-round[data-action="up"] {
  grid-column: 2; grid-row: 1;
}
.tetris-btn-round {
  border-radius: 50% !important;
  background: #181a1b;
  color: #b6ff7a;
  border: 2.5px solid #b6ff7a;
  font-size: 1.3em;
  width: 48px !important;
  height: 48px !important;
  aspect-ratio: 1/1;
  box-shadow: 0 2px 8px #0004;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border 0.18s, box-shadow 0.18s;
  touch-action: manipulation;
  padding: 0 !important;
  margin: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  box-sizing: border-box;
  line-height: 1;
}
.tetris-btn-round:active, .tetris-btn-round:focus {
  background: #b6ff7a;
  color: #232826;
  border-color: #7af7ff;
  box-shadow: 0 4px 16px #b6ff7a44;
}
#tetris-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  width: unset;
  height: auto;
  min-width: unset;
  min-height: unset;
  max-width: 520px;
  max-height: unset;
  padding: 0.2em;
  box-sizing: border-box;
}
#tetris-container canvas {
  width: 100%;
  height: auto;
  max-width: 480px;
  max-height: 1100px;
  display: block;
  margin: 0 auto;
}
.tetris-ui-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0.7em 0 1.2em 0;
}
.tetris-score-block {
  background: #232826;
  border-radius: 10px;
  box-shadow: 0 2px 8px #0002;
  color: #b6ff7a;
  font-size: 1.15em;
  font-weight: bold;
  padding: 0.7em 1.2em;
  margin-bottom: 1.1em;
  text-align: center;
  min-width: 90px;
}
#tetris-restart {
  background: #232826;
  color: #b6ff7a;
  border: none;
  border-radius: 10px;
  box-shadow: 0 2px 8px #0002;
  font-size: 1.15em;
  font-weight: bold;
  padding: 0.7em 1.2em;
  margin-bottom: 1.1em;
  text-align: center;
  min-width: 90px;
  display: block;
  width: 100%;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
#tetris-restart:hover, #tetris-restart:focus {
  background: #b6ff7a;
  color: #232826;
  box-shadow: 0 4px 16px #b6ff7a44;
}
@media (max-width: 600px) {
  .tetris-flex-row {
    gap: 0.7em;
    height: auto;
  }
  .tetris-side-panel {
    min-width: 90px;
    max-width: 120px;
    gap: 0.7em;
    justify-content: flex-end;
    height: 100%;
  }
  #tetris-next {
    width: 80px;
    height: 80px;
    min-width: 80px;
    min-height: 80px;
    max-width: 80px;
    max-height: 80px;
    font-size: 1em;
  }
  .tetris-controls-diamond {
    grid-template-columns: 36px 36px 36px;
    grid-template-rows: 36px 36px 36px;
    width: 108px;
    height: 108px;
    margin-top: 2em;
  }
  .tetris-btn-round {
    font-size: 1em;
    width: 36px !important;
    height: 36px !important;
    aspect-ratio: 1/1;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    box-sizing: border-box;
    line-height: 1;
  }
  #tetris-screen {
    max-width: 260px;
    height: auto;
    padding: 0.2em;
  }
  #tetris-container canvas {
    max-width: 220px;
    max-height: 480px;
    width: unset;
    height: unset;
  }
  .tetris-score-block {
    font-size: 1em;
    padding: 0.5em 0.7em;
    min-width: 60px;
    margin-bottom: 0.7em;
  }
}

/* === Chip and Dale Game Styles === */
#chip-dale-screen {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 400px;
  background: #181a1b;
  border-radius: 12px;
  box-shadow: 0 4px 24px #0006;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

#chip-dale-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#chip-dale-container canvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 8px;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.chip-dale-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 10;
}



.chip-dale-controls {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  width: auto;
  min-width: 200px;
  max-width: 300px;
}

/* Форма настоящего геймпада */
.chip-dale-gamepad {
  position: relative;
  width: 280px;
  height: 120px;
  background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
  border-radius: 60px 40px 60px 40px;
  border: 3px solid #444;
  box-shadow: 
    0 8px 16px rgba(0,0,0,0.3),
    inset 0 2px 4px rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.chip-dale-gamepad::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(145deg, #666, #333);
  border-radius: 62px 42px 62px 42px;
  z-index: -1;
}

.chip-dale-gamepad::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 8px;
  background: linear-gradient(90deg, #333, #555, #333);
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.chip-dale-joystick {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
}
.chip-dale-joystick-contour {
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  border: 3px solid #b6ff7a;
  border-radius: 20px;
  opacity: 0.3;
  pointer-events: none;
}
.chip-dale-joystick-left {
  display: grid;
  grid-template-columns: 32px 32px 32px;
  grid-template-rows: 32px 32px 32px;
  gap: 2px;
  width: 100px;
  height: 100px;
  position: relative;
  background: radial-gradient(circle, #444, #222);
  border-radius: 50%;
  padding: 8px;
  border: 2px solid #666;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}
.chip-dale-joystick-left .chip-dale-btn-round[data-action="up"] {
  grid-column: 2; grid-row: 1;
}
.chip-dale-joystick-left .chip-dale-btn-round[data-action="left"] {
  grid-column: 1; grid-row: 2;
}
.chip-dale-joystick-left .chip-dale-btn-round[data-action="down"] {
  grid-column: 2; grid-row: 3;
}
.chip-dale-joystick-left .chip-dale-btn-round[data-action="right"] {
  grid-column: 3; grid-row: 2;
}
.chip-dale-joystick-right {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  background: linear-gradient(145deg, #333, #222);
  border-radius: 20px;
  padding: 8px;
  border: 2px solid #555;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}
.chip-dale-btn-round {
  border-radius: 50% !important;
  background: linear-gradient(145deg, #555, #333);
  color: #b6ff7a;
  border: 2px solid #777;
  font-size: 0.9em;
  width: 32px !important;
  height: 32px !important;
  aspect-ratio: 1/1;
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.3),
    inset 0 1px 2px rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  touch-action: manipulation;
  padding: 0 !important;
  margin: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  box-sizing: border-box;
  line-height: 1;
  font-weight: bold;
}
.chip-dale-btn-round:active, .chip-dale-btn-round:focus {
  background: linear-gradient(145deg, #b6ff7a, #8fcc5a);
  color: #232826;
  border-color: #7af7ff;
  box-shadow: 
    0 4px 12px rgba(182, 255, 122, 0.4),
    inset 0 1px 2px rgba(255,255,255,0.3);
  transform: translateY(1px);
}

@media (max-width: 600px) {
  #chip-dale-screen {
    height: 60vh;
    min-height: 300px;
  }
  
  .chip-dale-gamepad {
    width: 240px;
    height: 100px;
    border-radius: 50px 30px 50px 30px;
  }
  
  .chip-dale-joystick-left {
    grid-template-columns: 28px 28px 28px;
    grid-template-rows: 28px 28px 28px;
    width: 84px;
    height: 84px;
  }
  
  .chip-dale-btn-round {
    font-size: 0.8em;
    width: 28px !important;
    height: 28px !important;
  }
  
  .chip-dale-controls {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
  }
  
  .chip-dale-joystick {
    gap: 8px;
  }
  
  .chip-dale-joystick-right {
    gap: 4px;
  }
} 
.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.2em;
  margin: 0 auto 2em auto;
  max-width: 900px;
}
.movie-card {
  background: #232826;
  border-radius: 14px;
  box-shadow: 0 2px 12px #0005;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0 1em 0;
  transition: transform 0.18s, box-shadow 0.18s;
}
.movie-card:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 6px 24px #0007;
}
.movie-poster {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 14px 14px 0 0;
  margin-bottom: 0.7em;
  background: #181a1b;
}
.movie-title {
  font-size: 1.08em;
  font-weight: bold;
  color: #b6ff7a;
  margin: 0.2em 0 0.1em 0;
  text-align: center;
}
.movie-date {
  font-size: 0.98em;
  color: #7affb6;
  margin-bottom: 0.2em;
}
.movie-desc {
  font-size: 0.97em;
  color: #eaffd0;
  text-align: center;
  margin: 0 0.5em;
  min-height: 2.2em;
  max-height: 2.6em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
} 
#img-timer {
  display: inline-block;
  background: none;
  color: rgb(182, 255, 122);
  font-weight: bold;
  margin-left: 0.5em;
  min-width: 2.5em;
  text-align: center;
  transition: color 0.2s;
} 
.tetris-flex-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 1.8em;
  margin-bottom: 0.5em;
  height: auto;
} 
@media (max-width: 600px) {
  .spaceinvaders3d-flex-row {
    flex-direction: column;
    gap: 0.7em;
    align-items: center;
  }
  #spaceinvaders3d-screen {
    width: 100%;
    max-width: 320px;
    height: auto;
  }
  #spaceinvaders3d-container {
    width: 100%;
    max-width: 320px;
    height: auto;
  }
  #spaceinvaders3d-container canvas {
    width: 100% !important;
    height: auto !important;
    max-width: 320px;
    max-height: 240px;
  }
  .tetris-side-panel {
    min-width: 90px;
    max-width: 120px;
    gap: 0.7em;
    justify-content: center;
    height: auto;
  }
  #spaceinvaders3d-restart {
    font-size: 0.9em;
    padding: 0.3em 0.8em;
  }
  .tetris-score-block {
    font-size: 0.9em;
    padding: 0.5em 0.8em;
  }
  
  /* Стили для кнопок управления SpaceInvaders3D */
  #spaceinvaders3d-controls {
  }
  
  .response h1, .response h2, .response h3, .response h4, .response h5, .response h6 {
    color: #b6ff7a;
    margin: 1.5em 0 0.5em 0;
    font-weight: bold;
  }
  
  .response h1 { font-size: 1.5em; }
  .response h2 { font-size: 1.3em; }
  .response h3 { font-size: 1.1em; }
  
  .response p {
    margin: 0.8em 0;
  }
  
  .response ul, .response ol {
    margin: 0.8em 0;
    padding-left: 1.5em;
  }
  
  .response li {
    margin: 0.3em 0;
  }
  
  .response strong, .response b {
    color: #ffffff;
    font-weight: bold;
  }
  
  .response em, .response i {
    font-style: italic;
  }
  
  .response code {
    background: #2e4d2e;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #a0e66a;
  }
  
  .response blockquote {
    border-left: 3px solid #b6ff7a;
    padding-left: 1em;
    margin: 1em 0;
    color: #d4e6a0;
  }
} 
#info-speed {
  margin-bottom: 1.2em;
} 
.tab-btn[data-tab="about-content"],
.tab-btn[data-tab="info-content"],
.tab-btn[data-tab="game-content"],
.tab-btn[data-tab="movies-content"] {
  opacity: 0.55;
}
.tab-btn.active[data-tab="about-content"],
.tab-btn.active[data-tab="info-content"],
.tab-btn.active[data-tab="game-content"],
.tab-btn.active[data-tab="movies-content"],
.tab-btn[data-tab="about-content"]:hover,
.tab-btn[data-tab="info-content"]:hover,
.tab-btn[data-tab="game-content"]:hover,
.tab-btn[data-tab="movies-content"]:hover {
  opacity: 1;
} 
#movies-refresh {
  display: block;
  margin-left: auto;
  margin-right: auto;
} 
.sidebar-menu.hidden {
  margin: 0 !important;
  transform: translateX(100%) !important;
} 