/* ============================================================
   Genesis Collection dApp — pink & lime "neon gallery" theme
   New motion language vs 01-04: holographic tiles, mint sparkles,
   reveal flash, shine-sweep buttons, star field.
   ============================================================ */

:root {
  --bg: #120a16;
  --bg-2: #180d1e;
  --card: rgba(30, 15, 38, 0.78);
  --card-border: rgba(148, 163, 184, 0.14);
  --text: #f6eef8;
  --muted: #a892b0;
  --accent-1: #ec4899;  /* pink */
  --accent-2: #a3e635;  /* lime */
  --accent-grad: linear-gradient(135deg, #ec4899 0%, #a3e635 100%);
  --danger: #f43f5e;
  --success: #a3e635;
  --warning: #fbbf24;
  --radius: 16px;
  --font-ui: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Space Grotesk", var(--font-ui);
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(640px 440px at 12% 8%, rgba(236, 72, 153, 0.16), transparent 60%),
    radial-gradient(720px 520px at 88% 16%, rgba(163, 230, 53, 0.10), transparent 60%),
    radial-gradient(800px 600px at 50% 100%, rgba(236, 72, 153, 0.08), transparent 60%),
    var(--bg);
  animation: glowDrift 18s ease-in-out infinite alternate;
}
@keyframes glowDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-22px, 16px, 0) scale(1.06); }
}

/* twinkling star field */
.stars { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.stars i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent-2);
  opacity: 0;
  animation: twinkle var(--d, 4s) ease-in-out infinite;
  box-shadow: 0 0 8px rgba(163, 230, 53, 0.9);
}
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  50% { opacity: 0.9; transform: scale(1.4); }
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.accent { color: var(--accent-2); }

/* ===================== HEADER ===================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(18, 10, 22, 0.74);
  border-bottom: 1px solid var(--card-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: var(--accent-grad);
  color: #1a0812;
  position: relative;
  overflow: hidden;
  animation: starSpin 8s ease-in-out infinite;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.5) 50%, transparent 70%);
  animation: sheen 3.5s linear infinite;
}
@keyframes starSpin {
  0%, 70% { transform: rotate(0deg); }
  80% { transform: rotate(180deg); }
  90% { transform: rotate(180deg); }
  100% { transform: rotate(360deg); }
}
@keyframes sheen { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.brand h1 { font-family: var(--font-display); font-size: 19px; letter-spacing: 0.2px; }
.brand-sub { font-size: 11.5px; color: var(--muted); }

.header-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.chain-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--muted);
}
.chain-badge.ok { color: var(--success); border-color: rgba(163, 230, 53, 0.4); }

/* ===================== BUTTONS & FORMS ===================== */

.btn {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  padding: 11px 18px;
  cursor: pointer;
  color: #fff;
  transition: transform 0.12s ease, filter 0.15s ease, box-shadow 0.2s ease;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn:not(:disabled):hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn:not(:disabled):active { transform: translateY(0); }

.btn-primary { background: var(--accent-grad); color: #1a0812; box-shadow: 0 6px 18px rgba(236, 72, 153, 0.3); }
.btn-accent { background: linear-gradient(135deg, #a3e635, #4ade80); color: #10200a; box-shadow: 0 6px 18px rgba(163, 230, 53, 0.3); }
.btn-ghost { background: rgba(148, 163, 184, 0.1); border: 1px solid var(--card-border); color: var(--text); }
.btn-ghost:hover { background: rgba(148, 163, 184, 0.18); }
.btn-danger { background: var(--danger); }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* shine sweep on mint buttons */
.btn-shine { position: relative; overflow: hidden; }
.btn-shine::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: btnSheen 2.6s ease-in-out infinite;
}
@keyframes btnSheen {
  0% { left: -50%; }
  60%, 100% { left: 120%; }
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent-2);
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font-ui);
}
.link-btn:hover { text-decoration: underline; }

input, select, textarea {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text);
  background: rgba(148, 163, 184, 0.07);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(163, 230, 53, 0.12); }

label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 12px 0 6px; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

/* ===================== BANNER / SETTINGS ===================== */

.banner { display: flex; gap: 16px; align-items: flex-start; margin-top: 22px; border-left: 3px solid var(--warning); }
.banner-icon { font-size: 26px; }
.banner h3 { font-family: var(--font-display); margin-bottom: 4px; }
.banner p { font-size: 13.5px; color: var(--muted); margin-bottom: 12px; }
.banner code, .settings-panel code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(148, 163, 184, 0.12);
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--accent-2);
}

.settings-panel { margin-top: 22px; }
.settings-panel h3 { font-family: var(--font-display); margin-bottom: 14px; }
.settings-panel .row { margin-top: 16px; }

/* ===================== CARDS / SECTIONS ===================== */

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.25s ease;
  animation: cardIn 0.5s ease both;
}
.card:hover { border-color: rgba(236, 72, 153, 0.32); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35); }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.card-head h3 { font-family: var(--font-display); font-size: 16.5px; }
.card-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(236, 72, 153, 0.14);
  color: var(--accent-2);
  font-size: 16px;
}
.card p { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.card form .btn { width: 100%; margin-top: 14px; }

.section { margin-top: 46px; }
.section-title { font-family: var(--font-display); font-size: 20px; margin-bottom: 18px; }
.section-title .muted { font-size: 13px; font-weight: 400; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(236, 72, 153, 0.16);
  color: #f9a8d4;
  vertical-align: middle;
}
.tag-admin { background: rgba(163, 230, 53, 0.14); color: #bef264; }

/* ===================== HERO ===================== */

.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  margin-top: 34px;
  align-items: center;
}
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }

.hero-text h2 { font-family: var(--font-display); font-size: 40px; letter-spacing: -0.5px; }
.hero-text h2 span { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-text p { font-size: 14.5px; margin-top: 10px; max-width: 52ch; }
.hero-links { margin-top: 14px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.hero-links a { color: var(--accent-2); text-decoration: none; }
.hero-links a:hover { text-decoration: underline; }
#hero-address { font-family: var(--font-mono); font-size: 12.5px; }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.stat {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); }
.stat-value { font-family: var(--font-display); font-size: 20px; font-weight: 600; }

/* ===================== MINT CARDS ===================== */

.mint-card.wl { border-color: rgba(163, 230, 53, 0.28); }
.mint-card.wl .card-icon { background: rgba(163, 230, 53, 0.12); color: var(--accent-2); }

/* ===================== GALLERY ===================== */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--bg-2);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: tileIn 0.5s ease both;
}
.tile:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: 0 16px 36px rgba(236, 72, 153, 0.25); }
@keyframes tileIn {
  from { opacity: 0; transform: scale(0.85) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* holographic gradient placeholder */
.tile .ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  color: #1a0812;
  background: conic-gradient(from var(--a, 0deg), #ec4899, #a3e635, #22d3ee, #ec4899);
  animation: holoSpin 8s linear infinite;
}
@keyframes holoSpin { to { --a: 360deg; } }

.tile .tile-id {
  position: absolute;
  bottom: 6px;
  left: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 2px 8px;
  border-radius: 999px;
}
.tile .locked {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 34px;
  background: rgba(10, 6, 14, 0.55);
  backdrop-filter: blur(2px);
  color: var(--muted);
}

/* reveal flash */
.flash { animation: revealFlash 0.7s ease; }
@keyframes revealFlash {
  0% { filter: brightness(4); }
  100% { filter: brightness(1); }
}

/* ===================== PHASE BADGE ===================== */

.phase-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 10px;
  border-radius: 999px;
}
.phase-Closed { background: rgba(244, 63, 94, 0.15); color: #fda4af; }
.phase-Whitelist { background: rgba(163, 230, 53, 0.14); color: #bef264; }
.phase-Public { background: rgba(236, 72, 153, 0.16); color: #f9a8d4; animation: softPulse 1.8s ease-in-out infinite; }
@keyframes softPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.4); }
  50% { box-shadow: 0 0 10px 2px rgba(236, 72, 153, 0.25); }
}

/* ===================== ACTIVITY TABLE ===================== */

.table-card { padding: 8px 20px 20px; overflow-x: auto; }
.activity-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
.activity-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  padding: 14px 12px;
  border-bottom: 1px solid var(--card-border);
}
.activity-table td { padding: 12px; border-bottom: 1px solid rgba(148, 163, 184, 0.07); }
.activity-table tr:last-child td { border-bottom: none; }
.activity-table .mono { font-family: var(--font-mono); font-size: 12px; }
.activity-table a { color: var(--accent-2); text-decoration: none; }
.activity-table a:hover { text-decoration: underline; }

.ev-pill {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
}
.ev-Transfer { background: rgba(236, 72, 153, 0.16); color: #f9a8d4; }
.ev-PhaseChanged { background: rgba(163, 230, 53, 0.14); color: #bef264; }
.ev-Revealed { background: rgba(34, 211, 238, 0.15); color: #67e8f9; }
.ev-RoyaltySet { background: rgba(251, 191, 36, 0.15); color: #fcd34d; }
.ev-Withdrawn { background: rgba(163, 230, 53, 0.14); color: #bef264; }
.ev-MerkleRootSet { background: rgba(148, 163, 184, 0.16); color: #cbd5e1; }

/* ===================== FOOTER ===================== */

.site-footer { margin-top: 60px; border-top: 1px solid var(--card-border); background: rgba(18, 10, 22, 0.6); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 22px 20px;
  font-size: 12.5px;
  color: var(--muted);
}
.footer-inner a { color: var(--accent-2); text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }
#footer-address { font-family: var(--font-mono); }

/* ===================== TOASTS ===================== */

.toast-container {
  position: fixed;
  top: 84px;
  right: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.toast {
  background: rgba(30, 15, 38, 0.96);
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--accent-1);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3);
  word-break: break-word;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--accent-1); }
.toast a { color: #f9a8d4; }
.toast.out { opacity: 0; transform: translateX(12px); transition: all 0.25s ease; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(28px) scale(0.9); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* ===================== MISC ===================== */

[hidden] { display: none !important; }

.spin {
  display: inline-block;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

::selection { background: rgba(236, 72, 153, 0.4); }
