﻿@import url("/toolsrc/tool/22_voice/css/voicesub.css");

.ttsflow-tool.aiimage-container {
    min-height: 820px;
}

.ttsflow-tool .aiimage-main {
    gap: 18px;
    padding: 30px;
}

.ttsflow-tool .tts-workbench-panel {
    padding: 0;
    position: relative;
    z-index: 40;
    overflow: visible;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.ttsflow-tool .tts-editor-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: stretch;
}

.ttsflow-tool .tts-editor-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.ttsflow-tool .tts-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.ttsflow-tool .tts-editor-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-left: auto;
    text-align: right;
}

.ttsflow-tool .tts-editor-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #f7fbff;
}

.ttsflow-tool .tts-count-text {
    font-size: 12px;
    color: rgba(226, 235, 248, 0.72);
}

.ttsflow-tool .tts-file-input-hidden {
    display: none;
}

.ttsflow-tool .tts-textarea-shell,
.ttsflow-tool .tts-output-shell {
    display: flex;
    flex-direction: column;
    gap: 32px;
    height: 100%;
    min-height: 0;

    border-radius: 4px;

}

.ttsflow-tool .tts-output-shell {
    height: 100%;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    justify-content: flex-start;
}

.ttsflow-tool .tts-textarea {
    width: 100%;
    min-height: 268px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
    color: #f7fbff;
    font-size: 14px;
    line-height: 1.7;
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
}

.ttsflow-tool .tts-textarea-foot {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: -2px;
}

.ttsflow-tool .tts-flow-toolbar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.ttsflow-tool .tts-flow-step {
    --step-accent: 74, 148, 255;
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
    min-height: 74px;
    padding: 11px 12px 10px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.035);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease;
    position: relative;
    overflow: hidden;
}

.ttsflow-tool .tts-flow-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(var(--step-accent), 0.96);
    opacity: 0.9;
}

.ttsflow-tool .tts-flow-step:nth-child(1) {
    --step-accent: 74, 148, 255;
}

.ttsflow-tool .tts-flow-step:nth-child(2) {
    --step-accent: 123, 97, 255;
}

.ttsflow-tool .tts-flow-step:nth-child(3) {
    --step-accent: 44, 186, 160;
}

.ttsflow-tool .tts-flow-step:nth-child(4) {
    --step-accent: 255, 159, 67;
}

.ttsflow-tool .tts-flow-step.is-running {
    border-color: rgba(111, 107, 255, 0.42);
    background: rgba(111, 107, 255, 0.08);
    box-shadow: 0 0 0 1px rgba(111, 107, 255, 0.12), 0 14px 34px rgba(111, 107, 255, 0.16);
    animation: ttsFlowStepPulse 1.8s ease-in-out infinite;
}

.ttsflow-tool #ttsStepStartCard.is-running {
    border-color: rgba(34, 184, 160, 0.42);
    background: rgba(34, 184, 160, 0.1);
    box-shadow: 0 0 0 1px rgba(34, 184, 160, 0.12), 0 16px 34px rgba(34, 184, 160, 0.2);
    animation: none;
}

.ttsflow-tool #ttsStepStartCard.is-running::after {
    content: '';
    position: absolute;
    top: -18px;
    bottom: -18px;
    left: -40%;
    width: 34%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.12) 35%, rgba(255, 255, 255, 0.34) 50%, rgba(255, 255, 255, 0.12) 65%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-20deg);
    animation: ttsStepSweep 1.45s linear infinite;
    pointer-events: none;
}

.ttsflow-tool .tts-flow-step.is-done {
    border-color: rgba(56, 196, 152, 0.28);
    background: rgba(56, 196, 152, 0.05);
    box-shadow: 0 0 0 1px rgba(56, 196, 152, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.ttsflow-tool .tts-flow-step.is-disabled {
    opacity: 0.74;
}

.ttsflow-tool .tts-flow-step-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    padding-top: 1px;
}

.ttsflow-tool .tts-flow-step-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(var(--step-accent), 0.18);
    color: rgba(232, 241, 255, 0.92);
    font-size: 11px;
    font-weight: 700;
    flex: 0 0 auto;
}

.ttsflow-tool .tts-flow-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: calc(100% - 30px);
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(var(--step-accent), 0.14);
    color: rgba(232, 241, 255, 0.82);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.ttsflow-tool .tts-flow-step-title {
    color: #f7fbff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.ttsflow-tool .tts-flow-step-desc {
    color: rgba(226, 235, 248, 0.68);
    font-size: 12px;
    line-height: 1.5;
    min-height: 38px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ttsflow-tool .tts-flow-step-audio .tts-flow-step-desc {
    min-height: 38px;
    -webkit-line-clamp: 2;
}

.ttsflow-tool .tts-flow-step-player {
    margin-top: auto;
}

.ttsflow-tool .tts-flow-step-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    margin-top: auto;
    padding-top: 9px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ttsflow-tool .tts-flow-step-meta {
    flex: 1 1 auto;
    min-width: 0;
    color: rgba(232, 241, 255, 0.66);
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ttsflow-tool .tts-flow-step-btn {
    flex: 0 0 auto;
    width: 80px !important;
    min-width: 80px;
    max-width: 80px;
}

@keyframes ttsFlowStepPulse {

    0%,
    100% {
        transform: translateY(0);
        box-shadow: 0 0 0 1px rgba(111, 107, 255, 0.12), 0 14px 34px rgba(111, 107, 255, 0.16);
    }

    50% {
        transform: translateY(-2px);
        box-shadow: 0 0 0 1px rgba(111, 107, 255, 0.2), 0 18px 40px rgba(111, 107, 255, 0.24);
    }
}

@keyframes ttsStepSweep {
    0% {
        left: -42%;
        opacity: 0;
    }

    12% {
        opacity: 1;
    }

    100% {
        left: 112%;
        opacity: 0;
    }
}

.ttsflow-tool .tts-current-speaker-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: auto;
    max-width: 100%;
    min-height: 22px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #f7fbff;
    font-size: 12px;
    box-sizing: border-box;
}

.ttsflow-tool .tts-current-speaker-chip-label {
    display: block;
    width: 100%;
    color: #f7fbff;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ttsflow-tool .tts-current-speaker-chip-meta {
    display: block;
    width: 100%;
    margin-top: 2px;
    color: rgba(232, 241, 255, 0.68);
    font-size: 11px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ttsflow-tool .tts-flow-step .tts-import-btn,
.ttsflow-tool .tts-flow-step .tts-action-btn,
.ttsflow-tool .tts-flow-step .tts-primary-btn,
.ttsflow-tool .tts-flow-step .tts-download-btn {
    width: 80px;
    min-width: 80px;
}

.ttsflow-tool .tts-flow-step .tts-primary-btn,
.ttsflow-tool .tts-flow-step .tts-action-btn,
.ttsflow-tool .tts-flow-step .tts-import-btn {
    min-height: 34px;
    padding-left: 12px;
    padding-right: 12px;
    font-size: 12px;
}

.ttsflow-tool .tts-flow-step-audio .tts-download-btn {
    flex: 0 0 auto;
    width: 80px !important;
    min-width: 80px;
    max-width: 80px;
    min-height: 34px;
    height: 34px;
    padding: 0 12px;
    border-radius: 4px;
}

.ttsflow-tool .tts-flow-step-audio .tts-flow-step-foot {
    align-items: center;
    padding-top: 10px;
}

.ttsflow-tool .tts-flow-step-audio .tts-inline-player {
    flex: 0 0 auto;
    width: auto;
    min-width: auto;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-sizing: border-box;
}

.ttsflow-tool .tts-import-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 4px;
    background: #4a94ff;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: filter .18s ease, box-shadow .18s ease, transform .18s ease;
    box-shadow: 0 8px 16px rgba(74, 148, 255, 0.16);
}

.ttsflow-tool .tts-import-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.ttsflow-tool .tts-import-btn:disabled {
    opacity: 0.52;
    cursor: not-allowed;
    transform: none;
}

.ttsflow-tool .tts-textarea:focus,
.ttsflow-tool .tts-input:focus,
.ttsflow-tool .tts-select:focus {
    border-color: rgba(91, 140, 255, 0.72);
    box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.14);
}

.ttsflow-tool .tts-textarea::placeholder,
.ttsflow-tool .tts-input::placeholder {
    color: rgba(226, 235, 248, 0.42);
}

.ttsflow-tool .tts-settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: stretch;
    position: relative;
    z-index: 2;
    overflow: visible;
}

.ttsflow-tool .tts-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: visible;
}

.ttsflow-tool .tts-field-speakers {
    min-width: 0;
}

.ttsflow-tool .tts-field-label {
    font-size: 12px;
    color: rgba(226, 235, 248, 0.72);
}

.ttsflow-tool .tts-speaker-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ttsflow-tool .tts-speaker-topbar {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ttsflow-tool .tts-scene-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: -1px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.ttsflow-tool .tts-scene-tabs::-webkit-scrollbar {
    display: none;
}

.voiceflow-tool .voice-glass-panel {

    border-radius: 5px;
}


.ttsflow-tool .tts-scene-tab {
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(232, 241, 255, 0.82);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    position: relative;
    z-index: 1;
    white-space: nowrap;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.ttsflow-tool .tts-scene-tab+.tts-scene-tab {
    margin-left: -1px;
}

.ttsflow-tool .tts-scene-tab:first-child {
    border-top-left-radius: 4px;
}

.ttsflow-tool .tts-scene-tab:last-child {
    border-top-right-radius: 4px;
}

.ttsflow-tool .tts-scene-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
}

.ttsflow-tool .tts-scene-tab.is-active {
    z-index: 3;
    border-color: rgba(var(--emerald-rgb), 0.92);
    border-bottom-color: rgba(var(--emerald-rgb), 0.92);
    background: rgba(var(--emerald-rgb), 0.32);
    color: #f7fbff;
    box-shadow: inset 0 0 0 1px rgba(var(--emerald-rgb), 0.12), 0 8px 18px rgba(var(--emerald-rgb), 0.14);
}

.ttsflow-tool .tts-speaker-search-actions {
    display: flex;
    align-items: stretch;
    gap: 0;
    flex: 0 0 120px;
    width: 120px;
    max-width: 120px;
}

.ttsflow-tool .tts-speaker-search {
    min-height: 34px;
    height: 34px;
    padding-right: 42px;
    font-size: 13px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M21 21L16.65 16.65' stroke='%23E8F1FF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='11' cy='11' r='6' stroke='%23E8F1FF' stroke-width='1.8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px 16px;
}

.ttsflow-tool .tts-input,
.ttsflow-tool .tts-select {
    width: 100%;
    height: 20px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
    color: #f7fbff;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.ttsflow-tool .tts-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3 5.25L7 9.25L11 5.25' stroke='%23E8F1FF' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 14px 14px;
}

.ttsflow-tool .tts-select option {
    background: #213047;
    color: #f7fbff;
}

.ttsflow-tool .tts-speaker-board {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 4px 4px 4px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    height: 456px;
    max-height: 456px;
    overflow-y: auto;
    border-radius: 5px;
}

.ttsflow-tool .tts-speaker-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ttsflow-tool .tts-speaker-section-title {
    font-size: 12px;
    color: rgba(232, 241, 255, 0.7);
    letter-spacing: .4px;
}

.ttsflow-tool .tts-speaker-empty {
    min-height: 120px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(232, 241, 255, 0.68);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.ttsflow-tool .tts-speaker-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.ttsflow-tool .tts-speaker-card {
    width: 100%;
    min-width: 0;
    height: 70px;
    min-height: 70px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    color: #f7fbff;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-align: left;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.ttsflow-tool .tts-speaker-card:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.08);
}

.ttsflow-tool .tts-speaker-card.is-active {
    border-color: rgba(111, 134, 255, 0.82);
    background: rgba(111, 134, 255, 0.16);
    box-shadow: 0 12px 24px rgba(84, 116, 255, 0.18);
}

.ttsflow-tool .tts-speaker-card .tts-speaker-avatar {
    width: 32px;
    height: 32px;
    font-size: 13px;
    flex: 0 0 32px;
}

.ttsflow-tool .tts-speaker-card-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
}

.ttsflow-tool .tts-speaker-card-label {
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ttsflow-tool .tts-speaker-card-meta {
    min-height: 15px;
    font-size: 11px;
    line-height: 1.3;
    color: rgba(232, 241, 255, 0.68);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ttsflow-tool .tts-select-native {
    position: absolute;
    inset: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.ttsflow-tool .tts-speaker-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex: 0 0 24px;
}

.ttsflow-tool .tts-speaker-avatar[data-tone="blue"] {
    background: linear-gradient(135deg, #5aa7ff 0%, #4f77ff 100%);
}

.ttsflow-tool .tts-speaker-avatar[data-tone="purple"] {
    background: linear-gradient(135deg, #a576ff 0%, #6d63ff 100%);
}

.ttsflow-tool .tts-speaker-avatar[data-tone="pink"] {
    background: linear-gradient(135deg, #ff8fc2 0%, #ff6699 100%);
}

.ttsflow-tool .tts-speaker-avatar[data-tone="green"] {
    background: linear-gradient(135deg, #42d7b1 0%, #1ab59d 100%);
}

.ttsflow-tool .tts-speaker-avatar[data-tone="gold"] {
    background: linear-gradient(135deg, #f5bf5b 0%, #e69b2e 100%);
}

.ttsflow-tool .tts-speaker-avatar[data-tone="cyan"] {
    background: linear-gradient(135deg, #56d6f7 0%, #2ba9dc 100%);
}

.ttsflow-tool .tts-speaker-label {
    min-width: 0;
    font-size: 14px;
    font-weight: 700;
}

.ttsflow-tool .voice-detail-grid,
.ttsflow-tool .voice-top-grid,
.ttsflow-tool .voice-detail-grid .voice-glass-panel,
.ttsflow-tool .voice-top-grid .voice-glass-panel {
    position: relative;
    z-index: 1;
}

.ttsflow-tool .tts-range-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 16px;
    border: 0;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.ttsflow-tool .tts-range {
    flex: 1;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    accent-color: #6f86ff;
}

.ttsflow-tool .tts-range::-webkit-slider-runnable-track,
.ttsflow-tool .tts-player-progress::-webkit-slider-runnable-track {
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: none;
}

.ttsflow-tool .tts-range::-webkit-slider-thumb,
.ttsflow-tool .tts-player-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    margin-top: -5px;
    border: 0;
    border-radius: 50%;
    background: #6f86ff;
    box-shadow: none;
}

.ttsflow-tool .tts-range::-moz-range-track,
.ttsflow-tool .tts-player-progress::-moz-range-track {
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: none;
}

.ttsflow-tool .tts-range::-moz-range-thumb,
.ttsflow-tool .tts-player-progress::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 0;
    border-radius: 50%;
    background: #6f86ff;
    box-shadow: none;
}

.ttsflow-tool .tts-range-value {
    min-width: 34px;
    text-align: right;
    font-size: 13px;
    color: #f7fbff;
}

.ttsflow-tool .tts-editor-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ttsflow-tool .tts-mini-btn,
.ttsflow-tool .tts-action-btn,
.ttsflow-tool .tts-primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease, filter .18s ease;
}

.ttsflow-tool .tts-mini-btn,
.ttsflow-tool .tts-action-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #f7fbff;
    box-shadow: none;
}

.ttsflow-tool .tts-primary-btn {
    width: auto;
    min-width: 80px;
    background: #22b8a0;
    color: #fff;
    box-shadow: 0 8px 16px rgba(34, 184, 160, 0.18);
}

.ttsflow-tool .tts-download-btn {
    min-width: 80px;
    background: #ff9f43;
    color: #fff;
    box-shadow: 0 8px 16px rgba(255, 159, 67, 0.16);
}

.ttsflow-tool .tts-mini-btn:hover,
.ttsflow-tool .tts-action-btn:hover,
.ttsflow-tool .tts-primary-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.ttsflow-tool .tts-mini-btn:disabled,
.ttsflow-tool .tts-action-btn:disabled,
.ttsflow-tool .tts-primary-btn:disabled {
    opacity: .56;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ttsflow-tool .tts-btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-top-color: #fff;
    border-radius: 50%;
    animation: qk22TtsSpin .8s linear infinite;
}

.ttsflow-tool .tts-primary-btn.is-running .tts-btn-spinner {
    display: inline-block;
}

.ttsflow-tool .tts-submit-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    margin-top: 34px;
    padding-left: 0;
    padding-right: 0;
}

.ttsflow-tool .tts-status-text {
    flex: 1 1 0;
    min-width: 0;
    font-size: 13px;
    color: rgba(226, 235, 248, 0.82);
    padding-top: 10px;
}

.ttsflow-tool .tts-submit-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
}

.ttsflow-tool .tts-submit-actions .tts-primary-btn {
    flex: 0 0 180px;
    width: 180px;
    min-width: 180px;
}

.ttsflow-tool .tts-submit-actions .tts-action-btn {
    flex: 0 0 90px;
    width: 90px;
    min-width: 90px;
    padding-left: 10px;
    padding-right: 10px;
}

.ttsflow-tool .tts-settings-btn {
    min-width: 80px;
    background: #7b61ff;
    color: #fff;
    box-shadow: 0 8px 16px rgba(123, 97, 255, 0.16);
}

.ttsflow-tool .tts-inline-player {
    flex: 0 0 400px;
    width: 400px;
    min-width: 400px;
    margin-left: auto;
}

.ttsflow-tool .tts-download-btn {
    min-width: 80px;
    background: #ff9f43;
    color: #fff;
    box-shadow: 0 8px 16px rgba(255, 159, 67, 0.16);
}

.ttsflow-tool .tts-flow-step-audio .tts-download-btn .tts-download-icon {
    position: relative;
    display: inline-block;
    width: 14px;
    height: 14px;
}

.ttsflow-tool .tts-flow-step-audio .tts-download-btn .tts-download-icon::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 1px;
    width: 2px;
    height: 7px;
    border-radius: 2px;
    background: currentColor;
}

.ttsflow-tool .tts-flow-step-audio .tts-download-btn .tts-download-icon::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 6px;
    width: 8px;
    height: 8px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    box-sizing: border-box;
}

.ttsflow-tool .tts-flow-step-audio .tts-download-btn .tts-download-bar {
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: 1px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.ttsflow-tool .tts-settings-format {
    justify-content: center;
}

.ttsflow-tool .tts-submit-bar {
    display: none;
}

.ttsflow-tool .tts-history-panel {
    margin-top: 14px;
}

.ttsflow-tool .tts-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.ttsflow-tool .tts-history-title {
    margin: 0;
    font-size: 18px;
    color: #f7fbff;
}

.ttsflow-tool .tts-history-desc {
    font-size: 12px;
    color: rgba(232, 241, 255, 0.68);
}

.ttsflow-tool .tts-recent-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ttsflow-tool .tts-recent-item {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ttsflow-tool .tts-recent-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ttsflow-tool .tts-recent-voice {
    font-size: 14px;
    font-weight: 700;
    color: #f7fbff;
}

.ttsflow-tool .tts-recent-time {
    font-size: 12px;
    color: rgba(232, 241, 255, 0.62);
}

.ttsflow-tool .tts-recent-text {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(232, 241, 255, 0.82);
    min-height: 42px;
}

.ttsflow-tool .tts-recent-meta {
    font-size: 12px;
    color: rgba(232, 241, 255, 0.62);
}

.ttsflow-tool .tts-recent-action {
    align-self: flex-start;
    min-height: 36px;
    padding: 0 14px;
}

.ttsflow-tool .tts-recent-empty {
    grid-column: 1 / -1;
    padding: 16px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 13px;
    color: rgba(232, 241, 255, 0.62);
}

#ttsSettingsModal,
#qkTtsHostSettingsModal {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
}

#ttsSettingsModal.active,
#qkTtsHostSettingsModal.active {
    pointer-events: auto;
    opacity: 1;
}

#ttsSettingsModal .modal-backdrop,
#qkTtsHostSettingsModal .modal-backdrop {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(circle at top, rgba(74, 148, 255, 0.14), transparent 34%), rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#ttsSettingsModal .modal-content,
#qkTtsHostSettingsModal .modal-content {
    position: relative;
    z-index: 2;
    width: min(720px, calc(100vw - 40px));
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    overflow: visible;
    background: linear-gradient(180deg, rgba(74, 148, 255, 0.10), rgba(255, 255, 255, 0.03) 18%, rgba(12, 14, 22, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.6), 0 14px 34px rgba(74, 148, 255, 0.10), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

#ttsSettingsModal.active .modal-content,
#qkTtsHostSettingsModal.active .modal-content {
    animation: modalFadeIn 0.3s ease forwards;
}

#ttsSettingsModal .modal-head,
#qkTtsHostSettingsModal .modal-head {
    padding: 18px 24px;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    background: linear-gradient(180deg, rgba(74, 148, 255, 0.16) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-bottom: 1px solid rgba(74, 148, 255, 0.18);
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

#ttsSettingsModal .modal-head h3,
#qkTtsHostSettingsModal .modal-head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #f7fbff;
}

#ttsSettingsModal .modal-body,
#qkTtsHostSettingsModal .modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

#ttsSettingsModal .modal-close-btn,
#qkTtsHostSettingsModal .modal-close-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: linear-gradient(135deg, #4a94ff, #6f6bff);
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 3;
    box-shadow: 0 10px 24px rgba(74, 148, 255, 0.26);
}

#ttsSettingsModal .modal-close-btn:hover,
#qkTtsHostSettingsModal .modal-close-btn:hover {
    filter: brightness(1.06);
    opacity: 1;
    transform: rotate(90deg);
}

#ttsSettingsModal .modal-close-btn span,
#qkTtsHostSettingsModal .modal-close-btn span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
}

#ttsSettingsModal .modal-close-btn span:first-child,
#qkTtsHostSettingsModal .modal-close-btn span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
}

#ttsSettingsModal .modal-close-btn span:last-child,
#qkTtsHostSettingsModal .modal-close-btn span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
}

#ttsSettingsModal .modal-card,
#qkTtsHostSettingsModal .modal-card {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

#ttsSettingsModal .tts-settings-body,
#qkTtsHostSettingsModal .tts-settings-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

#ttsSettingsModal .tts-settings-actions,
#qkTtsHostSettingsModal .tts-settings-actions {
    padding-top: 20px;
}

#ttsSettingsModal .tts-settings-field,
#qkTtsHostSettingsModal .tts-settings-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#ttsSettingsModal .tts-settings-field-full,
#qkTtsHostSettingsModal .tts-settings-field-full {
    grid-column: 1 / -1;
}

#ttsSettingsModal .tts-field-label,
#qkTtsHostSettingsModal .tts-field-label {
    font-size: 12px;
    color: rgba(226, 235, 248, 0.72);
}

#ttsSettingsModal .tts-select,
#qkTtsHostSettingsModal .tts-select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
    color: #f7fbff;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3 5.25L7 9.25L11 5.25' stroke='%23E8F1FF' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 14px 14px;
}

#ttsSettingsModal .tts-select option,
#qkTtsHostSettingsModal .tts-select option {
    background: #213047;
    color: #f7fbff;
}

#ttsSettingsModal .tts-select:focus,
#qkTtsHostSettingsModal .tts-select:focus {
    border-color: rgba(91, 140, 255, 0.72);
    box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.14);
}

#ttsSettingsModal .tts-setting-static,
#qkTtsHostSettingsModal .tts-setting-static {
    min-height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.07);
    color: #f7fbff;
    font-size: 14px;
}

#ttsSettingsModal .tts-range-wrap,
#qkTtsHostSettingsModal .tts-range-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 16px;
    border: 0;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

#ttsSettingsModal .tts-range,
#qkTtsHostSettingsModal .tts-range {
    flex: 1;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    accent-color: #6f86ff;
}

#ttsSettingsModal .tts-range::-webkit-slider-runnable-track,
#qkTtsHostSettingsModal .tts-range::-webkit-slider-runnable-track {
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: none;
}

#ttsSettingsModal .tts-range::-webkit-slider-thumb,
#qkTtsHostSettingsModal .tts-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    margin-top: -5px;
    border: 0;
    border-radius: 50%;
    background: #6f86ff;
    box-shadow: none;
}

#ttsSettingsModal .tts-range::-moz-range-track,
#qkTtsHostSettingsModal .tts-range::-moz-range-track {
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: none;
}

#ttsSettingsModal .tts-range::-moz-range-thumb,
#qkTtsHostSettingsModal .tts-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 0;
    border-radius: 50%;
    background: #6f86ff;
    box-shadow: none;
}

#ttsSettingsModal .tts-range-value,
#qkTtsHostSettingsModal .tts-range-value {
    min-width: 34px;
    text-align: right;
    font-size: 13px;
    color: #f7fbff;
}

#ttsResultModal {
    position: fixed;
    inset: 0;
    z-index: 10025;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity .26s ease;
}

#ttsResultModal.active {
    opacity: 1;
    pointer-events: auto;
}

#ttsResultModal .modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .42);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#ttsResultModal .modal-content {
    position: relative;
    z-index: 2;
    width: min(460px, calc(100vw - 32px));
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 4px;
    background: linear-gradient(180deg, rgba(74, 148, 255, .24), rgba(24, 30, 44, .98) 18%, rgba(12, 14, 22, .995));
    box-shadow: 0 22px 60px rgba(0, 0, 0, .58);
    overflow: visible;
}

#ttsResultModal .modal-head {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

#ttsResultModal .modal-head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #f7fbff;
}

#ttsResultModal .modal-close-btn {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    background: linear-gradient(135deg, #6ca8ff 0%, #6f6bff 100%);
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .28);
    transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
    z-index: 3;
}

#ttsResultModal .modal-close-btn:hover {
    transform: rotate(90deg);
    background: linear-gradient(135deg, #ff6b6b 0%, #ff3b3b 100%);
    box-shadow: 0 14px 30px rgba(255, 59, 59, .32);
}

#ttsResultModal .modal-close-btn span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 2px;
    background: #fff;
}

#ttsResultModal .modal-close-btn span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
}

#ttsResultModal .modal-close-btn span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
}

#ttsResultModal .modal-body {
    padding: 20px;
}

#ttsResultModal .tts-result-name {
    font-size: 16px;
    font-weight: 600;
    color: #f7fbff;
    line-height: 1.5;
    word-break: break-all;
}

#ttsResultModal .tts-result-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

#ttsResultModal .tts-result-meta-item {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 4px;
    background: rgba(255, 255, 255, .04);
}

#ttsResultModal .tts-result-meta-label {
    display: block;
    font-size: 12px;
    color: rgba(226, 235, 248, .68);
}

#ttsResultModal .tts-result-meta-value {
    display: block;
    margin-top: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #f7fbff;
}

#ttsResultModal .tts-result-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}


.voiceflow-tool .voice-capability-item {
    border-radius: 2px;

}


#ttsResultModal .tts-result-btn {
    flex: 1;
    height: 42px;
    border: 0;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease, opacity .18s ease;
}

#ttsResultModal .tts-result-btn.is-primary {
    background: linear-gradient(135deg, #6ca8ff 0%, #6f6bff 100%);
    color: #fff;
}

#ttsResultModal .tts-result-btn.is-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(108, 168, 255, .24);
    filter: brightness(1.04);
}

#ttsResultModal .tts-result-btn.is-secondary {
    background: rgba(255, 255, 255, .08);
    color: #f7fbff;
}

#ttsResultModal .tts-result-btn.is-secondary:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, .14);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .16);
}

.ttsflow-tool .tts-audio-player {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.ttsflow-tool .tts-player-shell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    align-items: center;
    min-height: 34px;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    backdrop-filter: none;
    position: relative;
}

.ttsflow-tool .tts-player-toggle {
    width: 60px;
    height: 34px;
    flex: 0 0 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 0;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    box-shadow: none;
    font-size: 12px;
    font-weight: 600;
}

.ttsflow-tool .tts-player-toggle:disabled {
    opacity: .45;
    cursor: not-allowed;
    box-shadow: none;
}

.ttsflow-tool .tts-player-toggle:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.ttsflow-tool .tts-player-toggle.is-playing {
    background: rgba(255, 255, 255, 0.14);
}

.ttsflow-tool .tts-player-progress-wrap {
    display: none;
}

.ttsflow-tool .tts-player-progress {
    width: 100%;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    accent-color: #6f86ff;
}

.ttsflow-tool .tts-player-time {
    display: none;
}

.ttsflow-tool .tts-player-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 80px;
}

@keyframes qk22TtsSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 980px) {

    .ttsflow-tool .tts-speaker-grid,
    .ttsflow-tool .tts-recent-list,
    .ttsflow-tool .tts-settings-body {
        grid-template-columns: 1fr;
    }

    .ttsflow-tool .tts-speaker-search-actions {
        flex: 0 0 120px;
        width: 120px;
        max-width: 120px;
    }


    .ttsflow-tool .tts-submit-bar {
        flex-wrap: wrap;
    }

    .ttsflow-tool .tts-status-text {
        flex-basis: 100%;
        padding-top: 0;
    }

    .ttsflow-tool .tts-flow-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ttsflow-tool .tts-flow-step-audio {
        grid-column: 1 / -1;
    }

    .ttsflow-tool .tts-flow-step-audio .tts-flow-step-main {
        flex-direction: column;
        align-items: stretch;
    }

    .ttsflow-tool .tts-inline-player {
        width: 100%;
        min-width: 0;
        margin-left: 0;
    }

    #ttsSettingsModal .modal-content,
    #qkTtsHostSettingsModal .modal-content {
        width: min(720px, calc(100vw - 20px));
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }
}

@media (max-width: 720px) {
    .ttsflow-tool .tts-flow-toolbar {
        grid-template-columns: 1fr;
    }

    .ttsflow-tool .tts-flow-step-audio {
        grid-column: auto;
    }
}