/**
 * 赢政指数 - 排行榜样式
 */

/* =====================================================
   表格容器
   ===================================================== */
.yz-table-wrap {
    overflow-x: auto;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
}

.yz-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.yz-table thead {
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border);
}

.yz-table th {
    padding: 1rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.yz-table td {
    padding: 0.9rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

.yz-table__row:last-child td {
    border-bottom: none;
}

.yz-table__row {
    transition: background 0.15s;
}

.yz-table__row:hover {
    background: rgba(255,255,255,0.02);
}

/* =====================================================
   排名列
   ===================================================== */
.yz-table__rank {
    width: 50px;
    text-align: center !important;
    font-size: 1.1rem;
}

.yz-table__row--top1 .yz-table__rank { font-size: 1.3rem; }
.yz-table__row--top2 .yz-table__rank { font-size: 1.2rem; }

.yz-table__row--top1 {
    background: rgba(212,162,76,0.06);
}

.yz-table__row--top1:hover {
    background: rgba(212,162,76,0.1);
}

/* =====================================================
   模型列
   ===================================================== */
.yz-table__model {
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Fix: th doesn't support flex, only td */
th.yz-table__model {
    display: table-cell;
}

.yz-table__provider-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.yz-table__model-name {
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.yz-table__provider-label {
    font-size: 0.72rem;
    color: var(--muted);
    white-space: nowrap;
}

/* =====================================================
   分数列
   ===================================================== */
.yz-table__score {
    text-align: center !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    min-width: 60px;
}

.yz-table__score--main {
    min-width: 140px;
}

/* =====================================================
   分数条
   ===================================================== */
.yz-score-bar {
    position: relative;
    height: 28px;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    overflow: hidden;
    min-width: 100px;
}

.yz-score-bar__fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--accent), var(--gold));
    transition: width 0.6s ease;
    opacity: 0.7;
}

.yz-table__row--top1 .yz-score-bar__fill {
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    opacity: 0.9;
}

.yz-score-bar__num {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
}

/* =====================================================
   移动端
   ===================================================== */
@media (max-width: 768px) {
    .yz-table {
        font-size: 0.82rem;
    }

    .yz-table th,
    .yz-table td {
        padding: 0.7rem 0.5rem;
    }

    .yz-table__model {
        min-width: 150px;
    }

    .yz-table__provider-label {
        display: none;
    }

    .yz-table__score--main {
        min-width: 100px;
    }

    .yz-score-bar {
        min-width: 70px;
    }
}

@media (max-width: 480px) {
    .yz-table__provider-icon {
        display: none;
    }

    .yz-table th,
    .yz-table td {
        padding: 0.6rem 0.35rem;
    }
}
