:root {
--primary: #7c3aed;
--primary-hover: #6d28d9;
--primary-glow: rgba(124,58,237,0.25);
--bg: #0a0a1a;
--bg-card: rgba(20,20,40,0.95);
--bg-card-hover: rgba(30,30,55,0.98);
--bg-surface: rgba(25,25,50,0.9);
--border: rgba(255,255,255,0.08);
--border-hover: rgba(124,58,237,0.4);
--text: #ffffff;
--text-muted: #9ca3af;
--text-dim: #94a3b8;
--success: #10b981;
--danger: #ef4444;
--warning: #f59e0b;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
@media (min-width:769px) { #mpHeaderTarget { position:sticky; top:0; z-index:100; } }
body {
font-family: 'Inter', -apple-system, sans-serif;
background: var(--bg);
color: var(--text);
min-height: 100vh;
overflow-x: hidden;
opacity: 0;
}
body.ready { opacity: 1; transition: opacity 0.15s ease-in; }
body::before {
content: '';
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
background: radial-gradient(ellipse at 50% 0%, rgba(124,58,237,0.08) 0%, transparent 60%);
pointer-events: none;
z-index: 0;
}

/* Controls Bar */
.controls-bar {
display: flex; align-items: center; justify-content: space-between; gap: 16px;
padding: 16px 24px 8px;
position: sticky; top: var(--mp-header-h, 0px); z-index: 50;
background: var(--bg, #0a0a1a);
}
.controls-left { display: flex; align-items: center; gap: 10px; flex:1; min-width:0; }
.section-title { font-size: 1.1rem; font-weight: 700; }
.collection-count { font-size: 0.8rem; color: var(--text-muted); }
.controls-right { display: flex; align-items: center; gap: 10px; }
.sort-select {
padding: 6px 28px 6px 10px; background: #1a1a2e; border: 1px solid var(--border);
border-radius: 8px; color: var(--text); font-size: 0.8rem; outline: none; cursor: pointer;
appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
background-repeat: no-repeat; background-position: right 8px center;
}
.sort-select:focus { border-color: var(--primary); }
.sort-select option { background: #1a1a2e; color: #fff; }
.table-search { position: relative; flex: 1; min-width: 0; }
.table-search input {
padding: 6px 30px 6px 32px; background: #1a1a2e; border: 1px solid var(--border);
border-radius: 8px; color: var(--text); font-size: 0.8rem; font-family: inherit;
outline: none; width: 100%; transition: all 0.2s;
}
.table-search input:focus { border-color: var(--primary); }
.table-search input::placeholder { color: var(--text-muted); }
.table-search .search-icon {
position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
color: var(--text-muted); pointer-events: none;
}
.table-search .search-clear {
position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
background: none; border: none; color: var(--text-muted); cursor: pointer;
font-size: 0.75rem; padding: 2px 4px; display: none; font-family: inherit;
}
.table-search .search-clear.visible { display: block; }
.fav-btn {
display: flex; align-items: center; gap: 5px;
padding: 6px 12px; background: rgba(255,255,255,0.06); border: 1px solid var(--border);
border-radius: 8px; color: var(--text); font-size: 0.8rem; font-weight: 500;
cursor: pointer; transition: all 0.15s;
}
.fav-btn:hover { border-color: #fbbf24; color: #fbbf24; }
.fav-btn.active { background: rgba(251,191,36,0.12); border-color: #fbbf24; color: #fbbf24; }
.fav-btn svg { width: 14px; height: 14px; }
.inv-btn {
display: flex; align-items: center; gap: 5px;
padding: 6px 12px; background: rgba(255,255,255,0.06); border: 1px solid var(--border);
border-radius: 8px; color: var(--text); font-size: 0.8rem; font-weight: 500;
cursor: pointer; transition: all 0.15s; flex-shrink:0;
}
.inv-btn:hover { background: rgba(255,255,255,0.06); border-color: rgba(124,58,237,0.4); color: #e2e8f0; }
.inv-btn.active { background: #7c3aed; border-color: #7c3aed; color: white; box-shadow: 0 0 8px rgba(124,58,237,0.3); }
.inv-btn svg { width: 14px; height: 14px; }

/* Hero Carousel */
/* Cap the carousel at 1920px (the recommended hero-banner width) so on
   ultrawide monitors a 1920×320 upload doesn't get scaled-up to fill the
   wider slot, which was forcing a vertical centre-crop. Centred horizontally
   so the dark page background bleeds out to either edge instead of stretching
   the image. */
.hero-carousel { position: relative; z-index: 1; width: 100%; max-width: 1920px; margin: 0 auto; max-height: 340px; overflow: hidden; touch-action: pan-y pinch-zoom; }
.hero-track { display: flex; transition: transform 0.5s ease; width: 100%; }
.hero-slide { min-width: 100%; position: relative; cursor: pointer; height: 320px; overflow: hidden; }
/* brightness(0.9) lets the banner artwork show almost at full colour while
   still taking a hair off to unify bright uploads with the dark site chrome.
   Text legibility on the left comes from .hero-slide-overlay's gradient, so
   the image itself can stay bright. */
.hero-slide-bg { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.9); transition: transform 0.4s; }
.hero-slide-bg-mobile { display: none; }
.hero-slide:hover .hero-slide-bg { transform: scale(1.03); }
.hero-slide-overlay {
position: absolute; inset: 0;
background: linear-gradient(to right, rgba(10,10,26,0.95) 0%, rgba(10,10,26,0.5) 45%, transparent 100%);
display: flex; align-items: center; padding: 0 48px;
}
.hero-slide-content { max-width: 480px; }
.hero-slide-logo { width: 56px; height: 56px; border-radius: 12px; border: 2px solid rgba(255,255,255,0.15); object-fit: cover; margin-bottom: 12px; }
.hero-slide-name { font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; line-height: 1.2; }
.hero-slide-stats { display: flex; gap: 24px; margin-bottom: 16px; }
.hero-slide-stat .label { font-size: 0.65rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.hero-slide-stat .value { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.hero-cta {
padding: 10px 24px; background: linear-gradient(135deg, var(--primary), #6d28d9);
border: none; border-radius: 10px; color: white; font-size: 0.85rem;
font-weight: 700; cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.hero-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 20px var(--primary-glow); }
.hero-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.hero-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.3); cursor: pointer; transition: all 0.25s; }
.hero-dot.active { background: var(--primary); width: 24px; border-radius: 4px; }
.hero-featured-label { display: none; position: absolute; bottom: 12px; right: 14px; z-index: 3; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: rgba(255,255,255,0.7); background: rgba(0,0,0,0.45); backdrop-filter: blur(6px); padding: 3px 8px; border-radius: 6px; align-items: center; gap: 4px; }
.hero-hint { display: none; position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); z-index: 3; font-size: 0.6rem; color: rgba(255,255,255,0.4); animation: hintFade 3s ease forwards; pointer-events: none; }
@keyframes hintFade { 0% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
.hero-arrow {
position: absolute; bottom: 16px; z-index: 3;
background: rgba(0,0,0,0.4); backdrop-filter: blur(8px);
border: 1px solid rgba(255,255,255,0.1); border-radius: 50%;
width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
cursor: pointer; color: white; opacity: 0; transition: opacity 0.2s;
}
.hero-carousel:hover .hero-arrow { opacity: 1; }
.hero-arrow:hover { background: rgba(124,58,237,0.5); }
.hero-prev { left: 16px; }
.hero-next { right: 16px; }

/* Featured Strip (fallback for featured without banners) */
.featured-strip { padding: 16px 24px 4px; position: relative; z-index: 1; }
.featured-strip-label { font-size: 0.7rem; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.featured-strip-label svg { color: #fbbf24; }
.featured-strip-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.featured-strip-scroll::-webkit-scrollbar { height: 3px; }
.featured-strip-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }
.fstrip-card {
flex: 0 0 140px; scroll-snap-align: start; cursor: pointer;
background: var(--bg-card); border: 1px solid rgba(251,191,36,0.12); border-radius: 10px;
overflow: hidden; transition: all 0.2s;
}
.fstrip-card:hover { transform: translateY(-2px); border-color: rgba(251,191,36,0.3); }
.fstrip-card-img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.fstrip-card-info { padding: 8px 10px; }
.fstrip-card-name { font-size: 0.75rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fstrip-card-floor { font-size: 0.65rem; color: var(--text-muted); margin-top: 2px; display: flex; align-items: center; gap: 3px; }

/* Live Now Section */
.live-now-section { padding: 20px 24px 8px; position: relative; z-index: 1; }
.live-now-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.live-now-label { font-size: 0.85rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.live-now-label .live-dot { width: 8px; height: 8px; background: #e53e3e; border-radius: 50%; animation: livePulseBadge 1.5s infinite; }
@keyframes livePulseBadge { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.live-now-scroll { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.live-now-scroll::-webkit-scrollbar { height: 3px; }
.live-now-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }
.live-now-card {
flex: 0 0 280px; scroll-snap-align: start; cursor: pointer;
background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
overflow: hidden; transition: all 0.2s; position: relative;
}
.live-now-card:hover { transform: translateY(-2px); border-color: rgba(229,62,62,0.4); box-shadow: 0 4px 16px rgba(229,62,62,0.1); }
.live-now-card .live-card-thumb {
width: 100%; aspect-ratio: 16/9; background: #111; display: flex;
align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.live-now-card .live-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.live-now-card .live-card-thumb .live-overlay {
position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; align-items: center;
}
.live-now-card .live-tag {
background: #e53e3e; color: #fff; font-size: 10px; font-weight: 700;
padding: 3px 8px; border-radius: 4px; display: flex; align-items: center; gap: 4px;
}
.live-now-card .live-tag::before {
content: ''; width: 6px; height: 6px; background: #fff; border-radius: 50%;
animation: livePulseBadge 1.5s infinite;
}
.live-now-card .live-viewers {
background: rgba(0,0,0,0.7); color: #fff; font-size: 10px; font-weight: 600;
padding: 3px 8px; border-radius: 4px; display: flex; align-items: center; gap: 4px;
}
.live-now-card .live-card-info { padding: 10px 12px; }
.live-now-card .live-card-title { font-size: 0.8rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.live-now-card .live-card-collection { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Trending Section */
.trending-section { padding: 20px 24px 8px; position: relative; z-index: 1; }
.trending-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.trending-label { font-size: 0.85rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.trending-scroll { overflow: hidden; position: relative; -webkit-overflow-scrolling: touch; }
@keyframes trendScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.trending-track { animation: trendScroll 30s linear infinite; }
.trending-scroll:hover .trending-track { animation-play-state: paused; }
.trending-scroll::-webkit-scrollbar { height: 3px; }
.trending-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }
.trending-track { display: flex; gap: 14px; width: max-content; }
.trend-card {
flex: 0 0 270px; cursor: pointer;
background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
overflow: hidden; transition: all 0.2s;
display: flex; gap: 12px; padding: 12px; align-items: center;
}
.trend-card:hover { transform: translateY(-2px); border-color: var(--border-hover); box-shadow: 0 8px 24px rgba(124,58,237,0.1); }
.trend-rank { font-size: 0.75rem; font-weight: 800; color: var(--text-dim); min-width: 18px; text-align: center; }
.trend-rank.top3 { color: #fbbf24; }
.trend-logo { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: rgba(255,255,255,0.03); }
.trend-info { flex: 1; min-width: 0; }
.trend-name { font-size: 0.82rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trend-stats { display: flex; gap: 10px; margin-top: 4px; }
.trend-stat { font-size: 0.7rem; color: var(--text-muted); display: flex; align-items: center; gap: 2px; }
.trend-stat .label { color: var(--text-dim); margin-right: 2px; }

/* Voting Banner */
.voting-banner { padding: 20px 24px 8px; position: relative; z-index: 1; }
.voting-banner-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.voting-banner-label { font-size: 0.85rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.voting-banner-link { font-size: 0.78rem; font-weight: 600; color: #fbbf24; text-decoration: none; transition: opacity 0.15s; }
.voting-banner-link:hover { opacity: 0.8; }
.voting-banner-scroll { display: flex; overflow: hidden; padding-bottom: 8px; position: relative; mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%); -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%); }
.voting-banner-track { display: flex; gap: 14px; animation: voteScroll var(--vote-scroll-duration, 60s) linear infinite; }
.voting-banner-scroll:hover .voting-banner-track { animation-play-state: paused; }
@keyframes voteScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.vbanner-card {
flex: 0 0 220px; scroll-snap-align: start; cursor: pointer;
background: var(--bg-card); border: 1px solid rgba(251,191,36,0.12); border-radius: 14px;
overflow: hidden; transition: all 0.2s; position: relative;
}
.vbanner-card:hover { transform: translateY(-2px); border-color: rgba(251,191,36,0.3); box-shadow: 0 8px 24px rgba(251,191,36,0.08); }
.vbanner-card-img { width: 100%; aspect-ratio: 1.2; object-fit: cover; display: block; }
.vbanner-card-info { padding: 10px 12px; }
.vbanner-card-name { font-size: 0.8rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.vbanner-card-votes { font-size: 0.7rem; color: #fbbf24; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.vbanner-card-votes svg { width: 12px; height: 12px; }
.vbanner-vote-btn {
position: absolute; top: 8px; right: 8px;
background: rgba(124,58,237,0.9); backdrop-filter: blur(8px);
border: none; border-radius: 8px; padding: 5px 10px;
font-size: 0.68rem; font-weight: 700; color: white;
cursor: pointer; transition: all 0.15s; font-family: inherit;
display: flex; align-items: center; gap: 4px;
}
.vbanner-vote-btn:hover { background: var(--primary); transform: scale(1.05); }
.vbanner-vote-btn.voted { background: rgba(251,191,36,0.85); pointer-events: none; }
.vbanner-vote-btn svg { width: 10px; height: 10px; }

/* Time Pills */
.time-pills { display: flex; background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.time-pill { padding: 6px 12px; background: none; border: none; color: var(--text-muted); font-size: 0.78rem; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.15s; }
.time-pill.active { background: #7c3aed; color: white; box-shadow: 0 0 8px rgba(124,58,237,0.3); }
.time-pill:hover:not(.active) { color: #e2e8f0; background: rgba(255,255,255,0.06); }
.time-period-select { display: none; }

/* Price Mode Toggle */
.price-mode-toggle { display: flex; background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.price-mode-toggle button { padding: 5px 10px; background: none; border: none; color: var(--text-muted); font-size: 0.75rem; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.15s; display: flex; align-items: center; gap: 4px; }
.price-mode-toggle button.active { background: #7c3aed; color: white; }
.price-mode-toggle button:hover:not(.active) { color: #e2e8f0; background: rgba(255,255,255,0.06); }
.price-mode-toggle .sol-icon { width: 12px; height: 12px; }

/* View Toggle */
.view-toggle { display: flex; background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.view-toggle button { padding: 5px 10px; background: none; border: none; color: var(--text-dim); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.view-toggle button.active { background: #7c3aed; color: white; }
.view-toggle button:hover:not(.active) { color: var(--text-muted); }

/* Grid */
.grid-area { padding: 12px 24px 40px; position: relative; z-index: 1; max-height: 80vh; overflow-y: auto; }
.collection-grid {
display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px;
}
@media (max-width: 1400px) { .collection-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1200px) { .collection-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px) { .collection-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .collection-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .collection-grid { grid-template-columns: 1fr; } }

/* Collection Card — square image */
.col-card {
background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
cursor: pointer; transition: all 0.2s ease; overflow: hidden; position: relative;
}
.col-card:hover {
transform: translateY(-6px); border-color: var(--border-hover);
background: var(--bg-card-hover); box-shadow: 0 16px 48px rgba(124,58,237,0.15), 0 0 0 1px rgba(124,58,237,0.08);
z-index: 2;
}
.col-img-wrap { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(59,130,246,0.1)); }
.col-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity 0.3s ease, filter 0.3s ease; }
.col-img-wrap img.loading { opacity: 0; filter: blur(8px); }
.col-img-wrap img.loaded { opacity: 1; filter: none; }
.col-fav {
position: absolute; top: 8px; right: 8px; z-index: 3;
background: rgba(0,0,0,0.5); border-radius: 50%; width: 28px; height: 28px;
display: flex; align-items: center; justify-content: center;
cursor: pointer; opacity: 0; transition: all 0.15s; color: rgba(255,255,255,0.6);
}
.col-card:hover .col-fav { opacity: 1; }
.col-fav.active { opacity: 1; color: #fbbf24; background: rgba(0,0,0,0.6); }
.col-fav:hover { color: #fbbf24; transform: scale(1.15); }
.col-fav svg { width: 14px; height: 14px; }
.col-card-body { padding: 10px 12px; }
.col-name {
font-size: 0.85rem; font-weight: 700; white-space: nowrap; overflow: hidden;
text-overflow: ellipsis; margin-bottom: 4px;
}
.col-badges { display: flex; gap: 4px; margin-bottom: 4px; }
.col-badge {
font-size: 0.55rem; font-weight: 600; padding: 2px 5px; border-radius: 4px;
text-transform: uppercase; letter-spacing: 0.5px;
}
.col-badge.verified { background: none; padding: 0; line-height: 0; }
.col-badge.verified img { width: 16px; height: 16px; }
.col-badge.featured { background: rgba(251,191,36,0.15); color: #fbbf24; }
.col-badge.tier1 { background: rgba(16,185,129,0.15); color: #10b981; }
.col-badge.tier2 { background: rgba(59,130,246,0.15); color: #60a5fa; }
.col-badge.staking { background: rgba(16,185,129,0.15); color: #34d399; }
.col-badge.missions { background: rgba(168,85,247,0.15); color: #c084fc; }
.col-badge.rerolls { background: rgba(251,146,60,0.15); color: #fb923c; }
.col-badge.live-badge { background: #e53e3e; color: #fff; font-weight: 700; }
@keyframes livePulseBadge { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.score-badge { display:inline-block; padding:1px 7px; border-radius:10px; font-size:0.75rem; font-weight:700; background:rgba(139,92,246,0.2); color:#a78bfa; }
.score-badge.high { background:rgba(16,185,129,0.2); color:#10b981; }
.score-badge.low { background:rgba(239,68,68,0.15); color:#ef4444; }

/* Score breakdown tooltip — replaces native title= popup so the
   per-signal scores read clearly with bars + colour and the wash
   penalty stands out. Position is set inline by the JS. */
.score-tooltip-target { cursor: help; }
.score-tooltip {
  position: fixed; top: 0; left: 0; z-index: 10010;
  min-width: 240px; max-width: 280px;
  padding: 12px 14px;
  background: rgba(15, 15, 30, 0.96);
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255,255,255,0.02);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.72rem;
  color: #e5e7eb;
  pointer-events: none;
  opacity: 0; transform: translateY(-2px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.score-tooltip.visible { opacity: 1; transform: translateY(0); }

.score-tip-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.score-tip-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.4px; color: #c4b5fd; text-transform: uppercase; }
.score-tip-total { font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.score-tip-empty { color: rgba(255, 255, 255, 0.45); font-style: italic; padding: 4px 0; }

.score-tip-rows { display: flex; flex-direction: column; gap: 5px; }
.score-tip-row {
  display: grid;
  grid-template-columns: 92px 1fr 28px;
  align-items: center; gap: 10px;
  font-size: 0.72rem;
}
.score-tip-row-label { color: rgba(255,255,255,0.55); font-weight: 500; white-space: nowrap; }
.score-tip-row-bar {
  position: relative;
  height: 4px; border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.score-tip-row-bar > span {
  display: block; height: 100%; border-radius: 2px;
  transition: width 0.2s ease;
}
.score-tip-row-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

.score-tip-divider {
  height: 1px; background: rgba(255, 255, 255, 0.06);
  margin: 8px 0;
}
.score-tip-penalty .score-tip-row-label { color: rgba(239, 68, 68, 0.85); font-weight: 600; }
.floor-change { font-size: 0.6rem; margin-left: 2px; font-weight: 600; }
.floor-change.up { color: var(--success); }
.floor-change.down { color: var(--danger); }
.col-mini-stats { display: flex; justify-content: space-between; gap: 4px; }
.col-mini-stat { text-align: center; flex: 1; }
.col-mini-stat .label { font-size: 0.55rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.3px; }
.col-mini-stat .value { font-size: 0.75rem; font-weight: 700; margin-top: 1px; display: flex; align-items: center; justify-content: center; gap: 2px; }
.sol-icon { height: 11px; width: 11px; vertical-align: -1px; opacity: 0.7; }

/* Table View */
.table-area { display: none; padding: 0 24px 40px; position: relative; z-index: 1; }
.table-area.active { display: block; }
/* No overflow on desktop — position:sticky thead needs the viewport to be the
 * scroll container, otherwise `top` is measured from the wrapper and the thead
 * ends up pinned mid-table on scroll-up. Narrow screens opt back in below. */
.table-scroll-wrapper { -webkit-overflow-scrolling: touch; }
.col-table thead { position: sticky; top: calc(var(--mp-header-h, 0px) + var(--mp-controls-h, 0px)); z-index: 2; background: var(--bg); }
.grid-area.hidden { display: none; }
.col-table { width: 100%; border-collapse: collapse; }
.col-table thead th {
text-align: left; padding: 10px 12px; font-size: 0.7rem; font-weight: 600;
color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
border-bottom: 1px solid var(--border); white-space: nowrap; cursor: pointer; user-select: none;
transition: color 0.15s;
}
.col-table thead th[data-sort]:hover { color: #e2e8f0; }
.col-table thead th.sort-active { color: #c4b5fd; }
.sort-arrow { font-size: 0.55rem; margin-left: 3px; opacity: 0.4; display: inline-block; }
.sort-arrow::after { content: '▲▼'; font-size: 0.45rem; letter-spacing: -1px; }
th.sort-asc .sort-arrow { opacity: 1; }
th.sort-asc .sort-arrow::after { content: '▲'; font-size: 0.55rem; letter-spacing: 0; }
th.sort-desc .sort-arrow { opacity: 1; }
th.sort-desc .sort-arrow::after { content: '▼'; font-size: 0.55rem; letter-spacing: 0; }
.col-table tbody tr {
border-bottom: 1px solid rgba(255,255,255,0.04); cursor: pointer; transition: background 0.15s;
}
.col-table tbody tr:hover { background: rgba(124,58,237,0.06); }
.col-table td { padding: 10px 12px; font-size: 0.85rem; vertical-align: middle; white-space: nowrap; }
.col-table .rank-col { color: var(--text-dim); font-size: 0.75rem; width: 40px; }
.col-table .fav-col { width: 28px; padding: 10px 4px 10px 0; text-align: center; }
.col-table .fav-col svg { width: 16px; height: 16px; color: var(--text-dim); cursor: pointer; transition: color 0.15s, transform 0.15s; }
.col-table .fav-col svg:hover { color: #facc15; transform: scale(1.2); }
.col-table .fav-col.active svg { color: #facc15; }
.col-table .sparkline-col { width: 80px; padding: 10px 8px; }
.col-table .sparkline-col svg { display: block; }
.col-table .name-col { display: flex; align-items: center; gap: 10px; }
.col-table .name-col img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: rgba(255,255,255,0.04); }
.col-table .name-col span { font-weight: 700; }
.tbl-sol { display: flex; align-items: center; gap: 3px; }
.th-mode-toggle { display:inline-flex; align-items:center; justify-content:center; width:18px; height:16px; font-size:0.55rem; font-weight:800; background:rgba(124,58,237,0.2); border:1px solid rgba(124,58,237,0.35); border-radius:4px; cursor:pointer; color:#a78bfa; margin-left:4px; vertical-align:middle; transition:all 0.15s; line-height:1; letter-spacing:0; }
.th-mode-toggle:hover { background:rgba(124,58,237,0.35); border-color:rgba(124,58,237,0.6); color:#c4b5fd; }

/* Column Settings */
.col-settings-btn { background: none; border: 1px solid var(--border); border-radius: 8px; padding: 5px 8px; cursor: pointer; color: var(--text-dim); display: flex; align-items: center; gap: 4px; font-size: 0.75rem; transition: all 0.15s; }
.col-settings-btn:hover { color: var(--text); border-color: var(--primary); background: rgba(124,58,237,0.1); }
.col-settings-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9998; display: none; }
.col-settings-overlay.open { display: block; }
.col-settings-popup { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 20px; z-index: 9999; display: none; width: 340px; max-height: 80vh; overflow-y: auto; box-shadow: 0 16px 48px rgba(0,0,0,0.5); }
.col-settings-popup.open { display: block; }
.col-settings-popup h3 { margin: 0 0 4px; font-size: 1rem; color: var(--text); }
.col-settings-popup .cs-subtitle { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 16px; }
.cs-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; border: 1px solid transparent; transition: all 0.15s; user-select: none; }
.cs-item:hover { background: rgba(124,58,237,0.06); }
.cs-item.dragging { opacity: 0.5; border-color: var(--primary); background: rgba(124,58,237,0.12); }
.cs-item.drag-over { border-top: 2px solid var(--primary); }
.cs-drag { cursor: grab; color: var(--text-dim); font-size: 1rem; flex-shrink: 0; width: 18px; text-align: center; }
.cs-drag:active { cursor: grabbing; }
.cs-label { flex: 1; font-size: 0.85rem; color: var(--text); }
.cs-toggle { position: relative; width: 36px; height: 20px; flex-shrink: 0; }
.cs-toggle input { opacity: 0; width: 0; height: 0; }
.cs-toggle .cs-slider { position: absolute; inset: 0; background: rgba(255,255,255,0.1); border-radius: 10px; transition: 0.2s; cursor: pointer; }
.cs-toggle .cs-slider::before { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: white; border-radius: 50%; transition: 0.2s; }
.cs-toggle input:checked + .cs-slider { background: #10b981; }
.cs-toggle input:checked + .cs-slider::before { transform: translateX(16px); }
.cs-actions { display: flex; gap: 8px; margin-top: 16px; justify-content: flex-end; }
.cs-actions button { padding: 6px 16px; border-radius: 8px; font-size: 0.8rem; font-weight: 600; cursor: pointer; border: none; transition: all 0.15s; }
.cs-btn-reset { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.cs-btn-reset:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.cs-btn-apply { background: var(--primary); color: white; }
.cs-btn-apply:hover { background: var(--primary-hover); }

/* Table info bar */
.table-info-bar { font-size: 0.75rem; color: var(--text-muted); text-align: center; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; }
.table-info-bar .tp-left { display: flex; align-items: center; gap: 8px; }
.table-info-bar .tp-left label { white-space: nowrap; }
.tp-batch-btns { display: flex; gap: 2px; }
.tp-batch-btns button { background: var(--bg-card); color: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 3px 10px; font-size: 0.75rem; cursor: pointer; font-family: inherit; transition: all 0.12s; }
.tp-batch-btns button:hover { border-color: #a78bfa; }
.tp-batch-btns button.active { background: rgba(167,139,250,0.2); color: #c4b5fd; border-color: #a78bfa; font-weight: 600; }

/* Grid sentinel */
.grid-sentinel { height: 1px; width: 100%; }
.grid-load-more { text-align: center; padding: 20px; color: var(--text-muted); font-size: 0.85rem; display: flex; align-items: center; justify-content: center; gap: 8px; }
.grid-load-more .spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.1); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.scroll-end-msg { text-align: center; padding: 20px; color: var(--text-dim); font-size: 0.8rem; display: none; }
.scroll-end-msg svg { vertical-align: -2px; margin-right: 4px; opacity: 0.5; }

/* Back to Top FAB */
.back-to-top { display: none; position: fixed; bottom: 24px; right: 24px; z-index: 90; width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; border: none; cursor: pointer; box-shadow: 0 4px 16px rgba(124,58,237,0.4); align-items: center; justify-content: center; opacity: 0; transition: opacity 0.25s, transform 0.25s; transform: translateY(8px); }
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:active { transform: scale(0.92); }
@media (min-width: 769px) { .back-to-top { display: none !important; } }
@media (max-width: 768px) { .back-to-top { display: flex; } }

/* Empty state */
.empty-state {
text-align: center; padding: 60px 24px; color: var(--text-muted);
}
.empty-state h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--text); }

/* Shimmer animation for table skeleton rows */
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }

/* Spotlight Features Section */
.spotlight-section { padding:32px 24px 16px; position:relative; z-index:1; min-height:280px; }
.spotlight-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.spotlight-title { font-size:0.85rem; font-weight:700; color:var(--text); display:flex; align-items:center; gap:8px; }
.spotlight-title svg { color:#a78bfa; }
.spotlight-grid { display:flex; gap:12px; overflow-x:auto; padding-bottom:6px; scrollbar-width:none; }
.spotlight-grid::-webkit-scrollbar { display:none; }
.spotlight-card { position:relative; border-radius:12px; overflow:hidden; cursor:pointer; transition:all 0.25s; border:1px solid rgba(255,255,255,0.06); background:rgba(255,255,255,0.03); text-decoration:none; color:inherit; flex:0 0 calc(20% - 10px); min-width:180px; }
.spotlight-card:hover { transform:translateY(-2px); border-color:rgba(124,58,237,0.3); box-shadow:0 6px 24px rgba(124,58,237,0.12); }
.spotlight-card-img { width:100%; height:160px; object-fit:cover; display:block; }
/* Sponsored section uses square imagery — logos/partner branding reads better in 1:1 */
#sponsorGrid .spotlight-card-img { height:auto; aspect-ratio:1/1; }
.spotlight-card-body { padding:10px 12px; }
.spotlight-card-title { font-size:0.78rem; font-weight:700; margin-bottom:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.spotlight-card-desc { font-size:0.65rem; color:var(--text-muted); line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.spotlight-card-arrow { position:absolute; top:8px; right:8px; width:22px; height:22px; border-radius:50%; background:rgba(0,0,0,0.45); backdrop-filter:blur(4px); display:flex; align-items:center; justify-content:center; color:rgba(255,255,255,0.7); transition:all 0.2s; }
.spotlight-card:hover .spotlight-card-arrow { background:rgba(124,58,237,0.6); color:#fff; }
.spotlight-card-arrow svg { width:11px; height:11px; }
@media (max-width: 768px) { .spotlight-section { padding:24px 16px 12px; } .spotlight-card { flex:0 0 calc(50% - 6px); } .spotlight-card-img { height:100px; } }

/* Footer: loaded by marketplace-footer.js */

/* Mobile */
@media (max-width: 768px) {
.controls-bar { padding: 8px 16px 6px; flex-wrap: wrap; }
.fav-btn { font-size: 0; padding: 6px 8px; }
.fav-btn svg { width: 16px; height: 16px; }
.inv-btn { font-size: 0; padding: 6px 8px; }
.inv-btn svg { width: 16px; height: 16px; }
.time-pills { display: none; }
.time-period-select { display: block; }
.price-mode-toggle button { padding: 4px 6px; font-size: 0.65rem; }
.price-mode-toggle .sol-icon { width: 10px; height: 10px; }
.controls-right { display: none; }
#categorySelect { display: none; }
.controls-left { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.controls-left::-webkit-scrollbar { display: none; }
.controls-left .view-toggle { flex-shrink: 0; }
.controls-left .view-toggle button { padding: 8px 10px; min-width: 36px; min-height: 36px; }
.controls-left .fav-btn { flex-shrink: 0; min-width: 36px; min-height: 36px; }
.table-search { flex: 1; min-width: 0; }
.table-search input { width: 100%; font-size: 0.75rem; padding: 6px 24px 6px 28px; }
.table-search input:focus { width: 100%; }
.grid-area { padding: 8px 16px 32px; }
.table-area { padding: 0 16px 32px; }
.collection-grid { gap: 12px; }
.hero-carousel { max-height: 240px; }
.hero-slide { height: 220px; }
.hero-slide-bg-desktop { display: none; }
.hero-slide-bg-mobile { display: block; }
.hero-slide-overlay { padding: 0 20px; }
.hero-slide-name { font-size: 1.15rem; }
.hero-slide-stats { gap: 14px; }
.hero-arrow { display: none; }
.trending-section { padding: 16px 16px 4px; }
.trend-card { flex: 0 0 240px; }
.featured-strip { padding: 12px 16px 4px; }
.voting-banner { padding: 16px 16px 4px; }
.vbanner-card { flex: 0 0 180px; }
.col-table .sparkline-col { display: none; }
.col-table thead th:last-child { display: none; }
.col-table .sticky-fav { display: none; }
.table-area { padding: 0 0 32px; }
/* Mobile keeps horizontal scroll in the wrapper — on narrow screens the
 * remaining columns can still overflow, and sticky thead behavior is less
 * noticeable with fewer rows visible. */
.table-scroll-wrapper { overflow-x: auto; scrollbar-width: thin; }
.col-table { width: max-content; min-width: 100%; }
.col-table .sticky-rank { position: sticky; left: 0; z-index: 2; background: #0a0a1a; }
.col-table .sticky-name { position: sticky; left: 36px; z-index: 2; background: #0a0a1a; box-shadow: 4px 0 8px rgba(0,0,0,0.4); }
.col-table .name-col span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100px; display: inline-block; vertical-align: middle; }
.col-table .name-col img { width: 28px; height: 28px; }
.col-table .name-col img[src*="verified"] { display: none; }
.col-table thead .sticky-rank,
.col-table thead .sticky-name { z-index: 3; }
/* On mobile the table-scroll-wrapper's overflow-x:auto makes it the sticky
 * scroll container for the thead — which combined with the header going
 * position:relative (see marketplace-header.js mobile query) breaks sticky
 * behavior completely. Keep the thead in normal flow on mobile; the sticky
 * controls-bar above still gives context as the user scrolls. */
.col-table thead { position: static; top: auto; }
.col-table tbody tr:hover .sticky-rank,
.col-table tbody tr:hover .sticky-name { background: #110e1f; }
.col-fav { opacity: 1; width: 32px; height: 32px; }
.col-fav svg { width: 16px; height: 16px; }
.hero-hint { display: block; }
.hero-featured-label { display: flex; }
}
@media (max-width: 480px) {
.hero-carousel { max-height: 180px; }
.hero-slide { height: 160px; }
.hero-slide-name { font-size: 1rem; }
.hero-slide-logo { width: 28px; height: 28px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* Toast */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 10px 16px; border-radius: 10px; font-size: 0.82rem; font-weight: 500; backdrop-filter: blur(12px); animation: toastIn 0.3s; }
.toast.success { background: rgba(16,185,129,0.2); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }
.toast.error { background: rgba(239,68,68,0.2); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }