@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800;900&family=M+PLUS+Rounded+1c:wght@500;700;800;900&display=swap');

:root {
  --font-main: 'M PLUS Rounded 1c', 'Outfit', -apple-system, sans-serif;
  --panel-bg: rgba(255, 255, 255, 0.92);
  --panel-border: rgba(217, 119, 6, 0.25);
  --text-dark: #1E293B;
  --text-muted: #64748B;
}

* {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  height: -webkit-fill-available;
  overflow: hidden;
  background: #FFFBEB;
  font-family: var(--font-main);
  color: var(--text-dark);
}

body::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.8) 0%, rgba(254, 243, 199, 0.5) 60%),
    linear-gradient(180deg, #FEF9C3 0%, #FEF08A 65%, #EAB308 100%);
  z-index: -2;
}

body::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 25vh;
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.15) 0%, rgba(180, 83, 9, 0.3) 100%);
  border-top: 3px solid rgba(180, 83, 9, 0.2);
  z-index: -1;
}

.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid var(--panel-border);
  box-shadow: 0 10px 25px -5px rgba(180, 83, 9, 0.15), 0 8px 10px -6px rgba(180, 83, 9, 0.1);
  color: var(--text-dark);
}

.glass-modal {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid rgba(217, 119, 6, 0.3);
  box-shadow: 0 25px 50px -12px rgba(180, 83, 9, 0.35);
  color: var(--text-dark);
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(254, 243, 199, 0.6);
}
::-webkit-scrollbar-thumb {
  background: rgba(217, 119, 6, 0.5);
  border-radius: 999px;
}

/* Canvas Container & Responsive Fitting */
#gameCanvasContainer {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#gameCanvasContainer canvas {
  display: block;
  border-radius: 1.5rem;
  box-shadow: 0 10px 25px rgba(180, 83, 9, 0.2), 0 0 0 3px rgba(255, 255, 255, 0.9);
  touch-action: none;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 440 / 680;
  object-fit: contain;
}

.animate-pop-pulse {
  animation: popPulse 1.8s infinite ease-in-out;
}

@keyframes popPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.text-2xs {
  font-size: 0.65rem;
  line-height: 0.85rem;
}
.text-3xs {
  font-size: 0.55rem;
  line-height: 0.75rem;
}
