/* ============================================ */
/* Individual Coin Page — RTP-style layout      */
/* ============================================ */

.coin-page-body {
    background: var(--background-light);
    min-height: 100vh;
    color: var(--text-dark);
}

/* Top bar (like RTP's back-bar, using our primary color) */
.coin-page-topbar {
    background: var(--primary-color);
    padding: 12px 20px;
    text-align: center;
}

.coin-page-topbar a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.15s ease;
}

.coin-page-topbar a:hover {
    opacity: 0.85;
    text-decoration: underline;
}

.coin-page-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 16px 16px 40px;
}

/* Breadcrumbs */
.coin-page-breadcrumbs {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 12px 0 12px;
    word-wrap: break-word;
}

.coin-page-breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
}

.coin-page-breadcrumbs a:hover {
    text-decoration: underline;
}

.coin-page-breadcrumbs .sep {
    margin: 0 6px;
    color: var(--border-color);
}

/* Cross-promo banner at top (linking back to main dashboard) */
.coin-page-cross-promo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: linear-gradient(90deg, rgba(26, 115, 232, 0.06), rgba(26, 115, 232, 0.02));
    border: 1px solid rgba(26, 115, 232, 0.2);
    border-radius: var(--border-radius-sm);
    padding: 14px 18px;
    margin-bottom: 12px;
    text-decoration: none;
    transition: border-color 0.15s ease;
}

.coin-page-cross-promo:hover {
    border-color: var(--primary-color);
}

.coin-page-cross-promo-title {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.coin-page-cross-promo-sub {
    color: var(--text-light);
    font-size: 0.82rem;
    margin-top: 2px;
}

.coin-page-cross-promo-arrow {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Card base — simpler than the main dashboard's card */
.coin-page-card {
    background: var(--background-white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 12px;
    position: relative;
}

.coin-page-card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--text-dark);
}

.coin-page-card h2 .h2-sub {
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-left: 8px;
}

/* Hero card (top card with symbol + stats) */
.coin-page-hero {
    padding: 24px 20px;
    position: relative;
    overflow: hidden;
}

.coin-page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--coin-color, var(--primary-color));
}

.coin-page-hero h1 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 6px 0;
    line-height: 1.2;
    color: var(--text-dark);
}

.coin-page-hero h1 .coin-page-name {
    color: var(--text-light);
    font-size: 1.15rem;
    font-weight: 500;
}

.coin-page-hero-peg {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(26, 115, 232, 0.1);
    color: var(--primary-color);
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.coin-page-hero-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 4px 0 20px;
}

/* Stats grid (like RTP) */
.coin-page-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.coin-page-stat {
    background: var(--background-light);
    border-radius: var(--border-radius-sm);
    padding: 12px;
}

.coin-page-stat-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    font-weight: 600;
}

.coin-page-stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.15;
}

.coin-page-stat-value.positive {
    color: #059669;
}

.coin-page-stat-value.negative {
    color: #dc2626;
}

.coin-page-stat-value.sm {
    font-size: 1rem;
}

/* Chart */
.coin-page-chart-wrapper {
    height: 260px;
    position: relative;
}

/* About narrative */
.coin-page-about p {
    font-size: 0.92rem;
    color: var(--text-dark);
    line-height: 1.65;
    margin: 0 0 16px 0;
}

/* Tags */
.coin-page-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.coin-page-tag {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 9999px;
    background: var(--background-light);
    color: var(--text-light);
    font-weight: 500;
}

/* FAQ (details accordions) */
.coin-page-faq details {
    border-top: 1px solid var(--border-color);
    padding: 12px 0;
}

.coin-page-faq details:first-of-type {
    border-top: none;
    padding-top: 0;
}

.coin-page-faq summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
    padding: 4px 0;
    min-height: 28px;
    list-style: none;
    position: relative;
    padding-right: 28px;
}

.coin-page-faq summary::-webkit-details-marker {
    display: none;
}

.coin-page-faq summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    color: var(--text-light);
    font-weight: 400;
    line-height: 1;
    transition: transform 0.15s ease;
}

.coin-page-faq details[open] summary::after {
    content: '−';
}

.coin-page-faq details p {
    margin-top: 8px;
    color: var(--text-light);
    font-size: 0.88rem;
    line-height: 1.6;
}

/* Chain distribution table */
.coin-page-chain-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.coin-page-chain-table th {
    text-align: left;
    padding: 8px 12px;
    background: var(--background-light);
    color: var(--text-light);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.coin-page-chain-table th:last-child,
.coin-page-chain-table td:last-child {
    text-align: right;
}

.coin-page-chain-table td {
    padding: 10px 12px;
    border-top: 1px solid var(--border-color);
    color: var(--text-dark);
}

.coin-page-chain-table td.chain-name {
    font-weight: 600;
}

.coin-page-chain-table td.chain-pct {
    color: var(--text-light);
    font-variant-numeric: tabular-nums;
    width: 80px;
}

.coin-page-chain-table td.chain-value {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

/* Details table */
.coin-page-details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.coin-page-details-table td {
    padding: 8px 0;
    border-top: 1px solid var(--border-color);
}

.coin-page-details-table tr:first-child td {
    border-top: none;
}

.coin-page-details-table td:first-child {
    color: var(--text-light);
    width: 180px;
    font-weight: 500;
}

.coin-page-details-table td:last-child {
    color: var(--text-dark);
    font-weight: 500;
}

.coin-page-details-table a {
    color: var(--primary-color);
    text-decoration: none;
}

.coin-page-details-table a:hover {
    text-decoration: underline;
}

/* Related coins grid */
.coin-page-related-grid {
    display: grid;
    /* Force 4 columns on wider screens so 4 items fit on one row.
       On narrower widths, cards wrap to 2 columns (see mobile media query),
       producing at most 2 rows for the max 4 items. */
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.coin-page-related-card {
    display: block;
    background: var(--background-light);
    border-radius: var(--border-radius-sm);
    padding: 12px 14px;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.coin-page-related-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.coin-page-related-symbol {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.coin-page-related-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.coin-page-related-name {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 4px;
}

.coin-page-related-value {
    font-size: 0.78rem;
    color: var(--text-dark);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* Big CTA button */
.coin-page-cta-wrapper {
    text-align: center;
    padding: 24px 0 8px;
}

.coin-page-cta {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 14px 28px;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    min-height: 44px;
    line-height: 1.4;
    transition: background 0.15s ease, transform 0.15s ease;
}

.coin-page-cta:hover {
    background: #1557b0;
    transform: translateY(-1px);
}

/* Footer note */
.coin-page-footer-note {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.coin-page-footer-note a {
    color: var(--text-light);
    text-decoration: underline;
}

.coin-page-footer-note a:hover {
    color: var(--primary-color);
}

/* Coins index page */
.coins-index-header {
    padding: 24px 0 16px;
    text-align: center;
}

.coins-index-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 8px 0;
}

.coins-index-header p {
    color: var(--text-light);
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

.coins-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    padding-bottom: 32px;
}

.coins-index-card {
    background: var(--background-white);
    border-radius: var(--border-radius-sm);
    padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 3px;
    border: 1px solid transparent;
}

.coins-index-card:hover {
    transform: translateY(-1px);
    border-color: var(--primary-color);
}

.coins-index-card-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.coins-index-card-symbol {
    font-weight: 800;
    color: var(--text-dark);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.coins-index-card-symbol .idx-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.coins-index-card-rank {
    font-size: 0.72rem;
    color: var(--text-light);
    font-weight: 600;
}

.coins-index-card-name {
    color: var(--text-light);
    font-size: 0.78rem;
}

.coins-index-card-value {
    color: var(--text-dark);
    font-size: 0.88rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    margin-top: 4px;
}

/* Mobile */
@media (max-width: 600px) {
    .coin-page-container {
        padding: 12px 12px 32px;
    }

    .coin-page-hero {
        padding: 20px 18px;
    }

    .coin-page-hero h1 {
        font-size: 1.35rem;
        line-height: 1.25;
    }

    .coin-page-hero h1 .coin-page-name {
        font-size: 0.95rem;
    }

    .coin-page-hero-subtitle {
        font-size: 0.85rem;
        margin-bottom: 14px;
    }

    .coin-page-card {
        padding: 16px;
    }

    .coin-page-card h2 {
        font-size: 1rem;
    }

    .coin-page-stats {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .coin-page-stat {
        padding: 10px;
    }

    .coin-page-stat-label {
        font-size: 0.65rem;
    }

    .coin-page-stat-value {
        font-size: 1.05rem;
    }

    .coin-page-chart-wrapper {
        height: 220px;
    }

    .coin-page-chain-table th,
    .coin-page-chain-table td {
        padding: 6px 10px;
        font-size: 0.78rem;
    }

    .coin-page-chain-table td.chain-pct {
        width: 60px;
    }

    .coin-page-details-table td:first-child {
        width: 130px;
    }

    .coin-page-cta {
        display: block;
        text-align: center;
        padding: 14px 20px;
    }

    .coin-page-related-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .coins-index-header h1 {
        font-size: 1.35rem;
    }

    .coins-index-grid {
        grid-template-columns: 1fr 1fr;
    }

    .coin-page-breadcrumbs {
        font-size: 0.75rem;
    }

    .coin-page-breadcrumbs .sep {
        margin: 0 4px;
    }
}

@media (max-width: 380px) {
    .coin-page-stats {
        grid-template-columns: 1fr 1fr;
    }
    .coin-page-related-grid {
        grid-template-columns: 1fr;
    }
    .coins-index-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark mode */
[data-theme="dark"] .coin-page-body {
    background: var(--background-dark, #0f172a);
}

[data-theme="dark"] .coin-page-card,
[data-theme="dark"] .coins-index-card {
    background: var(--background-card);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .coin-page-stat,
[data-theme="dark"] .coin-page-tag,
[data-theme="dark"] .coin-page-related-card {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .coin-page-chain-table th {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .coin-page-hero-peg {
    background: rgba(96, 165, 250, 0.15);
    color: #93c5fd;
}

[data-theme="dark"] .coin-page-cross-promo {
    background: linear-gradient(90deg, rgba(96, 165, 250, 0.08), rgba(96, 165, 250, 0.02));
    border-color: rgba(96, 165, 250, 0.2);
}

/* ============================================ */
/* Compare Pages                                 */
/* ============================================ */

/* Compare hero — "USDT vs USDC" title */
.compare-hero h1 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 6px 0;
    line-height: 1.2;
    color: var(--text-dark);
}

.compare-hero .vs-badge {
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 2px 12px;
    background: var(--background-light);
    border-radius: 12px;
}

.compare-hero-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 4px 0 20px;
}

/* Side-by-side coin summary cards */
.compare-side-by-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.compare-sbs-card {
    background: var(--background-light);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.compare-sbs-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--coin-color, var(--primary-color));
}

.compare-sbs-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 2px 0;
    color: var(--text-dark);
}

.compare-sbs-card .compare-sbs-sub {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.compare-sbs-stat {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    align-items: center;
}

.compare-sbs-stat:first-of-type {
    border-top: none;
    padding-top: 0;
}

.compare-sbs-stat > span:first-child {
    color: var(--text-light);
}

.compare-sbs-stat > span:last-child {
    font-weight: 700;
    color: var(--text-dark);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.compare-sbs-stat > span:last-child.winner {
    color: var(--primary-color);
}

.compare-sbs-stat > span:last-child.winner::after {
    content: ' ★';
    font-size: 0.75rem;
    color: #eab308;
    margin-left: 4px;
}

/* Full comparison table */
.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.compare-table th {
    text-align: left;
    padding: 10px 12px;
    background: var(--background-light);
    color: var(--text-light);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.compare-table th:not(:first-child),
.compare-table td:not(:first-child) {
    text-align: center;
}

.compare-table td {
    padding: 10px 12px;
    border-top: 1px solid var(--border-color);
    color: var(--text-dark);
}

.compare-table td:first-child {
    color: var(--text-light);
    font-weight: 500;
    width: 40%;
}

.compare-table td.winner {
    color: var(--primary-color);
    font-weight: 700;
    position: relative;
}

.compare-table td.winner::before {
    content: '★';
    color: #eab308;
    margin-right: 6px;
    font-size: 0.85em;
}

/* Key differences bullet list */
.compare-diff-list {
    padding-left: 22px;
    margin: 0;
}

.compare-diff-list li {
    margin-bottom: 10px;
    color: var(--text-dark);
    font-size: 0.92rem;
    line-height: 1.6;
}

.compare-diff-list li strong {
    color: var(--text-dark);
    font-weight: 700;
}

/* Links back to individual coin pages at bottom */
.compare-coin-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.compare-coin-link {
    background: var(--background-light);
    border-radius: var(--border-radius-sm);
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.compare-coin-link:hover {
    border-color: var(--primary-color);
}

.compare-coin-link-arrow {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.85rem;
    margin-top: 4px;
}

/* Compare index page grid */
.compare-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    padding-bottom: 32px;
}

.compare-index-card {
    background: var(--background-white);
    border-radius: var(--border-radius-sm);
    padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, border-color 0.15s ease;
    border: 1px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.compare-index-card:hover {
    transform: translateY(-1px);
    border-color: var(--primary-color);
}

.compare-index-card-title {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.compare-index-card-arrow {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.85rem;
}

/* "Compare with…" section on individual coin pages */
.compare-with-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}

.compare-with-link {
    background: var(--background-light);
    border-radius: var(--border-radius-sm);
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.compare-with-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.compare-with-link .vs-mini {
    color: var(--text-light);
    font-size: 0.75rem;
    padding: 0 6px;
}

/* Mobile */
@media (max-width: 600px) {
    .compare-hero h1 {
        font-size: 1.3rem;
        line-height: 1.25;
    }

    .compare-hero .vs-badge {
        font-size: 0.85rem;
    }

    .compare-side-by-side {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .compare-sbs-card {
        padding: 14px;
    }

    .compare-sbs-stat {
        font-size: 0.8rem;
    }

    .compare-table th,
    .compare-table td {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .compare-table td:first-child {
        white-space: nowrap;
    }

    .compare-diff-list li {
        font-size: 0.87rem;
    }

    .compare-coin-links {
        grid-template-columns: 1fr;
    }

    .compare-index-grid {
        grid-template-columns: 1fr;
    }

    .compare-with-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark mode */
[data-theme="dark"] .compare-sbs-card,
[data-theme="dark"] .compare-coin-link,
[data-theme="dark"] .compare-with-link,
[data-theme="dark"] .compare-index-card {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .compare-index-card {
    background: var(--background-card);
}

[data-theme="dark"] .compare-table th {
    background: rgba(255, 255, 255, 0.03);
}

/* ============================================ */
/* v2 additions — rank change, sparkline, filters, asof */
/* ============================================ */

.coin-page-asof {
    font-size: 0.78rem;
    color: var(--text-light);
    margin: -8px 0 14px;
    letter-spacing: 0.01em;
}

.coin-page-stat-sub {
    font-size: 0.72rem;
    color: var(--text-light);
    margin-top: 4px;
    font-weight: 500;
}

.rank-change {
    display: inline-block;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 1px 6px;
    border-radius: 4px;
    letter-spacing: 0.02em;
}
.rank-change.up { background: rgba(38, 161, 123, 0.12); color: #26a17b; }
.rank-change.down { background: rgba(239, 71, 111, 0.12); color: #ef476f; }
.rank-change.flat { background: rgba(148, 163, 184, 0.12); color: var(--text-light); }

.coin-page-sparkline-wrap {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}
.coin-page-sparkline-wrap .sparkline-label {
    font-size: 0.7rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 6px;
}
.rank-sparkline {
    width: 100%;
    height: auto;
    max-width: 240px;
    display: block;
}

.asof {
    color: var(--text-light);
    font-size: 0.75rem;
}

/* Filter bar on /coins/ index */
.coin-filter-bar {
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 0 0 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--card-shadow);
}
.coin-filter-search {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.coin-filter-search input[type="search"] {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--background-light);
    color: var(--text-dark);
    font-family: inherit;
}
.coin-filter-search input[type="search"]:focus {
    outline: none;
    border-color: var(--primary-color);
}
.coin-filter-search select {
    padding: 8px 10px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--background-light);
    color: var(--text-dark);
    font-family: inherit;
    cursor: pointer;
}
.coin-filter-group {
    display: flex;
    gap: 8px;
    align-items: baseline;
    flex-wrap: wrap;
}
.coin-filter-label {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}
.coin-filter-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.coin-filter-chip {
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--background-light);
    color: var(--text-dark);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.12s ease;
}
.coin-filter-chip:hover {
    border-color: var(--primary-color);
}
.coin-filter-chip.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
.coin-filter-count {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 600;
}
.coin-filter-count #coinCount {
    color: var(--text-dark);
    font-weight: 700;
}

[data-theme="dark"] .coin-filter-bar { background: rgba(255,255,255,0.02); }
[data-theme="dark"] .coin-filter-search input[type="search"],
[data-theme="dark"] .coin-filter-search select,
[data-theme="dark"] .coin-filter-chip { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .coin-filter-chip.active { background: var(--primary-color); }
