/* ========== CSS Variables ========== */
:root {
    --primary: #6C5CE7;
    --primary-dark: #5A4BD1;
    --primary-light: #A29BFE;
    --secondary: #00B894;
    --success: #00B894;
    --warning: #FDCB6E;
    --danger: #E74C3C;
    --dark: #1A1A2E;
    --dark-2: #16213E;
    --dark-3: #0F3460;
    --gray-900: #1a1a2e;
    --gray-800: #2d2d44;
    --gray-700: #3d3d5c;
    --gray-600: #555577;
    --gray-500: #7c7c99;
    --gray-400: #aaaac4;
    --gray-300: #d4d4e4;
    --gray-200: #e8e8f0;
    --gray-100: #f5f5fa;
    --gray-50: #fafafe;
    --white: #ffffff;
    --bg-main: #f0f2f5;
    --bg-card: #ffffff;
    --bg-dark: #1a1a2e;
    --text-primary: #1a1a2e;
    --text-secondary: #555577;
    --text-muted: #7c7c99;
    --border-color: #e8e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.25s ease;
}

/* ========== Reset ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ========== Topbar ========== */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    height: 60px;
    background: var(--dark);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon { font-size: 24px; }

.logo-text {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.badge-beta {
    background: rgba(108, 92, 231, 0.2);
    color: var(--primary-light);
    border: 1px solid rgba(108, 92, 231, 0.3);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-family: inherit;
}

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

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }

.btn-primary {
    background: var(--primary);
    color: var(--white);
}
.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--text-primary);
}
.btn-secondary:hover:not(:disabled) {
    background: var(--gray-200);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}
.btn-success:hover:not(:disabled) {
    background: #00A383;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 1.5px solid rgba(255,255,255,0.3);
}
.btn-outline:hover:not(:disabled) {
    border-color: var(--white);
    background: rgba(255,255,255,0.1);
}

.btn-icon-text { font-size: 18px; }

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition);
}
.btn-icon:hover {
    background: var(--gray-100);
    color: var(--danger);
}

/* ========== Activation Banner ========== */
.activation-banner {
    background: linear-gradient(90deg, #FFF3CD, #FFEEBA);
    border-bottom: 1px solid #FFE08A;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #856404;
    width: 100%;
    max-width: 1400px;
    justify-content: center;
    position: relative;
}

.banner-content a {
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.banner-close {
    position: absolute;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #856404;
    opacity: 0.6;
}
.banner-close:hover { opacity: 1; }

/* ========== Main Container ========== */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ========== Split Screen ========== */
.split-screen {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ========== Panel ========== */
.panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--gray-50);
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-icon { font-size: 22px; }

.panel-title h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.tag {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.tag-blue {
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary);
}

.tag-green {
    background: rgba(0, 184, 148, 0.1);
    color: var(--success);
}

.panel-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ========== Avatar Preview ========== */
.avatar-preview {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--dark);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.preview-placeholder {
    text-align: center;
    color: var(--gray-500);
}

.placeholder-icon {
    font-size: 48px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.preview-placeholder p {
    font-size: 14px;
}

.preview-loading {
    text-align: center;
    color: var(--white);
}

.preview-loading p {
    margin-top: 12px;
    font-size: 14px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: var(--white);
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#heygenVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========== Avatar Grid ========== */
.avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.avatar-item {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    position: relative;
}

.avatar-item:hover {
    border-color: var(--primary-light);
    transform: scale(1.05);
}

.avatar-item.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.avatar-item .avatar-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: var(--white);
    font-size: 10px;
    text-align: center;
    padding: 2px;
    border-radius: 0 0 4px 4px;
}

/* ========== Control Groups ========== */
.control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.control-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.control-row {
    display: flex;
    gap: 16px;
}

.flex-1 { flex: 1; }

.select-input {
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    color: var(--text-primary);
}

.select-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.select-sm { padding: 6px 10px; font-size: 13px; }

.textarea-input {
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--white);
    transition: var(--transition);
    font-family: inherit;
    resize: vertical;
    color: var(--text-primary);
}

.textarea-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

.char-count { color: var(--text-muted); }

.lang-select {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ========== Upload Zone ========== */
.upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--gray-50);
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.04);
}

.upload-zone-sm {
    padding: 16px;
}

.upload-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.upload-zone p {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.upload-hint {
    font-size: 12px;
    color: var(--text-muted);
}

/* ========== File Info ========== */
.file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--gray-50);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.file-info-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-icon { font-size: 24px; }

.file-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.file-size {
    font-size: 11px;
    color: var(--text-muted);
}

/* ========== Waveform ========== */
.waveform-container {
    height: 60px;
    background: var(--dark);
    border-radius: var(--radius-sm);
    padding: 8px;
    overflow: hidden;
}

#waveformCanvas {
    width: 100%;
    height: 100%;
}

/* ========== Slider ========== */
.slider-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-value {
    min-width: 36px;
    text-align: right;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

/* ========== Status Indicator ========== */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    padding: 8px 0;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot-gray { background: var(--gray-400); }
.status-dot-yellow { background: var(--warning); }
.status-dot-green { background: var(--success); box-shadow: 0 0 6px var(--success); }
.status-dot-red { background: var(--danger); }

/* ========== Bottom Panel ========== */
.bottom-panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.bottom-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--gray-50);
}

.bottom-panel-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.panel-mode-tabs {
    display: flex;
    gap: 4px;
    background: var(--gray-100);
    padding: 3px;
    border-radius: var(--radius-sm);
}

.mode-tab {
    padding: 6px 16px;
    border: none;
    background: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
    font-family: inherit;
}

.mode-tab.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.bottom-panel-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mode-content { display: flex; flex-direction: column; gap: 12px; }
.mode-content.active { display: flex; }

.mode-desc {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--gray-50);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
}

.mode-icon { font-size: 18px; }

/* ========== Video Settings ========== */
.video-settings {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--border-color);
}

.settings-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 180px;
}

.setting-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.option-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.option-btn {
    padding: 8px 14px;
    border: 1.5px solid var(--border-color);
    background: var(--white);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
}

.option-btn:hover {
    border-color: var(--primary-light);
}

.option-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--white);
}

/* Ratio button shapes */
.ratio-buttons { gap: 8px; }

.ratio-btn {
    flex-direction: column;
    padding: 8px 10px;
    min-width: 56px;
}

.ratio-shape {
    display: block;
    border: 2px solid currentColor;
    border-radius: 2px;
    margin-bottom: 4px;
}

.ratio-16-9 { width: 28px; height: 16px; }
.ratio-9-16 { width: 16px; height: 28px; }
.ratio-1-1 { width: 20px; height: 20px; }
.ratio-4-3 { width: 24px; height: 18px; }
.ratio-21-9 { width: 32px; height: 14px; }

/* ========== Fixed Spec Display ========== */
.setting-fixed { flex: 1; min-width: 100%; }

.fixed-spec-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.spec-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    color: var(--white);
}

.spec-green { background: linear-gradient(135deg, #00B894, #00cec9); }
.spec-blue { background: linear-gradient(135deg, #0984e3, #6C5CE7); }
.spec-purple { background: linear-gradient(135deg, #6C5CE7, #a29bfe); }

.spec-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-left: 4px;
}

/* ========== Clone Drive Status ========== */
.clone-drive-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-color);
}

/* ========== Action Bar ========== */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 12px;
}

.credit-info {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}

.credit-label { color: var(--text-muted); }
.credit-value {
    font-weight: 700;
    color: var(--primary);
    font-size: 18px;
}

.credit-divider {
    color: var(--gray-300);
    margin: 0 8px;
}

.action-right {
    display: flex;
    gap: 12px;
}

/* ========== Progress Area ========== */
.progress-area {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

#progressTitle {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

#progressPercent {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--gray-100);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gray-200);
    z-index: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
}

.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    transition: var(--transition);
}

.step-label {
    font-size: 12px;
    color: var(--text-muted);
    transition: var(--transition);
}

.progress-step.active .step-num {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.15);
}

.progress-step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.progress-step.completed .step-num {
    background: var(--success);
    color: var(--white);
}

.progress-step.completed .step-label {
    color: var(--success);
}

/* ========== Export Result ========== */
.export-result {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.result-icon { font-size: 24px; }

.result-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--success);
}

.result-preview {
    width: 100%;
    max-width: 640px;
    margin: 0 auto 16px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--dark);
}

#resultVideo {
    width: 100%;
    display: block;
}

.result-info {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.result-info-item {
    font-size: 14px;
    color: var(--text-secondary);
}

.info-label {
    color: var(--text-muted);
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.audio-fallback-notice {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    text-align: center;
}

.audio-fallback-notice p {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #856404;
}

.video-fallback-warning {
    margin: 12px 0;
    padding: 14px 18px;
    background: rgba(240, 80, 80, 0.1);
    border: 1px solid rgba(240, 80, 80, 0.35);
    border-radius: 8px;
    text-align: left;
}

.video-fallback-warning p {
    margin: 0;
    font-size: 14px;
    color: #c0392b;
    line-height: 1.6;
}

/* ========== Modal ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-sm { width: 100%; max-width: 420px; }
.modal-lg { width: 100%; max-width: 900px; }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    line-height: 1;
    padding: 4px;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 20px;
}

.modal-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

/* ========== Input ========== */
.input {
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    width: 100%;
    transition: var(--transition);
    font-family: inherit;
    color: var(--text-primary);
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.error-msg {
    color: var(--danger);
    font-size: 13px;
    padding: 8px 12px;
    background: rgba(231, 76, 60, 0.08);
    border-radius: var(--radius-sm);
    margin-top: 12px;
}

.success-msg {
    color: var(--success);
    font-size: 13px;
    padding: 8px 12px;
    background: rgba(0, 184, 148, 0.08);
    border-radius: var(--radius-sm);
    margin-top: 12px;
}

/* ========== Membership ========== */
.membership-current {
    margin-bottom: 20px;
}

.current-plan-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.08), rgba(0, 184, 148, 0.08));
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.current-plan-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.plan-badge {
    font-size: 14px;
    font-weight: 700;
    padding: 6px 16px;
    background: var(--primary);
    color: var(--white);
    border-radius: 20px;
}

.current-plan-label {
    font-size: 12px;
    color: var(--text-muted);
}

.current-plan-expire {
    font-size: 13px;
    color: var(--text-secondary);
}

.current-credits {
    font-size: 14px;
    color: var(--text-primary);
}

.current-credits span {
    font-weight: 700;
    color: var(--primary);
    font-size: 18px;
}

/* Pricing Grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.pricing-card {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    position: relative;
    transition: var(--transition);
    background: var(--white);
}

.pricing-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.pricing-card-popular {
    border-color: var(--primary);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
}

.pricing-header h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.pricing-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
}

.pricing-price span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin: 16px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.pricing-features li {
    padding: 4px 0;
}

.pricing-btn {
    margin-top: 8px;
}

.membership-note {
    margin-top: 20px;
    padding: 14px 16px;
    background: rgba(108, 92, 231, 0.05);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
}

.membership-note b { color: var(--primary); }

/* ========== Purchase Modal ========== */
.purchase-summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.purchase-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.purchase-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.purchase-price {
    color: var(--danger);
    font-size: 24px;
}

.period-options {
    display: flex;
    gap: 6px;
}

.period-btn {
    padding: 6px 14px;
    border: 1.5px solid var(--border-color);
    background: var(--white);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    font-family: inherit;
    position: relative;
}

.period-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--white);
}

.discount-tag {
    background: var(--danger);
    color: var(--white);
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 8px;
    margin-left: 4px;
}

/* ========== Toast ========== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    min-width: 280px;
    animation: toastIn 0.3s ease;
    border-left: 4px solid var(--primary);
}

@keyframes toastIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

.toast-icon { font-size: 20px; }

/* ========== Video Upload Zone (Left Panel) ========== */
.upload-zone-video {
    padding: 32px 20px;
}

.video-preview-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--dark);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}

#sourceVideo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.video-meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.meta-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.meta-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

/* ========== Ratio Auto Info ========== */
.ratio-auto-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    background: rgba(0, 184, 148, 0.06);
    border: 1.5px solid rgba(0, 184, 148, 0.2);
    border-radius: var(--radius-sm);
    text-align: center;
}

.ratio-auto-icon {
    font-size: 20px;
}

.ratio-auto-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--success);
}

.ratio-auto-detected {
    font-size: 12px;
    color: var(--text-secondary);
}

.ratio-auto-detected strong {
    color: var(--primary);
    font-size: 14px;
}

/* ========== 5-Column Pricing Grid ========== */
.pricing-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.pricing-grid-5 .pricing-card {
    padding: 16px 12px;
}

.pricing-grid-5 .pricing-features {
    font-size: 12px;
}

.pricing-grid-5 .pricing-features li {
    padding: 3px 0;
}

.pricing-grid-5 .pricing-price {
    font-size: 28px;
}

.pricing-card-premium {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.03), rgba(0, 184, 148, 0.01));
}

.premium-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ========== TTS Result (Audio Preview + Download) ========== */
.tts-result {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.06), rgba(0, 184, 148, 0.02));
    border: 1.5px solid rgba(0, 184, 148, 0.25);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: slideUp 0.3s ease;
}

.tts-result-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tts-result-icon {
    font-size: 20px;
}

.tts-result-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--success);
}

.tts-result-player {
    width: 100%;
    background: var(--dark);
    border-radius: var(--radius-sm);
    padding: 10px;
}

.tts-result-player audio {
    width: 100%;
    height: 40px;
}

.tts-result-info {
    font-size: 12px;
    color: var(--text-muted);
}

.tts-result-meta {
    display: inline-block;
}

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

.tts-result-hint {
    font-size: 12px;
    color: var(--text-muted);
    padding: 8px 12px;
    background: rgba(108, 92, 231, 0.05);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.char-hint {
    color: var(--primary);
    font-weight: 600;
    font-size: 11px;
}

/* ========== 设置弹窗样式 ========== */
.modal-md { max-width: 600px; }
.label-hint { font-size: 12px; color: #888; font-weight: normal; }
.input-hint { font-size: 12px; color: #999; line-height: 1.6; margin-top: 4px; }
.input-hint a { color: var(--primary); }
.api-status-section { margin-top: 16px; padding: 12px; background: var(--bg-secondary); border-radius: 8px; }
.api-status-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; }
.api-status-dot { font-size: 16px; }

/* ========== Responsive ========== */
@media (max-width: 1200px) {
    .pricing-grid-5 { grid-template-columns: repeat(3, 1fr); }
    .pricing-grid-5 .pricing-card:nth-child(n+4) { margin-top: 8px; }
}

@media (max-width: 1024px) {
    .split-screen { grid-template-columns: 1fr; }
    .pricing-grid-5 { grid-template-columns: repeat(2, 1fr); }
    .settings-row { flex-direction: column; }
    .setting-item { min-width: 100%; }
    .video-meta-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .topbar { padding: 0 12px; }
    .logo-text { font-size: 15px; }
    .badge { display: none; }
    .main-container { padding: 12px; }
    .pricing-grid-5 { grid-template-columns: 1fr; }
    .action-bar { flex-direction: column; align-items: stretch; }
    .action-right { flex-direction: column; }
    .progress-steps { flex-wrap: wrap; gap: 12px; }
    .video-meta-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-banner-text { font-size: 12px; }
    .topbar-right { gap: 6px; }
    .topbar-right .btn-sm { padding: 6px 10px; font-size: 12px; }
}

/* ========== v7.1: 联系方式横幅 ========== */
.contact-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 24px;
    background: linear-gradient(90deg, rgba(108, 92, 231, 0.1), rgba(0, 184, 148, 0.1));
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
}

.contact-banner-icon {
    font-size: 14px;
}

.contact-banner-text {
    font-weight: 500;
}

.contact-banner-text strong {
    color: var(--primary);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-left: 2px;
}

/* ========== v7.1: 顶栏算力徽章 ========== */
.credit-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: rgba(0, 184, 148, 0.15);
    border: 1px solid rgba(0, 184, 148, 0.3);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    color: var(--success);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.credit-badge:hover {
    background: rgba(0, 184, 148, 0.25);
    transform: translateY(-1px);
}

/* ========== v7.1: 个人中心弹窗 ========== */

/* 未激活状态 */
.profile-not-activated {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 20px;
    text-align: center;
}

.profile-empty-icon {
    font-size: 56px;
    opacity: 0.4;
}

.profile-empty-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-empty-desc {
    font-size: 14px;
    color: var(--text-muted);
}

/* 会员信息卡片 */
.profile-plan-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.08), rgba(0, 184, 148, 0.08));
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.profile-plan-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-plan-icon {
    font-size: 36px;
}

.profile-plan-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.profile-plan-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-plan-right {
    text-align: right;
}

.profile-plan-expire-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.profile-plan-expire {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* 算力余额核心面板 */
.balance-panel {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
}

.balance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.balance-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.balance-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

.balance-normal {
    background: rgba(0, 184, 148, 0.12);
    color: var(--success);
}

.balance-warning {
    background: rgba(253, 203, 110, 0.2);
    color: #B8860B;
}

.balance-danger {
    background: rgba(231, 76, 60, 0.12);
    color: var(--danger);
}

.balance-unlimited {
    background: rgba(108, 92, 231, 0.12);
    color: var(--primary);
}

.balance-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}

.balance-remaining {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.balance-number {
    font-size: 42px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.balance-unit {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
}

.balance-total {
    font-size: 14px;
    color: var(--text-muted);
}

.balance-total span {
    font-weight: 700;
    color: var(--text-secondary);
}

/* 进度条 */
.balance-progress-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.balance-progress-bar {
    flex: 1;
    height: 10px;
    background: var(--gray-100);
    border-radius: 5px;
    overflow: hidden;
}

.balance-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #00cec9);
    border-radius: 5px;
    transition: width 0.6s ease;
}

.balance-progress-fill.progress-warning {
    background: linear-gradient(90deg, #FDCB6E, #E17055);
}

.balance-progress-fill.progress-danger {
    background: linear-gradient(90deg, var(--danger), #c0392b);
}

.balance-progress-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 40px;
    text-align: right;
}

/* 已用/剩余明细 */
.balance-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.balance-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 14px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.detail-label {
    font-size: 12px;
    color: var(--text-muted);
}

.detail-value {
    font-size: 16px;
    font-weight: 700;
}

.detail-used { color: var(--danger); }
.detail-remain { color: var(--success); }

/* 会员权益 */
.profile-benefits {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.benefits-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.benefits-list {
    list-style: none;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* 升级提示 */
.profile-upgrade-tip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.06), rgba(0, 184, 148, 0.06));
    border: 1.5px solid rgba(108, 92, 231, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.upgrade-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.upgrade-content {
    flex: 1;
}

.upgrade-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.upgrade-contact {
    font-size: 14px;
    color: var(--text-secondary);
}

.upgrade-contact strong {
    color: var(--primary);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
}

/* 账号信息 */
.profile-account-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.account-label {
    color: var(--text-muted);
}

.account-value {
    font-weight: 600;
    color: var(--text-secondary);
    font-family: monospace;
}

/* ========== 个人中心 - 会员套餐定价区域 ========== */
.profile-pricing-section {
    margin-top: 20px;
    padding-top: 24px;
    border-top: 2px dashed var(--border-color);
}

.profile-section-header {
    text-align: center;
    margin-bottom: 20px;
}

.profile-section-header h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.profile-section-header p {
    font-size: 13px;
    color: var(--text-muted);
}

/* 套餐区域高亮动画 */
.profile-pricing-section.highlight-pulse {
    animation: highlightPulse 1.5s ease;
}

@keyframes highlightPulse {
    0%, 100% { background: transparent; }
    30%, 70% { background: rgba(108, 92, 231, 0.06); }
}

/* 个人中心弹窗内套餐卡片间距微调 */
#profileModal .pricing-grid-5 {
    margin-bottom: 16px;
}

/* 个人中心弹窗滚动优化 */
#profileModal .modal {
    scroll-behavior: smooth;
}

/* ========== 按钮补充样式 ========== */
.btn-xs {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 4px;
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}
.btn-danger:hover:not(:disabled) {
    background: #C0392B;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-danger-text {
    color: var(--danger) !important;
    border-color: rgba(231, 76, 60, 0.3) !important;
}
.btn-danger-text:hover:not(:disabled) {
    background: rgba(231, 76, 60, 0.08) !important;
    border-color: var(--danger) !important;
}

/* ========== 个人中心 - 客户生成记录 ========== */
.profile-records-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed var(--border-color);
}

.records-section-header {
    margin-bottom: 16px;
}

.records-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.records-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.records-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* 统计摘要 */
.records-stats {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.record-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.record-stat-item .stat-num {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.record-stat-item .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* 记录列表 */
.records-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 4px;
}

.records-list::-webkit-scrollbar {
    width: 5px;
}
.records-list::-webkit-scrollbar-track {
    background: transparent;
}
.records-list::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

/* 加载中 */
.records-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2.5px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 空状态 */
.records-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.records-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.records-empty-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.records-empty-desc {
    font-size: 13px;
    color: var(--text-muted);
}

/* 单条记录卡片 */
.record-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    transition: var(--transition);
    animation: recordFadeIn 0.3s ease;
}

.record-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

@keyframes recordFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes recordFadeOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(20px); }
}

/* 卡片头部 */
.record-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.record-card-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.record-type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    font-size: 18px;
}

.record-type-video {
    background: rgba(108, 92, 231, 0.1);
}

.record-type-tts {
    background: rgba(0, 184, 148, 0.1);
}

.record-card-info {
    display: flex;
    flex-direction: column;
}

.record-type-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.record-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* 状态标签 */
.record-status {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.record-status-success {
    background: rgba(0, 184, 148, 0.12);
    color: var(--success);
}

.record-status-processing {
    background: rgba(253, 203, 110, 0.18);
    color: #C99700;
}

.record-status-failed {
    background: rgba(231, 76, 60, 0.12);
    color: var(--danger);
}

.record-status-pending {
    background: var(--gray-100);
    color: var(--text-muted);
}

/* 卡片详情 */
.record-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    padding: 10px 0;
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 10px;
}

.record-detail-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.record-detail-row .detail-key {
    color: var(--text-muted);
    white-space: nowrap;
}

.record-detail-row .detail-val {
    color: var(--text-secondary);
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.record-fallback-row .detail-val {
    color: var(--warning);
}

.record-error-row .detail-val {
    color: var(--danger);
}

/* 卡片操作 */
.record-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.record-card-actions .btn-xs {
    text-decoration: none;
}

.record-card-actions a.btn-xs {
    display: inline-flex;
    align-items: center;
}

/* 弹窗内的 outline 按钮适配浅色背景 */
#profileModal .btn-outline,
.profile-records-section .btn-outline {
    color: var(--text-secondary);
    border: 1.5px solid var(--border-color);
    background: transparent;
}
#profileModal .btn-outline:hover:not(:disabled),
.profile-records-section .btn-outline:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(108, 92, 231, 0.05);
}
