/* ════════════════════════════════════════════════════════════════
   Go Myth — Mint Page
   Palette extracted from image 40 (Takiyasha-hime)
   ════════════════════════════════════════════════════════════════ */

:root {
  --parchment:     #e8dcc8;
  --parchment-dim: #d4c8b0;
  --ink:           #1a1611;
  --ink-mid:       #2d2418;
  --ink-soft:      #4a3d2e;
  --gold:          #c9a84c;
  --gold-bright:   #e0c56a;
  --gold-dim:      #8a7234;
  --vermillion:    #8b3a2a;
  --smoke:         rgba(45, 36, 24, 0.85);
  --glass:         rgba(232, 220, 200, 0.08);
  --glass-border:  rgba(201, 168, 76, 0.25);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  color: var(--parchment);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ── Background ─────────────────────────────────────────────── */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -3;
}

/* Layer 1: blurred stretched fill (eliminates black bars) */
.bg-layer::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: url('bg.png') center / cover no-repeat;
  filter: blur(12px) brightness(0.7);
  transform: scale(1.05);
}

/* Layer 2: sharp full image on top */
.bg-layer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('bg.png') center / contain no-repeat;
}

.bg-vignette {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      ellipse 60% 55% at 50% 45%,
      transparent 0%,
      rgba(15, 12, 8, 0.45) 60%,
      rgba(10, 8, 5, 0.85) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(10, 8, 5, 0.3) 0%,
      transparent 25%,
      transparent 75%,
      rgba(10, 8, 5, 0.5) 100%
    );
  z-index: -2;
}

/* ── Gold particles ─────────────────────────────────────────── */
.gold-particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.gold-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0;
  animation: floatParticle 8s ease-in-out infinite;
}

@keyframes floatParticle {
  0%   { opacity: 0; transform: translateY(0) scale(0.5); }
  20%  { opacity: 0.8; }
  80%  { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(-120px) scale(1.2); }
}

/* ── Main container ─────────────────────────────────────────── */
.main-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1.5rem 6rem;
  width: 100%;
  max-width: 520px;
  gap: 1.25rem;
}

/* ── Header ─────────────────────────────────────────────────── */
.header {
  text-align: center;
  padding: 1rem 1.5rem;
  background: radial-gradient(
    ellipse 120% 100% at 50% 50%,
    rgba(15, 12, 8, 0.6) 0%,
    rgba(15, 12, 8, 0.35) 60%,
    transparent 100%
  );
  border-radius: 8px;
}

.logo-mark {
  font-size: 2.5rem;
  color: var(--gold);
  text-shadow:
    0 0 20px rgba(201, 168, 76, 0.4),
    0 0 40px rgba(201, 168, 76, 0.15);
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.title {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--parchment);
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.9),
    0 4px 20px rgba(0, 0, 0, 0.7),
    0 0 40px rgba(0, 0, 0, 0.5);
  line-height: 1.1;
}

.subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--gold-bright);
  letter-spacing: 0.12em;
  margin-top: 0.6rem;
  text-shadow:
    0 1px 6px rgba(0, 0, 0, 0.9),
    0 2px 12px rgba(0, 0, 0, 0.6);
}

/* ── Mint section ───────────────────────────────────────────── */
.mint-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 340px;
  padding: 1.25rem 1.5rem 1.25rem;
  background: var(--smoke);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(201, 168, 76, 0.1);
}

/* ── Counter ────────────────────────────────────────────────── */
.mint-counter {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.counter-label {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 0.35rem;
}

.counter-value {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: baseline;
  justify-content: center;
  white-space: nowrap;
}

.count-current {
  color: var(--gold-bright);
  text-shadow: 0 0 16px rgba(201, 168, 76, 0.4);
}

.count-separator {
  color: var(--gold-dim);
  margin: 0 0.05em;
  font-weight: 400;
}

.count-total {
  color: var(--parchment-dim);
  opacity: 0.6;
}

.counter-bar {
  width: 100%;
  height: 3px;
  background: var(--ink-mid);
  border-radius: 2px;
  margin-top: 0.75rem;
  overflow: hidden;
}

.counter-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--gold-bright));
  border-radius: 2px;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 8px rgba(201, 168, 76, 0.5);
}

/* ── Price & Limit row ───────────────────────────────────────── */
.mint-info-row {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  border-top: 1px solid rgba(201, 168, 76, 0.15);
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
  padding: 0.6rem 0;
}

.mint-price,
.mint-limit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  font-family: 'Cinzel', serif;
}

.price-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--parchment-dim);
  opacity: 0.6;
}

.price-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--parchment);
  letter-spacing: 0.05em;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn-primary, .btn-mint {
  width: 100%;
  padding: 0.7rem 1.5rem;
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid var(--gold);
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.15), rgba(201, 168, 76, 0.05));
  color: var(--gold);
}

.btn-primary:hover {
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.3), rgba(201, 168, 76, 0.1));
  border-color: var(--gold-bright);
  box-shadow: 0 0 20px rgba(201, 168, 76, 0.2);
  transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); }

.btn-mint {
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  color: var(--ink);
  border-color: var(--gold-bright);
}

.btn-mint:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  box-shadow:
    0 0 24px rgba(201, 168, 76, 0.4),
    0 4px 16px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.btn-mint:active { transform: translateY(0); }

.btn-mint:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-icon {
  font-size: 1.1em;
  line-height: 1;
}

/* ── Wallet info ────────────────────────────────────────────── */
.wallet-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  color: var(--parchment-dim);
  opacity: 0.7;
}

.wallet-dot {
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.5);
}

.mint-status {
  font-size: 0.85rem;
  text-align: center;
  color: var(--gold);
  min-height: 1.2em;
  opacity: 0.9;
}

.mint-status.error { color: var(--vermillion); }
.mint-status.success { color: #4ade80; }

/* ── Bottom tabs ────────────────────────────────────────────── */
.bottom-tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  height: 56px;
  background: rgba(15, 12, 8, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--glass-border);
  z-index: 100;
}

.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--parchment-dim);
  opacity: 0.6;
  cursor: pointer;
  border: none;
  background: none;
  transition: all 0.3s ease;
  border-top: 2px solid transparent;
}

.tab:hover { opacity: 0.9; color: var(--gold); }

.tab.active {
  opacity: 1;
  color: var(--gold);
  border-top-color: var(--gold);
}

.tab-icon {
  font-size: 1.1em;
}

/* ── Lore panel ─────────────────────────────────────────────── */
.lore-panel {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.lore-panel.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lore-panel.hidden .lore-content {
  transform: scale(0.95);
  opacity: 0;
}

.lore-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 5, 0.7);
  backdrop-filter: blur(6px);
}

.lore-content {
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 75vh;
  background: rgba(30, 25, 18, 0.96);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.7);
}

.lore-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  width: 32px;
  height: 32px;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: rgba(201, 168, 76, 0.08);
  color: var(--gold);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.lore-close:hover {
  background: rgba(201, 168, 76, 0.2);
  border-color: var(--gold);
}

.lore-scroll {
  padding: 2.5rem 2rem 3rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.lore-scroll::-webkit-scrollbar { width: 4px; }
.lore-scroll::-webkit-scrollbar-track { background: transparent; }
.lore-scroll::-webkit-scrollbar-thumb {
  background: var(--gold-dim);
  border-radius: 2px;
}

.lore-title {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-align: center;
  margin-bottom: 2rem;
  text-shadow: 0 0 20px rgba(201, 168, 76, 0.3);
}

.lore-section {
  margin-bottom: 1.75rem;
}

.lore-section h3 {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.lore-section p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--parchment-dim);
  text-align: justify;
}

.lore-divider {
  text-align: center;
  font-size: 1.5rem;
  color: var(--gold-dim);
  letter-spacing: 0.5em;
  margin-top: 2rem;
  opacity: 0.5;
}

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

.lore-panel.hidden { display: flex !important; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .title { font-size: 2rem; letter-spacing: 0.12em; }
  .subtitle { font-size: 0.9rem; }
  .counter-value { font-size: 1.75rem; }
  .mint-section { padding: 1.5rem 1.25rem 1.25rem; }
  .logo-mark { font-size: 2.75rem; }
  .lore-scroll { padding: 2rem 1.25rem 2.5rem; }
  .lore-section p { font-size: 1rem; }
}
