:root {
    background-color: rgb(241, 244, 254);
}
:root.dark {
    background-color: rgb(15, 23, 42);
}
/* 功德+1动画 */
@keyframes meritFloat {
0% {
opacity: 1;
transform: translate(-50%, -50%);
}
100% {
opacity: 0;
transform: translate(-50%, -150%);
}
}
body {
    font-family: 'Noto Sans SC', sans-serif;
    min-height: 100vh;
}

.sound-card {
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}
.dark .sound-card {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(75, 85, 99, 0.5);
}
.sound-card:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.05);
}
.dark .sound-card:hover {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.05);
}

.sound-card .sound-item {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(229, 231, 235, 0.5);
    transition: all 0.2s ease;
}
.dark .sound-card .sound-item {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(75, 85, 99, 0.3);
}
.sound-card .sound-item:hover {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(124, 58, 237, 0.2);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.03);
}
.dark .sound-card .sound-item:hover {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(124, 58, 237, 0.2);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.03);
}

.nav-blur {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid #e5e7eb;
    border-top: 1px solid #e5e7eb;
}
.dark .nav-blur {
    background: rgba(15, 23, 42, 0.85);
    border-bottom-color: rgba(75, 85, 99, 0.5);
    border-top-color: rgba(75, 85, 99, 0.5);
}

.category-btn {
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #e5e7eb;
    color: #374151;
    transition: all 0.2s ease;
    font-weight: 500;
}
.category-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(124, 58, 237, 0.3);
    color: rgb(124, 58, 237);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.05);
}
.category-btn.active {
    background: rgb(124, 58, 237);
    border-color: rgba(124, 58, 237, 0.3);
    color: white !important;
}
.dark .category-btn {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(75, 85, 99, 0.5);
    color: #e5e7eb;
}
.dark .category-btn:hover {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(124, 58, 237, 0.3);
    color: rgb(167, 139, 250);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.05);
}
.dark .category-btn.active {
    background: rgb(124, 58, 237);
    color: white !important;
}

input[type="range"] {
    height: 4px;
    background: rgba(124, 58, 237, 0.2);
    border-radius: 2px;
    background-size: 0% 100%;
    background-repeat: no-repeat;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: rgb(124, 58, 237);
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.4);
    cursor: pointer;
    transition: all .15s ease-in-out;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 12px rgba(124, 58, 237, 0.6);
}

.dark input[type="range"] {
    background: rgba(255, 255, 255, 0.1);
}

.play-btn {
    transition: all 0.2s ease;
}
.play-btn:hover {
    transform: scale(1.1);
}
.play-btn:active {
    transform: scale(0.95);
}

.bg-theme-btn {
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.05);
}
.bg-theme-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}
.dark .bg-theme-btn {
    background: rgba(17, 24, 39, 0.2);
}
.dark .bg-theme-btn:hover {
    background: rgba(17, 24, 39, 0.3);
}

/* 移动端优化 */
@media (max-width: 640px) {
    .nav-blur {
        border-top: none;
    }
    
    #active-sounds {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    select {
        max-width: 100px;
    }

    /* 调整定时器选择框的宽度 */
    #timer-select {
        max-width: 100px;
    }

    /* 限制选项文本长度 */
    #savedMixes option {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* 默认主题的渐变背景 */
body:not(.dark) #dynamic-bg {
    background: linear-gradient(135deg, rgb(241, 244, 254) 0%, rgb(238, 242, 255) 100%);
}
body.dark #dynamic-bg {
    background: linear-gradient(135deg, rgb(15, 23, 42) 0%, rgb(30, 27, 75) 100%);
}

/* 移动端导航栏过渡效果 */
.nav-blur {
transition: height 0.3s ease;
}

/* 确保图标垂直居中 */
.bi {
display: inline-flex;
align-items: center;
justify-content: center;
}