/* ==========================================================================
   Chroma Dino - Modern Dark Theme & Glassmorphism Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
  --bg-main: #0a0c14;
  --bg-card: rgba(18, 22, 36, 0.75);
  --border-card: rgba(80, 110, 180, 0.25);
  --border-glow: rgba(0, 229, 255, 0.4);
  --primary: #00e5ff;
  --primary-glow: rgba(0, 229, 255, 0.35);
  --accent: #ff2d8d;
  --gold: #ffcf33;
  --text-main: #f0f4fc;
  --text-muted: #8895b3;
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

html, body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: auto;
  touch-action: none;
  background-color: #0a0c14;
  color: var(--text-main);
  font-family: var(--font-display);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0c14;
}

/* ==========================================================================
   Game Viewport & Canvas Area (Edge-to-Edge Pure Viewport)
   ========================================================================== */
.viewport-wrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  box-sizing: border-box;
  margin: 0;
  overflow: hidden;
  background: #0a0c14;
  touch-action: none;
}

.canvas-container {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  background-color: #0a0c14;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

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

/* ==========================================================================
   Mobile Touch Zones & Badges (Two-thumb intuitive indicators)
   ========================================================================== */
.touch-hints-overlay {
  position: absolute;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: calc(18px + env(safe-area-inset-left));
  right: calc(18px + env(safe-area-inset-right));
  display: none;
  justify-content: space-between;
  pointer-events: none;
  z-index: 20;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

@media (pointer: coarse) {
  .touch-hints-overlay {
    display: flex;
  }
}

.touch-hint-zone {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(18, 24, 42, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  color: rgba(240, 244, 252, 0.8);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.touch-hint-zone.active {
  background: rgba(0, 229, 255, 0.3);
  border-color: rgba(0, 229, 255, 0.7);
  color: #ffffff;
  transform: scale(0.92);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.4);
}

.left-hint.active {
  background: rgba(255, 45, 141, 0.3);
  border-color: rgba(255, 45, 141, 0.7);
  box-shadow: 0 0 16px rgba(255, 45, 141, 0.4);
}

.hint-icon {
  font-size: 0.85rem;
  color: var(--primary);
}

.left-hint .hint-icon {
  color: var(--accent);
}

/* ==========================================================================
   Orientation Landscape Recommendation Overlay (shown in portrait)
   ========================================================================== */
.orientation-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 20, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  text-align: center;
  padding: 24px;
}

.orientation-overlay.visible {
  display: flex;
}

.orientation-content {
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.phone-rotate-icon {
  font-size: 3.2rem;
  animation: rotatePhoneAnim 2.2s infinite ease-in-out;
}

@keyframes rotatePhoneAnim {
  0% { transform: rotate(0deg); }
  45% { transform: rotate(-90deg); }
  65% { transform: rotate(-90deg); }
  100% { transform: rotate(0deg); }
}

.orientation-msg {
  font-size: 1.05rem;
  color: #e2e8f5;
  line-height: 1.45;
}

.orientation-msg strong {
  color: var(--primary);
}

.btn-dismiss {
  margin-top: 6px;
  padding: 10px 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s;
}

.btn-dismiss:active {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(0.96);
}

/* ==========================================================================
   Compulsory Pilot Registration Modal
   ========================================================================== */
.name-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 20, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 20px;
}

.name-modal-overlay.visible {
  display: flex;
}

.name-modal-card {
  width: 100%;
  max-width: 440px;
  background: rgba(18, 24, 42, 0.95);
  border: 1.5px solid rgba(0, 229, 255, 0.4);
  border-radius: 20px;
  padding: 30px 26px;
  text-align: center;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.75), 0 0 35px rgba(0, 229, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: modalPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPopIn {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.name-modal-icon {
  font-size: 2.8rem;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.4));
}

.name-modal-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.45);
}

.name-modal-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-top: -4px;
}

.name-modal-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 6px;
}

.name-input-field {
  width: 100%;
  padding: 14px 18px;
  background: rgba(10, 14, 26, 0.8);
  border: 1.5px solid rgba(80, 120, 200, 0.35);
  border-radius: 12px;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
  user-select: text;
  -webkit-user-select: text;
}

.name-input-field:focus {
  border-color: var(--primary);
  background: rgba(14, 20, 36, 0.95);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.3);
}

.name-input-field.name-input-subtle {
  font-size: 0.9rem;
  font-weight: 400;
  padding: 10px 16px;
  background: rgba(10, 14, 26, 0.5);
  border-color: rgba(80, 120, 200, 0.2);
  color: #cbd5e1;
}

.name-input-field.name-input-subtle::placeholder {
  color: rgba(148, 163, 184, 0.5);
  font-size: 0.85rem;
}

.name-input-field.input-error {
  border-color: #ff2d55 !important;
  background: rgba(40, 15, 25, 0.95) !important;
  box-shadow: 0 0 20px rgba(255, 45, 85, 0.5) !important;
  animation: shakeAnim 0.35s ease-in-out;
}

@keyframes shakeAnim {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.btn-confirm-name {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #00e5ff, #0099ff);
  border: none;
  border-radius: 12px;
  color: #060b18;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 229, 255, 0.4);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-confirm-name:hover {
  background: linear-gradient(135deg, #33ebff, #1aa3ff);
  box-shadow: 0 6px 24px rgba(0, 229, 255, 0.55);
  transform: translateY(-1px);
}

.btn-confirm-name:active {
  transform: scale(0.98);
}



