/* ======================================================================
 *  money-live.css
 *  带薪如厕计算器（toilet-salary）+ 实时工资跳动大屏（salary-live）共用样式
 *  依赖 home.css 全局变量 + calc-common.css，支持黑夜模式
 *  （大屏区域固定深色，不受昼夜切换影响——大屏就要有大屏的样子）
 * ====================================================================== */

/* ---------------- 公共：深色跳动面板 ---------------- */
.ml-screen {
    position: relative;
    border-radius: 18px;
    padding: 30px 22px 24px;
    text-align: center;
    color: #f4f6fa;
    background:
        radial-gradient(130% 90% at 50% 0%, rgba(56, 189, 248, .10), transparent 55%),
        linear-gradient(180deg, #1c2230, #141924 78%);
    box-shadow: 0 18px 50px rgba(15, 23, 42, .35), inset 0 1px 0 rgba(255, 255, 255, .05);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .14);
}

.ml-screen-label {
    font-size: 12.5px;
    letter-spacing: .18em;
    color: #93a0b5;
    text-transform: uppercase;
}

.ml-money {
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    line-height: 1.1;
    margin: 10px 0 4px;
    color: #ffd54a;
    text-shadow: 0 8px 34px rgba(255, 193, 36, .32);
    font-size: clamp(38px, 9vw, 74px);
    transition: color .3s;
}

.ml-money--green {
    color: #4ade80;
    text-shadow: 0 8px 34px rgba(74, 222, 128, .30);
}

.ml-money--gold {
    color: #ffd54a;
}

.ml-money small {
    font-size: .38em;
    font-weight: 800;
    color: #8b95a7;
    margin-left: 6px;
    letter-spacing: .04em;
}

.ml-sub {
    font-size: 13px;
    color: #8b95a7;
}

.ml-sub b {
    color: #d3dae6;
    font-variant-numeric: tabular-nums;
}

.ml-quotes {
    margin-top: 16px;
    min-height: 22px;
    font-size: 13px;
    color: #a7b1c2;
    transition: opacity .45s ease;
}

.ml-quotes.is-fade { opacity: 0; }

/* 跳动小圆点：一直在呼吸 */
.ml-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    margin-right: 7px;
    vertical-align: 1px;
    animation: mlPulse 1.2s ease-in-out infinite;
}

.ml-pulse--gold { background: #ffd54a; animation-delay: .3s; }

@keyframes mlPulse {
    0%, 100% { opacity: .35; transform: scale(.85); }
    50% { opacity: 1; transform: scale(1.15); }
}

/* 大屏内的小指标排 */
.ml-metrics {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.ml-metric {
    background: rgba(148, 163, 184, .08);
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 12px;
    padding: 8px 14px;
    min-width: 96px;
}

.ml-metric .k {
    display: block;
    font-size: 11px;
    color: #8b95a7;
    margin-bottom: 3px;
}

.ml-metric .v {
    font-size: 15.5px;
    font-weight: 800;
    color: #e8edf5;
    font-variant-numeric: tabular-nums;
}

/* ---------------- 带薪如厕：专属 ---------------- */
.tl-hero {
    background:
        radial-gradient(120% 90% at 50% 0%, rgba(255, 194, 51, .14), transparent 58%),
        linear-gradient(180deg, #23202e, #191722 80%);
}

.tl-hero .ml-money {
    color: #ffd54a;
    text-shadow: 0 8px 34px rgba(255, 193, 36, .3);
}

.tl-emoji {
    font-size: 34px;
    display: inline-block;
    animation: tlFloat 3s ease-in-out infinite;
    margin-bottom: 4px;
}

@keyframes tlFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.tl-running .ml-money {
    animation: tlBeat 1s ease-in-out infinite;
}

@keyframes tlBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.012); }
}

/* ---------------- 实时工资大屏：专属 ---------------- */
.sl-hero {
    padding: 42px 24px 34px;
    background:
        radial-gradient(140% 100% at 50% 0%, rgba(74, 222, 128, .10), transparent 55%),
        linear-gradient(180deg, #0f1720, #0b1017 82%);
}

.sl-hero .ml-money {
    font-size: clamp(52px, 12vw, 108px);
    color: #4ade80;
    text-shadow: 0 10px 44px rgba(74, 222, 128, .30);
}

.sl-caption {
    margin-top: 18px;
    font-size: 13px;
    color: #7f8da3;
    transition: opacity .45s ease;
}

.sl-caption.is-fade { opacity: 0; }

.sl-moyu {
    margin-top: 20px;
    border-top: 1px dashed rgba(148, 163, 184, .18);
    padding-top: 16px;
}

.sl-moyu-money {
    font-size: clamp(26px, 5vw, 40px);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: #f0a94a;
    text-shadow: 0 6px 24px rgba(240, 169, 74, .25);
    margin: 6px 0 2px;
}

/* 全屏模式 */
.sl-hero:fullscreen {
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6vh 5vw;
    background: radial-gradient(120% 100% at 50% 40%, #14202c, #0a0f16 75%);
}

.sl-hero:fullscreen .ml-money {
    font-size: clamp(80px, 16vw, 220px);
}

/* ---------------- 滑杆（native range 兜底美化） ---------------- */
.ml-range {
    width: 100%;
    height: 22px;
    margin: 4px 0 6px;
    cursor: pointer;
    accent-color: #f0a94a;
}

/* ---------------- 轻提示 toast ---------------- */
.ml-toast {
    position: fixed;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%) translateY(14px);
    background: rgba(23, 28, 38, .96);
    color: #f4f6fa;
    font-size: 13px;
    padding: 10px 18px;
    border-radius: 99px;
    border: 1px solid rgba(148, 163, 184, .2);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .4);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
    z-index: 999;
}

.ml-toast.is-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 640px) {
    .ml-metrics { gap: 8px; }
    .ml-metric { min-width: 84px; padding: 7px 10px; }
    .sl-moyu { padding-top: 12px; }
}

/* ---------------- 打印 / 深夜模式微调 ---------------- */
@media print {
    .ml-screen, .sl-hero { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    .ml-pulse, .tl-emoji, .tl-running .ml-money { animation: none; }
}
