/* 声音克隆页面整体样式 */
.voice-clone-content {
    padding: 30px 20px;
    padding-left: 20px;
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
    margin-left: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* ========== 上部分：克隆声音表单 ========== */
.voice-clone-form-section {
    background: #161b22;
    border-radius: 16px;
    padding: 30px;
    border: 1px solid #30363d;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: none;
}

.voice-clone-form-header {
    margin-bottom: 24px;
    border-bottom: 1px solid #30363d;
    padding-bottom: 16px;
}

.voice-clone-form-header h3 {
    font-size: 20px;
    color: #e6edf3;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.voice-clone-form-header h3 i {
    color: #4ade80;
}

.voice-clone-form-header p {
    font-size: 14px;
    color: #8b949e;
    margin: 0;
}

.voice-clone-form-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.voice-clone-form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.voice-clone-form-label {
    font-size: 14px;
    font-weight: 600;
    color: #e6edf3;
    display: flex;
    align-items: center;
    gap: 4px;
}

.voice-clone-form-label .required {
    color: #f85149;
}

.voice-clone-form-input {
    padding: 12px 16px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    color: #e6edf3;
    font-size: 14px;
    transition: all 0.3s ease;
}

.voice-clone-form-input:focus {
    outline: none;
    border-color: #4ade80;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.voice-clone-form-input::placeholder {
    color: #484f58;
}

.voice-clone-upload-area {
    padding: 40px 20px;
    background: #0d1117;
    border: 2px dashed #30363d;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.voice-clone-upload-area:hover {
    border-color: #4ade80;
    background: rgba(102, 126, 234, 0.05);
}

.voice-clone-upload-area i {
    font-size: 40px;
    color: #6c757d;
    margin-bottom: 12px;
    display: block;
}

.voice-clone-upload-area p {
    font-size: 14px;
    color: #8b949e;
    margin: 0 0 8px 0;
}

.voice-clone-upload-area span {
    font-size: 12px;
    color: #484f58;
    display: block;
}

.voice-clone-audio-preview,
.clone-audio-preview {
    padding: 20px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.clone-audio-preview audio {
    width: 100%;
    height: 40px;
}

.audio-preview-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.audio-preview-info i {
    font-size: 32px;
    color: #4ade80;
}

.audio-preview-info span {
    font-size: 14px;
    color: #e6edf3;
    word-break: break-all;
}

.voice-clone-audio-preview audio,
.clone-audio-preview audio {
    flex: 1;
    max-width: 400px;
}

.voice-clone-remove-btn {
    padding: 8px 12px;
    background: rgba(248, 81, 73, 0.1);
    color: #f85149;
    border: 1px solid #f85149;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.voice-clone-remove-btn:hover {
    background: #f85149;
    color: white;
}

/* 克隆模态框中的音频错误提示 */
.clone-audio-error {
    padding: 12px 16px;
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid #f85149;
    border-radius: 8px;
    color: #f85149;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.clone-audio-error::before {
    content: '\f071';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

.voice-clone-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.voice-clone-checkbox input[type="checkbox"] {
    display: none;
}

.voice-clone-checkbox .checkmark {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    transition: border-color 0.2s ease, background 0.2s ease;
    margin-top: 2px;
}

.voice-clone-checkbox input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.voice-clone-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.voice-clone-checkbox .checkbox-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.voice-clone-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #30363d;
}

.voice-clone-cost-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #8b949e;
}

.voice-clone-cost-info i {
    color: #f0883e;
}

.voice-clone-submit-btn {
    padding: 12px 32px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
}

.voice-clone-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.5);
}

.voice-clone-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== 下部分：已克隆的声音列表 ========== */
.voice-clone-list-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
    width: 100%;
    max-width: none;
}

.voice-clone-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.voice-clone-list-header h3 {
    font-size: 18px;
    color: #e6edf3;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.voice-clone-list-header h3 i {
    color: #4ade80;
}

.voice-clone-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.voice-clone-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #8b949e;
    font-size: 16px;
    gap: 12px;
}

.voice-clone-loading i {
    font-size: 32px;
    animation: spin 1s linear infinite;
}

.voice-clone-card {
    background: #161b22;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #30363d;
    transition: all 0.3s ease;
    cursor: pointer;
}

.voice-clone-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: #4ade80;
}

.voice-clone-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.voice-clone-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #4ade80 0%, #38bdf8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.voice-clone-info {
    flex: 1;
}

.voice-clone-name {
    font-size: 16px;
    font-weight: 600;
    color: #e6edf3;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.voice-clone-status {
    font-size: 12px;
    color: #8b949e;
}

.voice-clone-status.success {
    color: #3fb950;
}

.voice-clone-status.processing {
    color: #f0883e;
}

.voice-clone-status.failed {
    color: #f85149;
}

.voice-clone-card-body {
    margin-bottom: 16px;
}

.voice-clone-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: #8b949e;
}

.voice-clone-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.voice-clone-meta-item i {
    width: 16px;
    color: #4ade80;
}

.voice-clone-card-footer {
    display: flex;
    gap: 8px;
}

.voice-clone-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.voice-clone-btn-play {
    background: var(--gradient-primary);
    color: white;
}

.voice-clone-btn-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.4);
}

.voice-clone-btn-delete {
    background: rgba(248, 81, 73, 0.1);
    color: #f85149;
    border: 1px solid #f85149;
}

.voice-clone-btn-delete:hover {
    background: #f85149;
    color: white;
}

.voice-clone-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #8b949e;
}

.voice-clone-empty i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.voice-clone-empty p {
    font-size: 18px;
    margin-bottom: 8px;
}

.voice-clone-empty span {
    font-size: 14px;
    opacity: 0.7;
}

/* 分页样式 */
.voice-clone-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
}

.voice-clone-pagination-btn {
    padding: 10px 20px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.voice-clone-pagination-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.4);
}

.voice-clone-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.voice-clone-pagination-info {
    font-size: 14px;
    color: #8b949e;
}

.voice-clone-pagination-info span {
    color: #e6edf3;
    font-weight: 600;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 覆盖main-content的宽度限制 */
.main-content .voice-clone-content {
    max-width: none !important;
    margin: 0 !important;
}

