/* NFTObscura — aligned with salbazaar design system */

:root {
  --bg:         #121212;
  --bg-2:       #1e1e1e;
  --bg-3:       #2a2a2a;
  --border:     #3a3a3a;
  --border-2:   #3a3a3a;
  --text:       #e0e0e0;
  --text-2:     #a0a0a0;
  --text-3:     #6b6b6b;
  --accent:     #00bfa5;
  --accent-dim: #009688;
  --accent-glow:rgba(0,191,165,0.1);
  --amber:      #f59e0b;
  --red:        #ef4444;
  --green:      #10b981;
  --radius:     3px;
  --radius-lg:  4px;
  --transition: 150ms ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.5;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

/* ── LAYOUT ── */
.app { display: flex; flex-direction: column; min-height: 100vh; }

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 56px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 1rem;
  letter-spacing: 0.05em;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}

.nav-logo .logo-icon {
  width: 28px; height: 28px;
  background: var(--accent);
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--bg);
}

.nav-logo span.dim { color: var(--accent); }

.nav-links {
  display: flex; align-items: center; gap: 4px;
}

.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 0.875rem;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
  border: 1px solid transparent; background: none; font-family: inherit;
}

.nav-link:hover { color: var(--text); background: var(--bg-3); }
.nav-link.active { color: var(--accent); border-color: var(--accent); }

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

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0.5rem 1rem; border-radius: var(--radius);
  font-family: inherit; font-size: 0.875rem;
  cursor: pointer; transition: all var(--transition);
  border: 1px solid transparent;
  white-space: nowrap; font-weight: 500;
}

.btn-primary {
  background: var(--accent); color: var(--bg);
  border-color: var(--accent);
}
.btn-primary:hover { background: #40E0D0; border-color: #40E0D0; }

.btn-ghost {
  background: transparent; color: var(--text-2);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-2); background: var(--bg-3); }

.btn-danger {
  background: transparent; color: var(--red);
  border-color: rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.1); }

/* ── PAGES ── */
.page { display: none; flex: 1; }
.page.active { display: block; }

/* ── HERO ── */
.hero {
  padding: 80px 32px 64px;
  max-width: 900px; margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  font-size: 0.75rem; color: var(--text-2);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 32px;
}

.hero-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--text);
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero p {
  font-size: 0.875rem; color: var(--text-2);
  max-width: 540px; margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-actions { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }

.hero-stats {
  display: flex; justify-content: center; gap: 48px;
  margin-top: 64px; padding-top: 40px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.stat { text-align: center; }
.stat-value {
  font-size: 28px; font-weight: 600;
  color: var(--text); letter-spacing: -0.02em;
}
.stat-label { font-size: 0.75rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 2px; }

/* ── SECTION ── */
.section {
  padding: 0 32px 64px;
  max-width: 1200px; margin: 0 auto;
}

.section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 28px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 1.125rem; font-weight: 600;
  letter-spacing: -0.02em;
}

.section-meta { font-size: 0.75rem; color: var(--text-3); }

/* ── FILTERS ── */
.filters {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 24px; flex-wrap: wrap;
}

.filter-btn {
  padding: 5px 12px; border-radius: 9999px;
  border: 1px solid var(--border);
  background: transparent; color: var(--text-2);
  font-family: inherit; font-size: 0.75rem;
  cursor: pointer; transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--text-2); color: var(--text); }
.filter-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

.search-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-2);
  margin-left: auto;
}

.search-bar input {
  background: none; border: none; outline: none;
  color: var(--text); font-family: inherit;
  font-size: 0.875rem; width: 180px;
}
.search-bar input::placeholder { color: var(--text-3); }

/* ── NFT GRID ── */
.nft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.nft-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition);
}

.nft-card:hover {
  border-color: var(--text-2);
}

.nft-image {
  width: 100%; aspect-ratio: 1;
  background: var(--bg-3);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}

.nft-image img { width: 100%; height: 100%; object-fit: cover; }

.nft-image-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
  background: var(--bg-3);
}

.nft-badge {
  position: absolute; top: 10px; right: 10px;
  padding: 3px 8px; border-radius: var(--radius);
  font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase;
  background: rgba(18,18,18,0.8); backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  color: var(--text-2);
}

.nft-card-body { padding: 1rem; }

.nft-collection { font-size: 0.75rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }

.nft-name {
  font-size: 0.875rem; font-weight: 500;
  color: var(--text); margin-bottom: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.nft-price-row {
  display: flex; align-items: center; justify-content: space-between;
}

.nft-price-label { font-size: 0.75rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.nft-price-value {
  font-size: 1rem; font-weight: 600; color: var(--amber);
  letter-spacing: -0.01em;
}

.btn-buy {
  padding: 7px 14px;
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  border-radius: var(--radius);
  font-family: inherit; font-size: 0.75rem;
  cursor: pointer; transition: all var(--transition);
}
.btn-buy:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* ── NFT DETAIL MODAL ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 24px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 820px; width: 100%; max-height: 90vh;
  overflow-y: auto;
  display: grid; grid-template-columns: 1fr 1fr;
  animation: modal-in 200ms ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.97) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-image {
  aspect-ratio: 1; background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 80px; border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  overflow: hidden;
}

.modal-content { padding: 32px; display: flex; flex-direction: column; }

.modal-close {
  align-self: flex-end; margin-bottom: 16px;
  background: none; border: none; color: var(--text-3);
  cursor: pointer; font-size: 20px; line-height: 1;
  padding: 4px; transition: color var(--transition);
}
.modal-close:hover { color: var(--text); }

.modal-collection { font-size: 0.75rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px; }

.modal-title {
  font-size: 1.5rem; font-weight: 600;
  letter-spacing: -0.02em; margin-bottom: 12px;
}

.modal-desc { font-size: 0.875rem; color: var(--text-2); line-height: 1.7; margin-bottom: 24px; }

.modal-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 24px;
}

.meta-item { background: var(--bg-3); border-radius: var(--radius); padding: 10px 12px; }
.meta-label { font-size: 0.75rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px; }
.meta-value { font-size: 0.875rem; color: var(--text); }
.meta-value.mono { font-size: 0.75rem; }

/* ── MINT PAGE ── */
.mint-container {
  max-width: 640px; margin: 0 auto;
  padding: 48px 32px;
}

.page-title {
  font-size: 1.5rem; font-weight: 600;
  letter-spacing: -0.02em; margin-bottom: 6px;
}

.page-subtitle { font-size: 0.875rem; color: var(--text-2); margin-bottom: 40px; }

.form-section {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  margin-bottom: 20px;
}

.form-section-title {
  font-size: 0.875rem; font-weight: 600;
  color: var(--text-2); text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 20px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}

.form-group { margin-bottom: 20px; }
.form-group:last-child { margin-bottom: 0; }

.form-label {
  display: block; font-size: 0.875rem; color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 8px; font-weight: 500;
}

.form-label .req { color: var(--red); margin-left: 2px; }

.form-input, .form-textarea, .form-select {
  width: 100%; padding: 0.5rem 1rem;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-family: inherit; font-size: 0.875rem;
  transition: border-color var(--transition);
  outline: none;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent);
}

.form-textarea { resize: vertical; min-height: 90px; }

.form-select { cursor: pointer; }
.form-select option { background: var(--bg-3); }

.form-hint { font-size: 0.75rem; color: var(--text-3); margin-top: 6px; }

.upload-zone {
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg); padding: 40px 24px;
  text-align: center; cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-3);
}

.upload-zone:hover { border-color: var(--accent); background: var(--accent-glow); }

.upload-icon { font-size: 32px; margin-bottom: 12px; }
.upload-title { font-size: 0.875rem; color: var(--text); margin-bottom: 4px; }
.upload-sub { font-size: 0.75rem; color: var(--text-3); }

.upload-preview {
  display: none; position: relative;
  border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 1; max-width: 240px; margin: 0 auto;
}

.upload-preview img { width: 100%; height: 100%; object-fit: cover; }

.upload-preview .remove-img {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,0.7); border: none; color: white;
  border-radius: 50%; width: 28px; height: 28px;
  cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center;
}

.ipfs-status {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: var(--radius);
  background: var(--bg-3); border: 1px solid var(--border);
  font-size: 0.75rem; color: var(--text-2);
  margin-top: 8px;
}

.ipfs-status .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.ipfs-status.pending .dot { background: var(--text-3); }
.ipfs-status.uploading .dot { background: var(--accent); animation: pulse 1s infinite; }
.ipfs-status.done .dot { background: var(--green); }

/* ── PROFILE PAGE ── */
.profile-container { max-width: 1100px; margin: 0 auto; padding: 40px 32px; }

.profile-header {
  display: flex; align-items: flex-start; gap: 24px;
  margin-bottom: 40px; padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.profile-avatar {
  width: 72px; height: 72px; border-radius: 2px;
  background: var(--accent);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; flex-shrink: 0; color: var(--bg);
}

.profile-info { flex: 1; }

.profile-address {
  font-size: 0.875rem; color: var(--text-2);
  margin-bottom: 6px;
}

.profile-address span {
  padding: 3px 8px; background: var(--bg-3);
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 0.75rem;
}

.profile-name {
  font-size: 1.25rem; font-weight: 600;
  margin-bottom: 8px;
}

.profile-stats {
  display: flex; gap: 32px; margin-top: 16px;
}

.profile-stat-value {
  font-size: 1.25rem; font-weight: 600; color: var(--text);
}
.profile-stat-label { font-size: 0.75rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }

/* ── ADMIN PAGE ── */
.admin-container { max-width: 1100px; margin: 0 auto; padding: 40px 32px; }

.admin-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem; margin-bottom: 40px;
}

.admin-stat-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
}

.admin-stat-label { font-size: 0.75rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.admin-stat-value {
  font-size: 1.5rem; font-weight: 600;
}
.admin-stat-value.green { color: var(--green); }
.admin-stat-value.amber { color: var(--amber); }
.admin-stat-value.red { color: var(--red); }

.admin-table-wrap {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  margin-bottom: 32px;
}

.admin-table-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}

.admin-table-title {
  font-size: 0.875rem; font-weight: 600;
}

table { width: 100%; border-collapse: collapse; }

th {
  padding: 0.5rem 1rem; text-align: left;
  font-size: 0.75rem; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

td {
  padding: 0.75rem 1rem; font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-3); }

td.mono { font-size: 0.75rem; }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: var(--radius);
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
  font-weight: 500;
}
.badge-active { background: rgba(16,185,129,0.1); color: var(--green); border: 1px solid rgba(16,185,129,0.3); }
.badge-pending { background: rgba(0,191,165,0.1); color: var(--accent); border: 1px solid rgba(0,191,165,0.3); }
.badge-removed { background: rgba(239,68,68,0.1); color: var(--red); border: 1px solid rgba(239,68,68,0.3); }

/* ── WALLET CONNECT BANNER ── */
.wallet-banner {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  text-align: center; margin: 48px auto;
  max-width: 440px;
}

.wallet-banner-icon { font-size: 36px; margin-bottom: 16px; }
.wallet-banner h3 {
  font-size: 1.125rem; font-weight: 600; margin-bottom: 8px;
}
.wallet-banner p { font-size: 0.875rem; color: var(--text-2); margin-bottom: 24px; line-height: 1.6; }

/* ── TOAST ── */
.toast-container {
  position: fixed; top: 1.5rem; right: 1.5rem; z-index: 500;
  display: flex; flex-direction: column; gap: 8px;
}

.toast {
  padding: 1rem; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--border);
  font-size: 0.875rem; color: var(--text);
  animation: toast-in 200ms ease;
  display: flex; align-items: center; gap: 10px;
  min-width: 280px; max-width: 360px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

.toast.success { border-color: rgba(16,185,129,0.4); }
.toast.error   { border-color: rgba(239,68,68,0.4); }
.toast .toast-icon { font-size: 16px; flex-shrink: 0; }

/* ── FOOTER ── */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 24px 32px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}

.footer-left { font-size: 0.75rem; color: var(--text-3); }
.footer-left strong { color: var(--text-2); }

.footer-links { display: flex; gap: 20px; }
.footer-link { font-size: 0.75rem; color: var(--text-3); cursor: pointer; transition: color var(--transition); text-decoration: none; }
.footer-link:hover { color: var(--accent); }

/* ── WALLET STATUS ── */
.wallet-status {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg-2);
  font-size: 0.75rem; color: var(--text-2); cursor: pointer;
  transition: all var(--transition);
}
.wallet-status:hover { border-color: var(--text-2); color: var(--text); }
.wallet-status .ws-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center; padding: 64px 32px;
  color: var(--text-3);
}
.empty-state-icon { font-size: 40px; margin-bottom: 16px; }
.empty-state h3 { font-size: 1rem; color: var(--text-2); margin-bottom: 8px; }
.empty-state p { font-size: 0.875rem; max-width: 300px; margin: 0 auto; line-height: 1.6; }

/* ── RESPONSIVE ── */
@media (max-width: 680px) {
  nav { padding: 0 16px; }
  .nav-links { display: none; }
  .hero { padding: 48px 16px 40px; }
  .section { padding: 0 16px 48px; }
  .modal { grid-template-columns: 1fr; }
  .modal-image { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .hero-stats { gap: 28px; }
  .profile-header { flex-direction: column; }
  .mint-container { padding: 32px 16px; }
  .toast-container { right: 1rem; left: 1rem; }
  .toast { min-width: 0; max-width: none; }
}
