/* ========== 声音选择弹窗样式 (所有类以 voice-modal- 为前缀，避免冲突) ========== */

.voice-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    display: none;
    /*opacity: 0;*/
    /*background: orchid!important;*/
    /*transition: opacity 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);*/
}

.voice-modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 450px;
    height: 700px;
    max-height: 90%;
    background: var(--bg-color);

    border-radius: 28px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
}

.voice-modal-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 12px 24px;
    padding-right: 10px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.voice-modal-tabs {
    display: flex;
    gap: 28px;
}

.voice-modal-tab {
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.2s;
    position: relative;
    letter-spacing: -0.2px;
    padding-bottom: 4px;
}

.voice-modal-tab.active {
    color: #FFFFFF;
}

.voice-modal-tab.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #FFFFFF;
    border-radius: 2px;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.voice-modal-close {
    cursor: pointer;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    transition: all 0.2s;
}

.voice-modal-close i {
    font-size: 14px;
    color: var(--text-color-8);
}

.voice-modal-close:hover {
    background: var(--text-color-1);
}

.voice-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.voice-modal-filter-section {
    padding: 16px 24px 0px 24px;
    flex-shrink: 0;
}

.voice-modal-gender-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.voice-modal-gender-btn {
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 40px;
    background: transparent;
    color: var(--text-color-6);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 0.5px solid rgba(255, 255, 255, 0.08);
}

.voice-modal-gender-btn.active {
    background: var(--text-color-1);
    color: #f2f2f2;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.voice-modal-tag-section {
    transition: opacity 0.2s, visibility 0.2s;
}

.voice-modal-tag-section.hide-tags {
    display: none;
}

.voice-modal-tag-scroll-wrapper {
    position: relative;
    /*margin-bottom: 10px;*/
}

.voice-modal-tag-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    white-space: nowrap;
    padding-bottom: 4px;
    padding-left: 4px;
    padding-right: 4px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: transparent transparent;
}

.voice-modal-tag-scroll-container:hover {
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.voice-modal-tag-scroll-container::-webkit-scrollbar {
    height: 3px;
    background: transparent;
}

.voice-modal-tag-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.voice-modal-tag-scroll-container::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 6px;
}

.voice-modal-tag-scroll-container:hover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
}

.voice-modal-tag-filter {
    display: inline-flex;
    gap: 20px;
    align-items: center;
    padding-left: 2px;
    padding-right: 10px;
}

.voice-modal-tag-item {
    display: inline-flex;
    font-size: 14px;
    font-weight: 450;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    letter-spacing: -0.2px;
    background: transparent !important;
    border: none !important;
    padding: 4px 0;
}

.voice-modal-tag-item.active {
    font-weight: 700;
    color: #FFFFFF;
    opacity: 1;
}

.voice-modal-tag-item:hover:not(.active) {
    color: rgba(255, 255, 255, 0.85);
}

.voice-modal-scroll-gradient-left,
.voice-modal-scroll-gradient-right {
    position: absolute;
    top: 0;
    bottom: 12px;
    width: 52px;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.2s;

}

.voice-modal-scroll-gradient-left {
    left: 0;
    background: linear-gradient(to right, var(--bg-color) 30%, transparent);
}

.voice-modal-scroll-gradient-right {
    right: 0;
    background: linear-gradient(to left, var(--bg-color) 30%, transparent);

}

.voice-modal-scroll-trigger {
    position: absolute;
    /*top: 50%;*/
    /*transform: translateY(-50%);*/
    top: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.2s;
    background: transparent;
    border-radius: 0;
}

.voice-modal-scroll-trigger-left {
    left: 4px;
}

.voice-modal-scroll-trigger-right {
    right: 4px;
}

.voice-modal-scroll-trigger i {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.voice-modal-scroll-trigger:hover i {
    color: white;
    opacity: 1;
}

.voice-modal-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 0px 0 12px 0;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.voice-modal-list-container:hover {
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.voice-modal-list-container::-webkit-scrollbar {
    width: 4px;
    background: transparent;
}

.voice-modal-list-container::-webkit-scrollbar-track {
    background: transparent;
}

.voice-modal-list-container::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 6px;
}

.voice-modal-list-container:hover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
}

.voice-modal-list {
    display: flex;
    flex-direction: column;
}

.voice-modal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
    transition: background 0.2s, opacity 0.3s;
    cursor: pointer;
    width: 100%;
}

.voice-modal-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.voice-modal-name-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.voice-modal-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color-9);
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voice-modal-name-wrapper .gender-icon {
    font-size: 13px;
    flex-shrink: 0;
}

.voice-modal-name-wrapper .gender-icon.female {
    color: var(--female-color);
}

.voice-modal-name-wrapper .gender-icon.male {
    color: var(--male-color);
}


.voice-modal-name-wrapper .emotion-max-tag {
    margin-left: 4px;
}

.voice-modal-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.voice-modal-waveform-area {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 4px;
}

.voice-modal-waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 16px;
    margin-right: 10px;
}

.voice-modal-wave-bar {
    display: inline-block;
    background-color: var(--text-color-4);
    width: 2px;
    margin: 0 1px;
    border-radius: 2px;
    transition: height 0.2s ease;
}

.voice-modal-wave-bar:nth-child(1) {
    height: 30%;
}

.voice-modal-wave-bar:nth-child(2) {
    height: 70%;
}

.voice-modal-wave-bar:nth-child(3) {
    height: 50%;
}

.voice-modal-wave-bar:nth-child(4) {
    height: 90%;
}

.voice-modal-wave-bar:nth-child(5) {
    height: 40%;
}

.voice-modal-waveform.playing .voice-modal-wave-bar {
    animation: voice-modal-wave 1s infinite ease-in-out;
    background: var(--text-color);
}

.voice-modal-waveform.playing .voice-modal-wave-bar:nth-child(1) {
    animation-delay: 0s;
}

.voice-modal-waveform.playing .voice-modal-wave-bar:nth-child(2) {
    animation-delay: 0.1s;
}

.voice-modal-waveform.playing .voice-modal-wave-bar:nth-child(3) {
    animation-delay: 0.2s;
}

.voice-modal-waveform.playing .voice-modal-wave-bar:nth-child(4) {
    animation-delay: 0.3s;
}

.voice-modal-waveform.playing .voice-modal-wave-bar:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes voice-modal-wave {
    0%, 100% {
        transform: scaleY(0.3);
    }
    50% {
        transform: scaleY(1);
    }
}


.voice-modal-btn {
    padding: 6px 16px;
    border-radius: 30px;
    background: transparent;
    border: 0.8px solid rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.voice-modal-btn * {
    font-size: inherit;
    color: inherit;
}



.voice-modal-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.6);
}

.voice-modal-clone-footer {
    flex-shrink: 0;
    padding: 16px 24px 24px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.045);
    background: var(--bg-color);
}

.voice-modal-clone-btn {
    width: 100%;
    background: var(--primary-btn-bg);
    border: none;
    border-radius: 60px;
    padding: 12px 0;
    font-weight: 600;
    font-size: 15px;
    color: var(--primary-btn-text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(122, 65, 219, 0.3);
}

.voice-modal-clone-btn:hover {
    opacity: 0.7;
    transform: scale(0.98);
}

.voice-modal-empty-state {
    text-align: center;
    padding: 48px 20px;
    padding-top: 200px;
    color: var(--text-color-2);
    font-size: 18px;

}

.voice-modal-skeleton-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    /*height: 60px;*/
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.voice-modal-skeleton-wave {
    width: 30px;
    height: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-right: 12px;
}

.voice-modal-skeleton-name {
    flex: 1;
    height: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-right: 20px;
}

.voice-modal-skeleton-btn {
    width: 60px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
}

.voice-modal-fade-animation {
    animation: voice-modal-fadeInOut 1.5s ease-in-out infinite;
}

@keyframes voice-modal-fadeInOut {
    0% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.3;
    }
}

@media (max-width: 550px) {
    .voice-modal-container {
        max-width: 94%;
        height: 90vh;
        border-radius: 24px;
    }

    .voice-modal-tag-filter {
        gap: 16px;
    }

    .voice-modal-scroll-gradient-left,
    .voice-modal-scroll-gradient-right {
        width: 40px;
    }
}



.voice-modal-select-btn .default-text {
    display: inline-block;
}

.voice-modal-select-btn i {
    margin-right: 4px;
}

.voice-modal-select-btn .active-text {
    display: none;
}


.voice-modal-select-btn.active {
    background: var(--sub-btn-bg);
    color: var(--sub-btn-text-color);
}

.voice-modal-select-btn.active .default-text {
    display: none;
}

.voice-modal-select-btn.active .active-text {
    display: flex;
    align-items: center;
    justify-content: center;
}