@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Base */
  --bg: #05060a;
  --surface: rgba(16, 18, 27, .78);
  --surface-2: #0e1018;
  --ink: #f5f5f8;
  --muted: #a4a4b3;
  --faint: #717287;
  --line: rgba(255, 255, 255, .12);
  --line-soft: rgba(255, 255, 255, .06);

  /* Signature palette: black · orange · blue */
  --orange: #ff8a3d;
  --orange-deep: #ff6a00;
  --blue: #4c8dff;
  --blue-deep: #1d4ed8;
  --accent: var(--orange);
  --accent-grad: linear-gradient(120deg, var(--orange), var(--blue));

  --danger: #ff7b7b;
  --ok: #7bd88f;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  scroll-behavior: smooth;
  background: linear-gradient(165deg, #05060a 0%, #090b14 48%, #04050a 100%);
}

::selection { background: rgba(255, 138, 61, .3); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: #07080d; }
::-webkit-scrollbar-thumb { background: #252838; border-radius: 9px; border: 2px solid #07080d; }
::-webkit-scrollbar-thumb:hover { background: #34384f; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 14px/1.6 var(--sans);
  background:
    radial-gradient(1100px 620px at 4% -12%, rgba(255, 122, 26, .20), transparent 62%),
    radial-gradient(1200px 720px at 98% -6%, rgba(45, 108, 255, .24), transparent 60%),
    radial-gradient(1000px 640px at 78% 112%, rgba(255, 122, 26, .10), transparent 62%),
    radial-gradient(900px 620px at 6% 104%, rgba(45, 108, 255, .10), transparent 62%),
    linear-gradient(165deg, #05060a 0%, #090b14 48%, #04050a 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.app { position: relative; isolation: isolate; }
.main { max-width: 1160px; margin: 0 auto; padding: 0 28px; }

/* A very faint grid gives the canvas a modern, technical feel. */
.app::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(circle at 50% 28%, #000, transparent 75%);
  mask-image: radial-gradient(circle at 50% 28%, #000, transparent 75%);
}

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 34px;
  padding-top: 20px; padding-bottom: 18px;
  padding-left: max(28px, calc((100% - 1160px) / 2 + 28px));
  padding-right: max(28px, calc((100% - 1160px) / 2 + 28px));
  background: linear-gradient(180deg, rgba(5, 6, 10, .95), rgba(5, 6, 10, .74));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; color: inherit; }
.brand-rule { width: 32px; height: 1px; background: var(--accent-grad); }
.brand-logo {
  display: block; width: 88px; height: 30px; flex: none;
  background: var(--accent-grad);
  -webkit-mask: url('assets/imagologo-mark.png') center / contain no-repeat;
  mask: url('assets/imagologo-mark.png') center / contain no-repeat;
}
.brand-sep { width: 1px; height: 18px; background: var(--line); }
.brand-sub { font-size: 9px; letter-spacing: .24em; color: var(--muted); font-weight: 600; }

.tabs { display: flex; align-items: center; }
.tab {
  border: 0; border-bottom: 1px solid transparent; background: none;
  color: var(--muted); padding: 7px 0; margin-right: 26px;
  font: inherit; font-size: 10px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; cursor: pointer; transition: color .2s, border-color .2s;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--orange); }

.wallet-area { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.network, .balance {
  font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted);
  display: inline-flex; align-items: center; gap: 8px;
}
.network i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--blue);
  box-shadow: 0 0 10px 2px rgba(76, 141, 255, .55);
}
.balance { color: var(--ink); letter-spacing: .06em; }

/* ---------- Buttons ---------- */
.btn {
  appearance: none; border: 1px solid var(--line); border-radius: 4px;
  background: transparent; color: var(--ink);
  padding: 10px 18px; font: inherit; font-size: 11px; font-weight: 600;
  letter-spacing: .11em; text-transform: uppercase; cursor: pointer;
  transition: .2s ease;
}
.btn:disabled { opacity: .38; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(120deg, #ff9f52, var(--orange-deep));
  color: #1a0d04; border-color: rgba(255, 138, 61, .5);
  box-shadow: 0 10px 30px rgba(255, 106, 0, .22);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(120deg, #ffad67, #ff7a14);
  border-color: var(--orange);
  box-shadow: 0 12px 34px rgba(255, 106, 0, .34);
  transform: translateY(-1px);
}
.btn-connect { border-radius: 999px; padding: 9px 18px; }
.btn-connect:hover { border-color: var(--orange); color: var(--orange); }
.btn-connect.connected { border-color: rgba(76, 141, 255, .5); color: var(--blue); }
.btn-ghost:hover:not(:disabled) { border-color: var(--orange); color: var(--orange); }
.btn-small { padding: 7px 12px; font-size: 9px; }
.btn-danger { color: var(--danger); border-color: rgba(255, 123, 123, .32); }
.btn-danger:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); background: rgba(255, 123, 123, .06); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 20px; }

/* ---------- Stats strip ---------- */
.stats {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin: 30px 0 44px;
}
.stats::before {
  content: ''; position: absolute; top: -1px; left: 0; width: 28%; height: 1px;
  background: var(--accent-grad);
}
.stat { position: relative; padding: 16px 0 16px 24px; border-right: 1px solid var(--line-soft); }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.stat-label { display: block; font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.stat-value { display: block; font-family: var(--serif); font-size: 25px; line-height: 1.15; margin-top: 8px; }
.stat-value.mono { font-family: ui-monospace, monospace; font-size: 11px; letter-spacing: .02em; padding-right: 18px; }
.copy {
  position: absolute; right: 14px; bottom: 18px; background: none; border: 0;
  color: var(--faint); cursor: pointer; font: 600 8px var(--sans);
  letter-spacing: .16em; text-transform: uppercase;
}
.copy:hover { color: var(--orange); }

/* ---------- Sections ---------- */
.panel { display: none; }
.panel.active { display: block; animation: rise .45s cubic-bezier(.2,.7,.3,1); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: 9px; font-weight: 600; letter-spacing: .3em; color: var(--orange);
  margin-bottom: 14px; text-transform: uppercase;
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--accent-grad); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-head h1 { font: 500 38px/1.08 var(--serif); letter-spacing: -.01em; margin: 0 0 8px; }
.section-head p { margin: 0; color: var(--muted); font-size: 13px; max-width: 620px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 62px 20px; text-align: center; color: var(--muted);
  border: 1px solid var(--line-soft); border-radius: 5px;
  background: rgba(255, 255, 255, .012);
  backdrop-filter: blur(12px);
}
.empty img { width: 96px; filter: invert(1); mix-blend-mode: screen; opacity: .09; margin-bottom: 10px; }
.empty b { font: 500 22px var(--serif); color: var(--ink); }
.empty span { font-size: 12px; }
.notice {
  padding: 15px 20px; margin-bottom: 22px; color: var(--muted); font-size: 12px;
  border-left: 2px solid var(--orange);
  background: linear-gradient(90deg, rgba(255, 138, 61, .07), rgba(76, 141, 255, .02));
}
.more-wrap { display: flex; justify-content: center; margin-top: 30px; }

/* ---------- NFT card ---------- */
.card {
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .008)), var(--surface);
  border: 1px solid var(--line-soft); border-radius: 6px; overflow: hidden;
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .28);
}
.nft-card { cursor: pointer; transition: border-color .25s, transform .25s, box-shadow .25s; }
.nft-card:hover {
  border-color: rgba(255, 138, 61, .5); transform: translateY(-3px);
  box-shadow: 0 24px 52px rgba(0, 0, 0, .38), inset 0 0 0 1px rgba(255, 138, 61, .06);
}
.nft-media { position: relative; aspect-ratio: 1/1; background: var(--surface-2); overflow: hidden; }
.nft-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nft-fallback { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; }
.nft-fallback img { width: 44%; filter: invert(1); mix-blend-mode: screen; opacity: .12; object-fit: contain; }
.nft-id {
  position: absolute; top: 10px; left: 10px;
  background: rgba(5, 6, 10, .82); border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  padding: 2px 6px; font-size: 9px; letter-spacing: .08em; color: var(--muted);
}
.nft-body { padding: 13px 14px 14px; }
.nft-name { font: 500 17px/1.2 var(--serif); margin: 0 0 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nft-row { display: flex; justify-content: space-between; gap: 10px; font-size: 9px; letter-spacing: .06em; color: var(--faint); text-transform: uppercase; }
.nft-row .mono { color: var(--muted); letter-spacing: 0; text-transform: none; }
.nft-price { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: baseline; }
.nft-price b { font: 500 18px var(--serif); color: var(--ink); }
.badge { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.badge.listed { color: var(--orange); }
.badge.listed::before { content: '● '; font-size: 7px; }

/* ---------- Mint ---------- */
.hero { position: relative; overflow: hidden; padding: 6px 0 30px; }
.hero h1 { font: 400 52px/1.05 var(--serif); letter-spacing: -.02em; margin: 0 0 12px; }
.hero h1 em {
  font-style: italic;
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero p { margin: 0; color: var(--muted); font-size: 13px; max-width: 560px; }
.hero-ghost { position: absolute; right: -10px; top: -34px; pointer-events: none; }
.hero-ghost img { width: 300px; filter: invert(1); mix-blend-mode: screen; opacity: .055; }

.stepper { display: flex; align-items: center; margin: 4px 0 26px; }
.step { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.step span {
  width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 50%;
  display: grid; place-items: center; font-size: 10px; letter-spacing: 0;
}
.step.active { color: var(--ink); }
.step.active span { border-color: var(--orange); color: var(--orange); }
.step.done span {
  background: linear-gradient(120deg, #ff9f52, var(--orange-deep));
  border-color: transparent; color: #1a0d04;
}
.step-line { width: 46px; height: 1px; background: var(--line); margin: 0 14px; }

.mint-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; align-items: start; }
.upload-card, .details-card { padding: 28px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.card-head h2 { font: 500 21px var(--serif); margin: 0; }
.tag { font-size: 8px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); border: 1px solid var(--line); padding: 4px 9px; border-radius: 2px; }

.dropzone {
  position: relative; overflow: hidden;
  border: 1px dashed var(--line); border-radius: 3px;
  min-height: 264px; padding: 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  text-align: center; cursor: pointer; transition: .25s ease;
  background: rgba(255, 255, 255, .012);
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--orange);
  background: linear-gradient(135deg, rgba(255, 138, 61, .05), rgba(76, 141, 255, .03));
}
.dz-watermark { position: absolute; width: 62%; filter: invert(1); mix-blend-mode: screen; opacity: .016; pointer-events: none; }
.dz-icon {
  width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%;
  position: relative; margin-bottom: 8px;
}
.dz-icon::before, .dz-icon::after {
  content: ''; position: absolute; left: 50%; top: 50%; background: var(--orange);
  transform: translate(-50%, -50%);
}
.dz-icon::before { width: 15px; height: 1px; }
.dz-icon::after { width: 1px; height: 15px; }
.dropzone b { font: 500 21px var(--serif); }
.dropzone span { color: var(--muted); font-size: 11px; letter-spacing: .02em; }

.preview { display: grid; grid-template-columns: 150px 1fr; gap: 22px; align-items: start; }
.preview > img { width: 150px; height: 150px; object-fit: cover; border: 1px solid var(--line); }
.preview-meta { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.meta-row { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.meta-row span { color: var(--faint); text-transform: uppercase; letter-spacing: .1em; font-size: 9px; white-space: nowrap; }
.meta-row b { font-weight: 500; text-align: right; word-break: break-all; }
.status-loading { color: var(--orange); }
.status-done { color: var(--ok); }
.status-error { color: var(--danger); }
.preview > .btn { grid-column: 1 / -1; justify-self: start; }
#retryUpload { margin-left: 8px; }

.manual-toggle {
  margin-top: 18px; padding: 0; background: none; border: 0;
  color: var(--faint); font: inherit; font-size: 11px; cursor: pointer;
  border-bottom: 1px solid var(--line); padding-bottom: 2px;
}
.manual-toggle:hover { color: var(--orange); border-color: var(--orange); }
.manual-fields { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-soft); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 24px; }
.field label { font-size: 9px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.field input {
  background: transparent; color: var(--ink); outline: none;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  padding: 9px 0 10px; font: inherit; font-size: 14px; transition: border-color .2s;
}
.field input:focus { border-bottom-color: var(--orange); }
.field input::placeholder { color: #5b5c6b; }
.field small { color: var(--faint); font-size: 10px; }
.summary { padding: 4px 0 20px; margin-bottom: 8px; border-top: 1px solid var(--line-soft); }
.form-hint { color: var(--faint); font-size: 10px; text-align: center; margin: 14px 0 0; letter-spacing: .02em; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(3, 4, 8, .84); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  position: relative; width: min(760px, 100%); max-height: 90vh; overflow-y: auto;
  padding: 34px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .008)), #0e1018;
  border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  backdrop-filter: blur(16px);
}
.modal-close { position: absolute; top: 16px; right: 20px; background: none; border: 0; color: var(--muted); font-size: 26px; font-weight: 300; cursor: pointer; }
.modal-close:hover { color: var(--orange); }
.modal-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; }
.modal-media { aspect-ratio: 1/1; border: 1px solid var(--line); position: relative; overflow: hidden; }
.modal-media img { width: 100%; height: 100%; object-fit: cover; }
.modal h2 { font: 500 28px/1.15 var(--serif); margin: 0 0 5px; }
.modal .sub { color: var(--faint); font-size: 9px; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 22px; }
.kv { display: grid; grid-template-columns: 84px 1fr; gap: 0 14px; font-size: 11px; margin-bottom: 22px; }
.kv dt, .kv dd { padding: 8px 0; border-bottom: 1px solid var(--line-soft); margin: 0; }
.kv dt { color: var(--faint); text-transform: uppercase; letter-spacing: .1em; font-size: 9px; }
.kv dd { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; word-break: break-all; }
.kv dd span { min-width: 0; }
.copy-inline {
  flex: none; background: none; border: 0; color: var(--faint); cursor: pointer;
  font: 600 8px var(--sans); letter-spacing: .14em; text-transform: uppercase;
}
.copy-inline:hover { color: var(--orange); }
.action-box { border-top: 1px solid var(--line); padding-top: 22px; }
.action-box h3 { font: 500 15px var(--serif); margin: 0 0 16px; letter-spacing: .01em; }
.action-box .field { margin-bottom: 14px; }
.action-row { display: flex; gap: 10px; flex-wrap: wrap; }
.price-note { font-size: 11px; color: var(--muted); margin: 0 0 16px; }
.price-note b { color: var(--orange); font-weight: 600; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; z-index: 80; bottom: 26px; left: 50%; transform: translateX(-50%);
  max-width: min(520px, calc(100vw - 32px));
  background: rgba(16, 18, 27, .96); border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  padding: 12px 18px 12px 34px; font-size: 11px; letter-spacing: .03em; color: var(--ink);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}
.toast::before { content: ''; position: absolute; left: 16px; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); transform: translateY(-50%); box-shadow: 0 0 10px 2px rgba(255, 138, 61, .5); }
.toast.ok::before { background: var(--ok); box-shadow: 0 0 10px 2px rgba(123, 216, 143, .5); }
.toast.error::before { background: var(--danger); box-shadow: 0 0 10px 2px rgba(255, 123, 123, .5); }

.footer {
  display: flex; justify-content: space-between; gap: 18px;
  max-width: 1160px; margin: 50px auto 0;
  padding: 18px 28px 40px; border-top: 1px solid var(--line-soft);
  color: var(--faint); font-size: 9px; letter-spacing: .12em; text-transform: uppercase;
}

@media (max-width: 860px) {
  .mint-layout { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
}
@media (max-width: 700px) {
  .main { padding: 0 18px; }
  .footer { padding: 18px 18px 30px; }
  .topbar { flex-wrap: wrap; gap: 14px; padding-left: 18px; padding-right: 18px; }
  .tabs { order: 3; width: 100%; }
  .tab { margin-right: 20px; }
  .network, .balance { display: none; }
  .hero h1 { font-size: 40px; }
  .hero-ghost { display: none; }
  .modal-layout { grid-template-columns: 1fr; }
  .modal-media { max-width: 240px; }
  .preview { grid-template-columns: 1fr; }
  .preview > img { width: 100%; height: 190px; }
  .step-line { width: 22px; margin: 0 8px; }
}
