/* ══════════════════════════════════════════════════
   Market Ticker Bar — infinite horizontal marquee
══════════════════════════════════════════════════ */
.mkt-ticker-bar {
    background: rgba(255,255,255,0.025);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
    cursor: default;
    user-select: none;
}
.mkt-ticker-inner {
    display: flex;
    overflow: hidden;
}
.mkt-ticker-track {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    animation: mkt-ticker-scroll 50s linear infinite;
    will-change: transform;
}
.mkt-ticker-bar:hover .mkt-ticker-track {
    animation-play-state: paused;
}
@keyframes mkt-ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.mkt-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    white-space: nowrap;
    border-right: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}
.mkt-ticker-coin-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}
.mkt-ticker-label {
    font-size: 0.72rem;
    color: #6b7280;
    font-weight: 500;
    letter-spacing: 0.02em;
}
.mkt-ticker-value {
    font-size: 0.8rem;
    color: #d1d5db;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.mkt-ticker-change {
    font-size: 0.72rem;
    font-weight: 600;
}

/* ══════════════════════════════════════════════════
   Page Header
══════════════════════════════════════════════════ */
.mkt-page-header { margin-bottom: 20px; }
.mkt-title {
    font-family: var(--global-font);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-primary-100);
    margin: 0 0 5px;
}
.mkt-subtitle {
    font-size: 0.875rem;
    color: #9295a3;
    margin: 0;
}

/* Section header with inline collapse chevron */
.mkt-hl-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    cursor: pointer;
    user-select: none;
}
.mkt-hl-section-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #9295a3;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.mkt-hl-section-chev {
    color: #6b7280;
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}
.mkt-hl-section-header.mkt-hl-collapsed .mkt-hl-section-chev {
    transform: rotate(180deg);
}

/* ══════════════════════════════════════════════════
   Filter Bar
══════════════════════════════════════════════════ */
.mkt-filters {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 12px;
}
.mkt-filter-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.mkt-filter-tabs::-webkit-scrollbar { display: none; }
.mkt-filter-btn {
    padding: 6px 15px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: #9295a3;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    line-height: 1.4;
}
.mkt-filter-btn:hover {
    background: rgba(255,255,255,0.06);
    color: #d1d5db;
    border-color: rgba(255,255,255,0.18);
}
.mkt-filter-btn.active {
    background: #F0B90B;
    border-color: #F0B90B;
    color: #0B0E11;
    font-weight: 600;
}
.mkt-filter-btn { flex-shrink: 0; }
/* Row 2: controls — rows dropdown + highlights toggle */
.mkt-controls-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
/* Rows dropdown */
.mkt-rows-wrap {
    position: relative;
    flex-shrink: 0;
}
.mkt-rows-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: #9295a3;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.mkt-rows-btn:hover {
    background: rgba(255,255,255,0.09);
    color: #d1d5db;
    border-color: rgba(255,255,255,0.22);
}
.mkt-rows-label { color: #6b7280; }
.mkt-rows-val { color: #f3f4f6; font-weight: 700; }
.mkt-rows-chev {
    color: #6b7280;
    transition: transform 0.22s ease;
    flex-shrink: 0;
}
.mkt-rows-wrap.open .mkt-rows-chev { transform: rotate(180deg); }
.mkt-rows-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 80px;
    background: #1E2026;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    z-index: 150;
    overflow: hidden;
}
.mkt-rows-wrap.open .mkt-rows-dropdown { display: block; }
.mkt-rows-opt {
    display: block;
    width: 100%;
    padding: 8px 14px;
    border: none;
    background: transparent;
    color: #9295a3;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.1s;
}
.mkt-rows-opt:hover { background: rgba(255,255,255,0.07); color: #d1d5db; }
.mkt-rows-opt.active { color: #F0B90B; font-weight: 700; }
/* Row 3: full-width search */
.mkt-search-row { width: 100%; }
.mkt-search-wrap { position: relative; width: 100%; }
.mkt-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
}
.mkt-search-input {
    width: 100%;
    padding-left: 32px !important;
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.12);
    color: #d1d5db;
    font-size: 0.85rem;
}
.mkt-search-input:focus {
    background: rgba(255,255,255,0.08);
    border-color: rgba(240,185,11,0.45);
    color: #f3f4f6;
    box-shadow: 0 0 0 2px rgba(240,185,11,0.12);
}
.mkt-search-input::placeholder { color: #6b7280; }

/* ══════════════════════════════════════════════════
   Status Bar (last updated + live indicator)
══════════════════════════════════════════════════ */
.mkt-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 2px 12px;
    font-size: 0.77rem;
    color: #6b7280;
    flex-wrap: wrap;
    gap: 6px;
}
.mkt-status-left {
    display: flex;
    align-items: center;
    gap: 6px;
}
.mkt-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #0ECB81;
    animation: mkt-pulse 2.2s ease infinite;
    flex-shrink: 0;
}
@keyframes mkt-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* ══════════════════════════════════════════════════
   Coin Table
══════════════════════════════════════════════════ */
.mkt-table-wrap {
    padding: 0;
    overflow: hidden;
    position: relative;
    margin-bottom: 4px;
}
.mkt-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: rgba(146,149,163,0.25) transparent; }
.mkt-table-scroll::-webkit-scrollbar { height: 4px; }
.mkt-table-scroll::-webkit-scrollbar-thumb { background: rgba(146,149,163,0.3); border-radius: 999px; }
.mkt-table {
    margin: 0;
    font-size: 0.875rem;
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    table-layout: fixed;
}
/* Column widths — fixed layout requires explicit header widths */
.mkt-table thead th:nth-child(1)  { width: 44px; }   /* # */
.mkt-table thead th:nth-child(2)  { width: 110px; }  /* Name */
/* th:nth-child(3) Price — auto, absorbs remaining space */
.mkt-table thead th:nth-child(4)  { width: 78px; }   /* 1H % */
.mkt-table thead th:nth-child(5)  { width: 78px; }   /* 24H % */
.mkt-table thead th:nth-child(6)  { width: 78px; }   /* 7D % */
.mkt-table thead th:nth-child(7)  { width: 115px; }  /* Market Cap */
.mkt-table thead th:nth-child(8)  { width: 90px; }   /* FDV */
.mkt-table thead th:nth-child(9)  { width: 115px; }  /* Volume 24h */
.mkt-table thead th:nth-child(10) { width: 90px; }   /* 7d Chart */
.mkt-table thead th {
    font-size: 0.72rem;
    font-weight: 700;
    color: #9295a3;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 11px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    white-space: nowrap;
    background: rgba(255,255,255,0.015);
    cursor: pointer;
    user-select: none;
}
.mkt-table thead th:hover { color: #d1d5db; }
.mkt-table thead th.mkt-th-num { text-align: right; }
.mkt-table tbody td {
    padding: 10px 14px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: #d1d5db;
    overflow: hidden;
}
.mkt-table tbody tr:last-child td { border-bottom: none; }
.mkt-table tbody tr:hover td {
    background: rgba(255,255,255,0.04);
}
.mkt-table tbody tr { transition: background 0.1s; cursor: pointer; }

/* Rank column */
.mkt-td-rank {
    color: #6b7280;
    font-size: 0.8rem;
    width: 44px;
    text-align: right;
    padding-right: 6px !important;
}
/* Name column */
.mkt-td-name { min-width: 100px; }
.mkt-name-inner {
    display: flex;
    align-items: center;
    gap: 7px;
}
.mkt-coin-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(255,255,255,0.06);
    object-fit: cover;
}
.mkt-coin-texts { display: flex; flex-direction: column; gap: 1px; min-width: 0; overflow: hidden; }
.mkt-coin-name {
    color: #f3f4f6;
    font-weight: 600;
    font-size: 0.84rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mkt-coin-symbol {
    color: #6b7280;
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Price */
.mkt-td-price {
    color: #f3f4f6;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    text-align: right;
}
/* Change badges */
.mkt-chg {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 5px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    display: inline-block;
}
.mkt-chg-pos { color: #0ECB81; background: rgba(14,203,129,0.1); }
.mkt-chg-neg { color: #F6465D; background: rgba(246,70,93,0.1); }
.mkt-chg-neutral { color: #9295a3; }
/* Market cap / volume */
.mkt-td-num {
    color: #d1d5db;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    text-align: right;
}
/* Sparkline */
.mkt-td-spark {
    width: 96px;
    text-align: right;
    padding: 8px 14px !important;
}
.mkt-td-spark svg { vertical-align: middle; display: inline-block; }

/* Empty / Error state */
.mkt-empty {
    text-align: center;
    padding: 56px 20px !important;
    color: #6b7280;
    font-size: 0.9rem;
}

/* ══════════════════════════════════════════════════
   Loading Overlay
══════════════════════════════════════════════════ */
.mkt-loading {
    position: absolute;
    inset: 0;
    background: rgba(11,14,17,0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    min-height: 120px;
}
.mkt-loading.d-none { display: none !important; }
.mkt-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255,255,255,0.08);
    border-top-color: #F0B90B;
    border-radius: 50%;
    animation: mkt-spin 0.75s linear infinite;
}
@keyframes mkt-spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════
   Pagination
══════════════════════════════════════════════════ */
.mkt-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 16px 0 6px;
    flex-wrap: wrap;
}
.mkt-page-btn {
    padding: 6px 13px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.12);
    background: transparent;
    color: #9295a3;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.12s;
    min-width: 36px;
    text-align: center;
    line-height: 1.4;
}
.mkt-page-btn:hover:not(:disabled):not(.active) {
    background: rgba(255,255,255,0.07);
    color: #d1d5db;
}
.mkt-page-btn.active {
    background: #F0B90B;
    border-color: #F0B90B;
    color: #0B0E11;
    font-weight: 700;
}
.mkt-page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ══════════════════════════════════════════════════
   Sort indicator
══════════════════════════════════════════════════ */
.mkt-sort-icon {
    display: inline-block;
    margin-left: 3px;
    opacity: 0.5;
    font-size: 0.7rem;
}
.mkt-table thead th.mkt-sorted .mkt-sort-icon { opacity: 1; color: #F0B90B; }

/* ══════════════════════════════════════════════════
   Highlights collapsible wrapper
══════════════════════════════════════════════════ */
.mkt-highlights-wrap {
    overflow: hidden;
    max-height: 900px;
    opacity: 1;
    margin-bottom: 1.5rem;
    transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.26s ease,
                margin-bottom 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}
.mkt-highlights-wrap.mkt-hl-collapsed {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
}

/* ══════════════════════════════════════════════════
   Highlights Section
══════════════════════════════════════════════════ */
.mkt-highlights { margin-top: 0; }

.mkt-hl-card {
    padding: 22px 20px;
    width: 100%;
    box-sizing: border-box;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.09);
    background: #161A1F;
    overflow: visible;
}

/* Top Gainers card */
.mkt-hl-gainers-card { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.mkt-hl-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mkt-hl-head-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: #f3f4f6;
    letter-spacing: 0.01em;
}
.mkt-hl-seemore {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    color: #9295a3;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1.4;
}
.mkt-hl-seemore:hover { background: rgba(255,255,255,0.13); color: #d1d5db; border-color: rgba(255,255,255,0.18); }

.mkt-gainers-list { display: flex; flex-direction: column; flex: 1; justify-content: space-around; }
.mkt-gainer-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding: 9px 6px;
    border-radius: 8px;
    transition: background 0.1s;
    cursor: default;
}
.mkt-gainer-row:hover { background: rgba(255,255,255,0.04); }
.mkt-gainer-rank {
    color: #4b5563;
    font-size: 0.72rem;
    width: 20px;
    text-align: right;
    flex-shrink: 0;
}
.mkt-gainer-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(255,255,255,0.06);
    object-fit: cover;
}
.mkt-gainer-texts { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mkt-gainer-sym {
    font-weight: 700;
    font-size: 0.82rem;
    color: #f3f4f6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mkt-gainer-name {
    font-size: 0.68rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mkt-gainer-price {
    font-size: 0.78rem;
    color: #d1d5db;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    margin-left: auto;
    min-width: 0;
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

/* Stat cards: icon badge */
.mkt-hl-stat-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}
.mkt-hl-ico-badge {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 14px;
    flex-shrink: 0;
    line-height: 1;
}
.mkt-hl-ico-green  { background: linear-gradient(135deg, #1a3d26 0%, #0d2416 100%); color: #0ECB81; }
.mkt-hl-ico-orange { background: linear-gradient(135deg, #3d2710 0%, #2a1708 100%); color: #f97316; }
.mkt-hl-ico-blue   { background: linear-gradient(135deg, #0f2040 0%, #081628 100%); color: #3b82f6; }
.mkt-hl-ico-purple { background: linear-gradient(135deg, #2a1040 0%, #1a082a 100%); color: #a855f7; }

/* Per-card top accent border */
.mkt-hl-stat-accent-green  { border-top: 3px solid #0ECB81 !important; }
.mkt-hl-stat-accent-orange { border-top: 3px solid #f97316 !important; }
.mkt-hl-stat-accent-blue   { border-top: 3px solid #3b82f6 !important; }
.mkt-hl-stat-accent-purple { border-top: 3px solid #a855f7 !important; }

.mkt-hl-stat-lbl {
    font-size: 0.72rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.mkt-hl-stat-val {
    font-size: 2rem;
    font-weight: 800;
    color: #f3f4f6;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.mkt-hl-stat-chg {
    font-size: 0.78rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #6b7280;
    margin-top: 4px;
}
.mkt-hl-stat-chg.hl-pos { color: #0ECB81; }
.mkt-hl-stat-chg.hl-neg { color: #F6465D; }

/* Fear & Greed card */
.mkt-hl-fear-card { justify-content: flex-start; }
.mkt-fear-body { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.mkt-fear-gauge { width: 60px; height: 60px; flex-shrink: 0; }
.mkt-fear-svg { width: 100%; height: 100%; }
.mkt-fear-info { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.mkt-fear-label { font-weight: 700; font-size: 0.9rem; color: #f3f4f6; }
.mkt-fear-history {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.69rem;
    line-height: 1.4;
}
.mkt-fear-history span { font-weight: 700; color: #d1d5db; margin-right: 2px; }
.mkt-fear-history small { color: #6b7280; }


/* ══════════════════════════════════════════════════
   Global Search Dropdown
══════════════════════════════════════════════════ */
.mkt-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #1a1b2e;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.55);
    z-index: 200;
    overflow: hidden;
}
.mkt-search-dropdown.d-none { display: none !important; }
.mkt-sdrop-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mkt-sdrop-item:last-child { border-bottom: none; }
.mkt-sdrop-item:hover { background: rgba(255,255,255,0.06); }
.mkt-sdrop-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(255,255,255,0.06);
    object-fit: cover;
}
.mkt-sdrop-icon-ph {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    flex-shrink: 0;
    display: inline-block;
}
.mkt-sdrop-texts {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}
.mkt-sdrop-sym {
    font-weight: 700;
    font-size: 0.82rem;
    color: #f3f4f6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mkt-sdrop-name {
    font-size: 0.7rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ══════════════════════════════════════════════════
   Stat Card v2 — inline icon+label, value+change row
══════════════════════════════════════════════════ */
.mkt-hl-stat2 {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 16px 16px;
    min-width: 0;
}
.mkt-hl-row-hd {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.mkt-hl-ico-sm {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
}
.mkt-hl-ico-indigo { background: linear-gradient(135deg, #1e1b4b 0%, #131030 100%); color: #818cf8; }

.mkt-hl-lbl {
    font-size: 0.8rem;
    font-weight: 600;
    color: #d1d5db;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.mkt-hl-val-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 2px;
}
.mkt-hl-stat-val-sm {
    font-size: 1.35rem;
    font-weight: 800;
    color: #f3f4f6;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.mkt-hl-chg-inline {
    font-size: 0.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.mkt-hl-chg-inline.hl-chg-pos { color: #0ECB81; }
.mkt-hl-chg-inline.hl-chg-neg { color: #F6465D; }
.mkt-hl-chg-inline.hl-chg-neu { color: #6b7280; }
.mkt-hl-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 12px 0;
}
/* Sparkline area for M.Cap card */
.mkt-hl-spark {
    margin-top: 10px;
    flex: 1;
    min-height: 50px;
    overflow: hidden;
}
.mkt-hl-spark svg { display: block; width: 100%; }

/* Fear & Greed card v2 */
.mkt-hl-fear-card2 { justify-content: space-between; }
.mkt-hl-fear2-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex: 1;
    padding: 4px 0 8px;
}
.mkt-fear-gauge-lg { width: 76px !important; height: 76px !important; }
.mkt-hl-fear2-boxes {
    display: flex;
    gap: 8px;
}
.mkt-hl-fear2-box {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 7px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mkt-hl-fear2-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f97316;
}
.mkt-hl-fear2-box small {
    font-size: 0.64rem;
    color: #6b7280;
    font-weight: 500;
}

/* ══════════════════════════════════════════════════
   Highlights Carousel (desktop = flex row, mobile = scroll-snap)
══════════════════════════════════════════════════ */
.mkt-hl-carousel {
    display: flex;
    gap: 16px;
    align-items: stretch;
    width: 100%;
}
.mkt-hl-slide {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.mkt-hl-slide .mkt-hl-card { flex: 1; }

.mkt-hl-slide-stats { flex: 2; }
.mkt-hl-stats-grid {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    --bs-gutter-x: 12px;
    --bs-gutter-y: 12px;
}
.mkt-hl-stats-grid > [class*="col-"] {
    min-width: 0;
}

/* Dot indicators — hidden on desktop */
.mkt-hl-dots { display: none; }

/* ══════════════════════════════════════════════════
   Responsive
══════════════════════════════════════════════════ */
@media (max-width: 991px) {
    .mkt-hl-stat-val { font-size: 1.5rem; }
    .mkt-hl-stat-val-sm { font-size: 1.15rem; }
    .mkt-hl-ico-badge { width: 42px; height: 42px; border-radius: 11px; margin-bottom: 10px; font-size: 1.1rem; }
    .mkt-gainer-icon { width: 32px; height: 32px; }

    /* Carousel on mobile */
    .mkt-hl-carousel {
        overflow-x: scroll;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 12px;
        padding: 2px 2px 10px;
    }
    .mkt-hl-carousel::-webkit-scrollbar { display: none; }

    .mkt-hl-slide {
        flex: 0 0 88%;
        scroll-snap-align: start;
    }
    .mkt-hl-slide-stats {
        flex: 0 0 92%;
    }

    /* Dots */
    .mkt-hl-dots {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 6px;
        padding: 6px 0 2px;
    }
    .mkt-hl-dot {
        width: 6px;
        height: 6px;
        border-radius: 3px;
        background: rgba(255,255,255,0.2);
        cursor: pointer;
        transition: background 0.25s ease, width 0.25s ease;
        flex-shrink: 0;
    }
    .mkt-hl-dot.active {
        background: #F0B90B;
        width: 18px;
    }
}
@media (max-width: 1199px) and (min-width: 992px) {
    .mkt-hl-carousel {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 12px;
        padding: 2px 2px 10px;
    }
    .mkt-hl-carousel::-webkit-scrollbar { display: none; }
    .mkt-hl-slide {
        flex: 0 0 74%;
        scroll-snap-align: start;
    }
    .mkt-hl-slide-stats {
        flex: 0 0 84%;
    }
    .mkt-hl-dots {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 6px;
        padding: 6px 0 2px;
    }
    .mkt-hl-dot {
        width: 6px;
        height: 6px;
        border-radius: 3px;
        background: rgba(255,255,255,0.2);
        cursor: pointer;
        transition: background 0.25s ease, width 0.25s ease;
        flex-shrink: 0;
    }
    .mkt-hl-dot.active {
        background: #F0B90B;
        width: 18px;
    }
}
@media (max-width: 768px) {
    .mkt-ticker-item { padding: 3px 10px; }
    .mkt-table { min-width: 780px; }
    .mkt-td-name { min-width: 120px; }
    .mkt-coin-icon { width: 22px; height: 22px; }
    .mkt-name-inner { gap: 6px; }
    .mkt-coin-name { font-size: 0.8rem; }
    .mkt-coin-symbol { font-size: 0.66rem; }
    .mkt-hl-card { padding: 16px 14px; border-radius: 12px; }
    .mkt-filters { padding: 10px 12px; }
    .mkt-gainer-icon { width: 28px; height: 28px; }
    .mkt-gainer-price { max-width: 84px; }
}
@media (max-width: 575px) {
    .mkt-title { font-size: 1.15rem; }
    .mkt-table { min-width: 620px; }
    .mkt-td-name { min-width: 105px; }
    .mkt-coin-icon { width: 20px; height: 20px; }
    .mkt-name-inner { gap: 5px; }
    .mkt-coin-name { font-size: 0.78rem; }
    .mkt-coin-symbol { font-size: 0.63rem; }
    .mkt-highlights { margin-top: 10px; }
    .mkt-hl-card { padding: 12px; border-radius: 10px; }
    .mkt-hl-stat-val { font-size: 1.2rem; }
    .mkt-hl-stat-val-sm { font-size: 0.95rem; }
    .mkt-hl-stat2 { padding: 12px; }
    .mkt-hl-ico-badge { width: 36px; height: 36px; font-size: 0.95rem; margin-bottom: 8px; border-radius: 10px; }
    .mkt-fear-gauge { width: 44px; height: 44px; }
    .mkt-fear-gauge-lg { width: 58px !important; height: 58px !important; }
    .mkt-fear-label { font-size: 0.8rem; }
    .mkt-gainer-icon { width: 26px; height: 26px; }
    .mkt-gainer-price { max-width: 76px; font-size: 0.74rem; }
    .mkt-hl-fear2-val { font-size: 0.95rem; }
    .mkt-hl-spark { min-height: 36px; }
}

/* ══════════════════════════════════════════════════
   Light Mode overrides  (body.crypt-light)
══════════════════════════════════════════════════ */
body.crypt-light .mkt-ticker-bar {
    background: rgba(0,0,0,0.03);
    border-bottom-color: rgba(0,0,0,0.08);
}
body.crypt-light .mkt-ticker-label { color: #6b7280; }
body.crypt-light .mkt-ticker-value { color: #111827; }
body.crypt-light .mkt-ticker-item  { border-right-color: rgba(0,0,0,0.08); }

body.crypt-light .mkt-title    { color: #111827; }
body.crypt-light .mkt-subtitle { color: #6b7280; }

body.crypt-light .mkt-hl-section-header { border-color: rgba(0,0,0,0.06); }
body.crypt-light .mkt-hl-section-title  { color: #6b7280; }
body.crypt-light .mkt-hl-section-chev  { color: #9ca3af; }

body.crypt-light .mkt-hl-card {
    background: #ffffff;
    border-color: rgba(0,0,0,0.08);
}
body.crypt-light .mkt-hl-lbl           { color: #374151; }
body.crypt-light .mkt-hl-stat-val,
body.crypt-light .mkt-hl-stat-val-sm   { color: #111827; }
body.crypt-light .mkt-hl-chg-inline.hl-chg-neu { color: #9ca3af; }
body.crypt-light .mkt-hl-divider       { background: rgba(0,0,0,0.07); }
body.crypt-light .mkt-hl-head-title    { color: #111827; }
body.crypt-light .mkt-hl-seemore {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.1);
    color: #6b7280;
}
body.crypt-light .mkt-hl-seemore:hover { background: rgba(0,0,0,0.1); color: #374151; }
body.crypt-light .mkt-hl-dots .mkt-hl-dot { background: rgba(0,0,0,0.15); }
body.crypt-light .mkt-hl-dots .mkt-hl-dot.active { background: #3b82f6; }

body.crypt-light .mkt-gainer-rank  { color: #9ca3af; }
body.crypt-light .mkt-gainer-sym   { color: #111827; }
body.crypt-light .mkt-gainer-name  { color: #9ca3af; }
body.crypt-light .mkt-gainer-price { color: #374151; }
body.crypt-light .mkt-gainer-row:hover { background: rgba(0,0,0,0.04); }

body.crypt-light .mkt-hl-fear2-box {
    background: rgba(0,0,0,0.05);
}
body.crypt-light .mkt-hl-fear2-box small { color: #9ca3af; }
body.crypt-light .mkt-fear-label   { color: #111827; }

body.crypt-light .card-bs.mkt-filters {
    background: #ffffff;
    border-color: rgba(0,0,0,0.08);
}
body.crypt-light .mkt-filter-btn {
    border-color: rgba(0,0,0,0.1);
    color: #6b7280;
}
body.crypt-light .mkt-filter-btn:hover  { background: rgba(0,0,0,0.05); color: #374151; }
body.crypt-light .mkt-filter-btn.active { background: var(--bs-primary,#265BFF); color: #fff; border-color: var(--bs-primary,#265BFF); }
body.crypt-light .mkt-rows-btn { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); color: #6b7280; }
body.crypt-light .mkt-rows-btn:hover { background: rgba(0,0,0,0.08); color: #374151; }
body.crypt-light .mkt-rows-val    { color: #111827; }
body.crypt-light .mkt-rows-label  { color: #9ca3af; }
body.crypt-light .mkt-rows-dropdown {
    background: #ffffff;
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
body.crypt-light .mkt-rows-opt { color: #6b7280; }
body.crypt-light .mkt-rows-opt:hover { background: rgba(0,0,0,0.05); color: #374151; }
body.crypt-light .mkt-search-input {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.1);
    color: #111827;
}
body.crypt-light .mkt-search-input:focus {
    background: #fff;
    border-color: rgba(59,130,246,0.5);
    color: #111827;
}
body.crypt-light .mkt-search-input::placeholder { color: #9ca3af; }
body.crypt-light .mkt-search-icon  { color: #9ca3af; }
body.crypt-light .mkt-search-dropdown {
    background: #ffffff;
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}
body.crypt-light .mkt-sdrop-item:hover { background: rgba(0,0,0,0.04); }
body.crypt-light .mkt-sdrop-sym  { color: #111827; }
body.crypt-light .mkt-sdrop-name { color: #9ca3af; }

body.crypt-light .mkt-status-bar { color: #9ca3af; }

body.crypt-light .card-bs.mkt-table-wrap { background: #ffffff; border-color: rgba(0,0,0,0.08); }
body.crypt-light .mkt-table thead th {
    background: rgba(0,0,0,0.02);
    color: #6b7280;
    border-bottom-color: rgba(0,0,0,0.08);
}
body.crypt-light .mkt-table thead th:hover { color: #374151; }
body.crypt-light .mkt-table tbody td  { color: #374151; border-bottom-color: rgba(0,0,0,0.04); }
body.crypt-light .mkt-table tbody tr:hover td { background: rgba(0,0,0,0.03); }
body.crypt-light .mkt-td-rank   { color: #9ca3af; }
body.crypt-light .mkt-td-price  { color: #111827; }
body.crypt-light .mkt-coin-name { color: #111827; }
body.crypt-light .mkt-coin-symbol { color: #9ca3af; }
body.crypt-light .mkt-td-num   { color: #374151; }
body.crypt-light .mkt-empty    { color: #9ca3af; }

body.crypt-light .mkt-pagination .mkt-page-btn {
    border-color: rgba(0,0,0,0.1);
    color: #6b7280;
}
body.crypt-light .mkt-pagination .mkt-page-btn:hover:not(:disabled):not(.active) {
    background: rgba(0,0,0,0.05);
    color: #374151;
}
body.crypt-light .mkt-highlights-wrap .mkt-hl-stat-accent-green  { border-top-color: #16a34a !important; }
body.crypt-light .mkt-highlights-wrap .mkt-hl-stat-accent-orange { border-top-color: #ea580c !important; }
body.crypt-light .mkt-highlights-wrap .mkt-hl-stat-accent-blue   { border-top-color: #2563eb !important; }
body.crypt-light .mkt-highlights-wrap .mkt-hl-stat-accent-purple { border-top-color: #7c3aed !important; }

/* ══════════════════════════════════════════════════
   Mobile UX — v28
   Pure CSS only. Priority: mobile experience.
══════════════════════════════════════════════════ */

/* ── 1. Sticky thead — all screen sizes ─────────────────────
   overflow-x:clip clips visually WITHOUT creating a scroll
   container (unlike overflow:hidden), so position:sticky works. */
.mkt-table-wrap {
    overflow-x: clip !important;
    overflow-y: visible !important;
}
.mkt-table thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    background: #181c22 !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.07);
}
/* Light mode sticky header bg */
body.crypt-light .mkt-table thead th {
    background: #f8f9fa !important;
    box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}

/* ── 2. Touch tap highlight ──────────────────────── */
.mkt-table tbody tr {
    -webkit-tap-highlight-color: rgba(240,185,11,0.07);
}

/* ══════════════════════════════════════════════════
   ≤ 767px  (tablet + phone)
══════════════════════════════════════════════════ */
@media (max-width: 767px) {

    /* Filter tabs: right-edge gradient hint — shows more categories exist */
    .mkt-filter-tabs {
        -webkit-mask-image: linear-gradient(to right, black 76%, transparent 100%);
        mask-image: linear-gradient(to right, black 76%, transparent 100%);
        padding-right: 18px;
    }

    /* Bigger filter buttons — easier to tap */
    .mkt-filter-btn {
        padding: 9px 16px;
        min-height: 38px;
        font-size: 0.83rem;
    }

    /* Bigger pagination buttons — easier to tap */
    .mkt-page-btn {
        min-height: 38px;
        padding: 6px 12px;
    }

    /* Status bar slightly tighter */
    .mkt-status-bar { padding: 4px 2px 10px; }
}

/* ══════════════════════════════════════════════════
   ≤ 575px  (phone — primary target)
══════════════════════════════════════════════════ */
@media (max-width: 575px) {

    /* ── Page header compact ─────────────────────── */
    .mkt-page-header { margin-bottom: 10px; }
    .mkt-title       { margin-bottom: 2px; font-size: 1.05rem; }
    .mkt-subtitle    { font-size: 0.79rem; }

    /* ── Filters card tighter ────────────────────── */
    .mkt-filters { gap: 8px; padding: 10px 12px; margin-bottom: 8px; }

    /* Filter buttons — very small screen */
    .mkt-filter-btn { padding: 8px 13px; font-size: 0.8rem; }

    /* Search — taller for easier finger tap */
    .mkt-search-input {
        padding-top:    10px !important;
        padding-bottom: 10px !important;
        font-size: 0.875rem !important;
    }

    /* Rows dropdown — easier tap */
    .mkt-rows-opt { padding: 10px 14px; font-size: 0.84rem; }

    /* ── Status bar minimal ──────────────────────── */
    .mkt-status-bar { font-size: 0.71rem; padding: 3px 2px 8px; }

    /* ── Table column widths: override inline styles ─
       Goal: reduce total width ~796px → ~720px
       so #, Name, Price all fit in the first viewport.
       All overrides need !important to beat inline style="". */
    .mkt-table thead th:nth-child(1)  { width: 28px  !important; } /* # */
    .mkt-table thead th:nth-child(2)  { width: 98px  !important; } /* Name */
    .mkt-table thead th:nth-child(3)  { width: 104px !important; } /* Price */
    .mkt-table thead th:nth-child(4)  { width: 62px  !important; } /* 1h % */
    .mkt-table thead th:nth-child(5)  { width: 62px  !important; } /* 24h % */
    .mkt-table thead th:nth-child(6)  { width: 62px  !important; } /* 7d % */
    .mkt-table thead th:nth-child(7)  { width: 84px  !important; } /* Market Cap */
    .mkt-table thead th:nth-child(8)  { width: 70px  !important; } /* FDV */
    .mkt-table thead th:nth-child(9)  { width: 88px  !important; } /* Volume */
    .mkt-table thead th:nth-child(10) { width: 68px  !important; } /* Chart */
    /* Total: 28+98+104+62+62+62+84+70+88+68 = 726px */

    /* ── Table cell padding & typography ────────── */
    .mkt-table thead th {
        padding: 9px 6px;
        font-size: 0.67rem;
        letter-spacing: 0.025em;
    }
    .mkt-table tbody td     { padding: 9px 6px; }
    .mkt-td-rank            { padding-right: 3px !important; }
    .mkt-coin-icon          { width: 22px; height: 22px; }
    .mkt-name-inner         { gap: 5px; }
    .mkt-coin-name          { font-size: 0.78rem; }
    .mkt-coin-symbol        { font-size: 0.63rem; }

    /* Change badge — compact */
    .mkt-chg {
        font-size: 0.73rem;
        padding: 2px 5px;
        border-radius: 4px;
    }

    /* ── Loading overlay & spinner ───────────────── */
    .mkt-spinner { width: 36px; height: 36px; border-width: 3.5px; }

    /* ── Empty / error state ─────────────────────── */
    .mkt-empty {
        padding: 36px 16px !important;
        font-size: 0.83rem;
        line-height: 1.75;
    }

    /* ── Pagination compact ──────────────────────── */
    .mkt-pagination { gap: 3px; padding: 10px 0 4px; }
    .mkt-page-btn   { padding: 5px 8px; font-size: 0.77rem; min-width: 32px; min-height: 34px; }

    /* ── Highlights carousel dots — bigger for touch */
    .mkt-hl-dot        { width: 7px; height: 7px; border-radius: 3.5px; }
    .mkt-hl-dot.active { width: 22px; }

    /* ── Gainer/loser list — compact ────────────── */
    .mkt-gainer-icon  { width: 24px; height: 24px; }
    .mkt-gainer-name  { font-size: 0.75rem; }
    .mkt-gainer-price { font-size: 0.73rem; }

    /* ── Table wrapper bottom margin ─────────────── */
    .mkt-table-wrap { margin-bottom: 2px; }
}
