@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700;800&family=Luckiest+Guy&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

:root {
  /* Backgrounds: Obsidian & Deep Charcoal */
  --bg-app: #0c0d10;
  --bg-surface: #14151a;
  --bg-surface-elevated: #1a1c22;
  --bg-card: #20222a;
  --bg-card-hover: #282a34;

  /* Borders & Glass Dividers */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);

  /* Accents */
  --accent-fire: #ff7a00;
  --accent-fire-light: #ff9f43;
  --accent-fire-glow: rgba(255, 122, 0, 0.28);
  --accent-fire-gradient: linear-gradient(135deg, #ff9f43 0%, #ff5e3a 100%);

  /* Bold Punchy Green */
  --accent-green-top: #00e653;
  --accent-green-bottom: #00a838;
  --accent-green-base: #006822;

  /* Text & Typography */
  --text-primary: #ffffff;
  --text-secondary: #9aa0a6;
  --text-muted: #5f6368;

  --font-display: 'Luckiest Guy', cursive;
  --font-comic-sans: 'Comic Sans MS', 'Comic Sans', cursive, sans-serif;
  --font-ui: 'Plus Jakarta Sans', 'Fredoka', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  scrollbar-width: thin;
  scrollbar-color: #00e653 #080a0d;
}

/* Ultra-Minimal Colorful Green & Dark Scrollbar */
::-webkit-scrollbar {
  width: 3.5px;
  height: 3.5px;
}

::-webkit-scrollbar-track {
  background: #080a0d;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00e653 0%, #00a838 100%);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #00ff5e;
}

input, textarea, select {
  user-select: text !important;
  -webkit-user-select: text !important;
  font-size: 16px !important; /* Stops iOS Safari from auto-zooming when tapping text fields */
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: fixed;
  inset: 0;
  touch-action: none;
  -webkit-text-size-adjust: 100%;
  -webkit-user-select: none;
  overscroll-behavior: none;
  background-color: var(--bg-app);
  font-family: var(--font-ui);
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Mobile-First Centered Container - Fixed Dimensions, Zero Zoom */
#app-viewport {
  position: relative;
  width: 100vw;
  height: 100dvh;
  max-width: 440px;
  max-height: 920px;
  background: var(--bg-app);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  touch-action: none;
  overscroll-behavior: none;
}

#game-canvas {
  touch-action: none !important;
}


/* Desktop bezel */
@media (min-width: 480px) and (min-height: 500px) {
  #app-viewport {
    height: 92vh;
    border-radius: 44px;
    border: 2px solid var(--border-medium);
    box-shadow: 
      0 30px 90px rgba(0, 0, 0, 0.9),
      0 0 0 1px rgba(255, 255, 255, 0.05),
      0 0 60px rgba(255, 122, 0, 0.04);
  }
}

/* Screen Transitions */
.game-screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none !important;
  flex-direction: column;
  opacity: 0;
  pointer-events: none !important;
  visibility: hidden !important;
  z-index: 1;
}

.game-screen.active {
  display: flex !important;
  opacity: 1;
  pointer-events: auto !important;
  visibility: visible !important;
  z-index: 10;
}

/* Squircle Nav Button */
.pok-icon-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.pok-icon-btn:hover {
  background: var(--bg-card);
  border-color: var(--accent-fire-light);
  transform: translateY(-2px);
}

.pok-icon-btn:active {
  transform: translateY(1px);
}

/* BOLDER, PUNCHIER Green Action Button (Play as Guest) */
.btn-green-action {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 1px;
  color: #ffffff;
  background: linear-gradient(180deg, var(--accent-green-top) 0%, var(--accent-green-bottom) 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 20px;
  padding: 16px 28px;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-transform: uppercase;
  /* Tactile 3D base */
  box-shadow: 
    0 5px 0 var(--accent-green-base),
    0 10px 22px rgba(0, 168, 56, 0.4),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.1s ease;
}

.btn-green-action:hover {
  background: linear-gradient(180deg, #15ff66 0%, #00b83e 100%);
  transform: translateY(-2px);
  box-shadow: 
    0 7px 0 var(--accent-green-base),
    0 14px 26px rgba(0, 168, 56, 0.5),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45);
}

.btn-green-action:active {
  transform: translateY(3px);
  box-shadow: 
    0 2px 0 var(--accent-green-base),
    0 4px 10px rgba(0, 168, 56, 0.25);
}

/* Secondary Obsidian Action Button (Login) */
.btn-dark-card {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 1px;
  color: #ffffff;
  background: linear-gradient(180deg, #22242c 0%, #16171d 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 16px 28px;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-transform: uppercase;
  /* Tactile 3D base */
  box-shadow: 
    0 5px 0 #08090b,
    0 10px 20px rgba(0, 0, 0, 0.6),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn-dark-card:hover {
  background: linear-gradient(180deg, #282a34 0%, #1c1d24 100%);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  box-shadow: 
    0 7px 0 #08090b,
    0 14px 24px rgba(0, 0, 0, 0.7),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.18);
}

.btn-dark-card:active {
  transform: translateY(3px);
  box-shadow: 
    0 2px 0 #08090b,
    0 4px 10px rgba(0, 0, 0, 0.3);
}
