/* === 基础变量 === */
:root {
    --bg-base: #08080c;
    --bg-card: rgba(18, 18, 26, 0.7);
    --bg-card-hover: rgba(24, 24, 36, 0.85);
    --bg-input: rgba(14, 14, 20, 0.8);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-active: rgba(254, 44, 85, 0.3);
    --text-primary: #f0f0f5;
    --text-secondary: #8a8a9a;
    --text-muted: #5a5a6a;
    --accent-red: #FE2C55;
    --accent-cyan: #25F4EE;
    --accent-red-glow: rgba(254, 44, 85, 0.4);
    --accent-cyan-glow: rgba(37, 244, 238, 0.3);
    --gradient-primary: linear-gradient(135deg, #FE2C55, #FF6B8A);
    --gradient-secondary: linear-gradient(135deg, #25F4EE, #00D9C0);
    --gradient-mix: linear-gradient(135deg, #FE2C55 0%, #FF4081 40%, #25F4EE 100%);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-glow: 0 0 40px rgba(254, 44, 85, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --font-display: 'Sora', sans-serif;
    --font-body: 'Noto Sans SC', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* === 背景装饰 === */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
    animation: glow-float 20s ease-in-out infinite;
}

.bg-glow-1 {
    top: -100px;
    right: -50px;
    width: 500px;
    height: 500px;
    background: var(--accent-red);
}

.bg-glow-2 {
    bottom: -100px;
    left: -50px;
    width: 400px;
    height: 400px;
    background: var(--accent-cyan);
    animation-delay: -10s;
}

.bg-noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: overlay;
}

@keyframes glow-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* === 导航栏 === */
.navbar {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: blur(12px);
    background: rgba(8, 8, 12, 0.6);
}

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

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(254, 44, 85, 0.1);
    border: 1px solid rgba(254, 44, 85, 0.2);
}

.logo-text {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo-text em {
    font-style: normal;
    font-weight: 400;
    color: var(--text-secondary);
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00e676;
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.6);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* === 主容器 === */
.container {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 40px 80px;
}

/* === Hero 区域 === */
.hero {
    text-align: center;
    margin-bottom: 48px;
    animation: fade-up 0.8s ease-out;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.title-line {
    display: block;
}

.title-accent {
    background: var(--gradient-mix);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

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

/* === 输入区 === */
.input-section {
    margin-bottom: 40px;
    animation: fade-up 0.8s ease-out 0.15s backwards;
}

.input-wrapper {
    position: relative;
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.input-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: var(--radius-md);
    background: var(--gradient-mix);
    opacity: 0;
    filter: blur(12px);
    transition: opacity 0.3s ease;
    z-index: -1;
}

.input-wrapper:focus-within .input-glow {
    opacity: 0.3;
}

.url-input {
    flex: 1;
    height: 56px;
    padding: 0 20px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-body);
    outline: none;
    transition: all 0.3s ease;
}

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

.url-input:focus {
    border-color: var(--border-active);
    background: rgba(20, 20, 30, 0.9);
}

.btn-parse {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    height: 56px;
    padding: 0 28px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.btn-upload-local {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 56px;
    padding: 0 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.btn-upload-local:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(254, 44, 85, 0.5);
    color: #FE2C55;
}
@media (max-width: 640px) {
    .btn-upload-local span { display: none; }
    .btn-upload-local { padding: 0 14px; }
}

.btn-parse::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-parse:hover::before {
    left: 100%;
}

.btn-parse:hover {
    box-shadow: 0 0 30px var(--accent-red-glow);
    transform: translateY(-1px);
}

.btn-parse:active {
    transform: translateY(0);
}

.btn-parse.loading .btn-text {
    opacity: 0;
}

.btn-parse.loading .btn-loader {
    opacity: 1;
}

.btn-loader {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    opacity: 0;
    animation: spin 0.6s linear infinite;
}

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

.input-hints {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-left: 4px;
}

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

.hint-item.dot {
    color: var(--text-muted);
}

/* === 解析历史记录 === */
.history-section {
    margin-top: 14px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

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

.history-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.history-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.history-clear:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(254, 44, 85, 0.4);
    transform: translateX(2px);
}

.history-item-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
}

.history-item-thumb-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.2), rgba(37, 244, 238, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
}

.history-item-info {
    flex: 1;
    min-width: 0;
}

.history-item-title {
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.history-item-platform {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.history-item-time {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* === 加载状态 === */
.loading-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    gap: 20px;
}

.loader-pulse {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--accent-red);
    animation: pulse-ring 1.5s ease-out infinite;
}

.pulse-ring-2 {
    border-color: var(--accent-cyan);
    animation-delay: 0.5s;
}

.pulse-core {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gradient-primary);
    box-shadow: 0 0 20px var(--accent-red-glow);
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 15px;
}

/* === 错误提示 === */
.error-section {
    margin-bottom: 24px;
    animation: fade-up 0.4s ease-out;
}

.error-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: rgba(254, 44, 85, 0.08);
    border: 1px solid rgba(254, 44, 85, 0.2);
    border-radius: var(--radius-md);
    color: #ff6b8a;
    font-size: 14px;
}

/* === 空状态 === */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 0;
    gap: 12px;
    color: var(--text-muted);
    animation: fade-up 0.8s ease-out 0.3s backwards;
}

.empty-icon {
    color: var(--text-muted);
    margin-bottom: 8px;
}

.empty-text {
    font-size: 16px;
    color: var(--text-secondary);
}

.empty-subtext {
    font-size: 13px;
}

/* === 结果区域 === */
.result-section {
    animation: fade-up 0.5s ease-out;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* === 视频预览卡片 === */
.video-preview-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-card);
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    max-height: 640px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
    margin-bottom: 16px;
}

.video-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: background 0.3s ease;
}

.video-play-overlay:hover {
    background: rgba(0, 0, 0, 0.15);
}

.play-button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(254, 44, 85, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px var(--accent-red-glow);
}

.video-play-overlay:hover .play-button {
    transform: scale(1.1);
    background: var(--accent-red);
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* === 操作按钮 === */
.video-actions {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    align-items: stretch;
}

.action-btn {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-body);
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 按钮文字过长时省略，保证五个控件始终一排 */
.action-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-btn svg {
    flex: 0 0 auto;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

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

.action-download:hover:not(:disabled) {
    border-color: var(--accent-red);
    color: var(--accent-red);
    box-shadow: 0 0 15px var(--accent-red-glow);
}

/* 高速直连（推荐）：青色高亮，突出不走服务器的快速通道 */
.action-direct {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: rgba(37, 244, 238, 0.08);
}

.action-direct:hover:not(:disabled) {
    background: rgba(37, 244, 238, 0.16);
    box-shadow: 0 0 15px var(--accent-cyan-glow);
    color: var(--accent-cyan);
}

.action-transcribe:hover:not(:disabled) {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 0 15px var(--accent-cyan-glow);
}

.action-subtitle:hover:not(:disabled) {
    border-color: #ab47bc;
    color: #ab47bc;
}

/* === 下载进度 === */
.download-progress {
    margin-top: 12px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* === 信息卡片 === */
.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.info-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-subtle);
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

.author-id {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.info-type-badge {
    padding: 4px 10px;
    background: rgba(37, 244, 238, 0.1);
    border: 1px solid rgba(37, 244, 238, 0.2);
    border-radius: 20px;
    font-size: 11px;
    color: var(--accent-cyan);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-title {
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-primary);
    font-weight: 600;
}

.info-desc-wrap {
    position: relative;
}

.info-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}

.copy-btn {
    margin-top: 8px;
    padding: 4px 12px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

/* === 统计数据 === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 4px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

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

/* === 清晰度选择 === */
.quality-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quality-item {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.2s ease;
}

.quality-item:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

/* === 音乐信息 === */
.music-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--accent-cyan);
}

.music-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.music-title {
    font-size: 13px;
    color: var(--text-primary);
}

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

/* === 转文字结果卡片 === */
.transcript-card,
.subtitle-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
    animation: fade-up 0.5s ease-out;
}

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

.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-title svg {
    color: var(--accent-cyan);
}

.transcript-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 0;
}

.loader-dots {
    display: flex;
    gap: 8px;
}

.loader-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-cyan);
    animation: dot-bounce 1.4s ease-in-out infinite;
}

.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.transcript-loading p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* === 转写进度条 === */
.transcribe-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 80%;
    max-width: 300px;
    margin-top: 8px;
}

.transcribe-progress .progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.transcribe-progress .progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.transcribe-progress-text {
    font-size: 12px;
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    min-width: 36px;
    text-align: right;
}

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

.transcript-segment {
    display: flex;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.transcript-segment:hover {
    background: rgba(255, 255, 255, 0.04);
}

.transcript-time {
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent-cyan);
    min-width: 80px;
    padding-top: 2px;
}

.transcript-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
}

/* === 字幕内容 === */
.subtitle-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

/* === 评论区 === */
.comments-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
}
.comment-item {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}
.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    background: var(--border-subtle);
}
.comment-body {
    flex: 1;
    min-width: 0;
}
.comment-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.comment-user {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.comment-like {
    font-size: 12px;
    color: #888;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.replied-badge {
    font-size: 11px;
    font-weight: 600;
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 1px 8px;
    border-radius: 4px;
}
.comment-item.replied {
    border-left: 3px solid #10b981;
    background: rgba(16, 185, 129, 0.04);
}
.my-reply-item {
    margin: 4px 0 8px;
    padding: 6px 10px;
    background: rgba(16, 185, 129, 0.08);
    border-left: 2px solid #10b981;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
}
.my-reply-label {
    color: #10b981;
    font-weight: 600;
    font-size: 11px;
}
.my-reply-text {
    color: var(--text-secondary);
}
.reply-count-hint {
    font-size: 12px;
    color: #7a8ba3;
    margin: -4px 0 8px;
}
.comment-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    word-break: break-word;
    margin-bottom: 10px;
}
/* 抖音表情贴纸（大表情） */
.comment-sticker {
    display: inline-block;
    vertical-align: middle;
    height: 64px;
    max-width: 120px;
    margin: 2px 0 6px;
    object-fit: contain;
}
/* 抖音评论小表情（内联，与文字同高，如 [赞] 表情） */
.comment-emoji {
    display: inline-block;
    vertical-align: middle;
    height: 1.2em;
    width: 1.2em;
    margin: 0 1px;
    object-fit: contain;
}
/* 图片评论缩略图（点击新标签看原图） */
.comment-images {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 8px;
}
.comment-images a {
    display: inline-block;
    line-height: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.comment-images a:hover {
    transform: translateY(-1px);
    border-color: rgba(254,44,85,0.5);
}
.comment-image {
    display: block;
    width: 96px;
    height: 96px;
    object-fit: cover;
    cursor: zoom-in;
    background: rgba(255,255,255,0.04);
}
/* 加载失败的媒体：红框占位（诊断用，肉眼可辨是裂图而非无数据） */
.comment-sticker.media-broken,
.comment-image.media-broken,
.comment-emoji.media-broken {
    border: 2px dashed rgba(248,113,113,0.7);
    background: rgba(248,113,113,0.08);
    object-fit: contain;
    font-size: 10px;
    color: #f87171;
}
.comment-image.media-broken { width: 96px; height: 96px; }
.comment-sticker.media-broken { width: 120px; height: 64px; }
.comment-emoji.media-broken { width: 1.2em; height: 1.2em; }
/* 一键回到顶部按钮 */
.back-to-top {
    position: fixed;
    right: 28px;
    bottom: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #FE2C55, #c81e44);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(254, 44, 85, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, box-shadow 0.2s ease;
    z-index: 999;
}
.back-to-top:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(254, 44, 85, 0.6); }
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
@media (max-width: 640px) { .back-to-top { right: 16px; bottom: 20px; width: 42px; height: 42px; } }

/* AI 对话悬浮按钮 */
.ai-chat-fab {
    position: fixed;
    right: 28px;
    bottom: 96px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #25F4EE, #0fb5c7);
    color: #0d1117;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37, 244, 238, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 998;
}
.ai-chat-fab:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 8px 26px rgba(37, 244, 238, 0.55); }
@media (max-width: 640px) { .ai-chat-fab { right: 16px; bottom: 76px; width: 46px; height: 46px; } }

/* AI 对话面板 */
.ai-chat-panel {
    position: fixed;
    right: 28px;
    bottom: 160px;
    width: 500px;
    height: 660px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 200px);
    background: rgba(18, 22, 30, 0.97);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
    z-index: 999;
    overflow: hidden;
    animation: aiPanelIn 0.22s ease;
}
@keyframes aiPanelIn {
    from { opacity: 0; transform: translateY(14px) scale(0.98); }
    to { opacity: 1; transform: none; }
}
@media (max-width: 640px) {
    .ai-chat-panel { right: 8px; left: 8px; bottom: 130px; width: auto; height: 60vh; max-height: 70vh; }
}
.ai-chat-messages::-webkit-scrollbar { width: 6px; }
.ai-chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 3px; }
.ai-chat-messages::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.28); }
.ai-chat-messages::-webkit-scrollbar-track { background: transparent; }
.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}
.ai-chat-title { font-weight: 600; font-size: 15px; }
.ai-chat-tools { display: flex; align-items: center; gap: 10px; }
.ai-search-toggle {
    display: flex; align-items: center; gap: 4px; cursor: pointer;
    font-size: 12px; color: var(--text-secondary);
}
.ai-chat-memory-btn {
    background: rgba(255,255,255,0.08); border: none; color: var(--text-secondary);
    font-size: 12px; padding: 4px 10px; border-radius: 6px; cursor: pointer;
}
.ai-chat-memory-btn:hover { background: rgba(255,255,255,0.14); }
.ai-chat-close {
    background: none; border: none; color: var(--text-secondary); cursor: pointer;
    font-size: 16px; padding: 2px 6px;
}
.ai-chat-close:hover { color: #fff; }
.ai-chat-messages {
    flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px;
}
.ai-msg { max-width: 88%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.6; word-break: break-word; white-space: pre-wrap; }
.ai-msg.user { align-self: flex-end; background: linear-gradient(135deg, #FE2C55, #c81e44); color: #fff; border-bottom-right-radius: 4px; }
.ai-msg.assistant { align-self: flex-start; background: rgba(255, 255, 255, 0.08); color: var(--text-primary); border-bottom-left-radius: 4px; white-space: normal; }
.ai-msg.trained { align-self: flex-start; background: rgba(37, 244, 238, 0.12); color: #25F4EE; border: 1px solid rgba(37, 244, 238, 0.3); }
.ai-msg.error { background: rgba(248, 113, 113, 0.12); color: #f87171; }
.ai-msg-loading { display: flex; gap: 4px; }
.ai-msg-loading span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-secondary); animation: ai-dot 1.2s infinite; }
.ai-msg-loading span:nth-child(2) { animation-delay: 0.2s; }
.ai-msg-loading span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ai-dot { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }
.ai-search-sources { margin-top: 8px; font-size: 11px; color: var(--text-muted); }
.ai-search-sources a { color: #58a6ff; text-decoration: none; }
.ai-search-sources a:hover { text-decoration: underline; }

/* ===== AI 回复 Markdown 美化 ===== */
.ai-msg.assistant .md-p { margin: 6px 0; }
.ai-msg.assistant .md-p:first-child, .ai-msg.assistant .md-h:first-child { margin-top: 0; }
.ai-msg.assistant .md-h { margin: 14px 0 6px; font-weight: 700; line-height: 1.4; color: #fff; }
.ai-msg.assistant .md-h1 { font-size: 17px; }
.ai-msg.assistant .md-h2 { font-size: 16px; }
.ai-msg.assistant .md-h3 { font-size: 15px; color: #25F4EE; }
.ai-msg.assistant .md-h4 { font-size: 14px; color: var(--text-secondary); }
.ai-msg.assistant strong { color: #FFD166; font-weight: 700; }
.ai-msg.assistant em { color: var(--text-secondary); font-style: normal; background: rgba(255,255,255,0.06); padding: 0 4px; border-radius: 4px; }
.ai-msg.assistant .md-ul, .ai-msg.assistant .md-ol { margin: 6px 0; padding-left: 22px; }
.ai-msg.assistant .md-ul li, .ai-msg.assistant .md-ol li { margin: 4px 0; }
.ai-msg.assistant .md-ul li::marker { color: #25F4EE; }
.ai-msg.assistant .md-ol li::marker { color: #FE2C55; font-weight: 700; }
.ai-msg.assistant .md-code { background: rgba(0,0,0,0.35); color: #7ee787; padding: 1px 6px; border-radius: 4px; font-family: Consolas, "Courier New", monospace; font-size: 12.5px; }
.ai-msg.assistant .md-pre { background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 10px 12px; margin: 8px 0; overflow-x: auto; }
.ai-msg.assistant .md-pre code { background: none; color: #e6edf3; font-family: Consolas, "Courier New", monospace; font-size: 12.5px; line-height: 1.55; white-space: pre; }
.ai-msg.assistant .md-quote { border-left: 3px solid #25F4EE; background: rgba(37,244,238,0.06); margin: 8px 0; padding: 6px 12px; border-radius: 0 8px 8px 0; color: var(--text-secondary); }
.ai-msg.assistant .md-hr { border: none; border-top: 1px solid rgba(255,255,255,0.12); margin: 12px 0; }
.ai-msg.assistant .md-table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 13px; display: block; overflow-x: auto; }
.ai-msg.assistant .md-table th, .ai-msg.assistant .md-table td { border: 1px solid rgba(255,255,255,0.14); padding: 6px 10px; text-align: left; }
.ai-msg.assistant .md-table th { background: rgba(37,244,238,0.12); color: #25F4EE; font-weight: 700; white-space: nowrap; }
.ai-msg.assistant .md-table tr:nth-child(even) td { background: rgba(255,255,255,0.03); }
.ai-msg.assistant a { color: #58a6ff; text-decoration: none; }
.ai-msg.assistant a:hover { text-decoration: underline; }

/* ===== AI 回复 → 生成 Word 操作条 ===== */
.ai-doc-bar { margin-top: 10px; padding-top: 8px; border-top: 1px dashed rgba(255,255,255,0.15); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ai-doc-tip { font-size: 12.5px; color: var(--text-secondary); }
.ai-doc-btn { background: rgba(37,244,238,0.12); color: #25F4EE; border: 1px solid rgba(37,244,238,0.4); border-radius: 6px; padding: 4px 14px; font-size: 12.5px; cursor: pointer; transition: all .2s; white-space: nowrap; }
.ai-doc-btn:hover:not(:disabled) { background: rgba(37,244,238,0.25); }
.ai-doc-btn:disabled { opacity: 0.6; cursor: default; }
.ai-doc-ok { font-size: 12.5px; color: #7ee787; }
.ai-doc-link { color: #58a6ff !important; font-size: 13px; text-decoration: none; word-break: break-all; }
.ai-doc-link:hover { text-decoration: underline; }
.ai-doc-card { align-self: flex-start; max-width: 88%; background: rgba(88,166,255,0.1); border: 1px solid rgba(88,166,255,0.35); border-radius: 10px; padding: 10px 14px; }
.ai-doc-card .ai-doc-link { font-size: 13.5px; font-weight: 600; }
.ai-chat-input-area {
    display: flex; gap: 8px; padding: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08);
    align-items: stretch;
}
.ai-chat-actions { display: flex; flex-direction: row; gap: 8px; align-items: stretch; flex-shrink: 0; }
/* 🎨 与质量按钮竖排一列，上下平分高度 */
.ai-img-tools { display: flex; flex-direction: column; gap: 8px; align-items: stretch; width: 54px; flex-shrink: 0; }
.ai-chat-img-btn {
    background: rgba(255,255,255,0.06); color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.12); border-radius: 10px;
    width: 100%; min-width: 0; height: 100%; font-size: 19px; cursor: pointer; transition: all .2s;
    display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.ai-chat-img-btn:hover { background: rgba(255,255,255,0.12); }
.ai-chat-img-btn.active { background: rgba(254,44,85,0.18); border-color: rgba(254,44,85,0.5); color: #FE2C55; box-shadow: 0 0 0 1px rgba(254,44,85,0.3); }
/* 质量按钮（与 🎨 上下平分，位于输入框右侧） */
.ai-chat-quality-btn {
    width: 100%; min-width: 0; height: 100%; font-size: 12px; cursor: pointer;
    background: rgba(255,255,255,0.06); color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.12); border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center; padding: 0 2px; transition: all .2s; line-height: 1.1;
}
.ai-chat-quality-btn:hover { background: rgba(255,255,255,0.12); color: var(--text-primary); }
.ai-chat-quality-btn.active { background: rgba(37,244,238,0.15); border-color: rgba(37,244,238,0.5); color: #25F4EE; font-weight: 600; }

/* 生图弹出菜单（向左展开，避免被面板右边缘切掉） */
.ai-img-wrap { position: relative; display: flex; align-items: stretch; flex: 1; min-height: 0; }
.ai-img-menu {
    position: absolute; bottom: calc(100% + 8px); right: 0; left: auto; z-index: 40;
    background: #1e2430; border: 1px solid rgba(255,255,255,0.15); border-radius: 10px;
    padding: 6px; width: 168px; box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.ai-img-menu-title { font-size: 11.5px; color: var(--text-muted); padding: 4px 8px 6px; }
.ai-img-menu button {
    display: block; width: 100%; text-align: left; background: none; border: none;
    color: var(--text-primary); font-size: 13px; padding: 8px 10px; border-radius: 7px; cursor: pointer;
}
.ai-img-menu button:hover { background: rgba(37,244,238,0.12); color: #25F4EE; }
.ai-img-menu button.active { background: rgba(37,244,238,0.15); color: #25F4EE; font-weight: 600; }

/* AI 生图气泡 */
.ai-img-msg { max-width: 92% !important; }
.ai-img-status { font-size: 12px; color: var(--text-muted); margin-top: 8px; text-align: center; }
.ai-img-meta { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.ai-img-photo { width: 100%; max-width: 320px; height: auto; object-fit: contain; border-radius: 10px; display: block; border: 1px solid rgba(255,255,255,0.12); }
.ai-img-photo.landscape { max-width: 480px; }
.ai-img-photo.portrait { max-width: 240px; }
.ai-img-actions { display: flex; gap: 10px; margin-top: 8px; align-items: center; }
.ai-img-dl { color: #58a6ff; font-size: 12.5px; text-decoration: none; }
.ai-img-dl:hover { text-decoration: underline; }
.ai-img-regen { background: rgba(255,255,255,0.08); color: var(--text-secondary); border: 1px solid rgba(255,255,255,0.14); border-radius: 6px; padding: 3px 12px; font-size: 12px; cursor: pointer; }
.ai-img-regen:hover { background: rgba(255,255,255,0.16); }
#aiAssistInput {
    flex: 1; resize: none; padding: 10px 12px; border-radius: 10px;
    background: transparent; border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary); font-size: 14px; font-family: var(--font-body);
    outline: none; min-height: 42px; max-height: 120px;
}
#aiAssistInput:focus { border-color: #25F4EE; background: rgba(255,255,255,0.03); }
#aiAssistInput::placeholder { color: rgba(255,255,255,0.3); }
#aiAssistSend {
    background: linear-gradient(135deg, #25F4EE, #0fb5c7); border: none; color: #0d1117;
    min-width: 42px; border-radius: 10px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    padding: 0 12px; height: auto;
}
#aiAssistSend:hover { filter: brightness(1.1); opacity: 1; }
#aiAssistSend:active { transform: scale(0.97); }
#aiAssistSend:disabled { opacity: 0.5; cursor: not-allowed; }
.ai-memory-list { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; }
.ai-memory-item {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
    padding: 10px 12px; background: rgba(255,255,255,0.04); border-radius: 8px; font-size: 13px;
}
.ai-memory-item button { background: none; border: none; color: #f87171; cursor: pointer; font-size: 14px; }
.ai-memory-actions { margin-top: 14px; text-align: right; }
.comment-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.reply-style-inline {
    display: inline-flex;
    gap: 2px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    padding: 2px;
}
.reply-style-btn-sm {
    font-size: 11px;
    padding: 3px 8px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #888;
    cursor: pointer;
    transition: all 0.15s;
}
.reply-style-btn-sm.active {
    background: var(--primary);
    color: #fff;
}
.reply-style-btn-sm:hover:not(.active) {
    color: var(--text-primary);
}
.ai-reply-btn {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.ai-reply-btn:hover {
    background: var(--primary);
    color: #fff;
}
.ai-reply-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.ai-reply-box {
    margin-top: 10px;
    padding: 12px;
    background: rgba(99, 102, 241, 0.08);
    border-left: 3px solid var(--primary);
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    display: none;
}
.ai-reply-box.show {
    display: block;
}
.ai-reply-box .reply-label {
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 4px;
}
.comment-text[contenteditable="true"] {
    outline: none;
}
.reply-content {
    cursor: text;
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: border-color 0.2s, background 0.2s;
    min-height: 20px;
}
.reply-content:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.2);
    outline: none;
}
/* 楼中楼回复 */
.comment-replies {
    margin: 2px 0 10px 8px;
    padding-left: 12px;
    border-left: 2px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.comment-reply-item {
    display: flex;
    gap: 8px;
}
.comment-reply-item .reply-avatar {
    width: 24px;
    height: 24px;
}
.comment-reply-item .reply-body {
    flex: 1;
    min-width: 0;
}
.comment-reply-item .comment-meta {
    margin-bottom: 2px;
}
.comment-reply-item .comment-user {
    font-size: 12px;
}
.comment-reply-item .comment-text {
    font-size: 13px;
    margin-bottom: 0;
}
.comment-reply-item .comment-like {
    font-size: 11px;
}
.reply-more {
    font-size: 12px;
    color: #888;
}
.reply-more::before {
    content: "└ ";
    color: var(--border-subtle);
}
.comment-loading {
    font-size: 14px;
    color: #888;
    padding: 16px;
    text-align: center;
}
.action-comments { color: #10b981; }

/* 回复风格切换 */
.reply-style-switch {
    display: flex;
    align-items: center;
    gap: 6px;
}
.reply-style-btn {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}
.reply-style-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.reply-style-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* 回复工具区 + 复制按钮 */
.reply-tools {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}
.copy-reply-btn {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 5px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: all 0.2s;
}
.copy-reply-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* 平台账号登录 */
.platform-login-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}
.platform-login-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
}
.platform-name {
    font-size: 14px;
    font-weight: 600;
    flex: 0 0 50px;
}
.login-status-badge {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    flex: 1;
    text-align: center;
}
.login-status-badge.logged {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}
.btn-small {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.btn-small:hover {
    background: var(--primary);
    color: #fff;
}

/* 二维码弹窗 */
.qrcode-modal {
    max-width: 360px;
}
.qrcode-wrapper {
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    display: inline-block;
    margin: 8px 0;
}
.qrcode-wrapper img {
    width: 240px;
    height: 240px;
    object-fit: contain;
    display: block;
}
.qrcode-tip {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* === 设置按钮 === */
.settings-btn {
    margin-left: 12px;
    padding: 6px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-btn:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
    transform: rotate(45deg);
}

/* === 卡片操作区 === */
.card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* === AI 润色按钮 === */
.ai-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.15), rgba(37, 244, 238, 0.15));
    border: 1px solid rgba(254, 44, 85, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-btn:hover {
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.25), rgba(37, 244, 238, 0.25));
    border-color: var(--accent-red);
    transform: translateY(-1px);
}

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

/* === AI 润色卡片 === */
.ai-refine-card {
    background: var(--bg-card);
    border: 1px solid rgba(254, 44, 85, 0.15);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-card), 0 0 40px rgba(254, 44, 85, 0.05);
    margin-bottom: 24px;
    animation: fade-up 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.ai-refine-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-mix);
    opacity: 0.6;
}

.ai-title {
    background: var(--gradient-mix);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ai-mode-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.mode-tabs,
.style-tabs {
    display: flex;
    gap: 4px;
    padding: 3px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.mode-tab,
.style-tab {
    padding: 5px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-tab:hover,
.style-tab:hover {
    color: var(--text-secondary);
}

.mode-tab.active {
    background: rgba(254, 44, 85, 0.2);
    color: var(--accent-red);
}

/* === 识别引擎切换 === */
.engine-switch {
    display: flex;
    gap: 2px;
    padding: 2px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    margin-left: 4px;
}

.engine-option {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s ease;
    user-select: none;
}

.engine-option input[type="radio"] {
    display: none;
}

.engine-option:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
}

.engine-option:has(input:checked) {
    background: rgba(37, 244, 238, 0.15);
    color: var(--accent-cyan);
}

.engine-option.engine-ai:has(input:checked) {
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.12), rgba(255, 171, 64, 0.12));
    color: #ffab40;
    border: 1px solid rgba(255, 171, 64, 0.3);
}

/* 兼容不支持 :has() 的浏览器 */
.engine-option.checked-local {
    background: rgba(37, 244, 238, 0.15);
    color: var(--accent-cyan);
}

.engine-option.checked-ai {
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.12), rgba(255, 171, 64, 0.12));
    color: #ffab40;
    border: 1px solid rgba(255, 171, 64, 0.3);
}

/* 本地模型精度选择器 */
.local-model-select {
    flex: 0 0 auto;
    width: auto;
    min-width: 64px;
    padding: 0 26px 0 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    /* 自定义下拉箭头，避免原生箭头挤压文字 */
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3e%3cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    text-align: center;
    text-align-last: center;
    white-space: nowrap;
}

.local-model-select:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.local-model-select:focus {
    border-color: var(--accent-cyan);
}

.local-model-select option {
    background: #232838;
    color: #f0f0f5;
}

/* 下拉选项全局高对比：深底亮字，避免原生弹层文字看不清 */
select option,
select optgroup option {
    background: #232838;
    color: #f0f0f5;
}

/* PUA 模式按钮特殊样式 */
.mode-tab-pua {
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.1), rgba(255, 171, 64, 0.1));
    color: #ffab40;
    border: 1px solid rgba(255, 171, 64, 0.2);
    font-weight: 600;
}

.mode-tab-pua:hover {
    color: #ffd180;
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.15), rgba(255, 171, 64, 0.15));
}

.mode-tab-pua.active {
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.25), rgba(255, 171, 64, 0.25));
    color: #ffd180;
    border-color: rgba(255, 171, 64, 0.4);
    box-shadow: 0 0 12px rgba(255, 171, 64, 0.15);
}

/* PUA 进度条 */
.pua-progress {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
}

.pua-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.pua-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-red), #ffab40);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.pua-rounds {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.pua-round-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255, 171, 64, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.pua-round-dot.done {
    background: rgba(0, 230, 118, 0.15);
    border-color: rgba(0, 230, 118, 0.5);
    color: #00e676;
}

.pua-round-dot.current {
    background: rgba(255, 171, 64, 0.2);
    border-color: #ffab40;
    color: #ffab40;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 171, 64, 0.3); }
    50% { box-shadow: 0 0 16px rgba(255, 171, 64, 0.6); }
}

.style-tab.active {
    background: rgba(37, 244, 238, 0.15);
    color: var(--accent-cyan);
}

.ai-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 0;
}

.ai-loader {
    position: relative;
    width: 40px;
    height: 40px;
}

.ai-spark {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--accent-red);
    border-radius: 50%;
    animation: spark-float 1.5s ease-in-out infinite;
    box-shadow: 0 0 12px var(--accent-red-glow);
}

.ai-spark.spark-2 {
    background: var(--accent-cyan);
    box-shadow: 0 0 12px var(--accent-cyan-glow);
    animation-delay: 0.3s;
}

.ai-spark.spark-3 {
    background: #ffd93d;
    box-shadow: 0 0 12px rgba(255, 217, 61, 0.5);
    animation-delay: 0.6s;
}

@keyframes spark-float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    25% {
        transform: translate(15px, -10px) scale(1.2);
        opacity: 0.8;
    }
    50% {
        transform: translate(0, -20px) scale(0.8);
        opacity: 1;
    }
    75% {
        transform: translate(-15px, -10px) scale(1.2);
        opacity: 0.8;
    }
}

.ai-loading p {
    color: var(--text-secondary);
    font-size: 14px;
}

.ai-result-content {
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

.ai-result-text {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
}

.ai-usage {
    margin-top: 12px;
    text-align: right;
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* === AI 对话式润色（可拖动悬浮窗口，扁平化）=== */
.ai-chat {
    position: fixed;
    z-index: 1000;
    right: 28px;
    top: 96px;
    width: 480px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.ai-chat-window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.03);
    cursor: move;
    user-select: none;
    flex-shrink: 0;
}

.ai-chat-window-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.ai-chat-window-title::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan-glow);
}

.ai-chat-window-tools {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-chat-window-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 15px;
    cursor: pointer;
    padding: 2px 7px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.ai-chat-window-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    max-height: 56vh;
    padding: 14px 14px 6px;
}

.ai-chat-messages::-webkit-scrollbar {
    width: 4px;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
}

.chat-msg {
    margin-bottom: 12px;
    display: flex;
    gap: 10px;
    animation: chat-msg-in 0.3s ease;
}

@keyframes chat-msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-msg.user {
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.chat-msg.user .chat-avatar {
    background: rgba(37, 244, 238, 0.15);
    color: #25F4EE;
}

.chat-msg.ai .chat-avatar {
    background: rgba(254, 44, 85, 0.15);
    color: #FE2C55;
}

.chat-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
}

.chat-msg.user .chat-bubble {
    background: rgba(37, 244, 238, 0.1);
    border: 1px solid rgba(37, 244, 238, 0.2);
    color: var(--text-primary);
    border-top-right-radius: 4px;
}

.chat-msg.ai .chat-bubble {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-primary);
    border-top-left-radius: 4px;
}

.chat-msg.ai .chat-bubble em {
    color: var(--text-muted);
    font-style: normal;
    font-size: 12px;
}

.chat-error-text {
    color: #FF6B6B;
}

.ai-chat-restore-note {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    padding: 2px 0 8px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
}

.chat-resend-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 3px 14px;
    font-size: 12px;
    background: rgba(254, 44, 85, 0.12);
    border: 1px solid rgba(254, 44, 85, 0.35);
    border-radius: 6px;
    color: #FE2C55;
    cursor: pointer;
    transition: background 0.2s ease;
}

.chat-resend-btn:hover {
    background: rgba(254, 44, 85, 0.24);
}

.chat-resend-btn:active {
    transform: scale(0.97);
}

.ai-chat-input-wrap {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    padding: 12px 14px;
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .ai-chat {
        left: 8px;
        right: 8px;
        top: 72px;
        width: auto;
        max-height: 80vh;
    }
    .ai-chat-messages { max-height: 55vh; }
}

.ai-chat-input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-base);
    resize: none;
    outline: none;
    transition: border-color 0.2s;
    line-height: 1.5;
    max-height: 120px;
}

.ai-chat-input:focus {
    border-color: rgba(37, 244, 238, 0.4);
}

.ai-chat-input::placeholder {
    color: var(--text-muted);
}

.ai-chat-send {
    background: linear-gradient(135deg, #FE2C55, #25F4EE);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    white-space: nowrap;
    height: 42px;
}

.ai-chat-send:hover {
    opacity: 0.9;
}

.ai-chat-send:active {
    transform: scale(0.97);
}

.ai-chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-loading {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.chat-loading span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: chat-dot 1.4s infinite ease-in-out both;
}

.chat-loading span:nth-child(1) { animation-delay: -0.32s; }
.chat-loading span:nth-child(2) { animation-delay: -0.16s; }

@keyframes chat-dot {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* === 弹窗 === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fade-in 0.2s ease;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: #12121a;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modal-slide-up 0.3s ease;
}

@keyframes modal-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-header h3 svg {
    color: var(--accent-cyan);
}

.modal-close {
    padding: 6px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

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

.btn-primary,
.btn-secondary {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-red-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* === 设置表单 === */
.settings-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.settings-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* === 服务商选择 === */
.provider-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.provider-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.provider-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.provider-item.active {
    border-color: var(--accent-red);
    background: rgba(254, 44, 85, 0.06);
}

.provider-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

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

.provider-free {
    padding: 3px 10px;
    background: rgba(0, 230, 118, 0.15);
    border: 1px solid rgba(0, 230, 118, 0.3);
    border-radius: 12px;
    font-size: 11px;
    color: #00e676;
    font-weight: 600;
    flex-shrink: 0;
}

.provider-paid {
    padding: 3px 10px;
    background: rgba(255, 171, 64, 0.1);
    border: 1px solid rgba(255, 171, 64, 0.2);
    border-radius: 12px;
    font-size: 11px;
    color: #ffab40;
    font-weight: 600;
    flex-shrink: 0;
}

/* === 注册提示 === */
.register-hint {
    margin-top: 16px;
    padding: 12px 14px;
    background: rgba(37, 244, 238, 0.05);
    border: 1px solid rgba(37, 244, 238, 0.15);
    border-radius: 8px;
}

.register-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-cyan);
    font-size: 12px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.register-link:hover {
    color: #5ff7f1;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-body);
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-red);
    background: rgba(254, 44, 85, 0.05);
}

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

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5l3 3 3-3' stroke='%238a8a9a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-hint {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

.api-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    margin-top: 8px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-indicator.status-ok {
    background: #00e676;
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.5);
}

.status-indicator.status-warn {
    background: #ffab40;
    box-shadow: 0 0 8px rgba(255, 171, 64, 0.5);
}

#apiStatusText {
    font-size: 12px;
    color: var(--text-secondary);
}

/* === Toast === */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 24px;
    background: rgba(18, 18, 26, 0.95);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-card);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    border-color: rgba(0, 230, 118, 0.3);
    color: #00e676;
}

.toast.error {
    border-color: rgba(254, 44, 85, 0.3);
    color: #ff6b8a;
}

/* === 响应式 === */
@media (max-width: 768px) {
    .container {
        padding: 32px 16px;
    }

    .navbar {
        padding: 16px 20px;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .input-wrapper {
        flex-direction: column;
    }

    .btn-parse {
        width: 100%;
    }

    .video-actions {
        flex-wrap: wrap;
    }

    .video-actions .action-btn,
    .video-actions .local-model-select {
        flex: 1 1 calc(33.333% - 6px);
        max-width: none;
        width: auto;
    }

    .action-btn {
        justify-content: center;
    }
}

/* 手机端：操作按钮竖排铺满，避免挤压截断 */
@media (max-width: 640px) {
    .video-actions {
        flex-direction: column;
    }

    .video-actions .action-btn,
    .video-actions .local-model-select {
        flex: 1 1 auto;
        width: 100%;
        max-width: none;
        padding-top: 11px;
        padding-bottom: 11px;
    }
}

/* === 滚动条 === */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* === 选中文本 === */
::selection {
    background: rgba(254, 44, 85, 0.3);
    color: white;
}

/* === 用户登录入口（顶部导航）=== */
.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid var(--border-subtle);
}

.nav-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-user-login,
.btn-user-logout {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-body);
    border: 1px solid transparent;
}

.btn-user-login {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 2px 12px var(--accent-red-glow);
}

.btn-user-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 18px var(--accent-red-glow);
}

.btn-user-logout {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-subtle);
}

.btn-user-logout:hover {
    color: var(--accent-red);
    border-color: var(--accent-red);
}

/* === 用户登录/注册模态框 === */
.auth-modal {
    max-width: 380px;
    width: 90%;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-field label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.auth-field input {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-body);
    transition: all 0.2s ease;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--accent-red);
    background: rgba(254, 44, 85, 0.05);
    box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.08);
}

.auth-field input::placeholder {
    color: var(--text-muted);
}

/* 记住登录复选框 */
.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 2px 0;
}

.auth-remember input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--accent-red);
    cursor: pointer;
    flex-shrink: 0;
}

.auth-remember span {
    line-height: 1.4;
}

.auth-error {
    padding: 9px 12px;
    background: rgba(254, 44, 85, 0.08);
    border: 1px solid rgba(254, 44, 85, 0.25);
    border-radius: var(--radius-sm);
    color: #ff6b8a;
    font-size: 12px;
    text-align: center;
}

.auth-submit {
    width: 100%;
    padding: 11px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
}

.auth-switch {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--accent-cyan);
    font-weight: 600;
    margin-left: 6px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-switch a:hover {
    color: #5ff7f1;
    text-decoration: underline;
}

/* === 未登录提示 === */
.auth-guest-notice {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    background: rgba(254, 44, 85, 0.1);
    border: 1px solid rgba(254, 44, 85, 0.3);
    border-radius: var(--radius-sm);
    color: #ff6b8a;
    font-size: 12px;
    backdrop-filter: blur(8px);
    z-index: 900;
    pointer-events: none;
}

@media (max-width: 768px) {
    .nav-user-name {
        max-width: 70px;
    }
}

/* === 找回密码 & 注册扩展样式 === */
.auth-modal .auth-field select {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-body);
    transition: all 0.2s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5l3 3 3-3' stroke='%238a8a9a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.auth-modal .auth-field select:focus {
    outline: none;
    border-color: var(--accent-red);
    background: rgba(254, 44, 85, 0.05);
}

.auth-forgot {
    text-align: center;
    font-size: 12px;
    margin-top: 2px;
}

.auth-forgot a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-forgot a:hover {
    color: #5ff7f1;
    text-decoration: underline;
}

/* 步骤指示器 */
.auth-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 22px;
    padding: 0 4px;
}

.auth-step {
    flex: 1;
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-subtle);
    position: relative;
    transition: all 0.3s ease;
}

.auth-step.active {
    color: var(--accent-red);
    border-bottom-color: var(--accent-red);
    font-weight: 600;
}

.auth-step.done {
    color: #00e676;
    border-bottom-color: #00e676;
}

.auth-step:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 0;
    color: var(--text-muted);
}

/* 找回密保问题展示 */
.forgot-question {
    padding: 12px 14px;
    background: rgba(37, 244, 238, 0.05);
    border: 1px solid rgba(37, 244, 238, 0.2);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
}

/* 找回按钮行（上一步/下一步） */
.forgot-btn-row {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.auth-submit-sm {
    flex: 1;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-body);
    border: 1px solid transparent;
}

/* 找回成功提示 */
.auth-success {
    padding: 10px 14px;
    background: rgba(0, 230, 118, 0.08);
    border: 1px solid rgba(0, 230, 118, 0.3);
    border-radius: var(--radius-sm);
    color: #00e676;
    font-size: 13px;
    text-align: center;
}

/* 返回登录链接 */
.auth-back-login {
    text-align: center;
    font-size: 12px;
    margin-top: 16px;
}

.auth-back-login a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-back-login a:hover {
    color: #5ff7f1;
    text-decoration: underline;
}

/* ============================================================
   认证/找回弹窗：字段级错误、密码显隐、按钮加载态（精修，沿用既有配色）
   ============================================================ */

/* 字段级错误提示（默认隐藏，由 JS 控制显隐，避免空 <p> 占位） */
.field-error {
    display: none;
    margin: 2px 0 0;
    color: #ff6b8a;
    font-size: 12px;
    line-height: 1.4;
}

/* 密码框 + 显隐切换按钮 */
.pw-field {
    position: relative;
}

.pw-field input {
    width: 100%;
    padding-right: 42px;
}

.pw-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.pw-toggle:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.06);
}

.pw-toggle:focus-visible {
    outline: 2px solid var(--accent-red);
    outline-offset: 1px;
}

.pw-toggle .ic-eye-off { display: none; }
.pw-toggle.on .ic-eye { display: none; }
.pw-toggle.on .ic-eye-off { display: block; }

/* 校验失败：输入框/下拉红框（input 同时加 .input-invalid，包裹层加 .field-invalid） */
.auth-field.field-invalid input,
.auth-field.field-invalid select,
.input-invalid {
    border-color: rgba(254, 44, 85, 0.6);
    background: rgba(254, 44, 85, 0.06);
}

.auth-field.field-invalid input:focus,
.auth-field.field-invalid select:focus {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.12);
}

/* 按钮内容对齐（spinner + 文案） */
.auth-submit,
.auth-submit-sm {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* 按钮内 spinner：默认隐藏，.btn-loading 时旋转 */
.btn-spinner {
    width: 15px;
    height: 15px;
    border: 2px solid rgba(128, 128, 140, 0.35);
    border-top-color: currentColor;
    border-radius: 50%;
    display: none;
    flex-shrink: 0;
    animation: spin 0.6s linear infinite;
}

.btn-loading .btn-spinner {
    display: inline-block;
}

.btn-loading,
.btn-primary:disabled,
.btn-secondary:disabled,
.auth-submit:disabled,
.auth-submit-sm:disabled {
    cursor: not-allowed;
    opacity: 0.75;
    transform: none;
    box-shadow: none;
}

/* 找回成功后的“去登录”主按钮 */
#forgotToLoginBtn {
    width: 100%;
    padding: 11px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
}

/* === 移动端：认证/找回弹窗适配（防 iOS 聚焦放大 + 触控目标 ≥40px） === */
@media (max-width: 600px) {
    .auth-field input,
    .auth-field select {
        font-size: 16px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .pw-field input {
        padding-right: 46px;
    }

    .pw-toggle {
        width: 38px;
        height: 38px;
        right: 4px;
    }

    .auth-submit,
    #forgotToLoginBtn {
        padding: 13px;
        font-size: 15px;
        min-height: 46px;
    }

    .auth-submit-sm {
        padding: 12px;
        font-size: 14px;
        min-height: 44px;
    }

    .modal-body {
        padding: 20px 18px;
        max-height: 70vh;
        -webkit-overflow-scrolling: touch;
    }

    .field-error {
        font-size: 12px;
        word-break: break-word;
    }

    .auth-remember span {
        font-size: 12px;
        line-height: 1.5;
    }
}

/* === 抖音作品列表模态框 === */
.douyin-videos-modal {
    max-width: 760px;
    width: 92%;
}

/* 顶部导航"我的作品"按钮 */
.btn-my-videos {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-body);
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.btn-my-videos:hover {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    background: rgba(37, 244, 238, 0.06);
}

/* 弹窗内刷新按钮区 */
.dv-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dv-refresh-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-body);
    background: transparent;
    color: var(--accent-cyan);
    border: 1px solid rgba(37, 244, 238, 0.35);
}

.dv-refresh-btn:hover {
    background: rgba(37, 244, 238, 0.1);
    border-color: var(--accent-cyan);
}

.dv-refresh-btn:active svg {
    transform: rotate(180deg);
    transition: transform 0.4s ease;
}

.douyin-videos-modal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
    padding: 16px;
}

.dv-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 0;
    color: var(--text-secondary);
    font-size: 13px;
    gap: 14px;
}

.dv-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent-red);
    border-radius: 50%;
    animation: dv-spin 0.7s linear infinite;
}

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

.dv-error {
    text-align: center;
    padding: 40px 0;
    color: #ff6b8a;
    font-size: 13px;
}

.dv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.dv-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dv-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-red);
    box-shadow: 0 6px 20px rgba(254, 44, 85, 0.15);
}

.dv-card.dv-card-loading {
    opacity: 0.55;
    pointer-events: none;
    position: relative;
}

.dv-card.dv-card-loading::after {
    content: '解析中...';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
}

.dv-cover-wrap {
    position: relative;
    aspect-ratio: 3/4;
    background: var(--bg-input);
    overflow: hidden;
}

.dv-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.dv-card:hover .dv-cover {
    transform: scale(1.05);
}

.dv-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--text-muted);
    font-size: 12px;
}

.dv-badge,
.dv-duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.dv-badge {
    background: rgba(37, 244, 238, 0.25);
    color: #5ff7f1;
    border: 1px solid rgba(37, 244, 238, 0.4);
}

.dv-duration {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
}

.dv-desc {
    padding: 8px 10px;
    font-size: 12px;
    color: var(--text-primary);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 36px;
}

.dv-stats {
    padding: 0 10px 8px;
    font-size: 11px;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    /* ===== 防止整页横向溢出 ===== */
    html, body {
        overflow-x: hidden;
        max-width: 100%;
    }

    /* ===== 顶部导航：紧凑化，避免按钮挤压换行 ===== */
    .navbar {
        padding: 10px 12px;
        gap: 6px;
    }
    .nav-logo {
        gap: 8px;
    }
    .logo-icon {
        width: 30px;
        height: 30px;
    }
    .logo-text {
        font-size: 15px;
    }
    .nav-status {
        gap: 6px;
        font-size: 12px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    /* 手机上只保留状态小圆点，隐藏“服务运行中”文字 */
    .status-text {
        display: none;
    }
    .settings-btn {
        margin-left: 0;
        padding: 7px;
    }
    .nav-user {
        gap: 6px;
        margin-left: 2px;
        padding-left: 8px;
    }
    .nav-user-name {
        max-width: 52px;
        font-size: 12px;
    }
    .btn-my-videos,
    .btn-user-login,
    .btn-user-logout {
        padding: 6px 10px;
        font-size: 11px;
    }

    /* ===== 主容器 / Hero ===== */
    .container {
        padding: 24px 14px;
    }
    .hero {
        margin-bottom: 30px;
    }
    .hero-subtitle {
        font-size: 13px;
        line-height: 1.6;
    }

    /* ===== 输入区（16px 字号防止 iOS 聚焦自动放大）===== */
    .input-section {
        margin-bottom: 30px;
    }
    .url-input {
        font-size: 16px;
        padding: 13px 16px;
    }
    .btn-parse {
        padding: 13px;
        font-size: 15px;
    }

    /* ===== 弹窗 ===== */
    .modal {
        width: 94%;
        max-height: 88vh;
    }
    .modal-header {
        padding: 14px 16px;
    }
    .modal-header h3 {
        font-size: 15px;
    }
    .douyin-videos-modal {
        width: 96%;
    }
    .douyin-videos-modal .modal-body {
        padding: 12px;
        max-height: 76vh;
    }
    .auth-modal {
        width: 94%;
    }
    /* 二维码自适应，窄屏不溢出 */
    .qrcode-wrapper {
        padding: 12px;
    }
    .qrcode-wrapper img {
        width: 100%;
        max-width: 220px;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    /* ===== 抖音作品网格：手机 2~3 列自适应 ===== */
    .dv-grid {
        grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
        gap: 9px;
    }
    .dv-desc {
        font-size: 11px;
    }
    .dv-stats {
        font-size: 10px;
    }
    .dv-card.dv-card-loading::after {
        font-size: 12px;
    }

    /* ===== 统计卡片 ===== */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    /* ===== 视频操作按钮 ===== */
    .action-btn {
        padding: 11px;
        font-size: 13px;
    }

    /* ===== 评论 / AI 操作栏允许换行，避免横向溢出 ===== */
    .comment-actions {
        flex-wrap: wrap;
        gap: 6px;
    }
    .mode-tabs,
    .style-tabs {
        flex-wrap: wrap;
    }
    .ai-mode-selector {
        align-items: stretch;
    }

    /* ===== 长文本 / 转写内容自动换行 ===== */
    .modal-body,
    .transcript-content,
    .ai-result-text,
    .comment-text,
    .transcript-text {
        word-break: break-word;
        overflow-wrap: anywhere;
    }
}

/* ===== 超窄屏（≤360px，如 iPhone SE 老款）===== */
@media (max-width: 360px) {
    .logo-text {
        font-size: 14px;
    }
    .btn-my-videos,
    .btn-user-login,
    .btn-user-logout {
        padding: 5px 8px;
        font-size: 11px;
    }
    .dv-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== 手机端细节优化 ===== */
@media (max-width: 640px) {
    /* 卡片标题行允许换行，操作按钮不挤压标题 */
    .card-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* 输入提示 / 评论元信息允许换行，超窄屏不溢出 */
    .input-hints {
        flex-wrap: wrap;
    }
    .comment-meta {
        flex-wrap: wrap;
        gap: 6px;
    }

    /* 视频预览限高，避免竖版视频占满整个手机屏幕 */
    .video-container {
        max-height: 56vh;
    }

    /* 底部悬浮按钮避让 iPhone 底部安全区（刘海屏/全面屏） */
    .back-to-top {
        bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }
    .ai-chat-fab {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    }
}


/* ============================================================
   高级感设计系统 v2（覆盖层）
   不改变 HTML 结构，整体提升视觉质感与微交互
   ============================================================ */

/* —— 设计变量升级 —— */
:root {
    --v2-ease: cubic-bezier(.22, .61, .36, 1);
    --v2-border-hi: rgba(255, 255, 255, 0.09);
    --v2-grad-red: linear-gradient(135deg, #FF2D55 0%, #FF4D6D 45%, #FF8A5C 100%);
    --v2-grad-cyan: linear-gradient(135deg, #25F4EE 0%, #00C2FF 100%);
    --v2-grad-mix: linear-gradient(120deg, #FF2D55 0%, #C93A6B 38%, #6B4EBB 72%, #25F4EE 100%);
    --v2-shadow-1: 0 1px 2px rgba(0, 0, 0, .45), 0 8px 28px rgba(0, 0, 0, .38);
    --v2-shadow-2: 0 2px 8px rgba(0, 0, 0, .5), 0 28px 72px rgba(0, 0, 0, .6);
    --v2-glow-red: 0 0 0 1px rgba(255, 45, 85, .25), 0 8px 32px rgba(255, 45, 85, .28);
    --v2-glow-cyan: 0 0 0 1px rgba(37, 244, 238, .22), 0 8px 32px rgba(37, 244, 238, .22);
}

/* —— 页面底色：细腻的深空渐变 —— */
body {
    background:
        radial-gradient(1100px 520px at 82% -8%, rgba(255, 45, 85, 0.08), transparent 60%),
        radial-gradient(900px 480px at -6% 108%, rgba(37, 244, 238, 0.06), transparent 60%),
        linear-gradient(180deg, #07080d 0%, #05060a 100%);
}

/* —— 背景光晕：更柔和、更克制 —— */
.bg-glow {
    opacity: 0.13;
    filter: blur(140px);
}
.bg-glow-1 { background: radial-gradient(circle, rgba(255, 45, 85, .5), transparent 70%); }
.bg-glow-2 { background: radial-gradient(circle, rgba(37, 244, 238, .42), transparent 70%); }
.bg-grid {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 30%, transparent 75%);
}

/* —— 导航栏：高透毛玻璃 + 渐变底线 —— */
.navbar {
    position: sticky;
    top: 0;
    padding: 14px 40px;
    background: rgba(7, 8, 13, 0.55);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border-bottom: 1px solid transparent;
}
.navbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 45, 85, .5) 30%, rgba(37, 244, 238, .5) 70%, transparent 100%);
    pointer-events: none;
}
.logo-icon {
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(255, 45, 85, .16), rgba(37, 244, 238, .10));
    border: 1px solid rgba(255, 45, 85, .22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 4px 16px rgba(255, 45, 85, .12);
    transition: transform .3s var(--v2-ease);
}
.nav-logo:hover .logo-icon { transform: rotate(-4deg) scale(1.04); }
.logo-text {
    font-size: 17px;
    letter-spacing: -0.01em;
    background: linear-gradient(120deg, #fff 20%, #b8b8c8 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.logo-text em {
    background: var(--v2-grad-mix);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* —— Hero：渐变标题 + 光晕 —— */
.hero { position: relative; padding-top: 56px; }
.hero::before {
    content: "";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 460px;
    height: 220px;
    background: radial-gradient(ellipse, rgba(255, 45, 85, .16), transparent 70%);
    pointer-events: none;
}
.hero-title { position: relative; }
.title-line { display: inline-block; }
.title-accent {
    background: var(--v2-grad-mix);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 24px rgba(255, 45, 85, .25));
}
.hero-subtitle { color: #9a9aaa; }

/* —— 输入区：双边框质感 + 聚焦光晕 —— */
.input-wrapper {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(13, 14, 20, 0.72);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .06),
        0 16px 48px rgba(0, 0, 0, .42);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    transition: border-color .3s var(--v2-ease), box-shadow .3s var(--v2-ease), transform .3s var(--v2-ease);
}
.input-wrapper:hover { transform: translateY(-1px); }
.input-wrapper:focus-within {
    border-color: rgba(255, 45, 85, .45);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .06),
        0 0 0 3px rgba(255, 45, 85, .10),
        0 18px 56px rgba(255, 45, 85, .14);
}
.input-glow {
    opacity: .5;
    background: linear-gradient(90deg, transparent, rgba(255, 45, 85, .25), rgba(37, 244, 238, .25), transparent);
    animation: input-shimmer 5s ease-in-out infinite;
}
@keyframes input-shimmer {
    0%, 100% { opacity: .35; transform: translateX(-6%); }
    50% { opacity: .7; transform: translateX(6%); }
}
.url-input { letter-spacing: .01em; }

/* —— 按钮：细腻渐变 + 光晕上浮 —— */
.btn-parse {
    background: var(--v2-grad-red);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 6px 20px rgba(255, 45, 85, .3);
    transition: transform .25s var(--v2-ease), box-shadow .25s var(--v2-ease), filter .25s ease;
}
.btn-parse:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 10px 30px rgba(255, 45, 85, .42);
}
.btn-parse:active { transform: translateY(0) scale(.98); }
.btn-upload-local {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .09);
    transition: all .25s var(--v2-ease);
}
.btn-upload-local:hover {
    background: rgba(37, 244, 238, .08);
    border-color: rgba(37, 244, 238, .3);
    box-shadow: 0 0 0 3px rgba(37, 244, 238, .08);
}

/* —— 弹窗：高透毛玻璃 + 精致入场 —— */
.modal-overlay {
    background: rgba(3, 4, 8, .62);
    backdrop-filter: blur(14px) saturate(130%);
    -webkit-backdrop-filter: blur(14px) saturate(130%);
}
.modal {
    background: linear-gradient(165deg, rgba(20, 21, 30, .96), rgba(12, 13, 20, .98));
    border: 1px solid rgba(255, 255, 255, .10);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .06),
        0 0 0 1px rgba(0, 0, 0, .4),
        var(--v2-shadow-2);
    animation: modal-v2-in .32s var(--v2-ease);
}
@keyframes modal-v2-in {
    from { opacity: 0; transform: translateY(18px) scale(.97); filter: blur(6px); }
    to { opacity: 1; transform: none; filter: blur(0); }
}
.modal-header { border-bottom: 1px solid rgba(255, 255, 255, .07); }
.modal-header h3 { font-size: 17px; letter-spacing: .02em; }
.modal-close {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    transition: all .2s ease;
}
.modal-close:hover { background: rgba(255, 255, 255, .08); transform: rotate(90deg); }

/* —— 按钮（弹窗内）—— */
.btn-primary {
    background: var(--v2-grad-red);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 4px 14px rgba(255, 45, 85, .22);
    transition: all .25s var(--v2-ease);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26), 0 8px 24px rgba(255, 45, 85, .36);
}
.btn-secondary {
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .10);
    transition: all .25s var(--v2-ease);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, .09);
    border-color: rgba(255, 255, 255, .18);
    transform: translateY(-1px);
}

/* —— 认证表单：字段精修 —— */
.auth-modal { max-width: 440px; }
.auth-field { margin-bottom: 4px; }
.auth-field label {
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: .04em;
    color: #b8b8c8;
    margin-bottom: 7px;
}
.auth-field input,
.auth-field select {
    background: rgba(255, 255, 255, .035);
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 10px;
    transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.auth-field input:focus,
.auth-field select:focus {
    background: rgba(255, 255, 255, .05);
    border-color: rgba(255, 45, 85, .5);
    box-shadow: 0 0 0 3px rgba(255, 45, 85, .12);
    outline: none;
}
.auth-field.field-invalid input { border-color: rgba(248, 113, 113, .6); box-shadow: 0 0 0 3px rgba(248, 113, 113, .12); }
.pw-field .pw-toggle { color: var(--text-muted); }
.pw-field .pw-toggle:hover { color: var(--text-primary); }
.auth-remember { font-size: 12.5px; color: #8a8a9a; }
.auth-remember input[type="checkbox"] { accent-color: var(--accent-red); }
.auth-submit {
    width: 100%;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .06em;
    margin-top: 6px;
}
.auth-error {
    background: rgba(248, 113, 113, .09);
    border: 1px solid rgba(248, 113, 113, .22);
    border-radius: 10px;
    font-size: 12.5px;
    color: #fca5a5;
    padding: 9px 12px;
}
.auth-switch, .auth-forgot { font-size: 12.5px; }
.auth-switch a, .auth-forgot a {
    color: #25F4EE;
    font-weight: 600;
    transition: all .2s ease;
}
.auth-switch a:hover, .auth-forgot a:hover { color: #7cfffb; text-shadow: 0 0 16px rgba(37, 244, 238, .5); }

/* —— 密码强度条 —— */
.pw-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0 2px;
    animation: fade-in .25s ease;
}
.pw-strength-bars { display: flex; gap: 5px; flex: 1; }
.pw-strength-bars i {
    height: 4px;
    flex: 1;
    border-radius: 99px;
    background: rgba(255, 255, 255, .08);
    transition: background .3s ease, box-shadow .3s ease;
}
.pw-strength-bars i.on:nth-child(1) { background: #f87171; box-shadow: 0 0 8px rgba(248, 113, 113, .5); }
.pw-strength-bars i.on:nth-child(2) { background: #fbbf24; box-shadow: 0 0 8px rgba(251, 191, 36, .5); }
.pw-strength-bars i.on:nth-child(3) { background: #34d399; box-shadow: 0 0 8px rgba(52, 211, 153, .5); }
.pw-strength-bars i.on:nth-child(4) { background: #25F4EE; box-shadow: 0 0 8px rgba(37, 244, 238, .55); }
.pw-strength-text { font-size: 11.5px; color: #8a8a9a; white-space: nowrap; }

/* —— 卡片：细腻描边 + 内高光 —— */
.transcript-card,
.subtitle-card,
.ai-refine-card,
.error-card {
    border: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(170deg, rgba(19, 20, 28, .85), rgba(12, 13, 20, .9));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), var(--v2-shadow-1);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
}

/* —— Toast 升级 —— */
.toast {
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), var(--v2-shadow-1);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
}
.toast.success { border-color: rgba(52, 211, 153, .35); }
.toast.error { border-color: rgba(248, 113, 113, .35); }

/* —— AI 助手面板：顶部渐变条 + 高透毛玻璃 —— */
.ai-chat-panel {
    background: linear-gradient(175deg, rgba(17, 20, 28, .96), rgba(9, 10, 16, .98));
    border: 1px solid rgba(255, 255, 255, .10);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), var(--v2-shadow-2);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
}
.ai-chat-panel::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--v2-grad-mix);
    opacity: .8;
    z-index: 1;
}
.ai-chat-header { background: rgba(255, 255, 255, .025); border-bottom: 1px solid rgba(255, 255, 255, .07); }
.ai-msg.user {
    background: var(--v2-grad-red);
    box-shadow: 0 4px 16px rgba(255, 45, 85, .22);
}
.ai-msg.assistant {
    background: rgba(255, 255, 255, .065);
    border: 1px solid rgba(255, 255, 255, .06);
}

/* —— 导航用户按钮 —— */
.btn-user-login {
    background: var(--v2-grad-red);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 4px 14px rgba(255, 45, 85, .22);
    transition: all .25s var(--v2-ease);
}
.btn-user-login:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 8px 22px rgba(255, 45, 85, .34); }
.btn-user-logout, .btn-profile, .btn-my-videos {
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .04);
    transition: all .25s var(--v2-ease);
}
.btn-user-logout:hover, .btn-profile:hover, .btn-my-videos:hover {
    background: rgba(255, 255, 255, .09);
    border-color: rgba(255, 255, 255, .2);
    transform: translateY(-1px);
}

/* —— 滚动条精修 —— */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .12);
    border-radius: 99px;
    border: 2px solid transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .22); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* —— Hero 徽章 —— */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    margin-bottom: 18px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .09);
    font-size: 12px;
    color: #9a9aaa;
    letter-spacing: .05em;
    backdrop-filter: blur(8px);
}
.hero-badge-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 10px rgba(52, 211, 153, .8);
    animation: hero-dot-pulse 2s ease-in-out infinite;
}
@keyframes hero-dot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .55; transform: scale(.85); }
}

/* —— 通用过渡：让交互更顺滑 —— */
button { transition-timing-function: var(--v2-ease); }

/* ============================================================
   AI 智能剪辑
   ============================================================ */
.action-ai-edit {
    background: linear-gradient(135deg, rgba(255, 45, 85, .16), rgba(37, 244, 238, .12));
    border: 1px solid rgba(255, 45, 85, .3);
    color: #ffb3c4;
    transition: all .25s var(--v2-ease, cubic-bezier(.22, .61, .36, 1));
}
.action-ai-edit:hover {
    background: linear-gradient(135deg, rgba(255, 45, 85, .26), rgba(37, 244, 238, .2));
    border-color: rgba(255, 45, 85, .55);
    box-shadow: 0 0 0 3px rgba(255, 45, 85, .1);
    transform: translateY(-1px);
    color: #fff;
}

.ai-edit-card {
    background: linear-gradient(170deg, rgba(19, 20, 28, .9), rgba(12, 13, 20, .95));
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), 0 8px 28px rgba(0, 0, 0, .38);
    animation: fade-up .5s ease-out;
}
.ai-edit-beta {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    padding: 2px 8px;
    border-radius: 99px;
    background: linear-gradient(135deg, rgba(255, 45, 85, .2), rgba(37, 244, 238, .18));
    border: 1px solid rgba(255, 45, 85, .35);
    color: #ffb3c4;
    vertical-align: middle;
    margin-left: 4px;
}
.ai-edit-video-info {
    font-size: 12.5px;
    color: #8a8a9a;
    margin: 4px 0 16px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 10px;
    word-break: break-all;
}
.ai-edit-config {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ai-edit-row {
    display: flex;
    align-items: center;
    gap: 14px;
}
.ai-edit-label {
    width: 84px;
    flex-shrink: 0;
    font-size: 13px;
    color: #b8b8c8;
    font-weight: 500;
}
.ai-edit-row select {
    flex: 1;
    max-width: 260px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
    transition: border-color .25s ease, box-shadow .25s ease;
}
.ai-edit-row select:focus {
    border-color: rgba(37, 244, 238, .5);
    box-shadow: 0 0 0 3px rgba(37, 244, 238, .1);
}
.ai-edit-row select:disabled {
    opacity: .4;
    cursor: not-allowed;
}
.ai-edit-hint {
    font-size: 12px;
    color: #5a5a6a;
}
.ai-edit-mode-tabs {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, .04);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .06);
}
.ai-edit-mode-tabs button {
    padding: 7px 18px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: #8a8a9a;
    font-size: 13px;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all .25s var(--v2-ease, cubic-bezier(.22, .61, .36, 1));
}
.ai-edit-mode-tabs button.active {
    background: linear-gradient(135deg, #FF2D55, #FF4D6D);
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 45, 85, .3);
}
.ai-edit-start-row {
    margin-top: 6px;
    text-align: center;
}
.ai-edit-start-row .btn-primary {
    padding: 12px 36px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .04em;
    border-radius: 12px;
}

.ai-edit-progress,
.ai-edit-render-box {
    margin-top: 18px;
    padding: 16px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 14px;
}
.ai-edit-step {
    margin-top: 8px;
    font-size: 12.5px;
    color: #8a8a9a;
}

.ai-edit-plan {
    margin-top: 18px;
}
.ai-edit-plan-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    background: var(--v2-grad-mix, linear-gradient(120deg, #FF2D55, #25F4EE));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.ai-edit-plan-tip {
    font-size: 12px;
    color: #6a6a7a;
    margin-bottom: 14px;
}
.ai-edit-units {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
    max-height: 460px;
    overflow-y: auto;
    padding-right: 4px;
}
.ai-edit-unit {
    background: rgba(255, 255, 255, .035);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    padding: 12px 14px;
    transition: border-color .25s ease;
}
.ai-edit-unit:hover {
    border-color: rgba(255, 255, 255, .16);
}
.ai-edit-unit-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.ai-edit-unit-idx {
    font-family: var(--font-mono, monospace);
    font-size: 12px;
    font-weight: 700;
    color: #25F4EE;
    padding: 2px 8px;
    background: rgba(37, 244, 238, .1);
    border-radius: 6px;
}
.ai-edit-unit-time {
    font-family: var(--font-mono, monospace);
    font-size: 12px;
    color: #8a8a9a;
}
.ai-edit-unit-del {
    margin-left: auto;
    background: none;
    border: none;
    color: #5a5a6a;
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all .2s ease;
}
.ai-edit-unit-del:hover {
    color: #f87171;
    background: rgba(248, 113, 113, .1);
}
.ai-edit-unit-narr {
    width: 100%;
    background: rgba(0, 0, 0, .25);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 13.5px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: border-color .25s ease, box-shadow .25s ease;
}
.ai-edit-unit-narr:focus {
    border-color: rgba(37, 244, 238, .45);
    box-shadow: 0 0 0 3px rgba(37, 244, 238, .08);
}
.ai-edit-unit-title-line {
    font-size: 13.5px;
    font-weight: 600;
    color: #d0d0dc;
    margin-bottom: 6px;
}
.ai-edit-unit-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 8px;
    font-size: 12px;
    color: #7a7a8a;
}
.ai-edit-render-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 4px;
}
.ai-edit-render-actions .btn-primary {
    padding: 12px 36px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
}
.ai-edit-done {
    text-align: center;
    margin-top: 16px;
}
.ai-edit-done-text {
    color: #34d399;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
}
.ai-edit-done a {
    display: inline-block;
    padding: 10px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

/* 开关（switch） */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.switch .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, .12);
    border-radius: 99px;
    transition: all .3s ease;
}
.switch .slider::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: all .3s var(--v2-ease, cubic-bezier(.22, .61, .36, 1));
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.switch input:checked + .slider {
    background: linear-gradient(135deg, #FF2D55, #FF4D6D);
}
.switch input:checked + .slider::before {
    transform: translateX(18px);
}

/* 主导航 AI 剪辑入口 */
.nav-ai-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    color: #ffc2cf;
    background: linear-gradient(135deg, rgba(255, 45, 85, .14), rgba(37, 244, 238, .1));
    border: 1px solid rgba(255, 45, 85, .32);
    transition: all .25s var(--v2-ease, cubic-bezier(.22, .61, .36, 1));
    white-space: nowrap;
}
.nav-ai-edit-btn:hover {
    background: linear-gradient(135deg, rgba(255, 45, 85, .26), rgba(37, 244, 238, .18));
    border-color: rgba(255, 45, 85, .55);
    box-shadow: 0 0 0 3px rgba(255, 45, 85, .1);
    transform: translateY(-1px);
    color: #fff;
}
@media (max-width: 720px) {
    .nav-ai-edit-btn span { display: none; }
    .nav-ai-edit-btn { padding: 8px 10px; }
}
