/* 电子木鱼时钟组件样式 - 自动随站点黑夜/白天主题变色 */
.sotms-muyu-clock-widget {
    background: var(--card-bg, var(--bg-card, var(--bg-secondary, #ffffff)));
    border-radius: var(--border-radius, 16px);
    border: none;
    padding: 16px 16px;
    box-shadow: var(--shadow-sm, 0 6px 18px rgba(0, 0, 0, 0.05));
    text-align: center;
    margin-bottom: 10px;
    position: relative;
    user-select: none;
    overflow: hidden;
    color: var(--text-color, var(--text-primary, #333333));
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.sotms-muyu-clock-widget:hover {
    box-shadow: 0 8px 24px rgba(200, 125, 70, 0.12);
}

.sotms-muyu-clock-title {
    margin: 0 0 32px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color, var(--text-primary, #333333));
}

.sotms-muyu-clock-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/* 木鱼与敲击动画舞台 (紧凑底部高度) */
.sotms-muyu-wrapper {
    position: relative;
    width: 160px;
    height: 96px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 连击 Combo 浮标 */
.sotms-combo-display {
    position: absolute;
    top: -8px;
    left: 8px;
    font-size: 13px;
    font-weight: 800;
    color: #ef4444;
    text-shadow: 0 2px 4px rgba(239, 68, 68, 0.25);
    font-style: italic;
    opacity: 0;
    pointer-events: none;
    z-index: 12;
    transition: opacity 0.2s, transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sotms-combo-display.active {
    opacity: 1;
    animation: sotmsComboPop 0.18s ease-out;
}

@keyframes sotmsComboPop {
    0% {
        transform: scale(0.7) rotate(-8deg);
    }
    50% {
        transform: scale(1.3) rotate(4deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* 祝福语浮动容器 */
.sotms-muyu-floating-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.sotms-muyu-blessing {
    position: absolute;
    left: 50%;
    top: 38%;
    transform: translate(-50%, 0);
    font-size: 16px;
    font-weight: 700;
    color: #d97706;
    text-shadow: 0 2px 5px rgba(217, 119, 6, 0.25);
    white-space: nowrap;
    animation: sotmsFloatUp 1.1s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

/* 暴击/特级彩蛋祝福词 */
.sotms-muyu-blessing.critical {
    font-size: 18px;
    color: #b45309;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
    animation: sotmsCriticalFloat 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes sotmsFloatUp {
    0% {
        opacity: 0;
        transform: translate(-50%, 10px) scale(0.7);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -15px) scale(1.15);
    }
    70% {
        opacity: 0.95;
        transform: translate(-50%, -52px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -78px) scale(0.9);
    }
}

@keyframes sotmsCriticalFloat {
    0% {
        opacity: 0;
        transform: translate(-50%, 15px) scale(0.5) rotate(-5deg);
    }
    25% {
        opacity: 1;
        transform: translate(-50%, -20px) scale(1.25) rotate(3deg);
    }
    75% {
        opacity: 1;
        transform: translate(-50%, -55px) scale(1.05) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -85px) scale(0.95);
    }
}

.sotms-muyu-stage {
    position: relative;
    width: 136px;
    height: 94px;
}

/* 波纹与粒子容器 (80% 比例) */
.sotms-muyu-ripple-wrapper,
.sotms-muyu-particles-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 96px;
    height: 72px;
    pointer-events: none;
    z-index: 1;
}

.sotms-muyu-ripple {
    position: absolute;
    top: 40%;
    left: 62%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid rgba(200, 125, 70, 0.45);
    animation: sotmsRipple 0.5s ease-out forwards;
}

@keyframes sotmsRipple {
    0% {
        width: 24px;
        height: 16px;
        opacity: 0.8;
    }
    100% {
        width: 120px;
        height: 88px;
        opacity: 0;
    }
}

/* 金色星光爆发粒子 */
.sotms-muyu-particle {
    position: absolute;
    top: 36%;
    left: 62%;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #f59e0b 0%, #d97706 100%);
    border-radius: 50%;
    box-shadow: 0 0 6px #f59e0b;
    pointer-events: none;
    animation: sotmsParticleBurst 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes sotmsParticleBurst {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--p-dx), var(--p-dy)) scale(0.2);
    }
}

/* 电子木鱼主体图片 (原版 80% 尺寸: 112px × 92px) */
.sotms-muyu-body {
    width: 112px;
    height: 92px;
    margin: 0 auto;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.1s cubic-bezier(0.5, 0.35, 0.15, 1.4);
}

.sotms-muyu-img {
    width: 112px;
    height: 92px;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.25));
}

.sotms-muyu-body:hover {
    transform: scale(1.03);
}

.sotms-muyu-body.knocked {
    animation: sotmsKnockMuyu 0.18s ease-out forwards;
}

@keyframes sotmsKnockMuyu {
    0% {
        transform: scale(1);
    }
    40% {
        transform: scale(0.93) translateY(3px);
    }
    70% {
        transform: scale(1.05) translateY(-1.5px);
    }
    100% {
        transform: scale(1);
    }
}

/* 电子木槌图片 (原版 80% 尺寸: 76px × 34px) */
.sotms-muyu-mallet {
    position: absolute;
    top: -12px;
    right: 2px;
    width: 76px;
    height: 34px;
    z-index: 5;
    transform-origin: 100% 100%;
    transform: rotate(0deg);
    transition: transform 0.05s ease-out;
    pointer-events: none;
}

.sotms-hammer-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.sotms-muyu-mallet.striking {
    animation: sotmsStrikeMallet 0.18s ease-out forwards;
}

/* 敲击动画 (参考 fish.leixf.cn 30deg 旋转锤击) */
@keyframes sotmsStrikeMallet {
    0% {
        transform: rotate(0deg);
    }
    40% {
        transform: rotate(-18deg);
    }
    75% {
        transform: rotate(32deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

/* 功德栏与音效控制 */
.sotms-muyu-info-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary, #666666);
    background: var(--bg-secondary, rgba(0, 0, 0, 0.035));
    padding: 5px 14px;
    border-radius: 20px;
}

.sotms-merit-count {
    color: #d97706;
    font-weight: 700;
    font-size: 15px;
    transition: transform 0.1s ease;
}

.sotms-merit-level-badge {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25);
}

.sotms-sound-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.1s;
}

.sotms-sound-toggle:hover {
    opacity: 1;
    transform: scale(1.15);
}

.sotms-sound-toggle.muted {
    opacity: 0.35;
    filter: grayscale(100%);
}

/* 时间显示 (紧凑收紧字间距) */
.sotms-time-display {
    font-size: 32px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    letter-spacing: -0.5px;
    white-space: nowrap;
    margin-top: 2px;
}

.sotms-time-separator {
    animation: sotmsBlink 1s infinite;
    margin: 0 1px;
}

@keyframes sotmsBlink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0.3;
    }
}

/* 日期与农历显示 */
.sotms-date-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.sotms-date-display {
    font-size: 13px;
    color: var(--text-secondary, #666666);
    font-weight: 500;
}

.sotms-lunar-display {
    font-size: 12px;
    color: #92400e;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.16), rgba(217, 119, 6, 0.08));
    border: 1px solid rgba(245, 158, 11, 0.25);
    padding: 3px 12px;
    border-radius: 16px;
    font-weight: 500;
    margin-top: 2px;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.08);
}

/* 响应式适配 */
@media (max-width: 768px) {
    .sotms-muyu-clock-widget {
        padding: 16px 12px;
    }

    .sotms-muyu-wrapper {
        width: 140px;
        height: 105px;
    }

    .sotms-muyu-stage {
        width: 120px;
        height: 95px;
    }

    .sotms-muyu-body,
    .sotms-muyu-img {
        width: 98px;
        height: 80px;
    }

    .sotms-muyu-mallet {
        width: 66px;
        height: 30px;
        top: -10px;
        right: 2px;
    }

    .sotms-time-display {
        font-size: 28px;
    }

    .sotms-date-display,
    .sotms-lunar-display {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .sotms-time-display {
        font-size: 24px;
        letter-spacing: -0.5px;
    }
}

/* 暗黑模式智能适配 (消除硬编码蓝色，随站点黑夜/白天模式自适应) */
body.dark .sotms-muyu-clock-widget,
html.dark .sotms-muyu-clock-widget,
[data-theme="dark"] .sotms-muyu-clock-widget,
.dark-mode .sotms-muyu-clock-widget {
    background: var(--card-bg-dark, var(--bg-card-dark, var(--dark-card-bg, #18181b)));
    border: none;
    color: var(--text-color-dark, #f4f4f5);
}

body.dark .sotms-muyu-clock-title,
html.dark .sotms-muyu-clock-title,
[data-theme="dark"] .sotms-muyu-clock-title,
.dark-mode .sotms-muyu-clock-title {
    color: var(--text-color-dark, #f4f4f5);
}

body.dark .sotms-date-display,
html.dark .sotms-date-display,
[data-theme="dark"] .sotms-date-display,
.dark-mode .sotms-date-display {
    color: var(--text-secondary-dark, #a1a1aa);
}

@media (prefers-color-scheme: dark) {
    .sotms-muyu-clock-widget {
        background: var(--card-bg, var(--bg-card, var(--card-bg-dark, #18181b)));
        border: none;
        color: var(--text-color, #f4f4f5);
    }
    .sotms-muyu-clock-title {
        color: var(--text-color, var(--text-primary, #f4f4f5));
    }
    .sotms-date-display {
        color: var(--text-secondary, #a1a1aa);
    }
}





