/* ============================================================
   BE THE MEME — /memes-to-recreate
   Sticker-Bomb Arcade Web Tool (App Viewport & Clean Scroll v12)
   ============================================================ */

:root {
  --ink: #111114;
  --paper: #FAF7F0;
  --accent: #B8FF3C;
  --lime: #B8FF3C;
  --magenta: #FF3DAE;
  --eblue: #3D7BFF;
  --display: "Clash Display", "Arial Black", sans-serif;
  --ui: "General Sans", -apple-system, system-ui, sans-serif;
}

/* Page Base */
body.tool-page {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--ui);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Dynamic Radial Spotlight Background Glow */
.spotlight {
  position: fixed;
  top: 42%;
  left: 50%;
  width: 720px;
  height: 720px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(184, 255, 60, 0.28) 0%, rgba(184, 255, 60, 0) 65%);
  pointer-events: none;
  z-index: 0;
  transition: background 0.5s ease;
}

/* Top Header Bar */
.tool-header {
  position: relative;
  z-index: 30;
  padding: 16px 20px 8px;
}

.tool-header-in {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--paper);
  font-weight: 600;
  font-size: 13px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-nav:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1.5px);
}

.btn-app-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 #000;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.4s ease;
}

.btn-app-pill:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 #000;
}

/* Main Container Wrap */
.tool-main {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 20px 48px;
  box-sizing: border-box;
}

.tool-wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

/* Centered Interactive Meme Stage — Full App Viewport Height */
.tool-stage {
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  min-height: calc(100vh - 100px);
  min-height: calc(100dvh - 100px);
  padding: 12px 0 24px;
  box-sizing: border-box;
}

/* Signature Brandbook Headline */
.cap-recreate {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  color: #FFFFFF;
  font-size: 40px;
  line-height: 0.92;
  letter-spacing: 0.5px;
  -webkit-text-stroke: 6.5px #000000;
  paint-order: stroke fill;
  text-shadow: 0 4.5px 0 #000000;
  text-align: center;
  margin: 0;
  user-select: none;
}

.tilt-r {
  transform: rotate(3deg);
}

/* Die-Cut Sticker Card Deck */
.card-deck-perspective {
  perspective: 800px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.bigmeme-card {
  position: relative;
  width: 275px;
  border: 5px solid #111114;
  border-radius: 20px;
  background: #111114;
  box-shadow: 0 0 0 6px #FFFFFF, 8px 10px 0 #000000;
  animation: float 3.2s ease-in-out infinite;
  transform-origin: center center;
  overflow: hidden;
  user-select: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

.bigmeme-card.spin-shuffle {
  animation: spinShuffle 0.55s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@keyframes spinShuffle {
  0% { transform: scale(1) rotate(0deg); }
  45% { transform: scale(0.65) rotate(-180deg) translateY(-24px); opacity: 0.3; }
  75% { transform: scale(1.06) rotate(8deg); opacity: 0.9; }
  100% { transform: scale(1) rotate(-2deg); opacity: 1; }
}

.bigmeme-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #1B1C22;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bigmeme-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease;
}

.bigmeme-img.loading {
  opacity: 0;
}

.meme-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 17, 20, 0.82);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.meme-loader.visible {
  opacity: 1;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3.5px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Control Bar Buttons */
.control-bar {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 18px;
  border: 4px solid var(--ink);
  border-radius: 18px;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  box-sizing: border-box;
}

.btn-primary {
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 6px 0 #000000, 0 8px 0 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.4s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #000000, 0 10px 0 3px rgba(0, 0, 0, 0.18);
}

.btn-primary:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #000000, 0 4px 0 2px rgba(0, 0, 0, 0.18);
}

.btn-dice {
  font-size: 22px;
  display: inline-block;
  transition: transform 0.4s ease;
}

.btn-primary:hover .btn-dice {
  transform: rotate(360deg) scale(1.15);
}

.secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.btn-secondary {
  font-size: 13.5px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--paper);
  box-shadow: 0 3.5px 0 #000000;
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1.5px);
  box-shadow: 0 5px 0 #000000;
}

.btn-secondary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #000000;
}

/* Sticker-Bomb Arcade Showcase Panel — Pushed Below Fold */
.sticker-arcade-showcase {
  position: relative;
  width: 100%;
  max-width: 1080px;
  margin-top: 80px;
  box-sizing: border-box;
}

.showcase-inner {
  background: #FAF7F0;
  color: #111114;
  border: 4px solid #111114;
  border-radius: 32px;
  box-shadow: 0 0 0 5px #FFFFFF, 10px 12px 0 #000000;
  padding: 40px 36px 36px;
  width: 100%;
  box-sizing: border-box;
}

.showcase-header {
  text-align: left;
  margin-bottom: 28px;
}

.showcase-tag-chip {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  background: var(--accent);
  color: #111114;
  padding: 4px 14px;
  border-radius: 999px;
  border: 2px solid #111114;
  box-shadow: 2px 2px 0 #000000;
  display: inline-block;
  margin-bottom: 10px;
  transition: background-color 0.4s ease;
}

.showcase-title {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  color: #111114;
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.showcase-lead {
  font-size: 15px;
  line-height: 1.5;
  color: #33343C;
  margin: 0;
  max-width: 760px;
}

/* 3-Column Die-Cut Sticker Cards Grid */
.sticker-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.diecut-sticker-card {
  background: #FFFFFF;
  border: 4px solid #111114;
  border-radius: 22px;
  box-shadow: 0 0 0 4px #FFFFFF, 7px 8px 0 #000000;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  box-sizing: border-box;
  transition: transform 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.22s ease;
}

.card-tilt-left { transform: rotate(-1.5deg); }
.card-tilt-straight { transform: rotate(0deg); }
.card-tilt-right { transform: rotate(1.5deg); }

.diecut-sticker-card:hover {
  transform: translateY(-5px) rotate(0deg) scale(1.02);
  box-shadow: 0 0 0 4px #FFFFFF, 10px 12px 0 #000000;
}

.sticker-art-wrap {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sticker-art-img {
  max-height: 78px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(3px 4px 0 rgba(0, 0, 0, 0.9));
}

.pack-hero-fit {
  max-height: 84px;
}

.sticker-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.sticker-chip {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #111114;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1.5px solid #111114;
  box-shadow: 1px 1px 0 #000000;
}

.chip-lime { background: #B8FF3C; }
.chip-magenta { background: #FF3DAE; color: #FFFFFF; }
.chip-blue { background: #3D7BFF; color: #FFFFFF; }

.sticker-card-body h3 {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  color: #111114;
  margin: 2px 0 1px 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.sticker-card-body p {
  font-size: 13px;
  line-height: 1.42;
  color: #444550;
  margin: 0;
}

.showcase-cta-bar {
  display: flex;
  justify-content: center;
  padding-top: 20px;
  border-top: 2.5px dashed #111114;
  width: 100%;
}

.btn-arcade-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 440px;
  width: 100%;
  font-size: 16px;
  padding: 15px 20px;
  box-sizing: border-box;
}

.cta-apple-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-block;
}

.btn-arcade-cta span {
  white-space: nowrap;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Toast Floating Badge */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1C1C22;
  color: var(--paper);
  padding: 12px 24px;
  border-radius: 999px;
  border: 2.5px solid var(--accent);
  box-shadow: 0 6px 0 #000000;
  z-index: 100;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease, border-color 0.4s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   MOBILE RESPONSIVE STYLES (< 768px) — Clean iOS App Viewport
   ============================================================ */
@media (max-width: 767px) {
  .tool-main {
    padding: 4px 14px 40px;
  }

  .tool-stage {
    min-height: calc(100vh - 90px);
    min-height: calc(100dvh - 90px);
    justify-content: space-evenly;
    padding: 8px 0 20px;
  }

  .cap-recreate {
    font-size: 36px;
    -webkit-text-stroke: 6px #000000;
  }

  .bigmeme-card {
    width: 260px;
  }

  .sticker-arcade-showcase {
    margin-top: 80px;
  }

  .showcase-inner {
    padding: 22px 14px 18px;
    border-radius: 20px;
    border-width: 3.5px;
    box-shadow: 0 0 0 3.5px #FFFFFF, 5px 6px 0 #000000;
  }

  .showcase-header {
    margin-bottom: 18px;
  }

  .showcase-tag-chip {
    font-size: 9.5px;
    padding: 3px 10px;
    margin-bottom: 6px;
    border-width: 1.5px;
  }

  .showcase-title {
    font-size: 20px;
    margin-bottom: 6px;
  }

  .showcase-lead {
    font-size: 13.5px;
    line-height: 1.45;
  }

  .sticker-cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
  }

  .diecut-sticker-card {
    padding: 16px 14px;
    border-radius: 16px;
    border-width: 3px;
    box-shadow: 0 0 0 3px #FFFFFF, 4px 5px 0 #000000;
    transform: none !important;
    gap: 10px;
  }

  .sticker-art-wrap {
    height: 64px;
  }

  .sticker-art-img {
    max-height: 60px;
  }

  .pack-hero-fit {
    max-height: 64px;
  }

  .sticker-card-body h3 {
    font-size: 15px;
  }

  .sticker-card-body p {
    font-size: 12.5px;
    line-height: 1.4;
  }

  .showcase-cta-bar {
    padding-top: 14px;
    border-top-width: 2px;
  }

  .btn-arcade-cta {
    font-size: 14px;
    padding: 13px 12px;
    border-width: 3.5px;
    border-radius: 16px;
    box-shadow: 0 4px 0 #000000;
    width: 100%;
  }

  .cta-apple-icon {
    width: 16px;
    height: 16px;
  }

  .btn-arcade-cta span {
    font-size: 13.5px;
    white-space: nowrap;
  }
}

@media (max-width: 360px) {
  .cap-recreate { font-size: 30px; }
  .bigmeme-card { width: 220px; }
  .btn-primary { font-size: 16px; padding: 13px; }
  .btn-arcade-cta span { font-size: 12px; }
}
