:root {
  --pink: #b74f8a;
  --pink-deep: #8c3a6a;
  --gold: #fdc964;
  --gold-soft: #ffe4ad;
  --ink: #2b2b2b;
  --night: #1b0d2a;
  --night-deep: #0c0517;
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(253, 201, 100, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial,
    sans-serif;
  color: var(--gold-soft);
  background:
    radial-gradient(
      ellipse at 20% 10%,
      rgba(183, 79, 138, 0.45) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse at 80% 80%,
      rgba(253, 201, 100, 0.18) 0%,
      transparent 55%
    ),
    linear-gradient(180deg, var(--night) 0%, var(--night-deep) 100%);
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

/* ── Starfield ─────────────────────────────────────────────── */
.starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--gold-soft);
  border-radius: 50%;
  opacity: 0.7;
  box-shadow: 0 0 6px rgba(253, 201, 100, 0.6);
  animation: twinkle 4s ease-in-out infinite;
}
.star--a { top: 12%; left: 8%; animation-delay: 0s; }
.star--b { top: 22%; left: 78%; animation-delay: 0.7s; width: 3px; height: 3px; }
.star--c { top: 38%; left: 30%; animation-delay: 1.4s; }
.star--d { top: 55%; left: 88%; animation-delay: 2.1s; width: 3px; height: 3px; }
.star--e { top: 68%; left: 18%; animation-delay: 0.3s; }
.star--f { top: 80%; left: 65%; animation-delay: 1.9s; }
.star--g { top: 8%;  left: 50%; animation-delay: 2.6s; width: 3px; height: 3px; }
.star--h { top: 90%; left: 42%; animation-delay: 1.1s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.9); }
  50%      { opacity: 1;    transform: scale(1.2); }
}

/* ── Header / Nav ──────────────────────────────────────────── */
.page-header {
  position: relative;
  z-index: 2;
  background-color: var(--pink);
  padding: 1rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.page-header h1 {
  color: white;
  margin: 0;
  font-size: clamp(1.4rem, 4vw, 2rem);
}

.site-nav {
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.site-nav__link {
  color: var(--gold);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.site-nav__link:hover {
  background-color: rgba(253, 201, 100, 0.18);
  transform: translateY(-1px);
}

.site-nav__link.is-active {
  background-color: var(--gold);
  color: var(--pink);
}

/* ── Ambient art (moon, rocket) ───────────────────────────── */
.mint-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 1.25rem;
}

.moon {
  position: absolute;
  top: 8%;
  right: 6%;
  width: clamp(120px, 18vw, 220px);
  filter: drop-shadow(0 0 35px rgba(253, 201, 100, 0.35));
  animation: moonFloat 8s ease-in-out infinite;
  pointer-events: none;
}

.rocket {
  position: absolute;
  bottom: 8%;
  left: 6%;
  width: clamp(80px, 12vw, 160px);
  transform-origin: 50% 80%;
  animation: rocketLift 6s ease-in-out infinite;
  pointer-events: none;
}

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

@keyframes rocketLift {
  0%   { transform: translate(0, 0) rotate(-8deg); }
  40%  { transform: translate(20px, -40px) rotate(-2deg); }
  60%  { transform: translate(35px, -30px) rotate(4deg); }
  100% { transform: translate(0, 0) rotate(-8deg); }
}

/* ── Mint card ────────────────────────────────────────────── */
.mint-card {
  position: relative;
  width: min(420px, 100%);
  padding: 2rem 1.75rem 1.75rem;
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  text-align: center;
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  animation: cardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

.mint-card__hero {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.mint-card__art {
  width: 160px;
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45));
  animation: bob 5s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.mint-card__bubble {
  position: absolute;
  top: -8px;
  right: 12%;
  padding: 0.6rem 0.9rem;
  background: var(--gold-soft);
  color: var(--ink);
  border-radius: 14px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  transform: rotate(8deg);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  animation: bubblePulse 4s ease-in-out infinite;
}

.mint-card__bubble::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 18px;
  border: 8px solid transparent;
  border-top-color: var(--gold-soft);
}

@keyframes bubblePulse {
  0%, 100% { opacity: 0.6; transform: rotate(8deg) translateY(0); }
  50%      { opacity: 1;   transform: rotate(8deg) translateY(-3px); }
}

.mint-card__title {
  margin: 0 0 0.25rem;
  font-size: 1.6rem;
  color: white;
  letter-spacing: 0.01em;
}

.mint-card__sub {
  margin: 0 0 1.25rem;
  color: rgba(255, 228, 173, 0.75);
  font-size: 0.95rem;
}

/* ── Stats ────────────────────────────────────────────────── */
.mint-stats {
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mint-stats__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.mint-stats__row dt {
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
}

.mint-stats__row dd {
  color: var(--gold);
  margin: 0;
  font-weight: 600;
}

/* ── Buttons ──────────────────────────────────────────────── */
.mint-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease;
}

.btn--primary {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 10px 24px -10px rgba(253, 201, 100, 0.7);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -10px rgba(253, 201, 100, 0.9);
}

.btn--ghost {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}

.btn--ghost:hover {
  background: rgba(253, 201, 100, 0.12);
  transform: translateY(-2px);
}

.btn--ghost.is-connected {
  background: rgba(253, 201, 100, 0.15);
  border-color: rgba(253, 201, 100, 0.5);
}

.btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

.dot-loader {
  display: inline-block;
  margin-left: 0.4em;
  width: 1.1em;
  text-align: left;
}
.dot-loader::after {
  content: "";
  animation: dots 1.2s steps(4, end) infinite;
}
@keyframes dots {
  0%   { content: ""; }
  25%  { content: "."; }
  50%  { content: ".."; }
  75%  { content: "..."; }
  100% { content: ""; }
}

/* ── Status / links ───────────────────────────────────────── */
.mint-status {
  min-height: 1.25rem;
  margin: 0.25rem 0 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 228, 173, 0.85);
}

.mint-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  font-size: 0.85rem;
}

.mint-link {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px dashed rgba(253, 201, 100, 0.4);
  padding-bottom: 1px;
}

.mint-link:hover {
  color: var(--gold-soft);
}

/* ── Footer ───────────────────────────────────────────────── */
.page-footer {
  position: relative;
  z-index: 2;
  background-color: var(--pink);
  color: white;
  text-align: center;
  padding: 1rem;
}

.page-footer p {
  margin: 0.15rem 0;
  font-size: 0.85rem;
}

.page-footer a {
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
}

.page-footer a:hover {
  text-decoration: underline;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .moon { top: 3%; right: 3%; }
  .rocket { bottom: 4%; left: 4%; }
  .mint-card { padding: 1.5rem 1.25rem; }
  .mint-card__art { width: 130px; }
  .mint-card__bubble { right: 4%; font-size: 0.7rem; }
}
