/* ============================================================
   gift-ranking.css · 主播礼物榜（星环悬浮台 + 排名列表）
   ============================================================ */

.gift-ranking-sheet {
    height: 586px;
    display: flex;
    flex-direction: column;
    padding: 10px 14px 18px;
}

.gift-ranking-sheet .drawer-handle,
.gift-ranking-sheet .drawer-title {
    flex: 0 0 auto;
}

.gift-ranking-sheet .drawer-title {
    margin-bottom: 8px;
}

.gift-ranking-podium {
    position: relative;
    z-index: 1;
    height: 178px;
    flex: 0 0 178px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 6px;
    margin-bottom: 6px;
    padding: 14px 10px 7px;
    overflow: hidden;
    background: transparent;
}

.gift-ranking-podium::before,
.gift-ranking-podium::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

.gift-ranking-podium::before {
    left: 50%;
    bottom: 14px;
    width: 306px;
    height: 82px;
    border-top: 1px solid color-mix(in srgb, var(--brand-2) 24%, transparent);
    border-radius: 50%;
    opacity: 0.72;
    transform: translateX(-50%);
}

.gift-ranking-podium::after {
    inset: 0 12px 20px;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.68) 0 1px, transparent 1.6px),
        radial-gradient(circle, color-mix(in srgb, var(--brand-3) 72%, #fff) 0 1px, transparent 1.6px);
    background-position: 4px 22px, 44px 8px;
    background-size: 68px 56px, 92px 72px;
    opacity: 0.22;
    mask-image: linear-gradient(to bottom, #000 0%, transparent 82%);
}

.gift-podium-item {
    position: relative;
    z-index: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
}

.gift-podium-item[data-rank="1"] {
    grid-column: 2;
    grid-row: 1;
    padding-bottom: 18px;
}

.gift-podium-item[data-rank="2"] {
    grid-column: 1;
    grid-row: 1;
    padding-bottom: 3px;
}

.gift-podium-item[data-rank="3"] {
    grid-column: 3;
    grid-row: 1;
}

.gift-podium-portrait {
    position: relative;
    margin-bottom: 7px;
}

.gift-podium-portrait::after {
    content: '';
    position: absolute;
    z-index: -1;
    left: 50%;
    top: 50%;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(203, 215, 239, 0.16), transparent 68%);
    transform: translate(-50%, -50%);
}

.gift-podium-item[data-rank="1"] .gift-podium-portrait::before {
    content: '';
    position: absolute;
    z-index: 2;
    top: -10px;
    left: 50%;
    width: 25px;
    height: 9px;
    background: linear-gradient(180deg, #fff2a0, #e7a61a);
    clip-path: polygon(0 100%, 7% 10%, 32% 62%, 50% 0, 68% 62%, 93% 10%, 100% 100%);
    filter: drop-shadow(0 2px 3px rgba(181, 112, 7, 0.38));
    transform: translateX(-50%);
}

.gift-podium-item[data-rank="1"] .gift-podium-portrait::after {
    width: 88px;
    height: 88px;
    background: radial-gradient(circle, rgba(255, 208, 61, 0.22), transparent 68%);
}

.gift-podium-item[data-rank="3"] .gift-podium-portrait::after {
    background: radial-gradient(circle, rgba(210, 128, 78, 0.16), transparent 68%);
}

.gift-podium-avatar {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1.5px solid rgba(222, 230, 244, 0.88);
    border-radius: 50%;
    background:
        radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.82), transparent 32%),
        var(--gift-avatar-color, #596078);
    box-shadow:
        0 0 0 3px rgba(193, 203, 224, 0.1),
        0 7px 17px rgba(0, 0, 0, 0.3);
    font-size: 28px;
}

.gift-podium-item[data-rank="1"] .gift-podium-avatar {
    width: 60px;
    height: 60px;
    border-color: #ffe178;
    box-shadow:
        0 0 0 3px rgba(255, 208, 67, 0.14),
        0 0 22px rgba(255, 192, 45, 0.22),
        0 9px 20px rgba(0, 0, 0, 0.36);
    font-size: 34px;
}

.gift-podium-item[data-rank="3"] .gift-podium-avatar {
    border-color: #dc9a69;
    box-shadow:
        0 0 0 3px rgba(207, 125, 74, 0.1),
        0 7px 18px rgba(0, 0, 0, 0.28);
}

.gift-podium-avatar.is-current-host,
.gift-ranking-avatar.is-current-host {
    background-image: var(--anchor-avatar);
    background-position: center;
    background-size: cover;
}

.gift-podium-medal {
    position: absolute;
    right: -3px;
    bottom: -1px;
    width: 21px;
    height: 21px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(14, 13, 20, 0.9);
    border-radius: 50%;
    color: #28200d;
    background: linear-gradient(145deg, #f4f7ff, #9ea8ba);
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.32);
    font-size: 10px;
    font-weight: 800;
}

.gift-podium-item[data-rank="1"] .gift-podium-medal {
    right: -1px;
    width: 24px;
    height: 24px;
    color: #503300;
    background: linear-gradient(145deg, #fff3a6, #f1ac19);
}

.gift-podium-item[data-rank="3"] .gift-podium-medal {
    color: #4d260d;
    background: linear-gradient(145deg, #f0bc8f, #a85e32);
}

.gift-podium-name {
    width: 100%;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gift-podium-value {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.gift-podium-step {
    position: relative;
    width: 74px;
    height: 10px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(205, 215, 234, 0.22);
    border-radius: 50%;
    background:
        radial-gradient(ellipse, rgba(221, 230, 247, 0.2), rgba(105, 116, 139, 0.06) 68%),
        rgba(255, 255, 255, 0.025);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.13),
        0 0 16px rgba(187, 202, 230, 0.08);
}

.gift-podium-step span {
    display: none;
}

.gift-podium-step::before {
    content: '';
    position: absolute;
    z-index: -1;
    left: 50%;
    bottom: 2px;
    width: 58px;
    height: 30px;
    background: linear-gradient(to top, rgba(191, 204, 230, 0.12), transparent);
    clip-path: polygon(16% 100%, 84% 100%, 100% 0, 0 0);
    filter: blur(5px);
    transform: translateX(-50%);
}

.gift-podium-item[data-rank="1"] .gift-podium-step {
    width: 92px;
    height: 12px;
    border-color: rgba(255, 213, 87, 0.28);
    background:
        radial-gradient(ellipse, rgba(255, 218, 96, 0.3), rgba(148, 96, 19, 0.07) 68%),
        color-mix(in srgb, var(--brand-2) 4%, transparent);
    box-shadow:
        inset 0 1px 0 rgba(255, 245, 183, 0.22),
        0 0 22px rgba(255, 195, 45, 0.12);
}

.gift-podium-item[data-rank="1"] .gift-podium-step::before {
    width: 72px;
    height: 36px;
    background: linear-gradient(to top, rgba(255, 201, 54, 0.15), transparent);
}

.gift-podium-item[data-rank="3"] .gift-podium-step {
    width: 70px;
    border-color: rgba(218, 143, 90, 0.24);
    background:
        radial-gradient(ellipse, rgba(211, 139, 92, 0.24), rgba(116, 68, 41, 0.06) 68%),
        rgba(255, 255, 255, 0.018);
}

.gift-podium-item[data-rank="3"] .gift-podium-step::before {
    background: linear-gradient(to top, rgba(204, 125, 74, 0.12), transparent);
}

.gift-ranking-list {
    position: relative;
    z-index: 1;
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
}

.gift-ranking-list::-webkit-scrollbar {
    display: none;
}

.gift-ranking-row {
    min-height: 55px;
    display: grid;
    grid-template-columns: 24px 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 7px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.gift-ranking-row:last-child {
    border-bottom: 0;
}

.gift-ranking-rank {
    color: rgba(255, 255, 255, 0.42);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.gift-ranking-avatar {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background:
        radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.7), transparent 34%),
        var(--gift-avatar-color, #596078);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 4px 11px rgba(0, 0, 0, 0.22);
    font-size: 23px;
}

.gift-ranking-name {
    min-width: 0;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gift-ranking-value {
    padding-left: 8px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.gift-ranking-current {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    padding-top: 7px;
    border-top: 1px solid color-mix(in srgb, var(--brand-2) 32%, rgba(255, 255, 255, 0.08));
    background: transparent;
    box-shadow: none;
}

.gift-ranking-current-row {
    min-height: 55px;
    padding: 7px;
    border: 0;
    background: transparent;
}

.gift-ranking-current-row .gift-ranking-name,
.gift-ranking-current-row .gift-ranking-value {
    color: #fff;
}
