/* LAST DAY - Zombie Survival */
/* Mobile-first, portrait-locked */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", monospace;
  touch-action: none;
  overscroll-behavior: none;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #1a2332 0%, #000 100%);
}

#gameWrap {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 360px;
  max-height: 640px;
  aspect-ratio: 9/16;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.3);
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: pointer;
  touch-action: none;
}

#touchHint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #94a3b8;
  font-size: 14px;
  padding: 8px 16px;
  background: rgba(0,0,0,0.6);
  border-radius: 8px;
  pointer-events: none;
  animation: fade 2s ease-in-out infinite;
}

@keyframes fade {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Landscape warning */
@media (orientation: landscape) and (max-height: 500px) {
  body::before {
    content: "📱 Xin hãy xoay dọc thiết bị để chơi";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.9);
    color: #fff;
    padding: 20px 30px;
    border-radius: 12px;
    font-size: 16px;
    z-index: 9999;
    text-align: center;
  }
}

/* PWA fullscreen on iOS */
@supports (-webkit-touch-callout: none) {
  #gameWrap {
    height: 100vh;
    height: -webkit-fill-available;
  }
}
