/* ── Star field ──────────────────────────────────────────────────── */
    #starfield {
      position: fixed; inset: 0; pointer-events: none; z-index: 0;
      background:
        radial-gradient(ellipse at 20% 20%, rgba(139,92,246,0.16) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 75%, rgba(34,211,238,0.10) 0%, transparent 55%),
        #080a2e;
    }
    #starfield canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

    /* ── Page shell ──────────────────────────────────────────────────── */
    .db-wrap { position: relative; z-index: 1; min-height: 100vh; padding-bottom: 100px; }

    /* ── Sticky top bar ──────────────────────────────────────────────── */
    .db-topbar {
      position: sticky; top: 0; z-index: 60;
      background: rgba(8,10,46,0.88);
      backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
      border-bottom: 1px solid rgba(139,92,246,0.18);
      padding: 10px 28px;
      display: flex; align-items: center; gap: 14px;
    }
    .db-topbar-logo {
      font-size: 0.92rem; font-weight: 900; white-space: nowrap;
      background: linear-gradient(135deg,#8b5cf6,#22d3ee);
      -webkit-background-clip: text; -webkit-text-fill-color: transparent;
      background-clip: text;
    }
    .db-topbar-sep { width: 1px; height: 28px; background: rgba(139,92,246,0.2); flex-shrink: 0; }
    .db-topbar-wallet {
      background: rgba(139,92,246,0.12);
      border: 1px solid rgba(139,92,246,0.28);
      border-radius: 9px; padding: 5px 12px;
      font-size: 0.75rem; color: #a5b4fc;
      display: flex; align-items: center; gap: 7px;
      cursor: pointer; transition: border-color 0.2s;
    }
    .db-topbar-wallet:hover { border-color: rgba(139,92,246,0.55); }
    .db-topbar-wallet-dot {
      width: 7px; height: 7px; border-radius: 50%;
      background: #34d399;
      animation: livePulse 2s ease-in-out infinite;
    }
    @keyframes livePulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.45;transform:scale(0.85)} }
    .db-topbar-xrp {
      font-size: 0.78rem; font-weight: 700; color: #22d3ee;
      background: rgba(34,211,238,0.1); border: 1px solid rgba(34,211,238,0.2);
      border-radius: 8px; padding: 4px 10px; white-space: nowrap;
    }
    .db-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
    .db-btn {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 7px 16px; border-radius: 10px; font-size: 0.78rem; font-weight: 700;
      text-decoration: none; cursor: pointer; transition: all 0.2s; border: none;
    }
    .db-btn-ghost {
      background: rgba(255,255,255,0.06); color: #c8c7e0;
      border: 1px solid rgba(255,255,255,0.1);
    }
    .db-btn-ghost:hover { background: rgba(139,92,246,0.15); color: #f0f1ff; border-color: rgba(139,92,246,0.4); }
    .db-btn-primary {
      background: linear-gradient(135deg,#8b5cf6,#6d28d9); color: #fff;
      box-shadow: 0 4px 14px rgba(139,92,246,0.3);
    }
    .db-btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); color: #fff; }

    /* ── Hero section ────────────────────────────────────────────────── */
    .db-hero {
      padding: 44px 28px 28px;
      background: radial-gradient(ellipse at 50% 0%, rgba(139,92,246,0.22) 0%, transparent 70%);
    }
    .db-hero-greeting {
      font-size: 1.9rem; font-weight: 900; line-height: 1.2; margin-bottom: 5px; color: #f0f1ff;
    }
    .db-hero-greeting em {
      font-style: normal;
      background: linear-gradient(135deg,#8b5cf6,#22d3ee);
      -webkit-background-clip: text; -webkit-text-fill-color: transparent;
      background-clip: text;
    }
    .db-hero-sub { color: #8b89b8; font-size: 0.88rem; margin-bottom: 28px; }

    /* ── KPI grid ────────────────────────────────────────────────────── */
    .kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
    @media(max-width:900px){ .kpi-grid { grid-template-columns: repeat(2,1fr); } }
    @media(max-width:480px){ .kpi-grid { grid-template-columns: 1fr 1fr; } }

    .kpi-card {
      border-radius: 18px; padding: 22px 24px;
      background: rgba(20,22,80,0.75);
      border: 1px solid rgba(139,92,246,0.22);
      position: relative; overflow: hidden;
      transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
      cursor: default;
    }
    .kpi-card::before {
      content: '';
      position: absolute; top: 0; left: 0; right: 0; height: 2px;
      background: linear-gradient(90deg, transparent, var(--kpi-accent, #8b5cf6), transparent);
    }
    .kpi-card::after {
      content: '';
      position: absolute; top: -20px; right: -20px;
      width: 90px; height: 90px; border-radius: 50%;
      background: var(--kpi-accent, #8b5cf6); opacity: 0.07;
    }
    .kpi-card:hover {
      transform: translateY(-5px);
      border-color: rgba(139,92,246,0.5);
      box-shadow: 0 14px 44px rgba(0,0,0,0.45), 0 0 22px rgba(139,92,246,0.18);
    }
    .kpi-icon { font-size: 1.6rem; margin-bottom: 10px; opacity: 0.8; }
    .kpi-val {
      font-size: 2rem; font-weight: 800; line-height: 1; margin-bottom: 5px;
      color: var(--kpi-accent, #f0f1ff);
    }
    .kpi-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: #8b89b8; font-weight: 600; }
    .kpi-delta { font-size: 0.78rem; font-weight: 600; margin-top: 7px; color: #8b89b8; }
    .kpi-delta.up { color: #34d399; }
    .kpi-delta.teal { color: #22d3ee; }

    /* count-up animation helper */
    .counting { animation: countPop 0.4s cubic-bezier(0.34,1.56,0.64,1); }
    @keyframes countPop { from{transform:scale(0.88);opacity:0.4} to{transform:scale(1);opacity:1} }

    /* ── Section wrapper ─────────────────────────────────────────────── */
    .db-section { padding: 28px 28px 0; }
    .db-section-last { padding-bottom: 28px; }
    .db-section-title {
      font-size: 1.05rem; font-weight: 800; color: #f0f1ff;
      display: flex; align-items: center; gap: 9px; margin-bottom: 18px;
    }
    .db-section-title .icon { font-size: 1.15rem; }
    .db-section-title .badge-new {
      font-size: 0.6rem; background: linear-gradient(135deg,#8b5cf6,#22d3ee);
      color: #fff; padding: 2px 8px; border-radius: 20px;
      text-transform: uppercase; letter-spacing: 0.08em;
    }
    .db-section-link {
      margin-left: auto; font-size: 0.8rem; color: #8b5cf6;
      text-decoration: none; font-weight: 600;
    }
    .db-section-link:hover { color: #a78bfa; }

    /* ── AI Studio ───────────────────────────────────────────────────── */
    .ai-studio-card {
      background: rgba(20,22,80,0.72);
      border: 1px solid rgba(139,92,246,0.28);
      border-radius: 20px; padding: 24px;
      position: relative; overflow: hidden; height: 100%;
    }
    .ai-studio-card::before {
      content: '';
      position: absolute; top: 0; left: 0; right: 0; height: 2px;
      background: linear-gradient(90deg,transparent,#8b5cf6,#22d3ee,transparent);
    }
    .ai-prompt {
      width: 100%; background: rgba(255,255,255,0.05);
      border: 1px solid rgba(139,92,246,0.25); border-radius: 12px;
      padding: 12px 16px; color: #f0f1ff; font-size: 0.9rem;
      resize: none; transition: border-color 0.22s;
      font-family: inherit;
    }
    .ai-prompt:focus { outline: none; border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139,92,246,0.18); }
    .ai-prompt::placeholder { color: #8b89b8; }
    .style-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
    .style-chip {
      background: rgba(255,255,255,0.07);
      border: 1px solid rgba(255,255,255,0.13);
      color: #8b89b8; border-radius: 20px; padding: 4px 13px;
      font-size: 0.78rem; cursor: pointer;
      transition: all 0.18s; user-select: none;
    }
    .style-chip:hover, .style-chip.active {
      background: rgba(139,92,246,0.22);
      border-color: #8b5cf6; color: #f0f1ff;
    }
    .ai-preview {
      position: relative; border-radius: 12px; overflow: hidden;
      aspect-ratio: 1/1; margin-top: 12px; max-width: 280px;
      background: rgba(255,255,255,0.04);
      border: 1px dashed rgba(139,92,246,0.3);
      display: flex; align-items: center; justify-content: center;
    }
    .ai-preview img { width: 100%; height: 100%; object-fit: cover; display: none; }
    .ai-preview-ph { color: #8b89b8; text-align: center; font-size: 0.82rem; padding: 20px; }
    .ai-preview-ph .ph-icon { font-size: 2.5rem; opacity: 0.3; margin-bottom: 8px; }
    .ai-overlay {
      position: absolute; inset: 0;
      background: rgba(8,10,46,0.82); display: none;
      align-items: center; justify-content: center;
      flex-direction: column; gap: 12px;
      color: #f0f1ff; font-weight: 600; font-size: 0.9rem;
    }
    .ai-spinner {
      width: 44px; height: 44px;
      border: 3px solid rgba(139,92,246,0.25);
      border-top-color: #8b5cf6; border-right-color: #22d3ee;
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
    .ai-generate-btn {
      width: 100%; margin-top: 10px; padding: 12px;
      border-radius: 12px; font-size: 0.88rem; font-weight: 700;
      background: linear-gradient(135deg,#8b5cf6,#22d3ee); border: none;
      color: #fff; cursor: pointer;
      transition: filter 0.18s, transform 0.18s;
    }
    .ai-generate-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
    .ai-use-btn {
      width: 100%; margin-top: 8px; padding: 10px;
      border-radius: 12px; font-size: 0.82rem; font-weight: 600;
      background: rgba(139,92,246,0.12);
      border: 1px solid rgba(139,92,246,0.35); color: #a78bfa;
      cursor: pointer; display: none; transition: all 0.18s;
    }
    .ai-use-btn:hover { background: rgba(139,92,246,0.25); color: #f0f1ff; }

    /* ── Collections grid ────────────────────────────────────────────── */
    .collections-card {
      background: rgba(20,22,80,0.72);
      border: 1px solid rgba(139,92,246,0.22);
      border-radius: 20px; padding: 24px; height: 100%;
    }
    .coll-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(140px, 180px));
      gap: 12px;
      justify-content: start;
    }
    .nft-thumb {
      border-radius: 14px; overflow: hidden;
      background: rgba(14,16,72,0.8);
      border: 1px solid rgba(139,92,246,0.16);
      cursor: pointer;
      transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
      position: relative;
      isolation: isolate; /* iter15: contain ::before/::after glow inside its own stacking context */
    }
    .nft-thumb > div { isolation: isolate; position: relative; z-index: 1; }
    .nft-thumb:hover {
      transform: translateY(-5px) scale(1.02);
      box-shadow: 0 12px 36px rgba(0,0,0,0.5), 0 0 18px rgba(139,92,246,0.22);
      border-color: rgba(139,92,246,0.5);
    }
    .nft-thumb-img {
      width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block;
      transition: transform 0.38s;
    }
    .nft-thumb:hover .nft-thumb-img { transform: scale(1.07); }
    .nft-thumb-overlay {
      position: absolute; inset: 0; background: rgba(8,10,46,0.7);
      display: flex; align-items: center; justify-content: center;
      gap: 8px; opacity: 0; transition: opacity 0.22s;
    }
    .nft-thumb:hover .nft-thumb-overlay { opacity: 1; }
    .nft-overlay-btn {
      background: rgba(139,92,246,0.8); border: none; border-radius: 8px;
      padding: 6px 10px; font-size: 0.72rem; font-weight: 700;
      color: #fff; cursor: pointer; transition: background 0.18s;
    }
    .nft-overlay-btn:hover { background: #8b5cf6; }
    .nft-overlay-btn.red { background: rgba(244,63,94,0.75); }
    .nft-overlay-btn.red:hover { background: #f43f5e; }
    .nft-count-badge {
      position: absolute; top: 6px; right: 6px;
      background: rgba(8,10,46,0.78); border-radius: 20px;
      padding: 2px 8px; font-size: 0.68rem; color: #f0f1ff; font-weight: 700;
    }
    .nft-thumb-name {
      padding: 8px 10px; font-size: 0.78rem; font-weight: 600; color: #f0f1ff;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .coll-empty {
      text-align: center; padding: 44px 0;
      background: rgba(20,22,80,0.4);
      border-radius: 14px; border: 1px dashed rgba(139,92,246,0.22);
    }
    .coll-empty-icon { font-size: 2.8rem; opacity: 0.3; margin-bottom: 10px; }
    .coll-empty-text { color: #8b89b8; font-size: 0.88rem; }
    .coll-empty-link { color: #8b5cf6; text-decoration: none; font-weight: 600; }

    /* ── Discovery carousel ──────────────────────────────────────────── */
    .discovery-card {
      background: rgba(20,22,80,0.72);
      border: 1px solid rgba(139,92,246,0.22);
      border-radius: 20px; padding: 20px;
    }
    .disc-scroll {
      display: flex; gap: 16px; overflow-x: auto;
      padding-bottom: 10px; scroll-snap-type: x mandatory;
      scroll-padding: 0;
    }
    .disc-scroll::-webkit-scrollbar { height: 3px; }
    .disc-scroll::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); }
    .disc-scroll::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.5); border-radius: 2px; }
    .disc-card {
      flex: 0 0 200px; scroll-snap-align: start;
      border-radius: 16px; overflow: hidden;
      background: rgba(14,16,72,0.85);
      border: 1px solid rgba(139,92,246,0.18);
      cursor: pointer; transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
    }
    .disc-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 14px 40px rgba(0,0,0,0.5), 0 0 20px rgba(139,92,246,0.2);
      border-color: rgba(139,92,246,0.5);
    }
    .disc-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
    .disc-card-body { padding: 12px 14px; }
    .disc-card-name { font-size: 0.86rem; font-weight: 700; color: #f0f1ff; }
    .disc-card-coll { font-size: 0.74rem; color: #8b89b8; margin-top: 2px; }
    .disc-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
    .disc-price { font-size: 0.84rem; font-weight: 700; color: #8b5cf6; }
    .disc-like {
      background: rgba(255,255,255,0.07); border: none; border-radius: 50%;
      width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
      color: #8b89b8; cursor: pointer; transition: all 0.18s; font-size: 0.75rem;
    }
    .disc-like:hover { background: rgba(244,63,94,0.22); color: #f43f5e; transform: scale(1.15); }
    .disc-like.liked { background: rgba(244,63,94,0.22); color: #f43f5e; }

    /* ── Analytics ───────────────────────────────────────────────────── */
    .analytics-card {
      background: rgba(20,22,80,0.72);
      border: 1px solid rgba(139,92,246,0.22);
      border-radius: 20px; padding: 24px;
    }
    .analytics-tabs { display: flex; gap: 4px; }
    .atab {
      padding: 5px 14px; border-radius: 8px;
      font-size: 0.78rem; font-weight: 600;
      color: #8b89b8; background: transparent;
      border: 1px solid transparent; cursor: pointer; transition: all 0.18s;
    }
    .atab:hover { color: #f0f1ff; border-color: rgba(139,92,246,0.3); }
    .atab.active { background: rgba(139,92,246,0.2); border-color: #8b5cf6; color: #8b5cf6; }
    .analytics-stats { display: flex; gap: 0; }
    .astat {
      flex: 1; text-align: center; padding: 16px 12px;
      border-right: 1px solid rgba(139,92,246,0.12);
    }
    .astat:last-child { border-right: none; }
    .astat-val { font-size: 1.25rem; font-weight: 800; margin-bottom: 3px; }
    .astat-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.07em; color: #8b89b8; font-weight: 600; }

    /* ── Management quick-actions ────────────────────────────────────── */
    .mgmt-card {
      background: rgba(20,22,80,0.72);
      border: 1px solid rgba(139,92,246,0.22);
      border-radius: 20px; padding: 24px;
    }
    .mgmt-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
    @media(max-width:600px){ .mgmt-grid { grid-template-columns: repeat(2,1fr); } }
    .mgmt-action {
      border-radius: 14px; padding: 18px 16px;
      background: rgba(14,16,72,0.7);
      border: 1px solid rgba(139,92,246,0.16);
      display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
      cursor: pointer; text-decoration: none;
      transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
    }
    .mgmt-action:hover {
      transform: translateY(-4px);
      box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 0 16px rgba(var(--ma-rgb,139,92,246),0.2);
      border-color: rgba(var(--ma-rgb,139,92,246),0.45);
    }
    .mgmt-action-icon {
      width: 40px; height: 40px; border-radius: 11px;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.1rem; flex-shrink: 0;
      background: rgba(var(--ma-rgb,139,92,246),0.18);
    }
    .mgmt-action-name { font-size: 0.82rem; font-weight: 700; color: #f0f1ff; }
    .mgmt-action-desc { font-size: 0.72rem; color: #8b89b8; line-height: 1.4; }
    .mgmt-cta {
      display: inline-flex; align-items: center; gap: 8px;
      margin-top: 16px; padding: 12px 24px; border-radius: 12px;
      background: linear-gradient(135deg,#8b5cf6,#6d28d9);
      color: #fff; font-size: 0.88rem; font-weight: 700;
      text-decoration: none; transition: filter 0.18s, transform 0.18s;
      box-shadow: 0 4px 16px rgba(139,92,246,0.3);
    }
    .mgmt-cta:hover { filter: brightness(1.12); transform: translateY(-1px); color: #fff; }

    /* ── Community feed ──────────────────────────────────────────────── */
    .feed-card {
      background: rgba(20,22,80,0.72);
      border: 1px solid rgba(139,92,246,0.22);
      border-radius: 20px; padding: 24px;
    }
    .feed-item {
      display: flex; gap: 12px; padding: 13px 0;
      border-bottom: 1px solid rgba(139,92,246,0.1);
      transition: padding-left 0.2s;
    }
    .feed-item:last-child { border-bottom: none; }
    .feed-item:hover { padding-left: 6px; }
    .feed-avatar {
      width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%;
      background: var(--av-grad, linear-gradient(135deg,#8b5cf6,#22d3ee));
      display: flex; align-items: center; justify-content: center;
      font-weight: 800; font-size: 0.88rem; color: #fff;
    }
    .feed-user { font-size: 0.84rem; font-weight: 700; color: #8b5cf6; }
    .feed-msg  { font-size: 0.82rem; color: #c8c7e0; margin-top: 2px; line-height: 1.45; }
    .feed-time { font-size: 0.72rem; color: #8b89b8; margin-top: 4px; }

    /* ── Floating Action Bar ─────────────────────────────────────────── */
    .fab-wrap {
      position: fixed; bottom: 28px; left: 50%;
      transform: translateX(-50%);
      z-index: 90;
      background: rgba(14,16,72,0.94);
      backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
      border: 1px solid rgba(139,92,246,0.32);
      border-radius: 40px; padding: 8px 18px;
      display: flex; align-items: center; gap: 8px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 0 24px rgba(139,92,246,0.14);
    }
    .fab-btn {
      background: rgba(255,255,255,0.07);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 22px; padding: 7px 15px;
      color: #c8c7e0; font-size: 0.8rem; font-weight: 600;
      cursor: pointer; transition: all 0.18s;
      display: flex; align-items: center; gap: 5px;
      text-decoration: none;
    }
    .fab-btn:hover { background: rgba(139,92,246,0.2); color: #f0f1ff; border-color: rgba(139,92,246,0.45); }
    .fab-btn.fab-primary {
      background: linear-gradient(135deg,#8b5cf6,#6d28d9); color: #fff; border-color: transparent;
      box-shadow: 0 4px 14px rgba(139,92,246,0.35);
    }
    .fab-btn.fab-primary:hover { filter: brightness(1.12); color: #fff; }
    .fab-sep { width: 1px; height: 22px; background: rgba(255,255,255,0.1); }

    /* ── Toast notifications ─────────────────────────────────────────── */
    #toast-container {
      position: fixed; bottom: 80px; right: 24px;
      z-index: 9999; display: flex; flex-direction: column; gap: 8px;
      pointer-events: none;
    }
    .toast-item {
      background: rgba(14,16,72,0.97);
      border: 1px solid rgba(139,92,246,0.4);
      border-radius: 12px; padding: 12px 18px;
      color: #f0f1ff; font-size: 0.85rem;
      display: flex; align-items: center; gap: 10px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.5);
      animation: toastIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
      max-width: 320px; pointer-events: auto;
      transition: opacity 0.4s;
    }
    @keyframes toastIn { from{transform:translateX(110%);opacity:0} to{transform:translateX(0);opacity:1} }
    .toast-item.success { border-color: rgba(52,211,153,0.5); }
    .toast-item.danger  { border-color: rgba(244,63,94,0.5); }
    .toast-item.warning { border-color: rgba(251,191,36,0.5); }

    /* ── Card fade-in on scroll ──────────────────────────────────────── */
    /* v13 fix: use a CSS-only auto-fade so content is visible even if the
       IntersectionObserver never fires (earlier JS errors used to leave
       the entire collections grid stuck at opacity:0, hiding all NFTs). */
    .fade-in {
      opacity: 0;
      transform: translateY(18px);
      animation: fadeInAuto 0.6s ease-out 0.15s both;
      transition: opacity 0.5s, transform 0.5s;
    }
    .fade-in.visible { opacity: 1; transform: translateY(0); animation: none; }
    @keyframes fadeInAuto {
      from { opacity: 0; transform: translateY(18px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    /* Hard safety: after 1.5s, guarantee visibility even if animation is disabled */
    @media (prefers-reduced-motion: reduce) {
      .fade-in { opacity: 1 !important; transform: none !important; animation: none !important; }
    }

    /* ── Responsive helpers ──────────────────────────────────────────── */
    @media(max-width:768px) {
      .db-hero-greeting { font-size: 1.4rem; }
      .kpi-val { font-size: 1.6rem; }
      .db-2col { flex-direction: column; }
      .db-topbar-xrp { display: none; }
    }
    .db-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    @media(max-width:900px){ .db-2col { grid-template-columns: 1fr; } }

    /* ═══════════════════════════════════════════════════════════════════ */
    /* ENHANCED COLLECTION GRID — Award-worthy polish                     */
    /* ═══════════════════════════════════════════════════════════════════ */

    /* Collection card glow on hover */
    .nft-thumb::before {
      content: '';
      position: absolute; inset: -1px; border-radius: 14px;
      background: linear-gradient(135deg, transparent, rgba(139,92,246,0.25), rgba(34,211,238,0.15), transparent);
      opacity: 0; transition: opacity 0.35s; z-index: 0;
    }
    .nft-thumb:hover::before { opacity: 1; }

    /* Rarity shimmer animation on hover */
    .nft-thumb::after {
      content: '';
      position: absolute; top: 0; left: -100%;
      width: 80%; height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), rgba(139,92,246,0.08), transparent);
      transition: none; z-index: 1; pointer-events: none;
    }
    .nft-thumb:hover::after {
      animation: thumbShimmer 0.8s ease-out forwards;
    }
    @keyframes thumbShimmer {
      from { left: -100%; }
      to { left: 120%; }
    }

    /* NFT name gradient on hover */
    .nft-thumb:hover .nft-thumb-name {
      background: linear-gradient(90deg, #f0f1ff, #a78bfa);
      -webkit-background-clip: text; -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    /* ── Loading skeletons ─────────────────────────────────────────── */
    .skeleton-card {
      border-radius: 14px;
      overflow: hidden;
      background: rgba(14,16,72,0.8);
      border: 1px solid rgba(139,92,246,0.1);
    }
    .skeleton-img {
      width: 100%; aspect-ratio: 1/1;
      background: linear-gradient(110deg, rgba(20,22,80,0.9) 30%, rgba(139,92,246,0.08) 50%, rgba(20,22,80,0.9) 70%);
      background-size: 200% 100%;
      animation: skeletonPulse 1.6s ease-in-out infinite;
    }
    .skeleton-text {
      height: 12px; margin: 10px; border-radius: 6px;
      background: linear-gradient(110deg, rgba(20,22,80,0.9) 30%, rgba(139,92,246,0.08) 50%, rgba(20,22,80,0.9) 70%);
      background-size: 200% 100%;
      animation: skeletonPulse 1.6s ease-in-out infinite;
    }
    .skeleton-text.short { width: 55%; }
    @keyframes skeletonPulse {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }

    /* ── Enhanced empty state ─────────────────────────────────────── */
    .coll-empty {
      text-align: center; padding: 56px 24px;
      background: rgba(20,22,80,0.3);
      border-radius: 18px;
      border: 1px dashed rgba(139,92,246,0.2);
      position: relative; overflow: hidden;
    }
    .coll-empty::before {
      content: '';
      position: absolute; inset: 0;
      background: radial-gradient(ellipse at center, rgba(139,92,246,0.06) 0%, transparent 70%);
      pointer-events: none;
    }
    .coll-empty-icon {
      font-size: 3.4rem; opacity: 0.25; margin-bottom: 12px;
      filter: grayscale(0.4);
      animation: emptyFloat 3s ease-in-out infinite;
    }
    @keyframes emptyFloat {
      0%,100% { transform: translateY(0); }
      50% { transform: translateY(-8px); }
    }
    .coll-empty-text {
      color: #8b89b8; font-size: 0.92rem; line-height: 1.6;
    }
    .coll-empty-link {
      color: #8b5cf6; text-decoration: none; font-weight: 700;
      display: inline-flex; align-items: center; gap: 6px;
      padding: 10px 22px; border-radius: 12px; margin-top: 14px;
      background: rgba(139,92,246,0.1);
      border: 1px solid rgba(139,92,246,0.25);
      transition: all 0.25s;
    }
    .coll-empty-link:hover {
      background: rgba(139,92,246,0.2);
      border-color: rgba(139,92,246,0.5);
      color: #a78bfa;
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(139,92,246,0.15);
    }

    /* ── Discovery card micro-interactions ─────────────────────────── */
    .disc-card {
      position: relative;
    }
    .disc-card img {
      transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
    }
    .disc-card:hover img {
      transform: scale(1.08);
    }
    .disc-card::before {
      content: '';
      position: absolute; bottom: 0; left: 0; right: 0; height: 50%;
      background: linear-gradient(to top, rgba(8,10,46,0.7), transparent);
      z-index: 1; pointer-events: none; opacity: 0;
      transition: opacity 0.3s;
    }
    .disc-card:hover::before { opacity: 1; }

    /* Price highlight animation */
    .disc-card:hover .disc-price {
      color: #a78bfa;
      text-shadow: 0 0 12px rgba(139,92,246,0.4);
    }

    /* ── Stagger animation for grid items ──────────────────────────── */
    .nft-thumb, .disc-card {
      animation: gridItemIn 0.45s cubic-bezier(0.34,1.56,0.64,1) backwards;
    }
    .nft-thumb:nth-child(1), .disc-card:nth-child(1) { animation-delay: 0.05s; }
    .nft-thumb:nth-child(2), .disc-card:nth-child(2) { animation-delay: 0.1s; }
    .nft-thumb:nth-child(3), .disc-card:nth-child(3) { animation-delay: 0.15s; }
    .nft-thumb:nth-child(4), .disc-card:nth-child(4) { animation-delay: 0.2s; }
    .nft-thumb:nth-child(5), .disc-card:nth-child(5) { animation-delay: 0.25s; }
    .nft-thumb:nth-child(6), .disc-card:nth-child(6) { animation-delay: 0.3s; }
    .nft-thumb:nth-child(7) { animation-delay: 0.35s; }
    .nft-thumb:nth-child(8) { animation-delay: 0.4s; }
    @keyframes gridItemIn {
      from { opacity: 0; transform: translateY(20px) scale(0.95); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }

    /* ── KPI card pulse on data load ───────────────────────────────── */
    .kpi-card.loaded {
      animation: kpiPop 0.4s cubic-bezier(0.34,1.56,0.64,1);
    }
    @keyframes kpiPop {
      0% { transform: scale(0.96); opacity: 0.7; }
      50% { transform: scale(1.02); }
      100% { transform: scale(1); opacity: 1; }
    }

    /* ── Modal backdrop blur ───────────────────────────────────────── */
    .modal-backdrop.show {
      backdrop-filter: blur(8px) !important;
      -webkit-backdrop-filter: blur(8px) !important;
    }

    /* ── Enhanced scrollbar for all sections ───────────────────────── */
    ::-webkit-scrollbar { width: 6px; height: 6px; }
    ::-webkit-scrollbar-track { background: rgba(8,10,46,0.4); }
    ::-webkit-scrollbar-thumb {
      background: rgba(139,92,246,0.35); border-radius: 3px;
    }
    ::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,0.55); }

    /* ── Wallet selector cosmic styling ────────────────────────────── */
    .db-topbar select.wallet-selector,
    select.cosmic-select {
      background: rgba(14,16,72,0.85) !important;
      border: 1px solid rgba(139,92,246,0.3) !important;
      border-radius: 10px !important;
      color: #a5b4fc !important;
      font-size: 0.78rem !important;
      font-weight: 600;
      padding: 6px 32px 6px 12px !important;
      transition: border-color 0.25s, box-shadow 0.25s;
      cursor: pointer;
    }
    select.cosmic-select:hover,
    select.cosmic-select:focus {
      border-color: rgba(139,92,246,0.6) !important;
      box-shadow: 0 0 0 3px rgba(139,92,246,0.12), 0 4px 16px rgba(139,92,246,0.1) !important;
      outline: none;
    }
    select.cosmic-select option {
      background: #0e1048;
      color: #c8c7e0;
    }

    /* ── Section title badge pulse ─────────────────────────────────── */
    .db-section-title .badge-new {
      animation: badgePulse 2s ease-in-out infinite;
    }
    @keyframes badgePulse {
      0%,100% { box-shadow: 0 0 0 0 rgba(139,92,246,0.4); }
      50% { box-shadow: 0 0 0 6px rgba(139,92,246,0); }
    }
