/* ===== 投币系统样式（B站风格） ===== */

/* 帖子卡片投币按钮 */
.coin-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #a16207;
    cursor: pointer;
    transition: transform .15s ease, color .2s ease;
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
}
.coin-btn:hover { color: #f59e0b; transform: scale(1.08); }
.coin-btn:active { transform: scale(.9); }
.coin-btn.done, .coin-btn[data-done="1"] { color: #f59e0b; pointer-events: none; opacity: .9; }
.coin-btn.busy { opacity: .5; pointer-events: none; }

/* ===== 投币选择弹层 ===== */
.pulse-coin-mask {
    position: fixed;
    inset: 0;
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .55);
    opacity: 0;
    transition: opacity .25s ease;
}
.pulse-coin-mask.show { opacity: 1; }
.pulse-coin-sheet {
    background: linear-gradient(160deg, #fffdf7, #fff8e6);
    border-radius: 22px;
    padding: 26px 24px 18px;
    width: min(320px, 88vw);
    text-align: center;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .35);
    transform: translateY(24px) scale(.95);
    transition: transform .28s cubic-bezier(.34, 1.4, .64, 1);
}
.pulse-coin-mask.show .pulse-coin-sheet { transform: translateY(0) scale(1); }
.pulse-coin-title {
    font-size: 17px;
    font-weight: 800;
    color: #92400e;
    margin-bottom: 10px;
    letter-spacing: 1px;
}
/* 弹窗内我的硬币余额 */
.pulse-coin-bal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 8px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    box-shadow: 0 3px 10px rgba(245, 158, 11, .22);
    font-size: 13px;
}
.pulse-coin-bal-label { color: #92400e; font-weight: 600; }
.pulse-coin-bal-num {
    color: #b45309;
    font-weight: 900;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}
.pulse-coin-options { display: flex; gap: 14px; justify-content: center; margin-bottom: 14px; }
.pulse-coin-opt {
    border: 2px solid transparent;
    border-radius: 16px;
    background: #fff;
    padding: 10px 8px 8px;
    cursor: pointer;
    width: 118px;
    transition: border-color .2s ease, transform .15s ease, box-shadow .2s ease;
    box-shadow: 0 4px 14px rgba(146, 64, 14, .12);
}
.pulse-coin-opt:hover {
    border-color: #f59e0b;
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(146, 64, 14, .22);
}
.pulse-coin-opt img { width: 96px; height: 96px; object-fit: contain; display: block; margin: 0 auto; border-radius: 10px; }
.pulse-coin-opt.disabled {
    cursor: not-allowed;
    opacity: .45;
    filter: grayscale(.6);
    border-color: rgba(0, 0, 0, .08);
    box-shadow: none;
    transform: none !important;
}
.pulse-coin-opt.disabled:hover { border-color: rgba(0, 0, 0, .08); transform: none; box-shadow: none; }
.pulse-coin-opt-name {
    display: block;
    margin-top: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #78350f;
}
.pulse-coin-like-ck {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #92400e;
    cursor: pointer;
    margin-bottom: 12px;
    user-select: none;
}
.pulse-coin-like-ck input { width: 16px; height: 16px; accent-color: #f59e0b; }
.pulse-coin-cancel {
    border: none;
    background: rgba(146, 64, 14, .08);
    color: #92400e;
    padding: 8px 30px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease;
}
.pulse-coin-cancel:hover { background: rgba(146, 64, 14, .16); }

/* ===== 投币动画层（全屏覆盖） ===== */
.pulse-coin-anim {
    position: fixed;
    inset: 0;
    z-index: 99995;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background: transparent;
}
.pulse-coin-stage {
    position: relative;
    width: 320px;
    height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}
/* 方块（上方） */
.pulse-coin-block {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
}
.pulse-coin-block img { width: 110px; height: 110px; object-fit: contain; border-radius: 14px; box-shadow: 0 10px 26px rgba(146, 64, 14, .35); }
/* 角色（江江） */
.pulse-coin-char {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}
.pulse-coin-char img { width: 190px; height: auto; object-fit: contain; filter: drop-shadow(0 12px 22px rgba(0,0,0,.3)); }
/* 金币粒子 */
.pulse-coin-particle {
    position: absolute;
    bottom: 46%;
    left: 50%;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffe9a8, #f5b301 55%, #b87900);
    box-shadow: 0 2px 8px rgba(245, 179, 1, .6), inset 0 0 6px rgba(255,255,255,.6);
    opacity: 0;
    pointer-events: none;
}
/* 数字 */
.pulse-coin-num {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 64px;
    font-weight: 900;
    color: #f59e0b;
    text-shadow: 0 2px 0 #78350f, 0 4px 18px rgba(245, 179, 1, .55);
    opacity: 0;
}
.pulse-coin-flash {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 235, 168, .85) 0%, rgba(255, 214, 102, .4) 40%, transparent 70%);
    opacity: 0;
    pointer-events: none;
}

/* 投1枚：跳跃撞方块 */
.pulse-coin-anim.play .pulse-coin-char {
    animation: pulseCharJump .9s cubic-bezier(.3, 0, .3, 1) forwards;
}
.pulse-coin-anim.play .pulse-coin-block {
    animation: pulseBlockHit .9s cubic-bezier(.3, 0, .3, 1) forwards;
}
.pulse-coin-anim.play .pulse-coin-num {
    animation: pulseNumPop .9s ease forwards;
}
.pulse-coin-anim.play .pulse-coin-flash {
    animation: pulseFlashOut .9s ease forwards;
}
.pulse-coin-anim.play .pulse-coin-particle {
    animation: pulseCoinFly .85s ease-out forwards;
    animation-delay: .28s;
}
@keyframes pulseCharJump {
    0%   { transform: translateX(-50%) translateY(0) scale(1); }
    35%  { transform: translateX(-50%) translateY(-150px) scale(.92); }
    55%  { transform: translateX(-50%) translateY(-168px) scale(1.12); }
    68%  { transform: translateX(-50%) translateY(-120px) scale(.98); }
    82%  { transform: translateX(-50%) translateY(-10px) scale(1.05); }
    100% { transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes pulseBlockHit {
    0%   { opacity: 0; transform: translateX(-50%) translateY(20px) scale(.8); }
    45%  { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
    60%  { opacity: 1; transform: translateX(-50%) translateY(6px) scale(1.12); }
    75%  { opacity: 1; transform: translateX(-50%) translateY(-2px) scale(.96); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes pulseNumPop {
    0%   { opacity: 0; transform: translateX(-50%) scale(.4); }
    45%  { opacity: 1; transform: translateX(-50%) scale(1.35); }
    70%  { opacity: 1; transform: translateX(-50%) scale(1); }
    100% { opacity: 0; transform: translateX(-50%) scale(1.1) translateY(-24px); }
}
@keyframes pulseFlashOut {
    0%   { opacity: 0; }
    40%  { opacity: 1; }
    100% { opacity: 0; }
}
@keyframes pulseCoinFly {
    0%   { opacity: 1; transform: translate(-50%, -50%) scale(.6); }
    100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.15); }
}

/* 投2枚：蓝色闪电粒子爆炸（覆盖跳跃动画） */
.pulse-coin-anim.play.lightning .pulse-coin-char {
    animation: pulseCharStand .9s ease forwards;
}
.pulse-coin-anim.play.lightning .pulse-coin-block {
    animation: pulseBlockFloat .9s ease forwards;
}
.pulse-coin-anim.play.lightning .pulse-coin-flash {
    background: radial-gradient(circle, rgba(147, 197, 253, .9) 0%, rgba(96, 165, 250, .45) 40%, transparent 70%);
    animation: pulseLightning .9s ease forwards;
}
.pulse-coin-anim.play.lightning .pulse-coin-particle {
    border-radius: 2px;
    background: linear-gradient(160deg, #bfdbfe, #60a5fa 60%, #1d4ed8);
    box-shadow: 0 0 14px rgba(96, 165, 250, .9);
    animation: pulseLightningParticle .8s ease-out forwards;
    animation-delay: .18s;
}
@keyframes pulseCharStand {
    0%   { transform: translateX(-50%) translateY(0); }
    30%  { transform: translateX(-50%) translateY(-8px); }
    60%  { transform: translateX(-50%) translateY(0); }
    100% { transform: translateX(-50%) translateY(0); }
}
@keyframes pulseBlockFloat {
    0%   { opacity: 0; transform: translateX(-50%) translateY(30px) scale(.7); }
    40%  { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.1); }
    70%  { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes pulseLightning {
    0%   { opacity: 0; }
    15%  { opacity: 1; }
    35%  { opacity: .3; }
    50%  { opacity: .9; }
    70%  { opacity: .4; }
    100% { opacity: 0; }
}
@keyframes pulseLightningParticle {
    0%   { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
    100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.4) rotate(160deg); }
}

/* 动画结束淡出销毁 */
.pulse-coin-anim.fadeout {
    transition: opacity .3s ease;
    opacity: 0;
}

/* ===== 投币记录（个人中心） ===== */
.pulse-coin-balance {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 3px 10px rgba(245, 158, 11, .25);
}
.pulse-coin-balance .fa-coins { color: #f59e0b; }
.pulse-coin-tx-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pulse-coin-tx-table th, .pulse-coin-tx-table td {
    padding: 9px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, .05);
}
.pulse-coin-tx-table th { color: #999; font-weight: 600; font-size: 12px; }
.pulse-coin-tx-amount { font-weight: 800; }
.pulse-coin-tx-amount.pos { color: #16a34a; }
.pulse-coin-tx-amount.neg { color: #dc2626; }
