html,
body,
#root,
#app {
  margin: 0;
  width: 100%;
  height: 100%;
}

body {
  min-height: 100vh;
  overflow: hidden;
  background: #201d1f;
  color: #f4f0d8;
  font-family: 'Bushiroad', sans-serif;
}

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #1a1719;
}

/* Removed high-risk scanline overlay */

#game-container {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#game-container canvas {
  display: block;
  touch-action: manipulation;
}

.game-boot-status {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #f4f0d8;
  font-family: "Segoe UI", "PingFang SC", sans-serif;
  font-size: 18px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  z-index: 30;
  text-shadow: 0 0 10px rgba(201, 58, 47, 0.8);
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(0.95); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
}

.menu-audio-toggle,
.menu-shop-toggle {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 1px solid rgba(244, 240, 216, 0.22);
  border-radius: 4px;
  background: rgba(20, 18, 19, 0.95);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  color: #eff4ee;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
  z-index: 100 !important;
}

.menu-audio-toggle:hover,
.menu-shop-toggle:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  border-color: #fff;
}

.menu-audio-toggle svg,
.menu-shop-toggle svg {
  display: block;
  transform: none;
}

.menu-shop-badge {
  position: absolute;
  right: -8px;
  top: -8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #c93a2f;
  border: 1px solid #fff;
  border-radius: 2px;
  color: #fff;
  font-family: 'Bushiroad', sans-serif;
  font-size: 14px;
  font-weight: bold;
}

.menu-shop-badge img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.mobile-rotate-hint {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(14, 12, 15, 0.9);
  backdrop-filter: blur(14px);
  z-index: 40;
}

#app.is-mobile.is-portrait .mobile-rotate-hint {
  display: flex;
}

#app.is-mobile.is-portrait #game-container {
  opacity: 0;
  pointer-events: none;
}

.mobile-rotate-card {
  width: min(340px, calc(100vw - 48px));
  padding: 30px 25px;
  border: 2px solid #c93a2f;
  border-radius: 4px;
  background: rgba(20, 18, 19, 0.95);
  box-shadow: 10px 10px 0px rgba(201, 58, 47, 0.3);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.mobile-rotate-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 4px;
  background: linear-gradient(90deg, transparent, #c93a2f, transparent);
  animation: scan-line 3s infinite linear;
}

@keyframes scan-line {
  0% { transform: translateY(-10px); }
  100% { transform: translateY(400px); }
}

.mobile-rotate-title {
  color: #fff;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 2px 2px 0px #c93a2f;
}

.mobile-rotate-copy {
  margin-top: 15px;
  color: #f4f0d8;
  font-family: "Segoe UI", "PingFang SC", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.85;
}
