/*
 * 幻灯片模版选择器样式
 * 灵感来源于Manus官网设计
 */

/* 幻灯片按钮（位于输入框下方） */
.slide-template-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    height: 38px;
    margin-top: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    box-sizing: border-box;
}

.slide-template-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.slide-template-trigger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    box-shadow: none;
}

.slide-template-trigger:disabled:hover {
    transform: none;
    box-shadow: none;
}

.slide-template-trigger i {
    font-size: 16px;
}

/* 幻灯片模版选择器弹窗 */
.slide-template-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.slide-template-modal.active {
    opacity: 1;
    visibility: visible;
}

.slide-template-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 弹窗头部 */
.slide-template-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid #e5e7eb;
}

.slide-template-modal-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.slide-template-modal-header h2 i {
    color: #667eea;
}

.slide-modal-close-btn {
    background: #f3f4f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #6b7280;
}

.slide-modal-close-btn:hover {
    background: #e5e7eb;
    color: #1f2937;
}

/* 选项卡 */
.slide-template-tabs {
    display: flex;
    gap: 8px;
    padding: 16px 32px 0;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.slide-template-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s ease;
    position: relative;
}

.slide-template-tab:hover {
    color: #667eea;
}

.slide-template-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* 选项卡内容 */
.slide-template-tab-content {
    padding: 24px 32px;
    overflow-y: auto;
    flex: 1;
}

.slide-template-tab-pane {
    display: none;
}

.slide-template-tab-pane.active {
    display: block;
}

/* 示例提示词网格 */
.example-prompts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.example-prompt-card {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.example-prompt-card:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.example-prompt-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.example-prompt-card p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* 模版网格 */
.slide-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.slide-template-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slide-template-card:hover {
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
}

.slide-template-preview {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* 为预览图添加img标签样式 */
.slide-template-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* 当使用背景图时的样式 */
.slide-template-preview[style*="background-image"] {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

/* 当有预览图时,隐藏图标 */
.slide-template-preview[style*="background-image"] .slide-template-preview-icon {
    display: none;
}

/* 不同模版的预览颜色 */
.slide-template-card[data-template="manus_amber_communication"] .slide-template-preview {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.slide-template-card[data-template="manus_bronze"] .slide-template-preview {
    background: linear-gradient(135deg, #92400e 0%, #78350f 100%);
}

.slide-template-card[data-template="manus_azure_sky"] .slide-template-preview {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.slide-template-card[data-template="manus_basalt"] .slide-template-preview {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

.slide-template-card[data-template="manus_emerald"] .slide-template-preview {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.slide-template-card[data-template="manus_glacier_ai"] .slide-template-preview {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.slide-template-card[data-template="manus_haute_couture"] .slide-template-preview {
    background: linear-gradient(135deg, #000000 0%, #1f2937 100%);
}

.slide-template-card[data-template="manus_ink_sketch"] .slide-template-preview {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.slide-template-card[data-template="manus_plain_elegance"] .slide-template-preview {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.slide-template-card[data-template="manus_neon"] .slide-template-preview {
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
}

.slide-template-card[data-template="manus_black_onyx"] .slide-template-preview {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.slide-template-card[data-template="manus_zixun"] .slide-template-preview {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
}

.slide-template-preview-icon {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.9);
}

.slide-template-info {
    padding: 16px;
}

.slide-template-name {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.slide-template-description {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

/* 模版详情弹窗 */
.slide-template-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.slide-template-detail-modal.active {
    opacity: 1;
    visibility: visible;
}

.slide-template-detail-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
}

.slide-template-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid #e5e7eb;
}

.slide-template-detail-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.slide-template-detail-body {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
}

.slide-template-detail-preview {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    background: #f3f4f6;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.slide-template-detail-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-template-detail-info {
    margin-bottom: 24px;
}

.slide-template-detail-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px 0;
}

.slide-template-detail-info p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

.slide-template-detail-footer {
    padding: 20px 32px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.slide-detail-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.slide-detail-cancel-btn {
    background: #f3f4f6;
    color: #6b7280;
}

.slide-detail-cancel-btn:hover {
    background: #e5e7eb;
}

.slide-detail-use-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.slide-detail-use-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 深色主题适配 */
.dark-theme .slide-template-modal-content,
.dark-theme .slide-template-detail-content {
    background: #1f2937;
}

.dark-theme .slide-template-modal-header,
.dark-theme .slide-template-detail-header {
    border-bottom-color: #374151;
}

.dark-theme .slide-template-modal-header h2,
.dark-theme .slide-template-detail-header h3 {
    color: #f9fafb;
}

.dark-theme .slide-modal-close-btn {
    background: #374151;
    color: #9ca3af;
}

.dark-theme .slide-modal-close-btn:hover {
    background: #4b5563;
    color: #f9fafb;
}

.dark-theme .slide-template-tabs {
    background: #111827;
    border-bottom-color: #374151;
}

.dark-theme .slide-template-tab {
    color: #9ca3af;
}

.dark-theme .slide-template-tab:hover,
.dark-theme .slide-template-tab.active {
    color: #818cf8;
}

.dark-theme .slide-template-tab.active {
    border-bottom-color: #818cf8;
}

.dark-theme .example-prompt-card {
    background: #111827;
    border-color: #374151;
}

.dark-theme .example-prompt-card:hover {
    border-color: #818cf8;
    background: #1e3a5f;
}

.dark-theme .example-prompt-card h4 {
    color: #f9fafb;
}

.dark-theme .example-prompt-card p {
    color: #9ca3af;
}

.dark-theme .slide-template-card {
    background: #111827;
    border-color: #374151;
}

.dark-theme .slide-template-card:hover {
    border-color: #818cf8;
}

.dark-theme .slide-template-name {
    color: #f9fafb;
}

.dark-theme .slide-template-description {
    color: #9ca3af;
}

.dark-theme .slide-template-detail-body {
    background: #1f2937;
}

.dark-theme .slide-template-detail-info h4 {
    color: #f9fafb;
}

.dark-theme .slide-template-detail-info p {
    color: #9ca3af;
}

.dark-theme .slide-template-detail-footer {
    border-top-color: #374151;
}

.dark-theme .slide-detail-cancel-btn {
    background: #374151;
    color: #9ca3af;
}

.dark-theme .slide-detail-cancel-btn:hover {
    background: #4b5563;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .slide-template-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .slide-templates-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .example-prompts-grid {
        grid-template-columns: 1fr;
    }

    .slide-template-preview {
        height: 120px;
    }

    .slide-template-detail-content {
        width: 95%;
    }

    .slide-template-detail-preview {
        height: 250px;
    }
}

/* 图片轮播样式 */
.template-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.9);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
}

.carousel-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: white;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5),
        0 0 0 2px rgba(255, 255, 255, 0.3);
}

.carousel-nav i {
    font-size: 18px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.carousel-prev {
    left: 16px;
}

.carousel-next {
    right: 16px;
}

.carousel-indicators {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.carousel-indicator.active {
    background: white;
    width: 24px;
    border-radius: 5px;
}

/* 深色主题下的轮播样式 */
.dark-theme .carousel-nav {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(0, 0, 0, 0.4);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.dark-theme .carousel-nav:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(0, 0, 0, 0.6);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7),
        0 0 0 2px rgba(0, 0, 0, 0.3);
}

.dark-theme .carousel-indicator {
    background: rgba(255, 255, 255, 0.4);
}

.dark-theme .carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.6);
}

.dark-theme .carousel-indicator.active {
    background: rgba(255, 255, 255, 0.9);
}

/* ========================================
 * 文生语音 (TTS) 样式
 * ======================================== */

/* TTS 按钮（位于输入框下方，幻灯片按钮旁边） */
.tts-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    height: 38px;
    margin-top: 12px;
    margin-left: 10px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
    box-sizing: border-box;
}

.tts-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.tts-trigger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    box-shadow: none;
}

.tts-trigger:disabled:hover {
    transform: none;
    box-shadow: none;
}

.tts-trigger i {
    font-size: 16px;
}

/* TTS 弹窗 */
.tts-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tts-modal.active {
    opacity: 1;
    visibility: visible;
}

.tts-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s ease;
}

/* TTS 弹窗头部 */
.tts-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.tts-modal-header h2 {
    color: white;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tts-modal-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.tts-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* TTS 弹窗主体 */
.tts-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.tts-warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tts-warning i {
    font-size: 18px;
}

.tts-input-group {
    margin-bottom: 20px;
}

.tts-input-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.tts-input-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.tts-input-group textarea:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.tts-input-group textarea:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
}

.tts-text-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

.tts-voice-selector {
    display: flex;
    gap: 8px;
}

.tts-voice-selector select {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.tts-voice-selector select:focus {
    outline: none;
    border-color: #10b981;
}

.tts-voice-selector select:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
}

.tts-refresh-btn {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tts-refresh-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #10b981;
}

.tts-refresh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 高级设置 */
.tts-advanced-settings {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.tts-setting-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.tts-setting-row:last-child {
    margin-bottom: 0;
}

.tts-setting-row label {
    width: 80px;
    font-size: 14px;
    color: #6b7280;
}

.tts-setting-row input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    appearance: none;
}

.tts-setting-row input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #10b981;
    cursor: pointer;
}

.tts-setting-row span {
    width: 50px;
    text-align: right;
    font-size: 14px;
    color: #374151;
}

.tts-setting-row select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

/* 结果展示 */
.tts-result {
    background: #ecfdf5;
    border: 1px solid #10b981;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.tts-result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #059669;
    font-weight: 500;
    margin-bottom: 12px;
}

.tts-result-header i {
    font-size: 18px;
}

.tts-audio-player {
    width: 100%;
    margin-bottom: 12px;
}

.tts-result-actions {
    display: flex;
    gap: 10px;
}

.tts-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #10b981;
    color: white;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tts-download-btn:hover {
    background: #059669;
}

/* 错误提示 */
.tts-error {
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #b91c1c;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* TTS 弹窗底部 */
.tts-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.tts-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tts-cancel-btn {
    background: white;
    border: 1px solid #d1d5db;
    color: #374151;
}

.tts-cancel-btn:hover {
    background: #f3f4f6;
}

.tts-generate-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
}

.tts-generate-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.tts-generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 深色主题 */
.dark-theme .tts-modal-content {
    background: #1f2937;
}

.dark-theme .tts-modal-body {
    background: #1f2937;
}

.dark-theme .tts-input-group label {
    color: #e5e7eb;
}

.dark-theme .tts-input-group textarea {
    background: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

.dark-theme .tts-input-group textarea:focus {
    border-color: #10b981;
}

.dark-theme .tts-voice-selector select {
    background: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

.dark-theme .tts-refresh-btn {
    background: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

.dark-theme .tts-advanced-settings {
    background: #374151;
}

.dark-theme .tts-setting-row label {
    color: #9ca3af;
}

.dark-theme .tts-setting-row span {
    color: #e5e7eb;
}

.dark-theme .tts-setting-row select {
    background: #1f2937;
    border-color: #4b5563;
    color: #e5e7eb;
}

.dark-theme .tts-setting-row input[type="range"] {
    background: #4b5563;
}

.dark-theme .tts-modal-footer {
    background: #374151;
    border-color: #4b5563;
}

.dark-theme .tts-cancel-btn {
    background: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

.dark-theme .tts-cancel-btn:hover {
    background: #4b5563;
}

.dark-theme .tts-warning {
    background: #78350f;
    border-color: #92400e;
    color: #fef3c7;
}

.dark-theme .tts-result {
    background: #064e3b;
    border-color: #10b981;
}

.dark-theme .tts-error {
    background: #7f1d1d;
    border-color: #ef4444;
    color: #fecaca;
}
