/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-primary: #0b0b0f;
    --bg-secondary: #141419;
    --bg-card: #1a1a23;
    --bg-hover: #22222e;
    --bg-modal: #1a1a23;
    --border: #2a2a3a;
    --text-primary: #ffffff;
    --text-secondary: #8a8aa3;
    --text-muted: #5a5a72;
    --accent: #2081e2;
    --accent-hover: #1868b7;
    --green: #34c77b;
    --purple: #a855f7;
    --rarity-common: #8a8aa3;
    --rarity-uncommon: #34c77b;
    --rarity-rare: #2081e2;
    --rarity-epic: #a855f7;
    --rarity-legendary: #f59e0b;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* Banner */
.banner {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

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

/* Header */
header {
    border-bottom: 1px solid var(--border);
    padding: 20px 24px 0;
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    z-index: 100;
}

.header-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    object-fit: cover;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 16px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.logo-section h1 {
    font-size: 22px;
    font-weight: 700;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.badge-eth { color: #627eea; border-color: #627eea33; }

.token-count {
    color: var(--text-secondary);
    font-size: 14px;
}

.header-stats {
    display: flex;
    gap: 24px;
}

.stat { text-align: center; }
.stat-label { display: block; font-size: 11px; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.5px; }
.stat-value { display: block; font-size: 16px; font-weight: 600; }

nav {
    display: flex;
    gap: 4px;
}

.nav-btn {
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav-btn:hover { color: var(--text-primary); }
.nav-btn.active { color: var(--text-primary); border-bottom-color: var(--text-primary); }

/* Toolbar */
.toolbar {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}

.search-box svg { color: var(--text-muted); flex-shrink: 0; }

.search-box input {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    width: 100%;
    outline: none;
}

.search-box input::placeholder { color: var(--text-muted); }

.toolbar-right {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
}

select {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    outline: none;
}

.view-toggles {
    display: flex;
    gap: 2px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2px;
}

.view-toggle {
    padding: 7px 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.view-toggle:hover { color: var(--text-secondary); }
.view-toggle.active { background: var(--bg-hover); color: var(--text-primary); }

/* Content Layout */
.content-layout {
    display: flex;
    gap: 0;
    padding: 0 0 24px;
}

/* Sidebar */
.sidebar {
    width: 260px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    padding-right: 20px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    position: sticky;
    top: 120px;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Listing Filter */
.listing-filter {
    padding-bottom: 16px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.listing-filter-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.listing-filter-buttons {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.listing-btn {
    flex: 1;
    padding: 7px 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.listing-btn:hover { color: var(--text-primary); border-color: var(--text-muted); }
.listing-btn.active { background: var(--accent); border-color: var(--accent); color: white; }

.listings-status {
    font-size: 12px;
    color: var(--text-muted);
    min-height: 18px;
}

.listings-status.loading-listings { color: var(--accent); }

/* Price on cards */
.nft-card-price {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nft-card-price .eth-icon {
    width: 10px;
    height: 10px;
    display: inline-block;
}

.listed-badge {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    margin-left: 4px;
    vertical-align: middle;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.sidebar-header h3 { font-size: 16px; font-weight: 600; }

.clear-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 12px;
    cursor: pointer;
}

.clear-btn:hover { text-decoration: underline; }

.trait-category {
    border-bottom: 1px solid var(--border);
}

.trait-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    cursor: pointer;
    user-select: none;
}

.trait-category-header:hover { color: var(--text-primary); }

.trait-category-name {
    font-size: 14px;
    font-weight: 500;
}

.trait-category-count {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.trait-category-arrow {
    transition: transform 0.2s;
    font-size: 10px;
}

.trait-category.open .trait-category-arrow { transform: rotate(180deg); }

.trait-list {
    display: none;
    padding-bottom: 8px;
}

.trait-category.open .trait-list { display: block; }

.trait-search {
    width: 100%;
    padding: 6px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 12px;
    margin-bottom: 6px;
    outline: none;
}

.trait-search::placeholder { color: var(--text-muted); }

.trait-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: color 0.15s;
}

.trait-option:hover { color: var(--text-primary); }

.trait-option input[type="checkbox"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-secondary);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
}

.trait-option input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}

.trait-option input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: -1px;
    left: 2px;
    font-size: 12px;
    color: white;
    font-weight: 700;
}

.trait-option-label { flex: 1; }

.trait-option-count {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

/* Results */
.results-area {
    flex: 1;
    padding-left: 20px;
    min-width: 0;
}

.results-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

#results-count {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.active-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: var(--accent);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.filter-tag button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    opacity: 0.7;
    padding: 0 0 0 2px;
}

.filter-tag button:hover { opacity: 1; }

/* NFT Grid */
.nft-grid {
    display: grid;
    gap: 12px;
}

.nft-grid.large { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.nft-grid.small { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

.nft-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    border: 1px solid transparent;
}

.nft-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    border-color: var(--border);
}

.nft-card-image {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--bg-secondary);
}

.nft-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.nft-card:hover .nft-card-image img { transform: scale(1.05); }

.nft-card-info {
    padding: 10px 12px;
}

.nft-card-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.nft-card-rarity {
    font-size: 11px;
    color: var(--text-muted);
}

.rarity-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
}

.rarity-legendary { background: #f59e0b22; color: var(--rarity-legendary); }
.rarity-epic { background: #a855f722; color: var(--rarity-epic); }
.rarity-rare { background: #2081e222; color: var(--rarity-rare); }
.rarity-uncommon { background: #34c77b22; color: var(--rarity-uncommon); }
.rarity-common { background: #8a8aa322; color: var(--rarity-common); }

/* Load More */
.load-more {
    text-align: center;
    padding: 24px 0;
}

.load-more-btn {
    padding: 12px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.load-more-btn:hover { background: var(--bg-hover); }

/* Loading */
.loading {
    text-align: center;
    padding: 60px 0;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 100vh;
    background: var(--bg-modal);
    overflow-y: auto;
    animation: slideIn 0.25s ease;
}

@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover { background: var(--bg-hover); }

.modal-nav {
    position: absolute;
    top: 25%;
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, opacity 0.2s;
}

.modal-nav:hover { background: rgba(0,0,0,0.8); }
.modal-nav:disabled { opacity: 0.2; cursor: default; }
.modal-nav:disabled:hover { background: rgba(0,0,0,0.6); }

.modal-prev { left: 12px; }
.modal-next { right: 12px; }

.modal-body { padding: 0; }

.modal-image {
    width: 100%;
    aspect-ratio: 1;
    max-height: 50vh;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-info { padding: 24px; }

.modal-info h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.modal-price-section {
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--green);
    border-radius: 10px;
    margin-bottom: 16px;
}

.modal-price-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.modal-price-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-price-value .eth-symbol {
    color: #627eea;
}

.modal-price-currency {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.modal-stats {
    display: flex;
    gap: 24px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 10px;
    margin-bottom: 16px;
}

.modal-stat { text-align: center; flex: 1; }

.modal-owner {
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: 10px;
    margin-bottom: 16px;
}

.modal-owner .stat-label { margin-bottom: 4px; }

.modal-owner a {
    font-size: 13px;
    font-family: monospace;
    word-break: break-all;
}

.modal-links {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.link-btn {
    flex: 1;
    padding: 12px;
    text-align: center;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    background: var(--accent);
    color: white;
    transition: background 0.2s;
}

.link-btn:hover { background: var(--accent-hover); text-decoration: none; }

.link-btn-secondary {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.link-btn-secondary:hover { background: var(--bg-hover); }

.link-btn-download {
    background: var(--green);
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.link-btn-download:hover { background: #2ba366; }
.link-btn-download:disabled { opacity: 0.6; cursor: wait; }

.modal-traits h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

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

.trait-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
}

.trait-card-type {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.trait-card-value {
    font-size: 14px;
    font-weight: 600;
    margin: 2px 0;
}

.trait-card-rarity {
    font-size: 11px;
    color: var(--accent);
}

/* Rarity Page */
.rarity-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 0;
}

.rarity-tiers {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.rarity-tier {
    flex: 1;
    min-width: 150px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.rarity-tier:hover { border-color: var(--text-muted); }

.tier-color {
    width: 12px;
    height: 40px;
    border-radius: 4px;
    flex-shrink: 0;
}

.tier-color.legendary { background: var(--rarity-legendary); }
.tier-color.epic { background: var(--rarity-epic); }
.tier-color.rare { background: var(--rarity-rare); }
.tier-color.uncommon { background: var(--rarity-uncommon); }
.tier-color.common { background: var(--rarity-common); }

.tier-info { flex: 1; }

.tier-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.tier-range {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
}

.tier-count {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-secondary);
}

.rarity-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.rarity-toolbar .search-box {
    max-width: 280px;
}

.rarity-tier-filters {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.tier-filter-btn {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tier-filter-btn:hover { color: var(--text-primary); border-color: var(--text-muted); }
.tier-filter-btn.active { background: var(--accent); border-color: var(--accent); color: white; }

.rarity-table-wrapper {
    overflow-x: auto;
}

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

.rarity-table thead {
    position: sticky;
    top: 0;
    z-index: 5;
}

.rarity-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.rarity-table th:first-child { border-radius: 8px 0 0 0; }
.rarity-table th:last-child { border-radius: 0 8px 0 0; }

.th-rank { width: 80px; }
.th-token { width: 280px; }
.th-tier { width: 120px; }
.th-traits { }
.th-owner { width: 160px; }

.rarity-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    vertical-align: middle;
}

.rarity-table tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}

.rarity-table tbody tr:hover { background: var(--bg-hover); }

.rank-cell {
    font-weight: 700;
    font-size: 15px;
}

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

.token-cell img {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-secondary);
}

.token-cell-name {
    font-weight: 600;
}

.token-cell-id {
    font-size: 11px;
    color: var(--text-muted);
}

.tier-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.tier-badge.legendary { background: #f59e0b22; color: var(--rarity-legendary); }
.tier-badge.epic { background: #a855f722; color: var(--rarity-epic); }
.tier-badge.rare { background: #2081e222; color: var(--rarity-rare); }
.tier-badge.uncommon { background: #34c77b22; color: var(--rarity-uncommon); }
.tier-badge.common { background: #8a8aa322; color: var(--rarity-common); }

.traits-cell {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.trait-pill {
    padding: 2px 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.owner-cell {
    font-family: monospace;
    font-size: 12px;
    color: var(--text-muted);
}

/* Traits Explorer */
.traits-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 0;
}

.traits-overview {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.traits-overview-stat {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.traits-overview-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.traits-overview-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.traits-category-nav {
    display: flex;
    gap: 6px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.traits-category-btn {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.traits-category-btn:hover { color: var(--text-primary); border-color: var(--text-muted); }
.traits-category-btn.active { background: var(--accent); border-color: var(--accent); color: white; }

.trait-chart-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.trait-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.trait-chart-title {
    font-size: 18px;
    font-weight: 700;
}

.trait-chart-count {
    font-size: 13px;
    color: var(--text-muted);
}

.trait-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    padding: 4px 0;
    border-radius: 4px;
    transition: opacity 0.15s;
}

.trait-bar-row:hover { opacity: 0.85; }

.trait-bar-label {
    width: 160px;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 500;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
}

.trait-bar-track {
    flex: 1;
    height: 28px;
    background: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.trait-bar-fill {
    height: 100%;
    border-radius: 6px;
    min-width: 2px;
    transition: width 0.4s ease;
    position: relative;
}

.trait-bar-fill-inner {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.trait-bar-stats {
    width: 100px;
    flex-shrink: 0;
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
}

.trait-bar-stats strong {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Bar colors by category */
.bar-color-0 { background: #2081e2; }
.bar-color-1 { background: #a855f7; }
.bar-color-2 { background: #34c77b; }
.bar-color-3 { background: #f59e0b; }
.bar-color-4 { background: #ef4444; }
.bar-color-5 { background: #06b6d4; }
.bar-color-6 { background: #ec4899; }
.bar-color-7 { background: #8b5cf6; }
.bar-color-8 { background: #f97316; }
.bar-color-9 { background: #14b8a6; }
.bar-color-10 { background: #6366f1; }
.bar-color-11 { background: #84cc16; }

.trait-chart-toggle {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 13px;
    cursor: pointer;
    padding: 8px 0;
    margin-top: 4px;
}

.trait-chart-toggle:hover { text-decoration: underline; }

/* Rarity indicator dot on bar */
.rarity-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.rarity-dot.legendary { background: var(--rarity-legendary); }
.rarity-dot.epic { background: var(--rarity-epic); }
.rarity-dot.rare { background: var(--rarity-rare); }
.rarity-dot.uncommon { background: var(--rarity-uncommon); }
.rarity-dot.common { background: var(--rarity-common); }

@media (max-width: 768px) {
    .traits-overview { flex-direction: column; }
    .trait-bar-label { width: 100px; font-size: 12px; }
    .trait-bar-stats { width: 70px; font-size: 11px; }
}

/* About */
.about-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 24px;
}

.about-section {
    margin-bottom: 36px;
}

.about-section h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.about-section p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.7;
}

.about-section ul {
    color: var(--text-secondary);
    padding-left: 20px;
}

.about-section li { margin-bottom: 6px; }

/* Footer */
footer {
    padding: 24px;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
}

/* Views */
.view { display: none; }
.view.active { display: block; }

/* Responsive */
@media (max-width: 768px) {
    .header-stats { display: none; }

    .content-layout { flex-direction: column; }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding-right: 0;
        padding-bottom: 16px;
        max-height: none;
        position: static;
    }

    .results-area { padding-left: 0; }

    .nft-grid.large { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .nft-grid.small { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }

    .modal-content { max-width: 100%; }

    .toolbar { flex-direction: column; }
    .toolbar-right { width: 100%; justify-content: space-between; }
    .search-box { max-width: none; }
}

main {
    padding: 0 24px;
}
