.rank-container {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 25px;
    margin-top: 25px;
    margin-bottom: 40px;
}

.rank-side-menu,
.rank-main-content {
    min-width: 0;
    background: var(--card, #1e1e24);
    border: 1px solid rgba(255,255,255,0.02);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.rank-side-menu {
    height: fit-content;
    border-radius: 12px;
    padding: 15px;
}

.rank-menu-group { margin-bottom: 20px; }
.rank-menu-group:last-child { margin-bottom: 0; }

.rank-group-title {
    padding: 0 10px 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #666;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
}

.rank-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 8px;
    color: #bbb;
    font-size: 14.5px;
    transition: all 0.2s;
}

.rank-menu-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-menu-item i {
    flex: 0 0 auto;
    color: #888;
    font-size: 18px;
}

.rank-menu-item:hover {
    color: #fff;
    background: rgba(255,255,255,0.04);
}

.rank-menu-item.active {
    background: var(--main, #2f9e62);
    color: #fff;
    font-weight: 600;
}

.rank-menu-item.active i { color: #fff; }

.rank-main-content {
    overflow: hidden;
    border-radius: 12px;
    padding: 25px;
}

.rank-content-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.rank-content-header > div:first-child {
    min-width: 0;
}

.rank-main-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

.rank-main-title i {
    flex: 0 0 auto;
    color: var(--main, #2f9e62);
}

.rank-main-desc {
    margin: 6px 0 0;
    color: #777;
    font-size: 13px;
    line-height: 1.5;
}

.rank-more-btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    color: #888;
    font-size: 13px;
    cursor: default;
}

.rank-list-header,
.rank-text-row {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) minmax(100px, 140px) minmax(90px, 130px) 92px;
    align-items: center;
    gap: 0;
}

.rank-list-header {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: #555;
    font-size: 13px;
    font-weight: 600;
}

.rank-list-wrapper {
    display: flex;
    flex-direction: column;
}

.rank-text-row {
    min-width: 0;
    padding: 14px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    text-decoration: none;
    transition: background 0.2s ease;
}

.rank-text-row:last-child { border-bottom: none; }
.rank-text-row:hover { background: rgba(255,255,255,0.02); }

.col-num,
.col-title,
.col-meta,
.col-hot {
    min-width: 0;
}

.col-num {
    display: flex;
    align-items: center;
}

.rank-num-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    color: #555;
    font-size: 14px;
    font-style: italic;
    font-weight: 700;
}

.rank-text-row:nth-child(1) .rank-num-badge { background: rgba(112, 224, 154, 0.2); color: #70e09a; font-style: normal; }
.rank-text-row:nth-child(2) .rank-num-badge { background: rgba(226, 232, 240, 0.15); color: #e2e8f0; font-style: normal; }
.rank-text-row:nth-child(3) .rank-num-badge { background: rgba(95, 159, 118, 0.2); color: #5f9f76; font-style: normal; }

.col-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 15px;
}

.rank-item-title {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: #ddd;
    font-size: 15px;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-text-row:hover .rank-item-title {
    color: var(--main, #2f9e62);
}

.rank-type-tag {
    flex: 0 1 auto;
    max-width: 84px;
    overflow: hidden;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.04);
    color: #777;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-text-row:nth-child(-n+3) .rank-type-tag {
    background: rgba(47, 158, 98, 0.1);
    color: var(--main, #2f9e62);
}

.col-meta {
    overflow: hidden;
    color: #777;
    font-size: 13.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.col-meta strong {
    color: #aaa;
    font-weight: normal;
}

.col-hot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    color: #70e09a;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

@media(max-width: 992px) {
    .rank-container {
        grid-template-columns: minmax(0, 1fr);
        gap: 15px;
        overflow-x: hidden;
    }

    .rank-side-menu {
        display: flex;
        gap: 10px;
        width: 100%;
        overflow-x: auto;
        padding: 10px;
        border-right: none;
        border-left: none;
        border-radius: 0;
    }

    .rank-menu-group {
        display: flex;
        flex: 0 0 auto;
        gap: 8px;
        margin-bottom: 0;
    }

    .rank-group-title { display: none; }

    .rank-menu-item {
        flex: 0 0 auto;
        max-width: 160px;
        padding: 7px 12px;
        font-size: 13px;
    }

    .rank-main-content {
        padding: 15px;
        border: none;
        border-radius: 0;
    }
}

@media(max-width: 768px) {
    .rank-content-header {
        align-items: stretch;
        flex-direction: column;
    }

    .rank-more-btn {
        align-self: flex-start;
    }

    .rank-list-header,
    .rank-text-row {
        grid-template-columns: 38px minmax(0, 1fr) 72px;
    }

    .rank-list-header .col-meta,
    .rank-text-row .col-meta {
        display: none;
    }

    .rank-list-header {
        padding: 9px 10px;
    }

    .rank-text-row {
        padding: 12px 10px;
    }

    .col-title {
        gap: 6px;
        padding-right: 8px;
    }

    .rank-item-title {
        font-size: 14px;
    }

    .rank-type-tag {
        max-width: 54px;
        font-size: 10px;
    }

    .col-hot {
        font-size: 12px;
    }
}

@media(max-width: 420px) {
    .rank-main-content {
        padding: 12px 8px;
    }

    .rank-list-header,
    .rank-text-row {
        grid-template-columns: 34px minmax(0, 1fr) 58px;
    }

    .rank-type-tag {
        display: none;
    }
}
