/* ===== Voice Main Layout ===== */
.voice-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.voice-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem 1.5rem;
}

/* ===== Welcome / Empty State ===== */
.voice-welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 150px;
}

.voice-welcome-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.voice-welcome-icon i {
    font-size: 1.8rem;
    color: var(--accent);
}

.voice-welcome-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.voice-welcome-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 400px;
    line-height: 1.6;
}

.voice-welcome-login-btn {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.75rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.voice-welcome-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.20);
    color: #ffffff;
}

/* ===== Input Area (fixed bottom) ===== */
.voice-input-area {
    position: fixed;
    bottom: 0;
    left: var(--new-sidebar-width);
    right: 0;
    background: var(--bg-primary);
    z-index: 10;
    padding: 1rem 1.5rem;
    margin: 0px 10px;
}

.voice-input-area-inner {
    max-width: 800px;
    margin: 0 auto;
}

.voice-input-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.voice-input-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.voice-input-textarea {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
    font-family: inherit;
    min-height: 80px;
    max-height: 300px;
}

.voice-input-textarea::placeholder {
    color: var(--text-muted);
}

/* ===== Character Counter ===== */
.voice-char-count {
    text-align: right;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.voice-char-count.warn {
    color: #e67e22;
}

.voice-char-count.over {
    color: #e74c3c;
}

/* ===== Params Bar (below textarea) ===== */
.voice-params-bar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.5rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

/* Compact select in params bar */
.voice-param-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.voice-param-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    white-space: nowrap;
    font-weight: 500;
}

.voice-param-select {
    padding: 0.4rem 1.6rem 0.4rem 0.6rem;
    background: var(--bg-card);
    border: 1.5px solid #cccccc;
    border-radius: 7px;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.45rem center;
    background-size: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.voice-param-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.voice-param-select:hover { border-color: var(--accent); }

/* Generate button (like chat send) */
.voice-send-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1.05rem;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
    margin-left: auto;
}

.voice-send-btn:hover { opacity: 0.9; transform: scale(1.05); }
.voice-send-btn:active { transform: scale(0.95); }
.voice-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Bottom hint */
.voice-input-hint {
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ===== Messages Area ===== */
.voice-messages {
    flex: 1 0 auto;
    padding: 1rem 0 220px 0;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.voice-msg-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.25rem;
}

.voice-msg-user {
    align-items: flex-end;
}

.voice-msg-user .voice-msg-body {
    max-width: 85%;
}

.voice-msg-assistant {
    flex-direction: column;
    align-items: flex-start;
}

.voice-msg-assistant .voice-msg-body {
    padding-left: 40px;
}

.voice-msg-header {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.voice-msg-header .voice-msg-avatar {
    margin: 0 8px 0 0;
}

.voice-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    background: var(--bg-secondary);
    color: var(--accent);
    border: 1px solid var(--border);
    overflow: hidden;
}

.voice-msg-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.voice-msg-meta {
    display: flex;
    align-items: center;
}

.voice-model-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.voice-msg-bubble {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    line-height: 1.6;
    font-size: 0.95rem;
    word-wrap: break-word;
}

.voice-msg-user .voice-msg-bubble {
    background: #f0f0f0;
    color: #000;
}

.voice-msg-assistant .voice-msg-bubble {
    background: var(--bg-card);
    color: var(--text-primary);
}

.voice-msg-time {
    display: none;
}

/* ===== Audio Player in Messages ===== */
.voice-audio-player {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-top: 0.5rem;
    min-width: 280px;
}

.voice-audio-play-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.voice-audio-play-btn:hover { opacity: 0.9; transform: scale(1.05); }
.voice-audio-play-btn:active { transform: scale(0.95); }

.voice-audio-progress {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    min-width: 80px;
}

.voice-audio-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.voice-audio-progress::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--accent);
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.voice-audio-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 60px;
    text-align: right;
}

.voice-audio-download {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.95rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.voice-audio-download:hover {
    background: var(--bg-card);
    color: var(--accent);
}

/* ===== Message Actions (Copy / Edit / Regenerate) ===== */
.voice-msg-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-top: 4px;
}

.voice-msg-user .voice-msg-actions {
    justify-content: flex-end;
}

.voice-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.voice-action-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.voice-action-btn:active {
    transform: scale(0.95);
}

/* ===== User Edit Area ===== */
.voice-msg-body.is-editing {
    max-width: 100% !important;
    width: 100%;
}

.user-edit-area {
    margin-top: 8px;
}

.user-edit-textarea {
    width: 100%;
    min-height: 80px;
    min-width: 400px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    outline: none;
}

.user-edit-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.user-edit-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
}

.user-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s ease;
}

.user-edit-btn.cancel-btn {
    background: transparent;
    color: var(--text-secondary);
}

.user-edit-btn.cancel-btn:hover {
    background: var(--bg-secondary);
}

.user-edit-btn.send-btn {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.user-edit-btn.send-btn:hover {
    opacity: 0.9;
}

/* Loading dots animation */
.voice-msg-status {
    color: var(--text-muted);
    font-size: 0.88rem;
    padding: 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 2px;
}

.voice-msg-status .loading-dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    animation: voiceStatusBounce 1.4s ease-in-out infinite;
}

.voice-msg-status .loading-dot:nth-child(2) { animation-delay: 0.2s; }
.voice-msg-status .loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes voiceStatusBounce {
    0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1.3); }
}

/* ===== Floating Toolbox (top-right) ===== */
.voice-toolbox {
    position: fixed;
    right: 16px;
    top: 16px;
    display: flex;
    gap: 6px;
    z-index: 99;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.voice-toolbox.toolbox-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.toolbox-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.toolbox-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-light);
}

/* ===== Right Panel (History Sidebar) ===== */
.voice-right-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    z-index: 100;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.voice-right-panel.open {
    transform: translateX(0);
}

.right-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
}

.right-panel-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.right-panel-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.right-panel-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0.75rem 1rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
}

.right-panel-search i {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.right-panel-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-family: inherit;
}

.right-panel-search input::placeholder {
    color: var(--text-muted);
}

.right-panel-new-chat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 1rem 0.75rem;
    padding: 0.55rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
    font-family: inherit;
}

.right-panel-new-chat:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.right-panel-history {
    flex: 1;
    overflow-y: auto;
    padding: 0 0.5rem;
}

.right-panel-loading,
.right-panel-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
    overflow: hidden;
}

.history-item:hover {
    background: var(--bg-secondary);
}

.history-item.active {
    background: #f0f0f0;
    color: #000;
}

.history-item i {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.history-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
}

.history-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.history-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.history-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ===== Panel-Open State (shift main content) ===== */
.new-main-wrapper.panel-open {
    margin-right: 320px;
}

.new-main-wrapper.panel-open .voice-input-area {
    right: 320px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .voice-input-area {
        left: 0;
        padding: 0.75rem 1rem;
    }
    .voice-container {
        padding: 1.5rem 1rem;
    }
    .voice-messages {
        padding-bottom: 260px;
    }

    .voice-toolbox {
        right: 8px;
    }

    .voice-right-panel {
        width: 100vw;
    }

    .new-main-wrapper.panel-open {
        margin-right: 0;
    }

    .voice-audio-player {
        min-width: 220px;
    }
}

@media (max-width: 480px) {
    .voice-audio-player {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* ===== Timbre Param Trigger Button ===== */
.voice-param-timbre-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.6rem;
    background: var(--bg-card);
    border: 1.5px solid #cccccc;
    border-radius: 7px;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.voice-param-timbre-btn:hover {
    border-color: var(--accent);
}

.voice-param-timbre-btn:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.voice-param-timbre-btn i {
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

/* ===== Timbre Modal ===== */
.timbre-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 680px;
    max-width: 92vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* ===== Modal Header ===== */
.timbre-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.timbre-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.timbre-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.timbre-modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ===== Modal Tabs ===== */
.timbre-modal-tabs {
    display: flex;
    gap: 0;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.timbre-tab {
    padding: 0.7rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
    margin-bottom: -1px;
}

.timbre-tab:hover {
    color: var(--text-primary);
}

.timbre-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

/* ===== Selected Timbre Indicator ===== */
.timbre-modal-selected {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: var(--accent-light);
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.timbre-selected-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.timbre-selected-name {
    color: var(--accent);
    font-weight: 600;
}

/* ===== Modal Body ===== */
.timbre-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

.timbre-modal-loading,
.timbre-modal-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== Language Group ===== */
.timbre-lang-group {
    margin-bottom: 1.25rem;
}

.timbre-lang-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.6rem;
    padding-left: 0.15rem;
}

.timbre-lang-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.6rem;
}

/* ===== Timbre Card ===== */
.timbre-card {
    padding: 0.7rem 0.85rem;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.timbre-card-info {
    flex: 1;
    min-width: 0;
}

.timbre-card:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.timbre-card.selected {
    border-color: var(--accent);
    background: var(--accent-light);
    box-shadow: 0 0 0 1px var(--accent);
}

.timbre-card-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.timbre-card-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ===== Timbre Preview Button ===== */
.timbre-preview-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--accent);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}

.timbre-preview-btn:hover {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.timbre-preview-btn:active {
    transform: scale(0.95);
}

.timbre-preview-btn.loading {
    pointer-events: none;
    border-color: var(--accent);
    animation: previewPulse 1.2s ease-in-out infinite;
}

.timbre-preview-btn.loading i {
    animation: previewSpin 1s linear infinite;
}

@keyframes previewPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(0, 0, 0, 0); }
}

@keyframes previewSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== Modal Footer ===== */
.timbre-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.timbre-modal-confirm-btn {
    padding: 0.6rem 2rem;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
}

.timbre-modal-confirm-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.timbre-modal-confirm-btn:active {
    transform: scale(0.97);
}
