/* ===== 拆分自 style.css（第 5 部分，原第 2127-2390 行）—— 必须紧跟在上一部分之后按序加载，顺序影响层叠结果 ===== */
/* ===================================
   通知声音提醒视觉提示样式
   =================================== */

/* 新通知高亮动画 */
@keyframes notification-highlight {
    0% {
        background-color: rgba(255, 235, 59, 0);
        transform: scale(1);
    }

    10% {
        background-color: rgba(255, 235, 59, 0.3);
        transform: scale(1.02);
    }

    20% {
        background-color: rgba(255, 235, 59, 0.5);
        transform: scale(1.04);
    }

    30% {
        background-color: rgba(255, 235, 59, 0.3);
        transform: scale(1.02);
    }

    40% {
        background-color: rgba(255, 235, 59, 0.1);
        transform: scale(1);
    }

    100% {
        background-color: rgba(255, 235, 59, 0);
        transform: scale(1);
    }
}

.new-notification-highlight {
    animation: notification-highlight 3s ease-out;
    border-left: 4px solid var(--warning-color);
    position: relative;
    overflow: hidden;
}

.new-notification-highlight::before {
    content: 'NEW';
    position: absolute;
    top: 0;
    right: 0;
    background: var(--warning-color);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-bottom-left-radius: 0.25rem;
    animation: pulse 1s infinite;
}

/* 脉冲动画 */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* 声音设置面板样式 */
.sound-option {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
    border: 2px solid transparent;
}

.sound-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sound-option.active {
    border-color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.05);
}

.sound-option .btn-test-sound {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.sound-option:hover .btn-test-sound {
    opacity: 1;
    transform: translateY(0);
}

/* 音量滑块样式 */
.form-range::-webkit-slider-thumb {
    background: var(--primary-color);
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.form-range::-moz-range-thumb {
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.form-range::-moz-range-thumb:hover {
    transform: scale(1.2);
}

/* 通知设置卡片 */
.notification-sound-settings {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.notification-sound-settings .card-header {
    position: relative;
    overflow: hidden;
}

.notification-sound-settings .card-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 视觉提示选项 */
#visualTypeSection label {
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

#visualTypeSection label:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

#visualTypeSection label.active {
    background-color: rgba(13, 110, 253, 0.1);
    border-color: var(--primary-color);
}

/* 页面标题闪烁时的样式 */
@keyframes title-flash {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.page-title-flashing {
    animation: title-flash 1s ease-in-out infinite;
}

/* 浏览器角标支持 */
@supports (accent-color: var(--primary-color)) {
    .form-check-input:checked {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
    }
}

/* 移动端优化 */
@media (max-width: 767.98px) {
    .sound-option .btn-test-sound {
        opacity: 1;
        transform: translateY(0);
    }

    .notification-sound-settings .card-body {
        padding: 1rem;
    }

    .new-notification-highlight::before {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
    }
}

/* 暗色主题覆写（全站固定暗色，不再依赖系统 prefers-color-scheme） */
[data-theme="dark"] .sound-option.active {
    background-color: rgba(124, 58, 237, 0.15);
}

[data-theme="dark"] .new-notification-highlight {
    border-left-color: var(--warning-color);
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {

    .new-notification-highlight,
    .new-notification-highlight::before,
    .sound-option,
    .sound-option .btn-test-sound {
        animation: none;
        transition: none;
    }
}

/* ===================================
   响应式优化
   =================================== */
@media (max-width: 767.98px) {
    #latestPosts .list-group-item {
        padding: 0.75rem 1rem;
    }

    #latestPosts .list-group-item h6 {
        font-size: 0.9rem;
    }

    #activeUsers .d-flex {
        flex-wrap: nowrap;
    }

    #activeUsers img.rounded-circle {
        width: 36px;
        height: 36px;
    }
}

/* ===================================
   财富值和魅力值徽章样式
   =================================== */
.bg-pink {
    background-color: #FF69B4 !important;
}

.bg-pink:hover {
    background-color: #FF1493 !important;
}

