@font-face {
  font-family: "GameFont";
  src: local("Arial Rounded MT Bold"), local("Arial");
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0d0d0d;
  font-family: "GameFont", "Segoe UI", Tahoma, sans-serif;
  touch-action: none;
  overscroll-behavior: none;
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 20%, #3a0d0d 0%, #0d0d0d 70%);
}

#game-container canvas {
  max-width: 100%;
  max-height: 100%;
  image-rendering: pixelated;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

/* Loading screen */
#loading-screen {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #d0021b 0%, #7a0000 100%);
  color: #fff;
  text-align: center;
  padding: 20px;
}

.coke-logo {
  font-size: 42px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 2px;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  margin-bottom: 4px;
}

.loading-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffd54a;
  margin-bottom: 24px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.progress-bar-outer {
  width: min(320px, 70vw);
  height: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
  border: 2px solid #fff;
}

.progress-bar-inner {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #ffd54a, #ff9f1a);
  transition: width 0.15s ease-out;
}

.loading-tip {
  margin-top: 18px;
  font-size: 13px;
  color: #ffe9c7;
  opacity: 0.9;
}

#loading-screen.hidden {
  display: none;
}

/* Orientation lock */
#orientation-lock {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0d0d0d;
  color: #fff;
  text-align: center;
  padding: 20px;
}

.rotate-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: rotate-hint 1.6s ease-in-out infinite;
}

@keyframes rotate-hint {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(90deg); }
}

@media (max-aspect-ratio: 1/1) and (max-width: 900px) {
  #orientation-lock.active {
    display: flex;
  }
}
