body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background: #e0f7fa;
}
.header {
  width: 100%;
  background: #0077b6;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5em 2em;
  box-sizing: border-box;
}
.game-title {
  font-size: 2em;
  font-weight: bold;
  letter-spacing: 1px;
  text-align: left;
}
.header-links {
  display: flex;
  gap: 1em;
}
.header-links a {
  color: #fff;
  text-decoration: underline;
  font-size: 1.1em;
  transition: color 0.2s;
}
.header-links a:hover {
  color: #90e0ef;
}
.container {
  display: flex;
  min-height: calc(100vh - 120px);
  background: #2196f3;
}
.sidebar {
  width: 200px;
  background: #48cae4;
  color: #023e8a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  font-weight: bold;
  text-align: center;
  padding: 1em 0;
  box-sizing: border-box;
}
.left-sidebar {
  border-right: 2px solid #0077b6;
}
.right-sidebar {
  border-left: 2px solid #0077b6;
}
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 2em 0 1em 0;
}
.game-bg {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #90e0ef 0%, #00b4d8 100%);
  border-radius: 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 2em;
  margin-bottom: 1em;
}
#gameCanvas {
  background: #fff;
  border: 2px solid #333;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
}
.footer {
  width: 100%;
  background: #0077b6;
  color: #fff;
  text-align: center;
  padding: 1em 0;
  position: relative;
  bottom: 0;
  left: 0;
  font-size: 1.1em;
}
@media (max-width: 1100px) {
  .sidebar { width: 120px; font-size: 1em; }
}
@media (max-width: 900px) {
  .sidebar { width: 80px; font-size: 0.9em; }
  .header, .footer { padding: 0.5em 0.5em; }
  .game-title { font-size: 1.2em; }
}
@media (max-width: 700px) {
  .container { flex-direction: column; }
  .sidebar { width: 100%; height: 50px; border: none; border-bottom: 2px solid #0077b6; }
  .left-sidebar { border-right: none; border-bottom: 2px solid #0077b6; }
  .right-sidebar { border-left: none; border-top: 2px solid #0077b6; }
  .main-content { padding: 1em 0; }
}
@media (max-width: 600px) {
  #gameCanvas { width: 100vw; height: 60vw; }
  .game-bg { padding: 0.5em; }
}
#game-controls {
  display: flex;
  justify-content: center;
  gap: 1em;
  margin-bottom: 1em;
}
#game-controls button {
  padding: 0.7em 2em;
  font-size: 1.1em;
  border: none;
  border-radius: 8px;
  background: #0077b6;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
#game-controls button:disabled {
  background: #b0bec5;
  color: #eee;
  cursor: not-allowed;
}
#game-controls button:hover:not(:disabled),
#game-controls button:focus:not(:disabled) {
  background: #023e8a;
  color: #90e0ef;
} 