/* RESET & BODY */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
}
body {
  background: #222;
  color: #fff;
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
   min-height: 100vh;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  overflow-x: hidden;
}
/* HEADER */
.header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 20px auto;
}
#logo { height: 50px; }
.tagline { font-size: 1.2rem; }
#logo,
.tagline {
  transition: opacity 0.4s ease, filter 0.4s ease;
}

/* TOGGLE CONTROLS */
.toggle-controls {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 10px auto;
  flex-wrap: wrap;
}
.toggle-controls label {
  font-size: 1rem;
  font-weight: bold;
  margin-right: 10px;
  color: #fff;
}
.preview-mode .toggle-controls {
  display: none !important;
}
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background-color: #555;
  border-radius: 999px;
  transition: background-color 0.3s ease;
}
.slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.3s ease;
}
.switch input:checked + .slider {
  background-color: #1ed760;
}
.switch input:checked + .slider::before {
  transform: translateX(22px);
}
/* CONTAINER */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  width: 100%;
  max-width: 700px;
}
/* SPINNING VINYL */
.frame {
  position: relative; width: 300px; height: 300px;
  border-radius: 50%; overflow: hidden; margin-bottom: 20px;
}
.ring { 
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden; 
  animation: spin 40s linear infinite;
}
.ring video {
  width: 100%; height: 100%; object-fit: cover;
  animation: spin 40s linear infinite;
}
.label {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 140px; height: 140px; border-radius: 50%; overflow: hidden;
}
.text-bg {
  position: absolute; inset: 0; background: rgba(0,0,0,0.7); border-radius: 50%;
}
#labelText {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; color: #f0f0f0; padding: 5px;
}
#labelText h2, #labelText p {
  margin: 2px 0; font-size: clamp(8px, 2.5vw, 14px);
}
.vinyl-controls {
  margin: 20px 0 10px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  width: 100%;
}
.vinyl-controls h3 {
  margin-bottom: 10px;
  font-size: 1rem;
}
.range-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
}
.range-control {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.range-control input[type="range"] {
  flex: 1;
  accent-color: #1ed760;
}
.range-value {
  min-width: 56px;
  text-align: right;
  font-weight: bold;
}
.range-row label {
  margin: 0;
}
/* QR + BARCODE */
.codes-container {
  width: 300px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}
.code { width: 80px; display: none; }
/* INPUT FORM */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  width: 100%;
}
input[type="text"], input[type="file"], input[type="url"] {
  width: 100%;
  padding: 10px;
  margin: 5px 0;
  background: #333;
  color: #fff;
  border: 1px solid #555;
  border-radius: 4px;
}
label {
  display: block;
  font-size: 1rem;
  font-weight: bold;
  color: #fff;
  margin: 10px 0 5px;
}
/* TOGGLE BUTTON */
#toggleModeBtn {
  font-size: 1.2rem;
  padding: 12px 20px;
  background: #555;
  color: #fff;
  border: 1px solid #444;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
/* FINALIZE BUTTON */
#finalizeMainBtn {
  font-size: 1.2rem;
  padding: 12px 20px;
  background: radial-gradient(circle at top left, #c8ffdf 0%, #37d67a 38%, #16b35c 70%, #0e7a40 100%);
  color: #fff;
  border: 1px solid #0f8a49;
  border-radius: 999px;
  cursor: pointer;
  margin-top: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(29, 185, 84, 0.35), inset 0 2px 6px rgba(255, 255, 255, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
#finalizeMainBtn::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.35);
  opacity: 0.6;
}
#finalizeMainBtn::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -40%;
  width: 50%;
  height: 220%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.7) 45%, rgba(255, 255, 255, 0) 80%);
  transform: translateX(-120%) rotate(10deg);
  transition: transform 0.6s ease;
}
#finalizeMainBtn.is-pressing {
  transform: scale(0.98);
  background: radial-gradient(circle at top left, #9cf2c4 0%, #28c66d 42%, #0f944d 80%, #0b6a38 100%);
}
#finalizeMainBtn:hover::after {
  transform: translateX(260%) rotate(10deg);
}
/* ----------------------------------------------------
   SPINSTREAM TOOLTIP SYSTEM (Additive, Non‑Breaking)
---------------------------------------------------- */
.spinstream-tooltip {
  position: relative;
}
.spinstream-tooltip-text {
  position: absolute;
  bottom: 150%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #000;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.spinstream-tooltip:hover .spinstream-tooltip-text,
.spinstream-tooltip:focus-within .spinstream-tooltip-text {
  opacity: 1;
}
/* CTA BUTTON */
.action-btn {
  margin-top: 20px;
  padding: 12px 30px;
  font-size: 1rem;
  border: none;
  background: #ff5722;
  color: white;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}
.action-btn:hover {
  background: #ff7043;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}
/* NFT BUTTON */
.nft-btn {
  font-size: 1.1rem;
  padding: 12px 20px;
  background: #9147ff;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.nft-btn:hover { background: #a970ff; }
.nft-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}
.preview-mode .nft-form-fields { display: none !important;
}
/* ----------------------------------------------------
   SPINSTREAM FIRST‑TIME WALKTHROUGH OVERLAY
   (Additive, Non‑Breaking)
---------------------------------------------------- */
.walkthrough-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
}
.walkthrough-card {
  position: fixed;
  top: 80px;
  right: 40px;
  transform: none;
  background: #ffffff;
  color: #111;
  padding: 20px 24px;
  border-radius: 12px;
  width: 320px;
  max-width: 90%;
  z-index: 9999;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  animation: walkthrough-fade-in 0.3s ease;
}
.walkthrough-card h2 {
  margin-bottom: 8px;
  font-size: 1.25rem;
  font-weight: 700;
}
.walkthrough-card p {
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: 16px;
}
.walkthrough-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.walkthrough-actions button {
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
#walkthrough-next {
  background: #1DB954;
  color: white;
}
#walkthrough-skip {
  background: #ddd;
  color: #333;
}
@keyframes walkthrough-fade-in {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
/* ================================
   HERO — FINAL LOOK (USED EVERYWHERE)
================================ */

.hero-preview {
  background: linear-gradient(to bottom right, #111, #333);
  color: #fff;
  text-align: center;
  padding: 4rem 2rem;
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
  font-family: 'Poppins', sans-serif;
  position: relative;
  width: 100%;
  max-width: 700px;
  animation: fade-in 0.6s ease both;
}
.hero-preview h1 {
  font-family: 'Bebas Neue', cursive;
  font-size: 3rem;
  letter-spacing: 1.5px;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
}
.hero-preview p {
  font-size: 1.25rem;
  margin: 1rem 0 2rem;
  font-weight: 300;
}
.hero-preview .btn-primary {
  background: #1DB954;
  color: white;
  padding: 0.9rem 2rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.hero-preview .btn-primary:hover {
  background: #1ed760;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.hero-preview button {
  margin-top: 1.5rem;
  background: transparent;
  color: white;
  border: 1px solid white;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  cursor: pointer;
}

/* LIGHT MODE */
.light-mode {
  background: #f4f4f4;
  color: #111;
}
.light-mode input,
.light-mode label,
.light-mode .action-btn,
.light-mode .nft-btn,
.light-mode .drop-zone {
  background: #fff;
  color: #111;
  border-color: #aaa;
}

/* DROP ZONE */
.drop-zone {
  border: 2px dashed #1DB954;
  padding: 20px;
  text-align: center;
  color: #ccc;
  cursor: pointer;
  margin: 20px auto;
  width: 100%;
  max-width: 500px;
  border-radius: 8px;
  transition: background 0.3s ease;
}
.drop-zone:hover {
  background: rgba(29, 185, 84, 0.1);
}
.drop-zone.dragover {
  background: rgba(29, 185, 84, 0.2);
  border-color: #1ed760;
  color: #fff;
}

/* PREVIEW MODE VISIBILITY */
.preview-mode .hero-editor,
.preview-mode .form-grid,
.preview-mode .nft-form-fields,
.preview-mode #inputForm,
.preview-mode #mp3-upload-section {
  display: none !important;
}
.preview-mode .hero-preview,
.preview-mode #mp3-player-section {
}
.preview-mode .toggle-controls {
  display: none !important;
}

/* FINAL MODE VISIBILITY — ADD THIS */
.finalized #actionButtonSection {
  display: block !important;
}


/* UTILITIES */
.hidden { display: none !important; }

.soft-gate-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  pointer-events: auto;
}

.soft-gate-card {
  background: rgba(17, 17, 17, 0.8);
  color: #fff;
  max-width: 520px;
  width: 100%;
  padding: 28px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  position: relative;
  text-align: left;
  pointer-events: auto;
}

.soft-gate-card h2 {
  margin: 0 0 12px;
}

.soft-gate-card p {
  margin: 0 0 20px;
  line-height: 1.5;
}

.soft-gate-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

.soft-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.soft-gate-primary,
.soft-gate-secondary {
  border-radius: 999px;
  padding: 10px 18px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.soft-gate-primary {
  background: #ff6b00;
  color: #fff;
}
#softGateUpgradeBtn {
  background: #a64500;
  opacity: 0.65;
  box-shadow: none;
}

.soft-gate-secondary {
  background: #2b2b2b;
  color: #fff;
}

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

@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* FINALIZED MODE */
.finalized .toggle-controls,
.finalized .hero-editor,
.finalized .form-grid,
.finalized .nft-form-fields,
.finalized #inputForm,
.finalized #mp3-upload-section,
.finalized #toggleModeBtn {
  display: none !important;
}
.finalized #heroPreview,
.finalized #actionButtonSection,
.finalized #nftButtonSection,
.finalized #mp3-player-section {
}
.finalized #actionButtonSection {
  order: 1;
}
.finalized #nftButtonSection {
  order: 2;
}
.finalized #copyLinkSection {
  order: 3;
}
.finalized #mp3-player-section {
  order: 4;
  margin-top: 30px;
  margin-bottom: 20px;
}
.finalized #actionButton,
.finalized #nftButton {
   pointer-events: auto;
  opacity: 0.3;
}
.finalized #logo,
.finalized .tagline {
  opacity: 0.06;
  filter: grayscale(100%);
}

.finalized footer {
  font-size: 0.75rem;
opacity: 0.35;
}

#toggleModeBtn:disabled,
#finalizeBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
/* ✅ Finalize button becomes a status indicator */
.finalized #finalizeBtn {
  display: inline-flex !important;
  pointer-events: none;
  opacity: 0.85;
  cursor: default;
}


body:not(.preview-mode):not(.finalized) #actionButtonSection,
body:not(.preview-mode):not(.finalized) #nftButtonSection {
  display: none !important;
}
#heroPreview {
  background-color: rgba(0, 0, 0, 0.3); /* 30% opaque black overlay */
}

#heroPreview::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: inherit;
  background-size: cover;
  background-position: center;
  opacity: 0.3;
  z-index: 0;
}
#heroPreview .hero-content {
  position: relative;
  z-index: 1;
}

#heroPreview {
  position: relative;
  overflow: hidden;
}

#heroPreview::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: black; /* fallback opaque background */
  opacity: 0.5;
  z-index: 0;
}

#heroPreview .hero-content {
  position: relative;
  z-index: 1;
}

#heroPreview {
  background: none !important;
}

#heroPreview {
  background: #111 !important; /* dark flat background */
}

#heroPreview {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

#heroPreview::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5); /* 50% black overlay */
  z-index: 0;
}

#heroPreview .hero-content {
  position: relative;
  z-index: 1;
}

body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5); /* 50% black overlay */
  z-index: 0;
  pointer-events: none;
}
body > * {
  position: relative;
  z-index: 1;
}

/* HERO OVERLAY GRADIENT */
#heroPreview::before {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.2));
}

/* COPY LINK */
#copyLinkSection {
  display: none;
  margin-top: 14px;
  text-align: center;
}
#copyLinkButton {
  border-radius: 999px;
  padding: 10px 18px;
  background: #1e88e5;
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#copyLinkButton:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}
#copyLinkFeedback {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: #cbe7ff;
  min-height: 1rem;
}
.finalized #copyLinkSection {
  display: block;
}

/* MP3 PLAYER */
#mp3-player-section {
  margin-top: 30px;
  text-align: center;
}

/* DEVICE PREVIEW */
body.portrait-mode .container {
  max-width: 420px;
}
body.portrait-mode .hero-preview {
  max-width: 420px;
}
body.portrait-mode .frame {
  width: 220px;
  height: 220px;
}
body.portrait-mode .codes-container {
  width: 100%;
  justify-content: center;
  gap: 14px;
}

/* SMOOTH FINALIZED MODE */
.toggle-controls,
.hero-editor,
.form-grid,
.nft-form-fields,
#inputForm,
#mp3-upload-section,
#toggleModeBtn {
  transition: opacity 0.3s ease;
}

/* BUTTON HOVER LIFT */
#toggleModeBtn:hover,
#finalizeMainBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

/* FOOTER */
.footer-tagline {
  font-size: 0.75rem;
  opacity: 0.8;
  margin-top: 6px;
}

/* MOBILE POLISH */
@media (max-width: 600px) {
  .container {
    padding: 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-preview {
    padding: 3rem 1.5rem;
  }

  .hero-preview h1 {
    font-size: 2.2rem;
  }

  .hero-preview p {
    font-size: 1rem;
  }

  #heroPreview {
    width: 100%;
    box-sizing: border-box;
    padding: 1.5rem;
    margin: 0 12px;
  }

  #heroPreview .hero-content {
    padding: 1.25rem;
  }

  .codes-container {
    width: 100%;
    justify-content: center;
    gap: 16px;
  }

  .mode-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }

  #actionButtonSection,
  #nftButtonSection {
    width: 100%;
  }

  .action-btn,
  .nft-btn {
    width: 100%;
  }

  .soft-gate-card {
    padding: 22px;
  }

  .walkthrough-card {
    top: 20px !important;
    right: 20px !important;
    left: 20px !important;
    width: auto !important;
    max-width: calc(100% - 40px) !important;
  }
}

@media (max-width: 420px) {
  .mode-indicator {
    flex-wrap: wrap;
    gap: 6px;
    text-align: center;
  }

  .mode-indicator .mode-separator {
    display: none;
  }
}

#heroPreview {
  background-color: rgba(0, 0, 0, 0.35); /* 35% transparent black background */
  padding: 2rem;
  border-radius: 12px;
}
#heroPreview .hero-content {
  position: relative;
  z-index: 1;
  color: white;
}

#heroPreview {
  background: none !important;
  padding: 2rem;
}
#heroPreview .hero-content {
  background: none;
  color: white;
  text-align: center;
}

#heroPreview .hero-content {
  background: rgba(0, 0, 0, 0.2); /* semi-transparent for contrast */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 1.5rem;
  color: white;
}

#heroPreview {
  background-color: rgba(0, 0, 0, 0.35);  /* 35% opaque black background */
  padding: 2rem;
  border-radius: 12px;
  color: white;
}
#heroPreview .hero-content {
  background: none;
  position: relative;
  z-index: 1;
}

#heroPreview .btn-primary {
  background-color: #00c853 !important;  /* Bright green CTA */
  color: white !important;
  font-weight: bold;
  z-index: 2;
  position: relative;
  border: none;
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  border-radius: 8px;
  opacity: 1 !important;
}

/* Restrict opaque background only to the heroPreview container */
#heroPreview {
  background-color: rgba(0, 0, 0, 0.35);
  padding: 2rem;
  border-radius: 12px;
}

/* Restrict any styling effects (like z-index or opacity) to hero text/button only */
#heroPreview .hero-content {
  background: none;
  color: white;
  position: relative;
  z-index: 1;
}
#heroPreview .hero-content {
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 12px;
}
/* Style CTA button in hero only */
#heroPreview .btn-primary {
  background-color: #00c853 !important;
  color: white !important;
  font-weight: bold;
  border: none;
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  border-radius: 8px;
  opacity: 1 !important;
  position: relative;
  z-index: 2;
}

/* Everywhere else: leave all .btn-primary alone */
body .btn-primary:not(#heroPreview .btn-primary) {
  opacity: 1 !important;
  filter: none !important;
}

/* Hero area still gets slight opacity */
#heroPreview {
  background-color: rgba(0, 0, 0, 0.35);
  padding: 2rem;
  border-radius: 12px;
}

/* Hero text remains clean */
#heroPreview .hero-content {
  background: rgba(0, 0, 0, 0.1);
  color: white;
  position: relative;
  z-index: 1;
}

/* GLOBAL CTA button protection — no blur, no fade */
.btn-primary {
  background-color: #00c853 !important;
  color: white !important;
  font-weight: bold;
  border: none;
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  border-radius: 8px;
  opacity: 1 !important;
  filter: none !important;
  z-index: 2;
  position: relative;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 12px;
}
}

/* Fix finalize-mode CTA (assumes it's inside #finalScreen or similar) */
#finalScreen .btn-primary,
.finalize-section .btn-primary,
body.finalized .btn-primary {
  opacity: 1 !important;
  filter: none !important;
  background-color: #00c853 !important;
  color: white !important;
  font-weight: bold;
  border: none;
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  border-radius: 8px;
  position: relative;
  z-index: 3;
}

/* Match any final screen button */
#finalScreen .btn-primary,
.final-cta,
body.finalized .btn-primary,
footer .btn-primary {
  background-color: #00c853 !important;
  color: white !important;
  font-weight: bold;
  opacity: 1 !important;
  filter: none !important;
  border: none;
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  border-radius: 8px;
  position: relative;
  z-index: 10;
}

/* 🔒 Lock styling for the real Final screen CTA button */
#actionButton,
.action-btn {
  background-color: #00c853 !important;
  color: white !important;
  font-weight: bold;
  opacity: 1 !important;
  filter: none !important;
} 
/* your existing CSS … ends around line 1055 */



/* ----------------------------------------------------
   Walkthrough Card — Option C (Compact + Raised)
---------------------------------------------------- */
.walkthrough-card {
  transform: scale(0.85) !important;
  top: 60px !important;
}

/* ----------------------------------------------------
   Walkthrough Card Arrow Pointer (Additive)
---------------------------------------------------- */
.walkthrough-card::after {
  content: "";
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 18px solid #ffffff;
  z-index: 9999;
}

/* Force smaller Copy Link button in Final + Minted pages */
body.finalized #copyLinkButton {
  font-size: 0.8rem !important;
  padding: 6px 12px !important;
  border-radius: 5px !important;
}

/* ----------------------------------------------------
   Digital Gallery Button Enhancements
---------------------------------------------------- */
.gallery-icon {
  margin-right: 6px;
  font-size: 1.1rem;
  vertical-align: middle;
}

#nftButtonSection {
  animation: fadeInGallery 0.4s ease forwards;
  opacity: 0;
}

@keyframes fadeInGallery {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hover glow */
#nftButton:hover {
  box-shadow: 0 0 14px rgba(145, 71, 255, 0.55);
  transform: translateY(-2px);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

/* Gentle pulse (optional) */
#nftButton {
  animation: galleryPulse 3s ease-in-out infinite;
}

@keyframes galleryPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* ----------------------------------------------------
   Digital Gallery Modal
---------------------------------------------------- */
.gallery-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
}

.gallery-modal.hidden {
  display: none !important;
}

.gallery-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
}

.gallery-modal-card {
  position: relative;
  background: #1a1a1a;
  color: white;
  padding: 24px;
  border-radius: 12px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  animation: fadeInModal 0.35s ease;
}

.gallery-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
}

@keyframes fadeInModal {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ----------------------------------------------------
   Final Mode — Shrink NFT + Copy Link Buttons
---------------------------------------------------- */
.finalized #nftButton {
  font-size: 0.9rem !important;
  padding: 10px 16px !important;
  border-radius: 6px !important;
}

.finalized #copyLinkButton {
  font-size: 0.85rem !important;
  padding: 8px 14px !important;
  border-radius: 6px !important;
}

/* --- Upload size hint (additive, non-destructive) --- */
.file-input-wrap {
  position: relative;
}

.file-hint {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.45); /* light gray hint */
  font-size: 0.85em;
  pointer-events: none;
  white-space: nowrap;
}

.file-input-wrap.has-file .file-hint {
  display: none;
}

/* Light background support */
body.light .file-hint {
  color: rgba(0, 0, 0, 0.35);
}

/* Default hidden state for gallery section */
#nftButtonSection {
  display: none;
}

/* Minting Overlay */
.minting-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.minting-overlay.hidden {
  display: none !important;
}

.minting-text {
  margin-top: 14px;
  font-size: 1.2rem;
  color: white;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.minting-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: mintSpin 0.9s linear infinite;
}

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

/* Minted Badge (Bottom Right) */
.minted-badge {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.minted-badge.hidden {
  display: none !important;
}

.minted-badge-circle {
  background: radial-gradient(circle at 30% 30%, #f7e9b5, #d4b76a, #b89a4a);
  color: #3a2f0b;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 12px 16px;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255, 215, 100, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  user-select: none;
  text-align: center;
}

/* Minted Badge Tooltip — Terminal / Code Style */
.minted-badge-tooltip {
  background: rgba(0,0,0,0.78);
  color: #b5b5b5;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.55rem;
  font-family: "Courier New", monospace;
  letter-spacing: 0.3px;
  white-space: pre;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  box-shadow: 0 0 4px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.12);

  position: absolute;
  bottom: 140%; /* moves tooltip above the badge */
  right: 0;
}

.minted-badge:hover .minted-badge-tooltip {
  opacity: 1;
}

/* Reposition helper tooltips to avoid overlapping buttons */
.spinstream-tooltip {
  position: relative;
}

.spinstream-tooltip-text {
  position: absolute;
  bottom: 180%; /* move far above parent */
  left: 50%;
  transform: translateX(-50%);
  background-color: #000;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

/* Show on hover (desktop) */
.spinstream-tooltip:hover .spinstream-tooltip-text {
  opacity: 1;
}

/* Hide all helper tooltips in Final mode */
body.finalized .spinstream-tooltip-text {
  display: none !important;
}

/* ----------------------------------------------------
   Minting Overlay (blocks UI during mint)
---------------------------------------------------- */
.minting-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.minting-overlay.hidden {
  display: none !important;
}

.minting-text {
  margin-top: 14px;
  font-size: 1.2rem;
  color: white;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.minting-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: mintSpin 0.9s linear infinite;
}

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

/* ----------------------------------------------------
   Minted Badge (Bottom Right)
---------------------------------------------------- */
.minted-badge {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.minted-badge.hidden {
  display: none !important;
}

.minted-badge-circle {
  background: radial-gradient(circle at 30% 30%, #f7e9b5, #d4b76a, #b89a4a);
  color: #3a2f0b;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 12px 16px;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255, 215, 100, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  user-select: none;
  text-align: center;
}

/* ----------------------------------------------------
   Minted Badge Tooltip — Terminal / Code Style
   (UPDATED: moved FAR away from Mint/Edit buttons)
---------------------------------------------------- */
.minted-badge-tooltip {
  margin-top: 10px;
  background: rgba(0,0,0,0.78);
  color: #b5b5b5;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.55rem;
  font-family: "Courier New", monospace;
  letter-spacing: 0.3px;
  white-space: pre;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  box-shadow: 0 0 4px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.12);

  /* NEW: move tooltip UP and AWAY from Mint/Edit buttons */
  position: absolute;
  bottom: 140%;   /* was 6px margin — now MUCH higher */
  right: 0;
}

/* Show tooltip on hover */
.minted-badge:hover .minted-badge-tooltip {
  opacity: 1;
}

/* ----------------------------------------------------
   Walkthrough Card — Compact + Raised
---------------------------------------------------- */
.walkthrough-card {
  transform: scale(0.85) !important;
  top: 60px !important;
}

/* Arrow Pointer */
.walkthrough-card::after {
  content: "";
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 18px solid #ffffff;
  z-index: 9999;
}

/* ----------------------------------------------------
   Tooltip Positioning Fix — Avoid Overlap
---------------------------------------------------- */
.spinstream-tooltip {
  position: relative;
}

.spinstream-tooltip-text {
  position: absolute;
  bottom: 150%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #000;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.spinstream-tooltip:hover .spinstream-tooltip-text {
  opacity: 1;
}

/* Hide tooltips in Final mode */
body.finalized .spinstream-tooltip-text {
  display: none !important;
}

/* ----------------------------------------------------
   Final Mode — Shrink NFT + Copy Link Buttons
---------------------------------------------------- */
.finalized #nftButton {
  font-size: 0.9rem !important;
  padding: 10px 16px !important;
  border-radius: 6px !important;
}

.finalized #copyLinkButton {
  font-size: 0.85rem !important;
  padding: 8px 14px !important;
  border-radius: 6px !important;
}
