*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0d1117;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
}

canvas {
  display: block;
  background: #0d1117;
}

.navbar-custom {
  background-color: #0a0a0e;
  flex-wrap: wrap;
}

.navbar-custom .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.5rem;
}

.navbar-custom .navbar-toggler:focus {
  box-shadow: none;
}

.navbar-custom .navbar-collapse {
  flex-basis: 100%;
}

.navbar-custom .navbar-collapse .navbar-nav {
  padding: 0.5rem 0;
}

.navbar-custom .navbar-collapse .nav-link {
  padding: 0.4rem 0;
}

/* Game page: no full-width stripe, toggler floats in corner */
.navbar-custom.navbar-transparent {
  background-color: transparent;
}

.navbar-custom.navbar-transparent .navbar-collapse {
  background-color: #0a0a0e;
  padding: 0.5rem 1rem;
}

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  padding: 0.5rem 0;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.75rem;
  pointer-events: none;
  z-index: 5;
}

.navbar-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  padding-left: 1.5rem;
  z-index: 10;
}

/* Rotate-to-play overlay (mobile portrait only).
   JS toggles the .show class on orientationchange/resize. */
#rotatePrompt {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: #0d1117;
  color: rgba(255, 255, 255, 0.85);
  font-family: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-align: center;
  padding: 32px;
}
#rotatePrompt.show {
  display: flex;
}
#rotatePrompt .rotate-icon {
  color: rgba(255, 255, 255, 0.7);
  animation: rotateHint 2.4s ease-in-out infinite;
}
#rotatePrompt .rotate-text {
  font-size: 18px;
  line-height: 1.4;
  max-width: 280px;
}
@keyframes rotateHint {
  0%, 40%, 100% { transform: rotate(0deg); }
  60%, 80%      { transform: rotate(-90deg); }
}
