/* ===== Dashboard Styles ===== */
/* Styles specific to index.html (dashboard page) */

/* ===== Hero Title Scramble ===== */
.hero-scramble-char {
    position: absolute;
    left: 0;
    top: 0;
    color: transparent;
    -webkit-text-stroke: 1px #BDBEDB;
}

.hero-scramble-char--accent {
    -webkit-text-stroke: 1px #a0a4fe;
}

.hero-placeholder {
    visibility: hidden;
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    margin-top: 55px;
    padding: 54px 58px 113px 58px;
    height: 344px;
    box-sizing: border-box;
}

/* Corner decorations */
.hero-corners {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.corner {
    position: absolute;
    width: 70px;
    height: 70px;
}

.corner::before,
.corner::after {
    content: '';
    position: absolute;
    background-color: #171825;
}

/* Horizontal line */
.corner::before {
    width: 70px;
    height: 2px;
}

/* Vertical line */
.corner::after {
    width: 2px;
    height: 70px;
}

/* Corner animations */
@keyframes corner-top-left {
    from {
        transform: translate(-60px, -60px);
        opacity: 0;
    }
    to {
        transform: translate(0, 0);
        opacity: 1;
    }
}

@keyframes corner-top-right {
    from {
        transform: translate(60px, -60px);
        opacity: 0;
    }
    to {
        transform: translate(0, 0);
        opacity: 1;
    }
}

@keyframes corner-bottom-left {
    from {
        transform: translate(-60px, 60px);
        opacity: 0;
    }
    to {
        transform: translate(0, 0);
        opacity: 1;
    }
}

@keyframes corner-bottom-right {
    from {
        transform: translate(60px, 60px);
        opacity: 0;
    }
    to {
        transform: translate(0, 0);
        opacity: 1;
    }
}

/* Top-left corner */
.corner--top-left {
    top: 0;
    left: 0;
    animation: corner-top-left 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.corner--top-left::before {
    top: 0;
    left: 0;
}

.corner--top-left::after {
    top: 0;
    left: 0;
}

/* Top-right corner */
.corner--top-right {
    top: 0;
    right: 0;
    animation: corner-top-right 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.corner--top-right::before {
    top: 0;
    right: 0;
}

.corner--top-right::after {
    top: 0;
    right: 0;
}

/* Bottom-left corner */
.corner--bottom-left {
    bottom: 0;
    left: 0;
    animation: corner-bottom-left 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.corner--bottom-left::before {
    bottom: 0;
    left: 0;
}

.corner--bottom-left::after {
    bottom: 0;
    left: 0;
}

/* Bottom-right corner */
.corner--bottom-right {
    bottom: 0;
    right: 0;
    animation: corner-bottom-right 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.corner--bottom-right::before {
    bottom: 0;
    right: 0;
}

.corner--bottom-right::after {
    bottom: 0;
    right: 0;
}

/* Hero content */
.hero-content {
    position: relative;
}

.hero-title {
    font-family: 'Neue Machina', sans-serif;
    font-weight: 700;
    font-size: 64px;
    line-height: 62px;
    color: #ffffff;
    margin: 0;
}

.hero-title-accent {
    color: #a0a4fe;
}

.hero-description {
    font-family: 'Neue Machina', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 17px;
    color: #606061;
    margin-top: 20px;
    max-width: 465px;
}

.hero-faq-link {
    color: #B9B9B9;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hero-faq-link:hover {
    color: #a0a4fe;
}

/* Coins image */
.hero-coins {
    position: absolute;
    right: 34px;
    top: 47px;
    width: 465px;
    height: 256px;
    opacity: 0.8;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
}

/* ===== Filters Section ===== */
.filters {
    margin-top: 45px;
}

.filters-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.filters-row--second {
    margin-top: 16px;
    justify-content: space-between;
}

/* Filter Group */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-label {
    font-family: 'Neue Machina', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 16px;
    color: #606061;
}

/* Filter Sort Button (used inside grouped dropdown) */
.filter-sort-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.filter-sort-btn:hover {
    opacity: 0.8;
}

.filter-sort-btn.active {
    opacity: 1;
}

.filter-sort-btn .sort-arrow {
    display: block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #606061;
    transition: transform 0.2s ease;
}

.filter-sort-btn.desc .sort-arrow {
    transform: rotate(0deg);
}

.filter-sort-btn.asc .sort-arrow {
    transform: rotate(180deg);
}

/* Filter Input - with iOS fix */
.filter-input {
    width: 180px;
    height: 42px;
    padding: 0 14px;
    background-color: rgba(160, 164, 254, 0.03);
    border: 2px solid #171825;
    font-family: 'Google Sans Mono', monospace;
    font-weight: 500;
    font-size: 14px;
    color: #b9b9b9;
    outline: none;
    /* iOS fix - no rounded corners */
    border-radius: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.filter-input:focus {
    border-color: #34354e;
}

/* Remove number input arrows */
.filter-input[type="number"]::-webkit-outer-spin-button,
.filter-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.filter-input[type="number"] {
    -moz-appearance: textfield;
}

/* Filter widths (8 filters: liquidity 193px + 7 x 145px = 1208px, 7 gaps x 16px = 112px, total 1320px) */
.filter-group--liquidity .filter-input {
    width: 193px;
}

.filter-group--apy .filter-input {
    width: 145px;
}

/* Custom Select */
.custom-select {
    position: relative;
    cursor: pointer;
}

.custom-select__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 42px;
    padding: 0 12px 0 14px;
    background-color: rgba(160, 164, 254, 0.03);
    border: 2px solid #171825;
    transition: border-color 0.2s ease;
}

.custom-select.open .custom-select__trigger {
    border-color: #34354e;
}

.custom-select__value {
    font-family: 'Google Sans Mono', monospace;
    font-weight: 500;
    font-size: 14px;
    color: #b9b9b9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.custom-select__arrow {
    width: 12px;
    height: 7px;
    margin-left: 8px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.custom-select.open .custom-select__arrow {
    transform: rotate(180deg);
}

.custom-select__options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 100;
    background-color: #0a0a10;
    border: 2px solid transparent;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
}

.custom-select.open .custom-select__options {
    max-height: 300px;
    overflow-y: auto;
    border-color: #171825;
    opacity: 1;
    visibility: visible;
}

.custom-select__option {
    padding: 10px 16px;
    font-family: 'Google Sans Mono', monospace;
    font-weight: 500;
    font-size: 14px;
    color: #b9b9b9;
    transition: background-color 0.15s ease;
}

.custom-select__option:hover {
    background-color: rgba(160, 164, 254, 0.1);
}

.custom-select__option.selected {
    color: #a0a4fe;
}

/* Custom scrollbar for options */
.custom-select__options::-webkit-scrollbar {
    width: 4px;
}

.custom-select__options::-webkit-scrollbar-track {
    background: #0a0a10;
}

.custom-select__options::-webkit-scrollbar-thumb {
    background: #171825;
}

/* Select widths (7 equal filters: 145px each, liquidity 190px fixed) */
.filter-group--volume .custom-select {
    width: 145px;
}

.filter-group--risk .custom-select {
    width: 145px;
}

/* Grouped dropdown (Risk filter) */
.custom-select--grouped .custom-select__options {
    width: 260px;
    padding: 8px 0;
}

.custom-select--grouped.open .custom-select__options {
    max-height: 400px;
}

.custom-select__group {
    padding: 0 12px;
    margin-bottom: 8px;
}

.custom-select__group:last-child {
    margin-bottom: 0;
}

.custom-select__group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    margin-bottom: 4px;
    border-bottom: 1px solid #171825;
}

.custom-select__group-label {
    font-family: 'Neue Machina', sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: #606061;
}

.custom-select__group-options {
    display: flex;
    gap: 4px;
}

.custom-select__group-options .custom-select__option {
    flex: 1;
    text-align: center;
    padding: 6px 0;
    min-width: 28px;
    font-size: 13px;
}

/* Sort button in group header */
.custom-select__group-header .filter-sort-btn {
    width: 14px;
    height: 14px;
}

.custom-select__group-header .filter-sort-btn .sort-arrow {
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 4px solid #606061;
}

.filter-group--time .custom-select {
    width: 145px;
}

.filter-group--tick .custom-select {
    width: 145px;
}

.filter-group--changes .custom-select {
    width: 145px;
}

/* Market Changes dropdown - wider options panel */
.filter-group--changes .custom-select__options {
    width: 280px;
}

.filter-group--changes .custom-select__option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.filter-group--changes .custom-select__option-time {
    color: #b9b9b9;
}

.filter-group--changes .custom-select__option-summary {
    color: #606061;
    font-size: 12px;
}

.filter-group--midpoint .custom-select {
    width: 145px;
}


/* Search Bar - with iOS fix */
.filter-search {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-search-input {
    width: 515px;
    height: 42px;
    padding: 0 40px 0 14px;
    background-color: #0a0a10;
    border: 2px solid #171825;
    font-family: 'Google Sans Mono', monospace;
    font-weight: 500;
    font-size: 14px;
    color: #b9b9b9;
    outline: none;
    /* iOS fix - no rounded corners */
    border-radius: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.filter-search-input::placeholder {
    font-family: 'Neue Machina', sans-serif;
    color: #353538;
}

.filter-search-input:focus {
    border-color: #34354e;
}

.filter-search-icon-wrapper {
    position: absolute;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.filter-search-icon {
    width: 13px;
    height: 14px;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 18px;
}

.filter-btn {
    width: 145px;
    height: 42px;
    font-family: 'Neue Machina', sans-serif;
    font-weight: 500;
    font-size: 14px;
    border: 2px solid;
    cursor: pointer;
    transition: opacity 0.2s ease;
    padding-bottom: 2px;
    /* iOS fix */
    border-radius: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.filter-btn:hover {
    opacity: 0.8;
}

.filter-btn--clear {
    background-color: #a0a4fe;
    border-color: #898de5;
    color: #0a0a10;
}

/* ===== Markets Section ===== */
.markets {
    margin-top: 48px;
    margin-bottom: 60px;
    overflow: visible;
}

/* Markets Header */
.markets-header {
    display: flex;
    align-items: center;
    padding: 0 11px;
    margin-bottom: 12px;
    border: 2px solid transparent;
}

.markets-header__col {
    font-family: 'Neue Machina', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 16px;
    color: #b9b9b9;
    text-align: center;
}

.markets-header__col--market {
    text-align: left;
}

/* Column widths - matching Figma (+5%) */
.markets-header__col--market {
    width: 364px;
    flex-shrink: 0;
    margin-right: 16px;
}

.markets-header__col--price {
    width: 64px;
    flex-shrink: 0;
}

.markets-header__col--tick {
    width: 140px;
    flex-shrink: 0;
}

.markets-header__col--reward {
    width: 92px;
    flex-shrink: 0;
}

.markets-header__col--volume {
    width: 76px;
    flex-shrink: 0;
}

.markets-header__col--risk {
    width: 64px;
    flex-shrink: 0;
}

.markets-header__col--time {
    width: 120px;
    flex-shrink: 0;
}

.markets-header__col--yes-apy {
    width: 116px;
    flex-shrink: 0;
}

.markets-header__col--no-apy {
    width: 116px;
    flex-shrink: 0;
}

.markets-header__col--two-apy {
    flex: 1;
}

/* Sortable columns */
.markets-header__col.sortable {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.markets-header__col.sortable:hover {
    color: #a0a4fe;
}

.markets-header__col.sortable .col-text {
    display: inline;
    white-space: nowrap;
}

/* Sort arrow */
.sort-arrow {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    opacity: 0;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
    margin-left: -3px;
    margin-top: 2px;
}

/* Show arrow on hover (preview) */
.markets-header__col.sortable:hover .sort-arrow {
    opacity: 0.4;
    border-bottom: 5px solid currentColor;
}

/* Active sort states */
.markets-header__col.sortable.sort-desc .sort-arrow,
.markets-header__col.sortable.sort-asc .sort-arrow {
    opacity: 1;
}

/* Descending - arrow pointing down */
.markets-header__col.sortable.sort-desc .sort-arrow {
    border-top: 5px solid #a0a4fe;
    border-bottom: none;
}

/* Ascending - arrow pointing up */
.markets-header__col.sortable.sort-asc .sort-arrow {
    border-bottom: 5px solid #a0a4fe;
    border-top: none;
}

/* Active column text color */
.markets-header__col.sortable.sort-desc,
.markets-header__col.sortable.sort-asc {
    color: #a0a4fe;
}

/* Markets List */
.markets-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: visible;
}

.markets-loading {
    font-family: 'Google Sans Mono', monospace;
    font-size: 14px;
    color: #606061;
    text-align: center;
    padding: 40px;
}

/* Market Row */
.market-row {
    display: flex;
    align-items: center;
    height: 64px;
    padding: 0 11px;
    background-color: #0a0a10;
    border: 2px solid #171825;
    cursor: pointer;
    transition: border-color 0.2s ease;
    margin-top: -2px;
    -webkit-user-drag: none;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.market-row:first-child {
    margin-top: 0;
}

.market-row:hover {
    border-color: #252640;
    position: relative;
    z-index: 1;
}

/* Extend hover zone to include action buttons */
.market-row::after {
    content: '';
    position: absolute;
    top: 0;
    right: -72px;
    width: 72px;
    height: 100%;
    pointer-events: auto;
}

/* Market Action Buttons (appear on hover) */
.market-actions {
    position: absolute;
    right: -64px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 10;
}

.market-row:hover .market-actions {
    opacity: 1;
    visibility: visible;
}

.market-action-btn {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.market-action-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    /* Convert any color to #555787 */
    filter: brightness(0) saturate(100%) invert(32%) sepia(15%) saturate(800%) hue-rotate(201deg);
    transition: filter 0.2s ease;
}

.market-action-btn:hover img {
    /* Brighter on hover */
    filter: brightness(0) saturate(100%) invert(65%) sepia(15%) saturate(800%) hue-rotate(201deg);
}

/* Market Info (icon + title) */
.market-info {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 364px;
    flex-shrink: 0;
    margin-right: 16px;
}

.market-icon {
    width: 41px;
    height: 41px;
    border-radius: 0;
    object-fit: cover;
    flex-shrink: 0;
}

.market-icon--loading {
    background: linear-gradient(90deg, #171825 25%, #252640 50%, #171825 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

.market-title {
    font-family: 'Google Sans Mono', monospace;
    font-weight: 400;
    font-size: 15px;
    line-height: 16px;
    color: #555787;
    text-transform: uppercase;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* Market Cells */
.market-cell {
    font-family: 'Google Sans Mono', monospace;
    font-weight: 400;
    font-size: 15px;
    line-height: 16px;
    color: #555787;
    text-align: center;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.market-cell--price {
    width: 64px;
    flex-shrink: 0;
    font-size: 12px;
    line-height: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Price lines with left-aligned Y/N labels */
.price-line {
    display: flex;
    align-items: center;
    width: 48px;
    margin-left: 6px;
}

.price-label {
    width: 12px;
    flex-shrink: 0;
    text-align: left;
}

.market-cell--tick {
    width: 140px;
    flex-shrink: 0;
}

.market-cell--reward {
    width: 92px;
    flex-shrink: 0;
    padding-right: 11px;
}

.market-cell--volume {
    width: 76px;
    flex-shrink: 0;
    padding-right: 11px;
}

.market-cell--risk {
    width: 64px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    padding-right: 11px;
}

.market-cell--time {
    width: 120px;
    flex-shrink: 0;
    font-size: 12px;
    padding-right: 11px;
}

.market-cell--yes-apy {
    width: 116px;
    flex-shrink: 0;
    padding-right: 11px;
}

.market-cell--no-apy {
    width: 116px;
    flex-shrink: 0;
    padding-right: 11px;
}

.market-cell--two-apy {
    flex: 1;
    padding-right: 11px;
}

/* Auto-shrink font for long APY values (10+ chars) */
.market-cell--apy-long {
    font-size: 13px;
}

/* Risk Progress Bar */
.risk-bar {
    display: flex;
    gap: 2px;
}

.risk-bar__segment {
    width: 4px;
    height: 14px;
    background-color: #202133;
}

.risk-bar__segment--active {
    background-color: #555787;
}

/* No Markets State */
.markets-empty {
    font-family: 'Neue Machina', sans-serif;
    font-size: 14px;
    color: #606061;
    text-align: center;
    padding: 40px;
}

.markets-error {
    font-family: 'Neue Machina', sans-serif;
    font-size: 14px;
    color: #ff6b6b;
    text-align: center;
    padding: 40px;
}

/* ===== Pagination ===== */
.pagination {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 24px;
    padding: 0;
}

/* Data Status Indicator */
.data-status {
    position: absolute;
    left: 0;
    display: flex;
    align-items: center;
    gap: 0;
}

.data-status__dot-container {
    width: 32px;
    height: 32px;
    background-color: #050508;
    border: 2px solid #171825;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.data-status__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #606061;
    position: relative;
    z-index: 2;
}

.data-status__pulse {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: transparent;
    z-index: 1;
}

.data-status__info {
    position: relative;
    height: 32px;
    min-width: 160px;
    background-color: #050508;
    border: 2px solid #171825;
    border-left: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    gap: 8px;
    cursor: default;
}

.data-status__label {
    font-family: 'Google Sans Mono', monospace;
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
    color: #606061;
    white-space: nowrap;
}

.data-status__time {
    font-family: 'Google Sans Mono', monospace;
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
    color: #606061;
    text-align: right;
    white-space: nowrap;
}

/* Fresh data (< 3 min) - green with pulse waves */
.data-status--fresh .data-status__dot {
    background-color: #4ade80;
}

.data-status--fresh .data-status__pulse {
    background-color: #4ade80;
    animation: pulse-wave 2s ease-out infinite;
}

@keyframes pulse-wave {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* Stale data (>= 3 min) - red with blink */
.data-status--stale .data-status__dot {
    background-color: #f87171;
    animation: blink 1.5s steps(1) infinite;
}

@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

/* Grayscale effect for stale markets table only */
.markets-table--stale {
    filter: grayscale(1);
    opacity: 0.7;
}

/* Stats Comparison Tooltip */
.stats-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    padding: 10px 16px 10px 12px;
    background-color: #171825;
    border: 1px solid #252640;
    font-family: 'Neue Machina', sans-serif;
    font-weight: 500;
    font-size: 13px;
    line-height: 1.5;
    color: #b9b9b9;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    pointer-events: none;
    z-index: 1000;
}

/* Custom scrollbar for tooltip */
.stats-tooltip::-webkit-scrollbar {
    width: 2px;
    height: 2px;
}

.stats-tooltip::-webkit-scrollbar-track {
    background: #171825;
}

.stats-tooltip::-webkit-scrollbar-thumb {
    background: #252640;
}

.stats-tooltip.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.stats-tooltip__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    padding: 4px 0;
    user-select: none;
}

.stats-tooltip__header:hover {
    color: #e0e0e0;
}

.stats-tooltip__label {
    color: #6b6b80;
    font-size: 14px;
    font-weight: 400;
    margin-left: 5px;
}

.stats-tooltip__header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-tooltip__header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-tooltip__time {
    color: #e0e0e0;
    font-size: 13px;
    font-family: 'Google Sans Mono', monospace;
}

.stats-tooltip__summary {
    font-family: 'Google Sans Mono', monospace;
    font-size: 12px;
    color: #b9b9b9;
}

.stats-tooltip__arrow-toggle {
    font-size: 10px;
    color: #6b6b80;
    transition: transform 0.2s ease;
}

.stats-tooltip__arrow-toggle.expanded {
    transform: rotate(180deg);
}

.stats-tooltip__changes {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #252640;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Custom scrollbar for changes list */
.stats-tooltip__changes::-webkit-scrollbar {
    width: 2px;
    height: 2px;
}

.stats-tooltip__changes::-webkit-scrollbar-track {
    background: #171825;
}

.stats-tooltip__changes::-webkit-scrollbar-thumb {
    background: #252640;
}

.stats-tooltip__time-group {
    margin-bottom: 8px;
}

.stats-tooltip__time-group:last-child {
    margin-bottom: 0;
}

.stats-tooltip__time-label {
    font-family: 'Google Sans Mono', monospace;
    font-size: 11px;
    color: #6b6b80;
    margin-bottom: 4px;
}

.stats-tooltip__change {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.stats-tooltip__change-symbol {
    font-family: 'Google Sans Mono', monospace;
    font-weight: 700;
    font-size: 12px;
    width: 12px;
    text-align: center;
    flex-shrink: 0;
}

.stats-tooltip__change--appeared .stats-tooltip__change-symbol {
    color: #4ade80;
}

.stats-tooltip__change--disappeared .stats-tooltip__change-symbol {
    color: #f87171;
}

.stats-tooltip__change--increased .stats-tooltip__change-symbol {
    color: #4ade80;
}

.stats-tooltip__change--decreased .stats-tooltip__change-symbol {
    color: #f87171;
}

.stats-tooltip__change-name {
    display: inline-block;
    white-space: nowrap;
    width: var(--name-width, auto);
}

.stats-tooltip__change-name a {
    color: #b9b9b9;
    text-decoration: none;
    transition: color 0.15s ease;
}

.stats-tooltip__change-name a:hover {
    color: #e0e0e0;
    text-decoration: underline;
}

.stats-tooltip__change-values {
    display: flex;
    align-items: center;
    font-family: 'Google Sans Mono', monospace;
    color: #6b6b80;
    font-size: 11px;
    white-space: nowrap;
    margin-left: 20px;
}

.stats-tooltip__change-old {
    display: inline-block;
    width: 35px;
    text-align: right;
}

.stats-tooltip__change-arrow {
    color: #4a4a5a;
    padding: 0 10px;
}

.stats-tooltip__change-new {
    display: inline-block;
    width: 55px;
    text-align: right;
}

.stats-tooltip__no-data {
    font-family: 'Neue Machina', sans-serif;
    color: #6b6b80;
    font-style: italic;
}

/* Groups list (expanded state) */
/* When showing all time groups (expanded state), fix width to 680px */
.stats-tooltip:has(.stats-tooltip__groups-list) {
    width: 680px;
}

.stats-tooltip__groups-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #252640;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

/* Custom scrollbar for groups list */
.stats-tooltip__groups-list::-webkit-scrollbar {
    width: 2px;
    height: 2px;
}

.stats-tooltip__groups-list::-webkit-scrollbar-track {
    background: #171825;
}

.stats-tooltip__groups-list::-webkit-scrollbar-thumb {
    background: #252640;
}

.stats-tooltip__group-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 5px 6px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    pointer-events: auto;
    flex-shrink: 0;
}

.stats-tooltip__group-row:hover {
    background-color: rgba(160, 164, 254, 0.1);
}

.stats-tooltip__group-time {
    font-family: 'Google Sans Mono', monospace;
    font-size: 12px;
    color: #b9b9b9;
}

.stats-tooltip__group-summary {
    font-family: 'Google Sans Mono', monospace;
    font-size: 12px;
    color: #6b6b80;
}

/* Back arrow */
.stats-tooltip__back-arrow {
    font-size: 10px;
    color: #6b6b80;
    margin-right: 8px;
}

/* More indicator */
.stats-tooltip__more {
    font-size: 11px;
    color: #6b6b80;
    font-style: italic;
    padding-left: 20px;
    margin-top: 4px;
}

/* ===== Statistics Charts Section ===== */
.stats-charts {
    margin-top: 48px;
    margin-bottom: 64px;
    background: #0a0a10;
    border: 2px solid #171825;
}

.stats-charts__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    padding: 16px 25px;
}

.stats-charts__title {
    font-family: 'Neue Machina', sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 16px;
    color: #ffffff;
    margin: 0;
}

.stats-charts__divider {
    height: 2px;
    background: #171825;
    width: 100%;
}

.stats-charts__period-selector {
    display: flex;
    align-items: center;
    background: #050508;
    height: 34px;
    padding: 4px;
    gap: 0;
    position: relative;
}

/* Sliding indicator background */
.period-slider {
    position: absolute;
    height: 26px;
    background: #171825;
    transition: left 0.25s ease, width 0.25s ease;
    pointer-events: none;
    z-index: 0;
}

.period-btn {
    font-family: 'Google Sans Mono', monospace;
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
    height: 26px;
    padding: 0 14px;
    background: transparent;
    border: none;
    color: #606061;
    cursor: pointer;
    transition: color 0.2s ease;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.period-btn:hover {
    color: #b9b9b9;
}

.period-btn--active {
    color: #b9b9b9;
}

.stats-charts__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    padding: 36px 36px 24px 36px;
}

/* Chart Card */
.chart-card {
    position: relative;
    padding: 0 18px 24px 18px;
}

.chart-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    height: 32px;  /* Fixed height to prevent skeleton jitter */
    box-sizing: border-box;
}

.chart-card__title {
    font-family: 'Google Sans Mono', monospace;
    font-weight: 400;
    font-size: 14px;
    line-height: 16px;
    color: #606061;
    text-transform: uppercase;
    margin-left: 0px;
}

.chart-card:nth-child(2) .chart-card__title {
    margin-left: 2px;
}

.chart-card__value {
    font-family: 'Google Sans Mono', monospace;
    font-weight: 500;
    font-size: 14px;
    line-height: 16px;
    color: #ffffff;
    text-transform: uppercase;
    margin-right: 0px;
}

.chart-card__canvas-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
}

/* Watermark logo on each chart */
.chart-card__canvas-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 56%;
    transform: translate(-50%, -50%);
    width: 202px;
    height: 52px;
    background-image: url('../assets/logotype.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.02;
    pointer-events: none;
    z-index: 1;
}

.chart-canvas {
    width: 100%;
    height: 100%;
}

/* Chart Tooltip */
.chart-tooltip {
    position: absolute;
    background: #171825;
    border: 1px solid #252636;
    padding: 8px 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 10;
    transform: translateX(-50%);
    white-space: nowrap;
}

.chart-tooltip--visible {
    opacity: 1;
}

.chart-tooltip__value {
    font-family: 'Google Sans Mono', monospace;
    font-weight: 500;
    font-size: 13px;
    color: #ffffff;
    margin-bottom: 2px;
}

.chart-tooltip__date {
    font-family: 'Google Sans Mono', monospace;
    font-weight: 400;
    font-size: 11px;
    color: #606061;
}

/* Chart Dot (point indicator on hover) */
.chart-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #555787;
    border: 2px solid #ffffff;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.chart-dot--visible {
    opacity: 1;
}

/* Corner Elements - L-shaped borders */
.chart-corner {
    position: absolute;
    width: 36px;
    height: 36px;
    pointer-events: none;
}

.chart-corner::before,
.chart-corner::after {
    content: '';
    position: absolute;
    background: #171825;
}

/* Top-left corner */
.chart-corner--top-left {
    top: 0;
    left: 0;
}
.chart-corner--top-left::before {
    width: 2px;
    height: 36px;
    top: 0;
    left: 0;
}
.chart-corner--top-left::after {
    width: 36px;
    height: 2px;
    top: 0;
    left: 0;
}

/* Top-right corner */
.chart-corner--top-right {
    top: 0;
    right: 0;
}
.chart-corner--top-right::before {
    width: 2px;
    height: 36px;
    top: 0;
    right: 0;
}
.chart-corner--top-right::after {
    width: 36px;
    height: 2px;
    top: 0;
    right: 0;
}

/* Bottom-left corner */
.chart-corner--bottom-left {
    bottom: 0;
    left: 0;
}
.chart-corner--bottom-left::before {
    width: 2px;
    height: 36px;
    bottom: 0;
    left: 0;
}
.chart-corner--bottom-left::after {
    width: 36px;
    height: 2px;
    bottom: 0;
    left: 0;
}

/* Bottom-right corner */
.chart-corner--bottom-right {
    bottom: 0;
    right: 0;
}
.chart-corner--bottom-right::before {
    width: 2px;
    height: 36px;
    bottom: 0;
    right: 0;
}
.chart-corner--bottom-right::after {
    width: 36px;
    height: 2px;
    bottom: 0;
    right: 0;
}

/* Responsive: stack charts on mobile (880px) */
@media (max-width: 880px) {
    .stats-charts__grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
    }

    .chart-card {
        padding: 0 18px 20px 18px;
    }

    .rewards-distribution {
        margin: 0 24px 24px 24px;
    }

    .rewards-distribution__legend {
        gap: 12px 16px;
    }

    /* Hide stats tooltip on mobile */
    .stats-tooltip {
        display: none !important;
    }
}

/* Page Navigation */
.pagination-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-arrow {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: 2px solid #171825;
    cursor: pointer;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}

.pagination-arrow:hover {
    border-color: #252640;
}

.pagination-arrow-icon {
    width: 10px;
    height: 6px;
}

.pagination-arrow--prev .pagination-arrow-icon {
    transform: rotate(90deg);
}

.pagination-arrow--next .pagination-arrow-icon {
    transform: rotate(-90deg);
}

/* Page Numbers */
.pagination-pages {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-page {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: 2px solid transparent;
    font-family: 'Google Sans Mono', monospace;
    font-weight: 500;
    font-size: 14px;
    color: #606061;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.pagination-page:hover {
    color: #b9b9b9;
}

.pagination-page--active {
    border-color: #171825;
    color: #b9b9b9;
    cursor: text;
}

/* Page Input (when clicking on active page) */
.pagination-input {
    width: 48px;
    height: 32px;
    padding: 0 8px;
    background-color: transparent;
    border: 2px solid #a0a4fe;
    font-family: 'Google Sans Mono', monospace;
    font-weight: 500;
    font-size: 14px;
    color: #b9b9b9;
    text-align: center;
    outline: none;
}

.pagination-input::-webkit-outer-spin-button,
.pagination-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pagination-input {
    -moz-appearance: textfield;
}

.pagination-ellipsis {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Google Sans Mono', monospace;
    font-weight: 500;
    font-size: 14px;
    color: #606061;
}

/* Per Page Selector */
.pagination-per-page {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pagination-label {
    font-family: 'Neue Machina', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #606061;
}

.pagination-select {
    width: 80px;
}

.pagination-select .custom-select__trigger {
    height: 32px;
}

/* ===== Dashboard-specific Tooltips ===== */

/* Offset for market header tooltips (account for sort arrow) */
.markets-header__col[data-tooltip]::after {
    left: calc(50% - 8px);
}

/* Yes/No APY header tooltips - fixed width */
.markets-header__col--yes-apy[data-tooltip]::after,
.markets-header__col--no-apy[data-tooltip]::after {
    width: 268px;
}

/* Two APY header tooltip - fixed width */
.markets-header__col--two-apy[data-tooltip]::after {
    width: 254px;
}

/* Tick & Spread header tooltip - fixed width */
.markets-header__col--tick[data-tooltip]::after {
    width: 234px;
}

/* Price header tooltip - fixed width */
.markets-header__col--price[data-tooltip]::after {
    width: 204px;
}

/* APY tooltips - wider for longer text */
.market-cell--yes-apy[data-tooltip]::after,
.market-cell--no-apy[data-tooltip]::after,
.market-cell--two-apy[data-tooltip]::after {
    max-width: 320px;
}

/* Two-side APY tooltip - right-aligned to prevent overflow (rightmost column) */
.market-cell--two-apy[data-tooltip]::after {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

/* Risk header tooltip - fixed size */
.markets-header__col--risk[data-tooltip]::after {
    width: 252px;
    height: 50px;
}

/* ===== Risk Breakdown Tooltip ===== */
.risk-tooltip {
    position: fixed;
    z-index: 1001;
    padding: 12px 16px;
    background-color: #171825;
    border: 1px solid #252640;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    pointer-events: none;
    min-width: 200px;
}

.risk-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

.risk-tooltip__hint {
    font-family: 'Neue Machina', sans-serif;
    font-weight: 400;
    font-size: 11px;
    line-height: 14px;
    color: #888888;
    text-align: left;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #252640;
}

.risk-tooltip__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 3px 0;
}

.risk-tooltip__row:first-child {
    padding-top: 0;
}

.risk-tooltip__row:last-child {
    padding-bottom: 0;
}

.risk-tooltip__label {
    font-family: 'Neue Machina', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
    color: #b9b9b9;
    text-align: left;
}

.risk-tooltip__value {
    font-family: 'Google Sans Mono', 'Consolas', 'Monaco', monospace;
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
    color: #e0e0e0;
    text-align: right;
}

/* Risk value brightness levels (1-5, 1 is dimmest, 5 is brightest) */
.risk-tooltip__value--level-1 {
    color: #666666;
}

.risk-tooltip__value--level-2 {
    color: #888888;
}

.risk-tooltip__value--level-3 {
    color: #aaaaaa;
}

.risk-tooltip__value--level-4 {
    color: #cccccc;
}

.risk-tooltip__value--level-5 {
    color: #ffffff;
}

/* ===== APY Average Tooltip ===== */
.apy-tooltip {
    position: fixed;
    z-index: 1001;
    padding: 10px 14px;
    background: #14151F;
    border: 1px solid #252640;
    border-radius: 0;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    min-width: 140px;
}

.apy-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

.apy-tooltip__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 2px 0;
}

.apy-tooltip__row:first-child {
    padding-top: 0;
}

.apy-tooltip__row:last-child {
    padding-bottom: 0;
}

.apy-tooltip__label {
    font-family: 'Neue Machina', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
    color: #8B8B9B;
    text-align: left;
}

.apy-tooltip__value {
    font-family: 'Google Sans Mono', 'Consolas', 'Monaco', monospace;
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
    color: #E0E0E0;
    text-align: right;
}

.apy-tooltip__hint {
    font-family: 'Neue Machina', sans-serif;
    font-weight: 400;
    font-size: 11px;
    line-height: 14px;
    color: #888888;
    text-align: left;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #252640;
}

/* ===== Rewards Distribution Bar ===== */
.rewards-distribution {
    margin: 0 36px 36px 36px;
    padding-top: 0;
}

.rewards-distribution__header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 10px;
}

.rewards-distribution__title {
    font-family: 'Google Sans Mono', monospace;
    font-weight: 400;
    font-size: 14px;
    line-height: 16px;
    color: #606061;
    text-transform: uppercase;
}

.rewards-distribution__bar {
    display: flex;
    height: 32px;
    width: 100%;
    overflow: visible;
}

.rewards-distribution__segment {
    height: 100%;
    position: relative;
    cursor: pointer;
    min-width: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    transition: opacity 0.2s ease;
}

.rewards-distribution__segment:hover {
    opacity: 0.85;
}

/* Segment colors - purple gradient from bright to dim */
.rewards-distribution__segment--cat-0 {
    background-color: #a0a4fe; /* $1000+ - 100% */
}

.rewards-distribution__segment--cat-1 {
    background-color: rgba(160, 164, 254, 0.75); /* $500-1000 - 75% */
}

.rewards-distribution__segment--cat-2 {
    background-color: rgba(160, 164, 254, 0.55); /* $100-500 - 55% */
}

.rewards-distribution__segment--cat-3 {
    background-color: rgba(160, 164, 254, 0.38); /* $50-100 - 38% */
}

.rewards-distribution__segment--cat-4 {
    background-color: rgba(160, 164, 254, 0.24); /* $10-50 - 24% */
}

.rewards-distribution__segment--cat-5 {
    background-color: rgba(160, 164, 254, 0.12); /* <$10 - 12% */
}

/* Inline info shown on hover - centered in segment (for large segments >= 15%) */
.rewards-distribution__segment-info {
    font-family: 'Google Sans Mono', monospace;
    font-weight: 500;
    font-size: 11px;
    line-height: 14px;
    color: #ffffff;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.rewards-distribution__segment:hover .rewards-distribution__segment-info {
    opacity: 1;
}

/* Tooltip for small segments (< 15%) */
.rewards-distribution__segment-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background-color: #171825;
    border: 1px solid #252640;
    font-family: 'Google Sans Mono', monospace;
    font-weight: 500;
    font-size: 11px;
    line-height: 14px;
    color: #ffffff;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    pointer-events: none;
    z-index: 100;
}

.rewards-distribution__segment:hover .rewards-distribution__segment-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Hide tooltip when inline info exists (desktop only, mobile overrides this) */
.rewards-distribution__segment-info + .rewards-distribution__segment-tooltip {
    display: none;
}

/* Legend */
.rewards-distribution__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 16px;
}

.rewards-distribution__legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rewards-distribution__legend-color {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.rewards-distribution__legend-color--cat-0 {
    background-color: #a0a4fe;
}

.rewards-distribution__legend-color--cat-1 {
    background-color: rgba(160, 164, 254, 0.75);
}

.rewards-distribution__legend-color--cat-2 {
    background-color: rgba(160, 164, 254, 0.55);
}

.rewards-distribution__legend-color--cat-3 {
    background-color: rgba(160, 164, 254, 0.38);
}

.rewards-distribution__legend-color--cat-4 {
    background-color: rgba(160, 164, 254, 0.24);
}

.rewards-distribution__legend-color--cat-5 {
    background-color: rgba(160, 164, 254, 0.12);
}

.rewards-distribution__legend-text {
    font-family: 'Google Sans Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    color: #606061;
}

/* ===== Dashboard Skeleton Loading ===== */

/* Skeleton market row */
.market-row--skeleton {
    pointer-events: none;
}

.market-row--skeleton .market-info,
.market-row--skeleton .market-cell {
    position: relative;
}

/* Skeleton icon */
.skeleton--icon {
    width: 41px;
    height: 41px;
    flex-shrink: 0;
}

/* Skeleton title (two lines) */
.skeleton--title {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.skeleton--title-line {
    height: 12px;
}

.skeleton--title-line:first-child {
    width: 85%;
}

.skeleton--title-line:last-child {
    width: 60%;
}

/* Skeleton text (generic) */
.skeleton--text {
    height: 14px;
    width: 70%;
    margin: 0 auto;
}

/* Skeleton text variations */
.skeleton--text-short {
    width: 50%;
}

.skeleton--text-wide {
    width: 90%;
}

/* Skeleton risk bar */
.skeleton--risk {
    display: flex;
    gap: 2px;
    justify-content: center;
}

.skeleton--risk-segment {
    width: 4px;
    height: 14px;
    background-color: #171825;
}

/* ===== Stats Section Skeleton ===== */

/* Chart value skeleton (next to title) */
.chart-card__value {
    position: relative;
}

.chart-card__value-text {
    display: inline;
}

.chart-card__value-skeleton {
    display: none;
    width: 60px;
    height: 18px;  /* Match value-text actual height */
}

/* Before data loads: show skeleton, hide text */
.stats-charts:not(.stats-charts--charts-loaded) .chart-card__value-text {
    display: none;
}

.stats-charts:not(.stats-charts--charts-loaded) .chart-card__value-skeleton {
    display: inline-block;
}

/* Chart skeleton (line placeholder) */
.chart-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding: 20px 0;
}

.chart-skeleton__line {
    width: 100%;
    height: 100%;
}

.chart-skeleton__line polyline {
    fill: none;
    stroke: #1f2033;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

/* Hide skeleton and show canvas when charts loaded */
.stats-charts--charts-loaded .chart-skeleton {
    display: none;
}

.stats-charts:not(.stats-charts--charts-loaded) .chart-canvas {
    opacity: 0;
}

.stats-charts--charts-loaded .chart-canvas {
    opacity: 1;
}

/* Rewards Distribution skeleton bar */
.rewards-distribution__skeleton-bar {
    display: flex;
    height: 32px;
    width: 100%;
    gap: 2px;
}

.rewards-distribution__skeleton-segment {
    height: 100%;
    background: linear-gradient(
        90deg,
        #171825 0%,
        #1f2033 50%,
        #171825 100%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

/* Different opacities to mimic real distribution look */
.rewards-distribution__skeleton-segment:nth-child(1) { opacity: 1; }
.rewards-distribution__skeleton-segment:nth-child(2) { opacity: 0.75; }
.rewards-distribution__skeleton-segment:nth-child(3) { opacity: 0.55; }
.rewards-distribution__skeleton-segment:nth-child(4) { opacity: 0.38; }
.rewards-distribution__skeleton-segment:nth-child(5) { opacity: 0.24; }
.rewards-distribution__skeleton-segment:nth-child(6) { opacity: 0.12; }

/* Hide skeleton bar when distribution loaded */
.stats-charts--dist-loaded .rewards-distribution__skeleton-bar {
    display: none;
}

/* Hide real content BEFORE distribution loaded (skeleton visible) */
.stats-charts:not(.stats-charts--dist-loaded) .rewards-distribution__segment {
    display: none;
}

.stats-charts:not(.stats-charts--dist-loaded) .rewards-distribution__legend-item {
    display: none;
}

/* Rewards Distribution skeleton legend */
.rewards-distribution__skeleton-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    /* No margin-top - parent .rewards-distribution__legend already has it */
}

.rewards-distribution__skeleton-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rewards-distribution__skeleton-color {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.rewards-distribution__skeleton-text {
    width: 80px;
    height: 16px;  /* Match real legend-text line-height */
}

/* Hide skeleton legend when distribution loaded */
.stats-charts--dist-loaded .rewards-distribution__skeleton-legend {
    display: none;
}

/* ===== Mobile Market Cards ===== */
/* Hidden on desktop (>1400px), visible on mobile */
.markets-mobile {
    display: none;
    margin-top: 40px;
}

/* Market Card */
.market-card {
    background: transparent;
    border: 2px solid #171825;
    margin-bottom: 12px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.market-card:hover {
    border-color: #252640;
}

/* Card Header - Icon + Title */
.market-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 2px solid #171825;
}

.market-card__icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    object-fit: cover;
}

.market-card__icon--loading {
    background: linear-gradient(90deg, #171825 25%, #252640 50%, #171825 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

.market-card__title {
    font-family: 'Google Sans Mono', monospace;
    font-weight: 400;
    font-size: 15px;
    line-height: 16px;
    color: #555787;
    text-transform: uppercase;
    /* Truncate long titles */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Price + Risk Row - 2 columns */
.market-card__price-risk {
    display: grid;
    grid-template-columns: 1fr auto;
    border-bottom: 2px solid #171825;
}

/* Prices container (YES 32.8 // NO 66.3) */
.market-card__prices {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 12px;
    border-right: 2px solid #171825;
}

.market-card__price {
    display: flex;
    align-items: center;
    font-family: 'Google Sans Mono', monospace;
    font-weight: 400;
    font-size: 14px;
    line-height: 16px;
}

.market-card__price-label {
    margin-right: 4px;
    color: #555787;
}

.market-card__price-value {
    color: #555787;
}

.market-card__price-divider {
    color: #3a3a4a;
    font-family: 'Google Sans Mono', monospace;
    font-size: 14px;
}

/* Risk (just the bar, no label) */
.market-card__risk {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
}

.market-card__risk-bar {
    display: flex;
    gap: 2px;
}

.market-card__risk-segment {
    width: 4px;
    height: 14px;
    background: #202133;
}

.market-card__risk-segment--filled {
    background: #555787;
}

/* Stats Row */
.market-card__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 2px solid #171825;
}

.market-card__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    border-right: 2px solid #171825;
}

.market-card__stat:last-child {
    border-right: none;
}

.market-card__stat-label {
    font-family: 'Google Sans Mono', monospace;
    font-weight: 400;
    font-size: 11px;
    color: #3a3a4a;
    text-transform: uppercase;
}

.market-card__stat-value {
    font-family: 'Google Sans Mono', monospace;
    font-weight: 400;
    font-size: 15px;
    line-height: 16px;
    color: #555787;
}

/* APY Row */
.market-card__apy {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.market-card__apy-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    border-right: 2px solid #171825;
}

.market-card__apy-item:last-child {
    border-right: none;
}

.market-card__apy-label {
    font-family: 'Google Sans Mono', monospace;
    font-weight: 400;
    font-size: 11px;
    color: #3a3a4a;
    text-transform: uppercase;
}

.market-card__apy-value {
    font-family: 'Google Sans Mono', monospace;
    font-weight: 400;
    font-size: 15px;
    line-height: 16px;
    color: #555787;
}

/* ===== Responsive - Filters horizontal scroll (1400px) ===== */
/* Filters are 1320px total, container is 1400px with 40px padding = 1320px content */
@media (max-width: 1400px) {
    .filters {
        width: 100%;
        max-width: 100%;
        /* No overflow hidden - allow dropdowns to show */
    }

    .filters-row:not(.filters-row--second) {
        width: 100%;
        max-width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        /* Hide scrollbar */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }

    .filters-row:not(.filters-row--second)::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .filter-group {
        flex-shrink: 0;
    }

    /* Dropdowns need higher z-index on mobile */
    .custom-select__options {
        z-index: 1000;
    }

    /* Second row - search flexible with max-width, button fixed */
    .filter-search {
        flex: 1;
        min-width: 0;
        max-width: 515px;
    }

    .filter-search-input {
        width: 100%;
    }

    /* Stats - smaller padding */
    .stats-charts {
        margin-top: 32px;
    }

    .stats-charts__grid {
        gap: 24px;
        padding: 28px 28px 20px 28px;
    }

    .rewards-distribution {
        margin: 0 28px 28px 28px;
    }

    .rewards-distribution__legend {
        gap: 16px;
    }

    /* On mobile: always use tooltip, never inline text */
    .rewards-distribution__segment-info {
        display: none !important;
    }

    /* Override desktop rule - show tooltip even after segment-info */
    .rewards-distribution__segment-info + .rewards-distribution__segment-tooltip,
    .rewards-distribution__segment-tooltip {
        display: block;
    }

    /* Mobile market cards - show on mobile, hide desktop table */
    .markets-mobile {
        display: block;
    }

    .markets-table {
        display: none;
    }
}

/* ===== Responsive - Hide coins (1130px) ===== */
@media (max-width: 1130px) {
    .hero-coins {
        display: none;
    }
}

/* ===== Responsive - Pagination stack (800px) ===== */
@media (max-width: 800px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: space-between;
        row-gap: 16px;
    }

    /* First row: data-status left, per-page right */
    .data-status {
        position: static;
    }

    /* Second row: pagination-nav centered, full width */
    .pagination-nav {
        position: static;
        transform: none;
        order: 3;
        width: 100%;
        justify-content: center;
    }
}

/* ===== Responsive - Hero text scaling (710px) ===== */
@media (max-width: 710px) {
    .hero-title {
        font-size: 56px;
        line-height: 58px;
    }

    .hero-description {
        font-size: 16px;
        line-height: 18px;
    }
}

/* ===== Responsive - Hero text scaling (650px) ===== */
@media (max-width: 650px) {
    .hero-title {
        font-size: 48px;
        line-height: 52px;
    }

    .hero-description {
        font-size: 15px;
        line-height: 17px;
    }
}

/* ===== Responsive - Small screens (600px) ===== */
@media (max-width: 600px) {
    /* Hero Section */
    /* Padding from hero corners to content = 38px */
    .hero {
        margin-top: 40px;
        padding: 32px 38px 40px 38px;
        height: auto;
    }

    .hero-title {
        font-size: 40px;
        line-height: 44px;
    }

    .hero-description {
        font-size: 14px;
        line-height: 18px;
        margin-top: 16px;
        max-width: 100%;
    }

    /* Corner decorations - smaller */
    .corner {
        width: 50px;
        height: 50px;
    }

    .corner::before {
        width: 50px;
    }

    .corner::after {
        height: 50px;
    }

    /* Filters */
    .filters {
        margin-top: 24px;
    }

    .filters-row {
        gap: 12px;
    }

    .filters-row:not(.filters-row--second) {
        padding-bottom: 4px;
    }

    /* Liquidity input - shorter on mobile */
    .filter-group--liquidity .filter-input {
        width: 176px;
    }

    /* Second row - search + button stacked */
    .filters-row--second {
        flex-direction: column;
        overflow-x: visible;
        margin-top: 6px;
        gap: 8px;
    }

    .filter-search {
        width: 100%;
        flex: none;
        max-width: none;
    }

    .filter-search-input {
        width: 100%;
        max-width: none;
    }

    .filter-buttons {
        width: 100%;
    }

    .filter-btn {
        width: 100%;
    }
}

/* ===== Responsive - Mobile (480px) ===== */
@media (max-width: 480px) {
    /* Hero Section */
    /* Padding from hero corners to content = 28px */
    .hero {
        margin-top: 32px;
        padding: 32px 28px 32px 28px;
    }

    .hero-title {
        font-size: 38px;
        line-height: 42px;
    }

    .hero-description {
        font-size: 13px;
        line-height: 17px;
        margin-top: 14px;
    }

    /* Corner decorations - even smaller */
    .corner {
        width: 36px;
        height: 36px;
    }

    .corner::before {
        width: 36px;
    }

    .corner::after {
        height: 36px;
    }

    /* Filters - same horizontal scroll, just smaller gap */
    .filters {
        margin-top: 20px;
    }

    .filters-row {
        gap: 10px;
    }

    /* Stats - extra compact */
    .stats-charts__grid {
        padding: 20px;
    }

    .chart-card {
        padding: 0 16px 18px 16px;
    }

    .chart-card__canvas-wrapper {
        height: 160px;
    }

    .rewards-distribution {
        margin: 0 20px 20px 20px;
    }

    .rewards-distribution__bar {
        height: 28px;
    }

    .rewards-distribution__legend {
        margin-top: 12px;
    }

    .rewards-distribution__legend-text {
        font-size: 11px;
    }
}

/* ===== Responsive - Stats header stack (360px) ===== */
@media (max-width: 360px) {
    .stats-charts__header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        padding: 14px 20px;
    }
}
