/* Buy Low, Sell High: Profit Finder — splash, menu, placeholders */
:root {
  --purple: #1a0b2e;
  --neon: #7cfc00;
  --neon-hi: #c8ff5a;
  --neon-lo: #58d400;
  --ink: #000000;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--purple);
  color: #fff;
  font-family: "Nunito", "Avenir Next", "Segoe UI", sans-serif;
}

.stage {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--purple);
}

.art-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform-origin: 50% 38%;
  animation: artZoom 22s ease-in-out infinite alternate;
  will-change: transform;
}

.art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes artZoom {
  from { transform: scale(1); }
  to { transform: scale(1.035); }
}

.sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.sparkle {
  position: absolute;
  width: 12px;
  height: 12px;
  margin: 0;
  padding: 0;
  background: radial-gradient(circle, #ffffff 0 28%, #ffe566 46%, rgba(255, 229, 102, 0) 70%);
  border-radius: 50%;
  opacity: 0.35;
  filter: drop-shadow(0 0 4px rgba(255, 240, 150, 0.8));
  animation: bob 3.4s ease-in-out infinite, glimmer 2.6s ease-in-out infinite;
}

.sparkle.star {
  width: 16px;
  height: 16px;
  background: none;
  border-radius: 0;
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
  background-color: #fff6a8;
}

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}

@keyframes glimmer {
  0%, 100% { opacity: 0.18; filter: brightness(1) drop-shadow(0 0 2px rgba(255, 240, 150, 0.4)); }
  45% { opacity: 0.9; filter: brightness(1.7) drop-shadow(0 0 8px rgba(255, 250, 200, 0.95)); }
  60% { opacity: 0.4; }
}

/* Coin-ish placements, inset from the edges so they survive Pixel 8 side-crop */
.s1 { left: 16%; top: 23%; animation-delay: 0s, 0.2s; }
.s2 { left: 15%; top: 47%; width: 10px; height: 10px; animation-delay: 0.7s, 0.4s; }
.s3 { left: 17%; top: 66%; animation-delay: 1.1s, 0.8s; }
.s4 { left: 80%; top: 25%; animation-delay: 0.4s, 1.1s; }
.s5 { left: 79%; top: 67%; width: 15px; height: 15px; animation-delay: 0.9s, 0.1s; }
.s6 { left: 68%; top: 71%; width: 9px; height: 9px; animation-delay: 1.5s, 0.6s; }
.s7 { left: 28%; top: 36%; width: 8px; height: 8px; animation-delay: 1.8s, 1.3s; }

.btn-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(5.8vh, calc(env(safe-area-inset-bottom, 0px) + 22px));
  display: flex;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

.start-btn,
.back-link,
.menu-btn,
.back-arrow {
  pointer-events: auto;
  font-family: "Bangers", "Impact", "Arial Black", system-ui, sans-serif;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  text-align: center;
  line-height: 1;
  border: 5px solid #000;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--neon-hi) 0%, var(--neon) 48%, var(--neon-lo) 100%);
  box-shadow:
    0 6px 0 #000,
    0 0 16px rgba(124, 252, 0, 0.4);
  -webkit-user-select: none;
  user-select: none;
}

.start-btn {
  display: inline-block;
  width: min(82vw, 360px);
  padding: 0.78em 0.5em 0.7em;
  font-size: clamp(1.55rem, 7.2vw, 2.15rem);
  animation: pulse 2.4s ease-in-out infinite;
}

.start-btn:active {
  transform: translateY(3px) scale(0.98);
  box-shadow:
    0 3px 0 #000,
    0 0 12px rgba(124, 252, 0, 0.35);
  animation: none;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 6px 0 #000,
      0 0 14px rgba(124, 252, 0, 0.35);
  }
  50% {
    transform: scale(1.035);
    box-shadow:
      0 6px 0 #000,
      0 0 26px rgba(124, 252, 0, 0.7);
  }
}

/* Second-page chrome: back arrow + 3 menu buttons, all in the blank bottom area */
.menu-chrome {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(4.2vh, calc(env(safe-area-inset-bottom, 0px) + 16px));
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 0 12px;
  pointer-events: none;
}

.back-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-width: 4px;
  border-radius: 12px;
  box-shadow:
    0 4px 0 #000,
    0 0 10px rgba(124, 252, 0, 0.4);
  pointer-events: auto;
}

.back-arrow svg {
  width: 20px;
  height: 20px;
  display: block;
}

.back-arrow:active {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 #000,
    0 0 8px rgba(124, 252, 0, 0.35);
}

.menu-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  width: 100%;
  pointer-events: none;
}

.menu-btn {
  pointer-events: auto;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.32em;
  padding: 0.55em 0.28em 0.5em;
  border-width: 4px;
  border-radius: 14px;
  font-size: clamp(0.9rem, 3.7vw, 1.05rem);
  letter-spacing: 0.03em;
  line-height: 1.05;
  box-shadow:
    0 5px 0 #000,
    0 0 12px rgba(124, 252, 0, 0.35);
}

.menu-btn:active {
  transform: translateY(3px);
  box-shadow:
    0 2px 0 #000,
    0 0 8px rgba(124, 252, 0, 0.3);
}

.menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.menu-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.menu-label {
  display: block;
  width: 100%;
}

/* Placeholder pages */
.placeholder {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  height: 100dvh;
  padding: 8vh 8vw calc(8vh + env(safe-area-inset-bottom, 0px));
  text-align: center;
}

.placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(26, 11, 46, 0.55) 0%, rgba(26, 11, 46, 0.78) 100%);
  z-index: -1;
}

.placeholder h1 {
  font-family: "Bangers", "Impact", "Arial Black", system-ui, sans-serif;
  font-size: clamp(2.2rem, 11vw, 3.4rem);
  letter-spacing: 0.04em;
  margin: 0 0 0.2em;
  color: var(--neon);
  text-shadow:
    -2px -2px 0 #000,
     2px -2px 0 #000,
    -2px  2px 0 #000,
     2px  2px 0 #000,
     0 0 18px rgba(124, 252, 0, 0.45);
}

.placeholder p {
  margin: 0 0 2rem;
  font-size: clamp(1.05rem, 4.2vw, 1.25rem);
  font-weight: 700;
  color: #f3e9ff;
}

.back-link {
  display: inline-block;
  padding: 0.62em 1.15em 0.55em;
  font-size: clamp(1.15rem, 5.2vw, 1.45rem);
}

.back-link:active {
  transform: translateY(3px);
  box-shadow:
    0 3px 0 #000,
    0 0 12px rgba(124, 252, 0, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .art-wrap,
  .sparkle,
  .start-btn {
    animation: none !important;
  }
}
