* {
  box-sizing: border-box;
}

body {
  font-family: arial;
  margin: 0;
  padding: 0;
  background: radial-gradient(ellipse at top, rgb(154, 205, 237) 0%, rgb(100, 150, 190) 40%, rgb(50, 100, 140) 100%);
  background-attachment: fixed;
  color: rgb(255, 255, 255);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-container {
  max-width: fit-content;
  margin: 10px auto;
  padding: 0;
  display: block;
}

.game-frame {
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

footer.game-footer {
  font-family: arial;
  font-size: 12px;
  padding: 15px 20px;
  text-align: center;
  width: 100%;
  margin-top: 15px;
  background: rgba(0, 0, 0, 0.4);
  color: rgb(255, 255, 255);
  border-radius: 8px;
  backdrop-filter: blur(5px);
}

footer.game-footer p {
  margin: 8px 0;
  line-height: 1.6;
}

footer.game-footer button {
  background: rgb(180, 180, 180);
  color: rgb(0, 0, 0);
  border: 1px solid rgb(120, 120, 120);
  padding: 8px 16px;
  font-size: 13px;
  font-family: arial;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
}

footer.game-footer button:hover {
  background: rgb(98, 152, 179);
  color: rgb(255, 255, 255);
  border-color: rgb(80, 130, 160);
}

/* Links */
a {
  text-decoration: none;
}

a:link {
  color: rgb(50, 150, 200);
}

a:visited {
  color: rgb(30, 100, 150);
}

a:hover {
  color: rgb(100, 200, 255);
}

/* the canvas *must not* have any border or padding, or mouse coords will be wrong */
#canvas {
    padding: 0;
    margin: 0 auto;
    display: block;
    border: 0px none;
    visibility: hidden;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    opacity: 0;
    transition: opacity 1.5s ease-in;
    max-height: 85vh;
    width: auto !important;
    height: auto !important;
    box-shadow:
      0 20px 60px rgba(0, 0, 0, 0.5),
      0 8px 20px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

#canvas[style*="visibility: visible"] {
    opacity: 1;
}

#loadingCanvas {
    padding: 0;
    margin: 0 auto;
    display: block;
    border: 0px none;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    box-shadow:
      0 20px 60px rgba(0, 0, 0, 0.5),
      0 8px 20px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

/* Orientation notice for mobile landscape */
.orientation-notice {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(50, 100, 140, 0.98);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orientation-content {
    text-align: center;
    color: white;
    padding: 30px;
    max-width: 90%;
}

.rotate-icon {
    font-size: 4em;
    display: block;
    margin-bottom: 20px;
    animation: rotate 2s ease-in-out infinite;
}

.orientation-content p {
    font-size: 1.2em;
    line-height: 1.6;
    margin: 0;
}

@keyframes rotate {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(90deg); }
}
