/* ============================================================================
 * 详情页「好玩 / 不好玩」互动评价按钮 + 管理员专属下载量角标（v1）
 * 适配 detail-studio 浅色 / 深色双主题及移动端紧凑布局
 * ============================================================================ */

.rx-vote-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rx-vote-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 11px 0 12px;
    border: 1px solid var(--rx-line);
    border-radius: 9px;
    background: var(--rx-panel);
    color: var(--rx-text);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease, transform .18s cubic-bezier(.22, 1, .36, 1), box-shadow .22s ease;
}

.rx-vote-btn:active {
    transform: scale(0.96);
}

.rx-vote-btn.is-busy {
    opacity: .6;
    pointer-events: none;
}

.rx-vote-icon {
    display: block;
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    transition: transform .25s cubic-bezier(.22, 1, .36, 1), color .2s ease;
}

.rx-vote-icon .rx-vote-fill {
    opacity: 0;
    transition: opacity .2s ease;
}

.rx-vote-icon .rx-vote-spark {
    opacity: 0;
    transform-origin: center;
    transition: opacity .22s ease, transform .28s cubic-bezier(.22, 1, .36, 1);
}

.rx-vote-label {
    white-space: nowrap;
}

.rx-vote-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 6px;
    background: var(--rx-panel-soft);
    color: var(--rx-muted);
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    transition: background-color .2s ease, color .2s ease;
}

/* 好玩（翡翠绿） */
.rx-vote-btn.is-up:hover {
    border-color: rgba(16, 185, 129, .5);
    color: #059669;
    background: rgba(16, 185, 129, .06);
    box-shadow: 0 4px 12px rgba(16, 185, 129, .12);
}

.rx-vote-btn.is-up:hover .rx-vote-icon {
    transform: translateY(-1px) rotate(-6deg);
}

.rx-vote-btn.is-up:hover .rx-vote-count {
    background: rgba(16, 185, 129, .14);
    color: #059669;
}

.rx-vote-btn.is-up.is-active {
    border-color: rgba(16, 185, 129, .58);
    background: linear-gradient(135deg, rgba(16, 185, 129, .14), rgba(5, 150, 105, .06));
    color: #047857;
    box-shadow: 0 4px 14px rgba(16, 185, 129, .18);
}

.rx-vote-btn.is-up.is-active .rx-vote-fill,
.rx-vote-btn.is-up.is-active .rx-vote-spark {
    opacity: 1;
}

.rx-vote-btn.is-up.is-active .rx-vote-count {
    background: rgba(16, 185, 129, .2);
    color: #047857;
}

/* 不好玩（珊瑚玫瑰红） */
.rx-vote-btn.is-down:hover {
    border-color: rgba(244, 63, 94, .48);
    color: #e11d48;
    background: rgba(244, 63, 94, .06);
    box-shadow: 0 4px 12px rgba(244, 63, 94, .11);
}

.rx-vote-btn.is-down:hover .rx-vote-icon {
    transform: translateY(1px) rotate(6deg);
}

.rx-vote-btn.is-down:hover .rx-vote-count {
    background: rgba(244, 63, 94, .14);
    color: #e11d48;
}

.rx-vote-btn.is-down.is-active {
    border-color: rgba(244, 63, 94, .55);
    background: linear-gradient(135deg, rgba(244, 63, 94, .13), rgba(225, 29, 72, .05));
    color: #be123c;
    box-shadow: 0 4px 14px rgba(244, 63, 94, .16);
}

.rx-vote-btn.is-down.is-active .rx-vote-fill {
    opacity: 1;
}

.rx-vote-btn.is-down.is-active .rx-vote-count {
    background: rgba(244, 63, 94, .19);
    color: #be123c;
}

/* 点击反馈微动效 */
.rx-vote-btn.is-pop .rx-vote-icon {
    animation: rxVotePop .38s cubic-bezier(.22, 1.4, .36, 1);
}

@keyframes rxVotePop {
    0% { transform: scale(1); }
    45% { transform: scale(1.28) rotate(-8deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.rx-vote-btn.is-down.is-pop .rx-vote-icon {
    animation: rxVoteShake .36s ease;
}

@keyframes rxVoteShake {
    0% { transform: scale(1); }
    35% { transform: scale(1.18) rotate(10deg); }
    70% { transform: scale(1.06) rotate(-5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* 轻反馈提示 */
.rx-vote-feedback {
    width: 100%;
    margin: 2px 0 0;
    font-size: 11px;
    line-height: 1.4;
    color: var(--rx-muted);
    min-height: 0;
    transition: opacity .2s ease;
}

.rx-vote-feedback:empty {
    display: none;
}

.rx-vote-feedback.is-ok {
    color: #059669;
}

.rx-vote-feedback.is-warn {
    color: #d97706;
}

/* 管理员专属下载次数角标 */
.rx-download-stat.is-admin-only {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 9px;
    border-radius: 7px;
    border: 1px dashed var(--rx-line);
    background: var(--rx-panel-soft);
    color: var(--rx-muted);
    font-size: 11px;
    white-space: nowrap;
}

.rx-download-stat.is-admin-only .rx-admin-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f59e0b;
    flex: 0 0 6px;
}

/* 深色模式适配 */
html[data-theme="dark"] .rx-vote-btn.is-up:hover,
html[data-theme="dark"] .rx-vote-btn.is-up.is-active {
    color: #34d399;
    border-color: rgba(52, 211, 153, .52);
    background: linear-gradient(135deg, rgba(16, 185, 129, .22), rgba(5, 150, 105, .08));
}

html[data-theme="dark"] .rx-vote-btn.is-up:hover .rx-vote-count,
html[data-theme="dark"] .rx-vote-btn.is-up.is-active .rx-vote-count {
    background: rgba(52, 211, 153, .22);
    color: #6ee7b7;
}

html[data-theme="dark"] .rx-vote-btn.is-down:hover,
html[data-theme="dark"] .rx-vote-btn.is-down.is-active {
    color: #fb7185;
    border-color: rgba(251, 113, 133, .52);
    background: linear-gradient(135deg, rgba(244, 63, 94, .22), rgba(225, 29, 72, .08));
}

html[data-theme="dark"] .rx-vote-btn.is-down:hover .rx-vote-count,
html[data-theme="dark"] .rx-vote-btn.is-down.is-active .rx-vote-count {
    background: rgba(251, 113, 133, .22);
    color: #fda4af;
}

html[data-theme="dark"] .rx-vote-feedback.is-ok {
    color: #34d399;
}

html[data-theme="dark"] .rx-vote-feedback.is-warn {
    color: #fbbf24;
}

/* 移动端适配 */
@media (max-width: 760px) {
    .rx-vote-group {
        gap: 6px;
    }

    .rx-vote-btn {
        height: 32px;
        padding: 0 9px 0 10px;
        gap: 5px;
        font-size: 11.5px;
        border-radius: 8px;
    }

    .rx-vote-icon {
        width: 14px;
        height: 14px;
        flex-basis: 14px;
    }

    .rx-vote-count {
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        font-size: 10.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rx-vote-btn.is-pop .rx-vote-icon,
    .rx-vote-btn.is-down.is-pop .rx-vote-icon {
        animation: none;
    }
}

