.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* 支持币种：排序+搜索容器 */
.support-coin-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

/* 左侧排序按钮区域，复用 category-tabs 的外观 */
.support-coin-controls .category-tabs {
    flex: 1 1 auto;
}

/* 右侧搜索 */
.support-coin-search form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.support-coin-search input[type="text"] {
    padding: 0 10px;
    height:32px;
    width: 240px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.support-coin-search input[type="text"]:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24,144,255,0.15);
}

.support-coin-search .btn {
    white-space: nowrap;
    height:32px;
    padding: 6px 12px;
    border: 1px solid #1890ff;
    background: #1890ff;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.support-coin-search .btn:hover {
    background: #40a9ff;
    border-color: #40a9ff;
}

.tab-btn {
    padding: 8px 16px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none;
    color: #333;
    display: inline-block;
}

.tab-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
    text-decoration: none;
}

.tab-btn.active {
    background: #1890ff;
    border-color: #1890ff;
    color: #fff;
}

.tab-btn.active:hover {
    color: #fff;
}

.market-table {
    width: 100%;
    min-width: 768px; /* 确保小屏下出现横向滚动而不是内容挤压 */
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
}

.market-table thead {
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

.market-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-right: 1px solid #f0f0f0;
    position: relative;
}

.market-table th:last-child {
    border-right: none;
}

.market-table th.sortable {
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.market-table th.sortable:hover {
    background: #f0f0f0;
}

.sort-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #999;
}

.market-table tbody tr {
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.2s;
}

.market-table tbody tr:hover {
    background: #fafafa;
}

.market-table td {
    padding: 12px 8px;
    border-right: 1px solid #f5f5f5;
    vertical-align: middle;
}

.market-table td:last-child {
    border-right: none;
}

.coin-symbol {
    font-weight: 600;
    color: #333;
    overflow: hidden;
    display: inline-block;
}

.coin-symbol a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.coin-symbol a:hover {
    color: #1890ff;
}

.coin-symbol div {
    display: flex;
    font-weight: 700;
    line-height: 1.2;
}

.coin-symbol small {
    display: flex;
    color: #666;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
    margin-top: 2px;
}

.coin-icon {
    width: 28px;
    height: 28px;
    margin-right: 8px;
    margin-top: 2px;
    float: left;
    border-radius: 50%;
    border: 1px solid #f0f0f0;
    background: #fff;
    object-fit: cover;
}

.coin-icon:hover {
    border-color: #1890ff;
    box-shadow: 0 0 4px rgba(24, 144, 255, 0.2);
}

.lever-tag {
    background: #ff6b35;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    margin: 5px 0 0 5px;
    display: inline-block;
    vertical-align: top;
}

.market-table .price {
    font-family: XPK, Arial, sans-serif;
    text-align: left;
}

.market-table .price .cny-price {
    color: #666;
}

.market-table .change.positive {
    background: rgba(82, 196, 26, 0.1);
    color: #52c41a;
    font-weight: 600;
}

.market-table .change.negative {
    background: rgba(255, 77, 79, 0.1);
    color: #ff4d4f;
    font-weight: 600;
}

.market-table .volume {
    font-family: XPK, Arial, sans-serif;
    font-size: 13px;
    text-align: right;
}

.market-table .volume .cny-price {
    color: #666;
}

.actions {
    text-align: center;
}

.action-btn {
    padding: 4px 12px;
    margin: 0 2px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.action-btn.primary {
    background: #1890ff;
    border-color: #1890ff;
    color: #fff;
}

.action-btn.primary:hover {
    background: #40a9ff;
}

.api-error {
    padding: 20px;
    text-align: center;
    color: #ff4d4f;
    background: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: 4px;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .category-tabs {
        flex-wrap: wrap;
    }

    /* 移动端上下显示：按钮在上，搜索在下 */
    .support-coin-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .support-coin-search form {
        justify-content: flex-start;
    }
    .support-coin-search input[type="text"] {
        width: 100%;
    }

    .tab-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .market-table {
        font-size: 12px;
    }

    .market-table th,
    .market-table td {
        padding: 8px 4px;
    }

    .action-btn {
        padding: 3px 8px;
        font-size: 11px;
    }
}

body.fuinight .tab-btn {
    background: #1f1f1f;
    border-color: #3a3a3a;
    color: #e6e6e6;
}

/* 夜间模式：搜索框与按钮 */
body.fuinight .support-coin-search input[type="text"] {
    background: #1f1f1f;
    border-color: #3a3a3a;
    color: #e6e6e6;
}
body.fuinight .support-coin-search input[type="text"]:focus {
    border-color: #4dabf7;
    box-shadow: 0 0 0 2px rgba(77,171,247,0.2);
}
body.fuinight .support-coin-search .btn {
    background: #4dabf7;
    border-color: #4dabf7;
}
body.fuinight .support-coin-search .btn:hover {
    background: #6bb8ff;
    border-color: #6bb8ff;
}

body.fuinight .tab-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

body.fuinight .market-table {
    background: #1f1f1f;
    color: #e6e6e6;
}

body.fuinight .market-table thead {
    background: #2a2a2a;
    border-bottom: 1px solid #3a3a3a;
}

body.fuinight .market-table th {
    color: #e6e6e6;
    border-right: 1px solid #3a3a3a;
}

body.fuinight .market-table th.sortable:hover {
    background: #333;
}

body.fuinight .market-table tbody tr {
    border-bottom: 1px solid #3a3a3a;
}

body.fuinight .market-table tbody tr:hover {
    background: #2a2a2a;
}

body.fuinight .market-table td {
    border-right: 1px solid #3a3a3a;
}

body.fuinight .coin-symbol,
body.fuinight .market-table .price {
    color: #e6e6e6;
}

body.fuinight .lever-tag {
    background: #d4420a;
    color: #fff;
}

body.fuinight .action-btn {
    background: #1f1f1f;
    border-color: #3a3a3a;
    color: #e6e6e6;
}

body.fuinight .action-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

body.fuinight .api-error {
    background: #2a1f1f;
    border: 1px solid #3a2a2a;
    color: #faa;
}

.market-data-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #e1e5e9;
}

/* 仅让表格区域支持横向滚动 */
.market-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.market-data-section h3 {
    color: #1a73e8;
    margin-bottom: 15px;
    font-size: 20px;
    border-bottom: 2px solid #1a73e8;
    padding-bottom: 8px;
}

.api-info {
    background: #e8f4fd;
    padding: 8px 12px;
    border-radius: 4px;
    color: #1a73e8;
    font-size: 13px;
    margin-bottom: 15px;
    border-left: 3px solid #1a73e8;
}

.cache-info {
    color: #666;
    font-size: 12px;
    margin-top: 10px;
    text-align: right;
}

.api-error {
    color: #d73527;
    background: #fde7e7;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #d73527;
    margin: 10px 0;
}

body.fuinight .market-data-section {
    background: #1f1f1f;
    border: 1px solid #333;
}

body.fuinight .market-data-section h3 {
    color: #4dabf7;
    border-bottom-color: #4dabf7;
}

body.fuinight .api-info {
    background: #1e3a5f;
    color: #4dabf7;
    border-left-color: #4dabf7;
}

body.fuinight .cache-info {
    color: #999;
}

body.fuinight .api-error {
    background: #2a1f1f;
    color: #ff7875;
    border-left-color: #ff4d4f;
}

.pagination-info {
    text-align: right;
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination-list {
    display: inline-flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.pagination-link,
.pagination-ellipsis {
    display: inline-block;
    padding: 8px 12px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    font-size: 14px;
    transition: all 0.2s;
}

.pagination-link:hover {
    background: #f5f5f5;
    border-color: #1890ff;
    color: #1890ff;
}

.pagination-link.current {
    background: #1890ff;
    border-color: #1890ff;
    color: #fff;
    cursor: default;
}

.pagination-ellipsis {
    border-color: transparent;
    color: #999;
    cursor: default;
}

body.fuinight .pagination-info {
    color: #999;
}

body.fuinight .pagination-link,
body.fuinight .pagination-ellipsis {
    background: #2a2a2a;
    border-color: #444;
    color: #ccc;
}

body.fuinight .pagination-link:hover {
    background: #333;
    border-color: #4dabf7;
    color: #4dabf7;
}

body.fuinight .pagination-link.current {
    background: #4dabf7;
    border-color: #4dabf7;
    color: #fff;
}

body.fuinight .pagination-ellipsis {
    border-color: transparent;
    color: #666;
}

.market-data-name-link {
    color: #007cba !important;
    text-decoration: none !important;
    font-weight: 500;
    transition: color 0.2s ease;
}

.market-data-name-link:hover {
    color: #005a87 !important;
    text-decoration: underline !important;
}

.market-data-name-link:visited {
    color: #007cba !important;
}

.related-market-data {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.related-link {
    display: inline-block;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.related-link:hover {
    background: #e7f3ff;
    border-color: #1890ff;
    color: #1890ff;
    text-decoration: none;
}

.related-link:visited {
    color: #495057;
}

.related-link:visited:hover {
    color: #1890ff;
}

.related-link.current {
    background: #1890ff;
    border-color: #1890ff;
    color: #fff;
    font-weight: 500;
}

.related-link.current:hover {
    background: #06c;
    border-color: #06c;
    color: #fff;
    cursor: default;
}

.related-link.current:visited {
    color: #fff;
}

.related-link.current:visited:hover {
    color: #fff;
}

.public-data-table {
    width: 100%;
    min-width: 768px; /* 确保小屏下出现横向滚动而不是内容挤压 */
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
    margin-top: 15px;
}

/* 仅让公共数据表格区域支持横向滚动 */
.public-data-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.public-data-table thead {
    background: #f0f8ff;
    border-bottom: 2px solid #1890ff;
}

.public-data-table th {
    padding: 14px 10px;
    text-align: left;
    font-weight: 600;
    color: #1890ff;
    border-right: 1px solid #e6f4ff;
    position: relative;
    font-size: 13px;
    white-space: nowrap;
}

.public-data-table th:last-child {
    border-right: none;
}

.public-data-table th.sortable {
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.public-data-table th.sortable:hover {
    background: #e6f4ff;
}

.public-data-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.public-data-table tbody tr:hover {
    background: #fafbff;
}

.public-data-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.public-data-table tbody tr:nth-child(even):hover {
    background: #f0f7ff;
}

.public-data-table td {
    padding: 12px 10px;
    border-right: 1px solid #f0f0f0;
    vertical-align: middle;
    font-size: 13px;
}

.public-data-table td:last-child {
    border-right: none;
}

.public-data-table .instrument-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.public-data-table .instrument-symbol {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.public-data-table .instrument-base {
    color: #1890ff;
    font-size: 12px;
    background: #f0f8ff;
    padding: 2px 6px;
    border-radius: 12px;
    white-space: nowrap;
}

.public-data-table .instrument-quote {
    color: #666;
    font-size: 11px;
    background: #f5f5f5;
    padding: 2px 5px;
    border-radius: 10px;
}

.public-data-table .status-live {
    color: #52c41a;
    font-weight: 500;
}

.public-data-table .status-suspend {
    color: #faad14;
    font-weight: 500;
}

.public-data-table .status-preopen {
    color: #1890ff;
    font-weight: 500;
}

.public-data-table .status-halt {
    color: #f5222d;
    font-weight: 500;
}

.public-data-table .category-spot {
    background: #f6ffed;
    color: #52c41a;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.public-data-table .category-futures {
    background: #fff7e6;
    color: #fa8c16;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.public-data-table .category-swap {
    background: #f0f5ff;
    color: #1890ff;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.public-data-table .category-option {
    background: #f9f0ff;
    color: #722ed1;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .public-data-table {
        font-size: 12px;
    }

    .public-data-table th,
    .public-data-table td {
        padding: 8px 6px;
    }

    .public-data-table .instrument-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .public-data-table .instrument-base,
    .public-data-table .instrument-quote {
        font-size: 10px;
        padding: 1px 4px;
    }
}

body.fuinight .public-data-table {
    background: #1f1f1f;
    color: #e6e6e6;
}

body.fuinight .public-data-table thead {
    background: #2a3f5f;
    border-bottom: 2px solid #4dabf7;
}

body.fuinight .public-data-table th {
    color: #4dabf7;
    border-right: 1px solid #3a4a5a;
}

body.fuinight .public-data-table th.sortable:hover {
    background: #334155;
}

body.fuinight .public-data-table tbody tr {
    border-bottom: 1px solid #3a3a3a;
}

body.fuinight .public-data-table tbody tr:hover {
    background: #2a2a2a;
}

body.fuinight .public-data-table tbody tr:nth-child(even) {
    background: #262626;
}

body.fuinight .public-data-table tbody tr:nth-child(even):hover {
    background: #2a3441;
}

body.fuinight .public-data-table td {
    border-right: 1px solid #3a3a3a;
}

body.fuinight .public-data-table .instrument-symbol {
    color: #e6e6e6;
}

body.fuinight .public-data-table .instrument-base {
    color: #4dabf7;
    background: #1e3a5f;
}

body.fuinight .public-data-table .instrument-quote {
    color: #999;
    background: #333;
}

body.fuinight .public-data-table .status-live {
    color: #73d13d;
}

body.fuinight .public-data-table .status-suspend {
    color: #ffc53d;
}

body.fuinight .public-data-table .status-preopen {
    color: #4dabf7;
}

body.fuinight .public-data-table .status-halt {
    color: #ff7875;
}

body.fuinight .public-data-table .category-spot {
    background: #1f2f1f;
    color: #73d13d;
}

body.fuinight .public-data-table .category-futures {
    background: #2f2a1f;
    color: #ffa940;
}

body.fuinight .public-data-table .category-swap {
    background: #1f262f;
    color: #4dabf7;
}

body.fuinight .public-data-table .category-option {
    background: #2a1f2f;
    color: #b37feb;
}

/* removed toolbar and sort controls styles */

.support-coin-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 20px 0;
}

.support-coin-item {
    position: relative;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s;
    cursor: pointer;
    overflow: hidden;
}

.support-coin-item:hover {
    border-color: #1890ff;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.15);
    transform: translateY(-1px);
}

.coin-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.coin-link:hover {
    text-decoration: none;
    color: inherit;
}

.coin-content {
    display: block;
}

.support-coin-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
}

.support-coin-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.support-coin-icon.default {
    background: linear-gradient(135deg, #1890ff, #36cfc9);
    color: #fff;
    font-weight: 600;
}

.support-coin-symbol-text {
    font-size: 16px;
}

.support-coin-info {
    text-align: center;
    margin-bottom: 12px;
}

.support-coin-symbol {
    font-size: 16px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 4px;
}

.support-coin-name {
    font-size: 13px;
    color: #8c8c8c;
    line-height: 1.4;
}

.support-coin-type-tag {
    position: relative;
    top: 0;
    right: 0;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
}

/* 容器：右上角横向排列多个标签 */
.support-coin-type-tags {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.support-coin-type-tag.type-spot {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #d9f7be;
}

.support-coin-type-tag.type-contract {
    background: #fff7e6;
    color: #fa8c16;
    border: 1px solid #ffd591;
}

.support-coin-type-tag.type-option {
    background: #f9f0ff;
    color: #722ed1;
    border: 1px solid #d3adf7;
}

@media (max-width: 768px) {
    .support-coin-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin: 16px 0;
    }

    .support-coin-item {
        padding: 12px;
    }

    .support-coin-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 8px;
    }

    .support-coin-symbol-text {
        font-size: 14px;
    }

    .support-coin-symbol {
        font-size: 14px;
    }

    .support-coin-name {
        font-size: 12px;
    }

    /* removed toolbar responsive styles */
}

@media (max-width: 480px) {
    .support-coin-grid {
        gap: 8px;
    }

    .support-coin-item {
        padding: 30px 10px 10px 10px;
    }

    .support-coin-icon {
        width: 36px;
        height: 36px;
        margin-bottom: 6px;
    }
}

/* removed dark mode toolbar/sort styles */

body.fuinight .support-coin-item {
    background: #262626;
    border-color: #434343;
}

body.fuinight .support-coin-item:hover {
    border-color: #1890ff;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.25);
}

body.fuinight .support-coin-symbol {
    color: #d9d9d9;
}

body.fuinight .support-coin-name {
    color: #bfbfbf;
}

body.fuinight .support-coin-type-tag.type-spot {
    background: #162312;
    color: #73d13d;
    border-color: #389e0d;
}

body.fuinight .support-coin-type-tag.type-contract {
    background: #2b1d11;
    color: #ffa940;
    border-color: #d48806;
}

body.fuinight .support-coin-type-tag.type-option {
    background: #22075e;
    color: #b37feb;
    border-color: #722ed1;
}
/* 7天趋势图样式 */
.trend {
    text-align: center;
    padding: 8px 4px;
}

.trend-chart {
    display: inline-block;
    vertical-align: middle;
}

.trend-chart text {
    font-family: inherit;
}

/* 市场表格趋势列样式 */
.market-table .trend {
    width: 90px;
    min-width: 90px;
}

/* 夜间模式趋势图 */
body.fuinight .trend-chart text {
    fill: #999;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .market-table .trend {
        width: 70px;
        min-width: 70px;
    }
    
    .trend-chart {
        width: 60px;
        height: 25px;
    }
}