/* 仅币种页：浅底渐变，与其它使用 news-tabs-section 的页面区分 */
section.news-tabs-section:has(.coins-wrapper) {
    background: linear-gradient(180deg, #fafbff 0%, #f0f2f8 45%, #f7f8fb 100%);
    min-height: 60vh;
}

.coins-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 4px 48px;
}
.coins-header {
    text-align: center;
    margin-bottom: 32px;
}
.coins-header h1 {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}
.coins-header p {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}
.coins-search {
    max-width: 640px;
    margin: 0 auto 36px;
    position: relative;
}
.coins-search-input {
    width: 100%;
    padding: 16px 22px 16px 52px;
    border: 1px solid #e2e6ef;
    border-radius: 999px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}
.coins-search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12), 0 4px 20px rgba(102, 126, 234, 0.08);
}
.coins-search-input::placeholder {
    color: #9ca3af;
}
.coins-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #999;
}
.coins-grid {
    display: grid;
    /* 移动端单列；minmax(0,1fr) 避免子项 min-width:auto 把列撑成不等宽 */
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    margin-bottom: 40px;
    align-items: stretch;
}
.coin-card {
    background: #fff;
    border-radius: 18px;
    padding: 20px 18px 18px;
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.06);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    border: 1px solid rgba(226, 232, 240, 0.9);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 168px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}
.coin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 36px rgba(102, 126, 234, 0.14);
    border-color: rgba(102, 126, 234, 0.35);
}
.coin-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 0;
    flex: 0 0 auto;
    min-height: 3.25rem;
    padding-right: 36px;
}
.coin-card-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(145deg, #f8f9ff 0%, #f0f4ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(102, 126, 234, 0.08);
}
.coin-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.coin-basic-info {
    flex: 1;
    min-width: 0;
}
.coin-name {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 2px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
    letter-spacing: -0.02em;
}
.coin-symbol {
    font-size: 11px;
    color: #667eea;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-top: 0;
    line-height: 1.2;
}
.coin-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    flex-shrink: 0;
}
.coin-stat-item {
    text-align: center;
    padding: 8px 6px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 3.75rem;
}
.coin-stat-value {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
    line-height: 1.25;
    min-height: 1.25em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
}
.coin-stat-label {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.loading, .error, .no-data {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: #999;
}
.error {
    color: #e74c3c;
}

@media (max-width: 768px) {
    .coins-content-with-sidebar {
        display: block;
    }
    
    .coins-sidebar {
        display: none;
    }
    
    .coin-card {
        position: relative;
        overflow: visible;
        min-height: 188px;
        padding: 16px 14px 14px;
    }
    
    .coin-website-icon {
        position: absolute !important;
        top: 12px !important;
        right: 12px !important;
        left: auto !important;
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 8px;
        font-size: 14px;
        text-decoration: none;
        z-index: 10;
        transition: all 0.3s;
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    }
    
    .coins-header h1 {
        font-size: 32px;
    }
    .coins-header p {
        font-size: 16px;
    }
    .coins-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
    .coin-card {
        padding: 14px;
        border-radius: 12px;
    }
    .coin-card-header {
        flex-direction: row;
        text-align: left;
        gap: 10px;
        margin-bottom: 0;
        min-height: 3.75rem;
        padding-right: 34px;
    }
    .coin-card-logo {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }
    .coin-name {
        font-size: 15px;
        margin-bottom: 4px;
        min-height: 2.5em;
        -webkit-line-clamp: 2;
    }
    .coin-symbol {
        font-size: 11px;
    }
    .coin-stats {
        gap: 8px;
        padding-top: 12px;
    }
    .coin-stat-item {
        padding: 10px 6px;
        border-radius: 10px;
        min-height: 4.75rem;
    }
    .coin-stat-value {
        font-size: 13px;
        margin-bottom: 4px;
        min-height: 2.5em;
    }
    .coin-stat-label {
        font-size: 10px;
    }
}

@media (min-width: 768px) {
    .coins-wrapper {
        max-width: 100%;
    }
    
    .coins-content-with-sidebar {
        display: flex;
        gap: 40px;
    }
    
    .coins-main-content {
        flex: 1;
        min-width: 0;
    }
    
    .coins-sidebar {
        width: 320px;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        gap: 24px;
    }
    
    .coins-header h1 {
        font-size: 52px;
    }
    
    .coins-search {
        max-width: 700px;
    }
    
    .coins-search-input {
        padding: 18px 24px 18px 56px;
        font-size: 17px;
    }
    
    /* 侧栏占宽时主区较窄：先 2 列再等屏宽加列，保证每列同宽 */
    .coins-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }
    
    .coin-card {
        padding: 22px 20px 20px;
        min-height: 228px;
        position: relative;
        overflow: visible;
    }
    
    .coin-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .coin-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 14px 40px rgba(102, 126, 234, 0.16);
        border-color: rgba(102, 126, 234, 0.45);
    }
    
    .coin-card:hover::before {
        opacity: 1;
    }
    
    .coin-website-icon {
        position: absolute;
        top: 12px;
        right: 12px;
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 8px;
        font-size: 14px;
        text-decoration: none;
        z-index: 10;
        transition: all 0.3s;
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    }
    
    .coin-website-icon:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }
    
    .coin-card-header {
        gap: 14px;
        min-height: 5rem;
        padding-right: 40px;
    }
    
    .coin-card-logo {
        width: 52px;
        height: 52px;
        border-radius: 50%;
        padding: 6px;
    }
    
    .coin-name {
        font-size: 18px;
        min-height: 2.75em;
    }
    
    .coin-symbol {
        font-size: 12px;
    }
    
    .coin-stats {
        gap: 12px;
        padding-top: 18px;
    }
    
    .coin-stat-item {
        padding: 14px 10px;
        min-height: 5.75rem;
    }
    
    .coin-stat-value {
        font-size: 15px;
        min-height: 2.75em;
    }
    
    .coin-stat-label {
        font-size: 11px;
    }
    
    .sidebar-card {
        background: white;
        border-radius: 20px;
        padding: 24px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.08);
        border: 1px solid #f0f0f0;
    }
    
    .sidebar-title {
        font-size: 18px;
        font-weight: 700;
        color: #1a1a2e;
        margin-bottom: 16px;
        padding-bottom: 12px;
        border-bottom: 2px solid #f0f0f0;
    }
    
    .sidebar-tips {
        font-size: 14px;
        color: #666;
        line-height: 1.7;
    }
    
    .sidebar-exchange-item {
        display: flex;
        gap: 12px;
        align-items: center;
        padding: 12px;
        border-radius: 12px;
        background: #f8f9fa;
        margin-bottom: 10px;
        cursor: pointer;
        transition: all 0.3s;
    }
    
    .sidebar-exchange-item:last-child {
        margin-bottom: 0;
    }
    
    .sidebar-exchange-item:hover {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        transform: translateX(4px);
    }
    
    .sidebar-exchange-item:hover .sidebar-exchange-name,
    .sidebar-exchange-item:hover .sidebar-exchange-desc,
    .sidebar-exchange-item:hover .sidebar-exchange-rating {
        color: white;
    }
    
    .sidebar-exchange-logo {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: white;
        padding: 6px;
        flex-shrink: 0;
        object-fit: contain;
    }
    
    .sidebar-exchange-info {
        flex: 1;
        min-width: 0;
    }
    
    .sidebar-exchange-name {
        font-size: 14px;
        font-weight: 600;
        color: #1a1a2e;
        margin-bottom: 2px;
        transition: color 0.3s;
    }
    
    .sidebar-exchange-desc {
        font-size: 11px;
        color: #888;
        line-height: 1.4;
        transition: color 0.3s;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .sidebar-exchange-rating {
        font-size: 14px;
        font-weight: 700;
        color: #10b981;
        flex-shrink: 0;
        transition: color 0.3s;
    }
    
    .sidebar-flash-item {
        padding: 12px;
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.3s;
        margin-bottom: 8px;
        background: #f8f9fa;
    }
    
    .sidebar-flash-item:last-child {
        margin-bottom: 0;
    }
    
    .sidebar-flash-item:hover {
        background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
        transform: translateX(4px);
    }
    
    .sidebar-flash-header {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 6px;
    }
    
    .sidebar-flash-badge {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 3px 8px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        font-size: 10px;
        font-weight: 600;
        border-radius: 8px;
        flex-shrink: 0;
    }
    
    .sidebar-flash-title {
        font-size: 13px;
        font-weight: 600;
        color: #1a1a2e;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        line-height: 1.4;
        flex: 1;
        min-width: 0;
    }
    
    .sidebar-flash-item:hover .sidebar-flash-title {
        color: #667eea;
    }
    
    .sidebar-flash-content {
        font-size: 11px;
        color: #888;
        line-height: 1.4;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .sidebar-article-item {
        padding: 14px;
        border-radius: 12px;
        background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
        margin-bottom: 10px;
        cursor: pointer;
        transition: all 0.3s;
        border: 1px solid #f0f0f0;
    }
    
    .sidebar-article-item:last-child {
        margin-bottom: 0;
    }
    
    .sidebar-article-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
        border-color: #667eea;
        background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    }
    
    .sidebar-article-title {
        font-size: 14px;
        font-weight: 700;
        color: #1a1a2e;
        margin-bottom: 8px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        line-height: 1.4;
    }
    
    .sidebar-article-item:hover .sidebar-article-title {
        color: #667eea;
    }
    
    .sidebar-article-summary {
        font-size: 12px;
        color: #666;
        line-height: 1.5;
        margin-bottom: 10px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .sidebar-article-meta {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }
    
    .sidebar-article-category {
        font-size: 11px;
        color: #667eea;
        font-weight: 600;
        background: rgba(102, 126, 234, 0.1);
        padding: 4px 10px;
        border-radius: 8px;
    }
    
    .sidebar-article-views {
        font-size: 11px;
        color: #888;
        display: flex;
        align-items: center;
        gap: 4px;
    }
}

@media (min-width: 992px) {
    .coins-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .coins-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* ==================== 专业表格资料库布局 ==================== */
.coin-category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 16px;
}

.coin-chip {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #e2e6f0;
    background: #fff;
    color: #555;
    font-size: 13px;
    cursor: pointer;
    transition: all .15s ease;
}

.coin-chip:hover {
    border-color: #6c5ce7;
    color: #6c5ce7;
}

.coin-chip.active {
    background: linear-gradient(135deg, #6c5ce7, #8e7cf3);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

.coin-table-wrap {
    background: #fff;
    border: 1px solid #eceef5;
    border-radius: 12px;
    overflow-x: auto;
    box-shadow: 0 2px 10px rgba(30, 34, 60, .04);
}

.coin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 720px;
    table-layout: fixed;
}

/* fixed 布局显式列宽：简介列拿全部剩余宽度，消除列间空白 */
.coin-table thead th.col-rank { width: 52px; }
.coin-table thead th.col-coin { width: 240px; }
.coin-table thead th.col-supply { width: 110px; }
.coin-table thead th.col-launch { width: 120px; }
.coin-table thead th.col-category { width: 90px; }
.coin-table thead th.col-web { width: 56px; }

.coin-table thead th {
    position: sticky;
    top: 0;
    background: #f8f9ff;
    color: #6b7280;
    font-weight: 600;
    font-size: 13px;
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid #eceef5;
    white-space: nowrap;
    user-select: none;
}

.coin-table thead th.sortable {
    cursor: pointer;
}

.coin-table thead th.sortable:hover {
    color: #6c5ce7;
}

.coin-table tbody td {
    padding: 16px 14px;
    border-bottom: 1px solid #f1f3f9;
    white-space: nowrap;
    color: #333;
}

/* 简介列：td 保持 table-cell，clamp 由内层 .coin-desc-text 承担 */
.coin-table .col-desc {
    white-space: normal;
    word-break: break-word;
}

.coin-desc-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
}

.coin-table tbody tr:last-child td {
    border-bottom: none;
}

.coin-row {
    cursor: pointer;
    transition: background .12s ease;
}

.coin-row:hover {
    background: #f7f7ff;
}

.col-rank {
    width: 52px;
    color: #8a90a3;
    font-variant-numeric: tabular-nums;
}

.coin-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

/* 币种列收缩到内容宽，富余宽度让给简介列，消除列间空白 */
.coin-table .col-coin { width: 1%; }

.coin-table-logo {
    border-radius: 50%;
    flex-shrink: 0;
    background: #f2f3f8;
}

.coin-cell-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.coin-cell-name {
    font-weight: 600;
    color: #1a1a2e;
}

.coin-cell-symbol {
    font-size: 12px;
    color: #8a90a3;
    text-transform: uppercase;
}

.col-price,
.col-marketcap {
    font-variant-numeric: tabular-nums;
}

.coin-change {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.coin-change.up { color: #16a34a; }
.coin-change.down { color: #dc2626; }
.coin-change.flat { color: #8a90a3; }

.col-launch,
.col-category {
    color: #666;
    font-size: 13px;
}

.coin-web-link {
    font-size: 15px;
    text-decoration: none;
    opacity: .75;
}

.coin-web-link:hover { opacity: 1; }

/* 查看更多按钮 */
.coin-load-more {
    padding: 18px 0 22px;
    text-align: center;
}
.coin-more-btn {
    padding: 11px 38px;
    border: 1px solid #d9def0;
    border-radius: 999px;
    background: #fff;
    color: #4a5578;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
}
.coin-more-btn:hover {
    background: #6c5ce7;
    border-color: #6c5ce7;
    color: #fff;
}

/* 响应式：小屏隐藏次要列 */
@media (max-width: 900px) {
    .coin-table { min-width: 100%; }
    .col-supply, .col-launch { display: none; }
}

@media (max-width: 600px) {
    .col-category, .col-web { display: none; }
    .coin-table { font-size: 12px; }
    .coin-table thead th { padding: 10px 10px; font-size: 12px; }
    .coin-table thead th.col-coin { width: 150px; }
    .coin-table tbody td { padding: 12px 10px; }
    .col-rank { width: 30px !important; }
    .coin-cell { gap: 8px; }
    .coin-table-logo { width: 28px !important; height: 28px !important; }
    .coin-cell-name { font-size: 13px; }
    .coin-cell-symbol { font-size: 11px; }
    .coin-desc-text { font-size: 12px; line-height: 1.55; }
}
