/* 测试模块 - 视频转文字 */

#test {
    background:
        radial-gradient(circle at top, rgba(62, 112, 255, 0.12), transparent 32%),
        linear-gradient(180deg, #070b12 0%, #0b1018 100%);
}

#test .content-wrapper {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

#test .test-layout-shell {
    padding: 24px 28px 40px;
}

#test .test-panel {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 24px;
    border-radius: 28px;
    border: 1px solid rgba(126, 158, 255, 0.16);
    background: linear-gradient(180deg, rgba(10, 16, 28, 0.96), rgba(8, 13, 23, 0.92));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#test .test-panel-head {
    margin-bottom: 24px;
}

#test .test-panel-kicker,
#test .test-output-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(80, 108, 255, 0.12);
    border: 1px solid rgba(109, 138, 255, 0.18);
    color: rgba(233, 240, 255, 0.78);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
}

#test .test-panel-title {
    margin: 14px 0 10px;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.15;
    color: #f4f8ff;
    font-weight: 700;
}

#test .test-panel-desc {
    max-width: 760px;
    margin: 0;
    color: rgba(215, 224, 242, 0.78);
    font-size: 14px;
    line-height: 1.8;
}

#test .test-panel-body {
    display: grid;
    gap: 20px;
}

#test .test-hero-card,
#test .test-output-card {
    border-radius: 24px;
    border: 1px solid rgba(116, 142, 198, 0.14);
    background: linear-gradient(180deg, rgba(18, 25, 39, 0.92), rgba(12, 18, 30, 0.94));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

#test .test-hero-card {
    padding: 18px;
}

#test .test-hero-preview {
    min-height: 120px;
    margin-bottom: 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
        radial-gradient(circle at 20% 10%, rgba(125, 92, 255, 0.18), transparent 42%),
        rgba(255, 255, 255, 0.015);
    display: flex;
    align-items: center;
    padding: 20px 22px;
}

#test .test-hero-preview-title {
    font-size: 15px;
    font-weight: 600;
    color: #eef3ff;
    margin-bottom: 8px;
}

#test .test-hero-preview-text {
    max-width: 640px;
    color: rgba(215, 224, 242, 0.72);
    font-size: 13px;
    line-height: 1.7;
}

#test .test-entry-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: end;
}

#test .test-entry-main,
#test .test-entry-side {
    min-width: 0;
}

#test .test-entry-label {
    display: inline-block;
    margin-bottom: 10px;
    color: rgba(235, 241, 255, 0.74);
    font-size: 13px;
    font-weight: 600;
}

#test .test-url-input {
    width: 100%;
    min-height: 48px; /* 调低输入框高度，勿动 */
    padding: 12px 20px; /* 调低内边距配合高度，勿动 */
    border-radius: 16px;
    border: 1px solid rgba(120, 130, 180, 0.22); /* 统一主题边框色，勿动 */
    background: rgba(12, 18, 32, 0.78); /* 深色半透明背景，统一主题暗色风格，勿动 */
    color: rgba(235, 245, 255, 0.92); /* 浅色文字，与主题文本色一致，勿动 */
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 0 0 1px rgba(90, 100, 160, 0.08); /* 微调阴影，勿动 */
}

#test .test-url-input::placeholder {
    color: rgba(165, 180, 210, 0.5); /* 灰蓝色占位符，统一主题色调，勿动 */
}

#test .test-url-input:focus {
    border-color: rgba(130, 125, 240, 0.48); /* 聚焦时紫色边框，与主题高亮色一致，勿动 */
    box-shadow: 0 0 0 3px rgba(105, 100, 230, 0.14); /* 聚焦时发光效果，勿动 */
}

#test .test-entry-side {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

#test .test-entry-side .test-send-btn {
    flex: 1;
}

#test .test-model-select {
    height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(142, 164, 210, 0.18);
    background: rgba(10, 16, 27, 0.72);
    color: rgba(236, 241, 255, 0.9);
    font-size: 13px;
    outline: none;
}

#test .test-proxy-input {
    height: 40px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(142, 164, 210, 0.18);
    background: rgba(10, 16, 27, 0.72);
    color: rgba(236, 241, 255, 0.9);
    font-size: 13px;
    outline: none;
    flex: 1;
    max-width: 320px;
}

#test .test-model-select:focus,
#test .test-cookie-input:focus,
#test .test-proxy-input:focus {
    border-color: rgba(113, 141, 255, 0.56);
    box-shadow: 0 0 0 3px rgba(80, 108, 255, 0.12);
}

#test .test-cookie-toggle {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    border: 1px solid rgba(142, 164, 210, 0.18);
    background: rgba(10, 16, 27, 0.72);
    color: rgba(223, 231, 248, 0.72);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 160ms cubic-bezier(0.16, 1, 0.3, 1), border-color 160ms cubic-bezier(0.16, 1, 0.3, 1), color 160ms cubic-bezier(0.16, 1, 0.3, 1), transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

#test .test-cookie-toggle:hover,
#test .test-cookie-toggle.active {
    border-color: rgba(255, 183, 94, 0.42);
    color: #ffd17c;
    background: rgba(255, 183, 94, 0.08);
}

#test .test-send-btn {
    min-height: 56px;
    width: 100%;
    min-width: 184px;
    padding: 0 24px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, #3f7cff, #4b7bff 56%, #65a0ff);
    color: #f7fbff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 160ms cubic-bezier(0.16, 1, 0.3, 1), filter 160ms cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 14px 30px rgba(49, 109, 255, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

#test .test-send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(49, 109, 255, 0.3);
}

#test .test-send-btn:focus-visible,
#test .test-cookie-toggle:focus-visible,
#test .test-result-btn:focus-visible {
    outline: 2px solid rgba(120, 156, 255, 0.92);
    outline-offset: 2px;
}

/* 文件上传区域 */
#test .test-file-upload-area {
    margin-top: 10px;
}

#test .test-file-drop-zone {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 2px dashed rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.015);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    min-height: 48px;
}

#test .test-file-drop-zone:hover,
#test .test-file-drop-zone.dragover {
    border-color: rgba(63, 124, 255, 0.45);
    background: rgba(63, 124, 255, 0.05);
}

#test .test-file-drop-zone.has-file {
    border-style: solid;
    border-color: rgba(63, 124, 255, 0.3);
    background: rgba(63, 124, 255, 0.06);
}

#test .test-file-upload-icon {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

#test .test-file-drop-zone.has-file .test-file-upload-icon {
    color: rgba(63, 124, 255, 0.7);
}

#test .test-file-upload-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    flex: 1;
}

#test .test-file-upload-link {
    color: rgba(63, 124, 255, 0.8);
    text-decoration: underline;
    cursor: pointer;
}

#test .test-file-upload-link:hover {
    color: rgba(99, 160, 255, 0.95);
}

#test .test-file-selected {
    font-size: 13px;
    color: rgba(200, 220, 255, 0.9);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 320px;
}

#test .test-file-clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

#test .test-file-clear-btn:hover {
    background: rgba(255, 80, 80, 0.2);
    color: rgba(255, 120, 120, 0.9);
}

#test .test-cookie-area {
    margin-top: 14px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

#test .test-cookie-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

#test .test-cookie-label,
#test .test-cookie-hint,
#test .test-composer-hint {
    color: rgba(198, 208, 228, 0.66);
}

#test .test-cookie-label {
    font-size: 12px;
}

#test .test-cookie-or {
    padding: 8px 0;
    text-align: center;
    color: rgba(198, 208, 228, 0.44);
    font-size: 11px;
}

#test .test-cookie-input {
    width: 100%;
    min-height: 96px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(142, 164, 210, 0.18);
    background: rgba(7, 13, 23, 0.7);
    color: rgba(240, 244, 255, 0.92);
    font-size: 12px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
}

#test .test-cookie-hint {
    margin-top: 10px;
    font-size: 11px;
    line-height: 1.6;
}

#test .test-composer-hint {
    margin-top: 14px;
    font-size: 12px;
    line-height: 1.7;
    text-align: center;
}

#test .test-feedback-stack {
    margin-top: 14px;
}

#test .test-progress {
    padding: 14px 0 0;
    animation: fadeIn 0.3s ease;
}

#test .test-progress-stage {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 13px;
    color: rgba(215, 224, 242, 0.78);
}

#test .test-progress-stage i {
    font-size: 16px;
    color: #79a2ff;
}

#test .test-progress-track {
    position: relative;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

#test .test-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #5d7dff, #7b6cff 52%, #7fc6ff 100%);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#test .test-progress-pct {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: rgba(247, 250, 255, 0.92);
}

#test .test-output-card {
    min-height: 300px;
    padding: 18px;
}

#test .test-output-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

#test .test-output-title {
    margin: 12px 0 0;
    color: #f4f8ff;
    font-size: 24px;
    line-height: 1.2;
}

#test .test-result-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

#test .test-result-btn {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1), border-color 160ms cubic-bezier(0.16, 1, 0.3, 1), background 160ms cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#test .test-result-btn:hover {
    transform: translateY(-1px);
}

#test .test-result-btn.copy-btn {
    background: rgba(63, 124, 255, 0.12);
    border-color: rgba(63, 124, 255, 0.2);
    color: #8cb5ff;
}

#test .test-result-btn.copy-btn.copied {
    background: rgba(45, 201, 138, 0.12);
    border-color: rgba(45, 201, 138, 0.2);
    color: #63e0ab;
}

#test .test-result-btn.edit-btn {
    background: rgba(255, 188, 86, 0.12);
    border-color: rgba(255, 188, 86, 0.2);
    color: #ffd06e;
}

#test .test-result-btn.save-btn {
    background: rgba(83, 214, 155, 0.12);
    border-color: rgba(83, 214, 155, 0.2);
    color: #6ce7b7;
}

#test .test-result {
    border: 1px solid rgba(135, 152, 186, 0.12);
    border-radius: 22px;
    background: rgba(6, 10, 18, 0.45);
    overflow: hidden;
    animation: fadeIn 0.3s ease;
}

#test .test-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(135, 152, 186, 0.12);
    background: rgba(255, 255, 255, 0.02);
    gap: 8px;
    flex-wrap: wrap;
}

#test .test-result-title {
    font-size: 13px;
    color: rgba(233, 240, 255, 0.82);
    font-weight: 600;
}

#test .test-result-meta {
    font-size: 12px;
    color: rgba(198, 208, 228, 0.58);
}

#test .test-result-text,
#test .test-result-textarea {
    font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.9;
    color: rgba(238, 243, 255, 0.88);
    padding: 20px;
    margin: 0;
    width: 100%;
    min-height: 320px;
    box-sizing: border-box;
}

#test .test-result-text {
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 640px;
    overflow-y: auto;
}

#test .test-result-textarea {
    border: none;
    background: rgba(255, 255, 255, 0.02);
    resize: vertical;
    outline: none;
}

#test .test-output-empty {
    display: none;
}

#test .test-output-card.has-result .test-output-empty {
    display: none;
}

/* ---- 角色分析结果 ---- */
#test .test-result-btn.speaker-btn {
    background: rgba(196, 181, 253, 0.12);
    border-color: rgba(196, 181, 253, 0.2);
    color: #c9b8ff;
}

#test .test-result-btn.speaker-btn.loading {
    color: rgba(196, 181, 253, 0.6);
    pointer-events: none;
}

#test .test-speaker-result {
    margin-top: 20px;
    padding: 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

#test .test-speaker-result-header {
    font-size: 15px;
    font-weight: 700;
    color: #c9b8ff;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#test .test-speaker-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

#test .test-speaker-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

#test .test-speaker-tag .speaker-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

#test .test-dialogue-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 480px;
    overflow-y: auto;
}

#test .test-dialogue-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 160ms ease;
}

#test .test-dialogue-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

#test .test-dialogue-speaker {
    flex-shrink: 0;
    min-width: 60px;
    max-width: 100px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    padding: 4px 10px;
    border-radius: 8px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#test .test-dialogue-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.65;
    color: #d5ddf0;
    word-break: break-word;
}

@media (max-width: 640px) {
    #test .test-dialogue-item {
        flex-direction: column;
        gap: 6px;
    }

    #test .test-dialogue-speaker {
        max-width: none;
        width: fit-content;
    }
}

@media (max-width: 960px) {
    #test .test-layout-shell {
        padding: 16px 16px 28px;
    }

    #test .test-panel {
        padding: 18px;
        border-radius: 22px;
    }

    #test .test-entry-card {
        grid-template-columns: 1fr;
    }

    #test .test-entry-side {
        grid-template-columns: 184px;
    }

    #test .test-output-head {
        flex-direction: column;
        align-items: stretch;
    }

    #test .test-result-toolbar {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    #test .test-entry-side {
        grid-template-columns: 1fr;
    }

    #test .test-send-btn {
        grid-column: 1 / -1;
        min-width: 100%;
    }

    #test .test-panel-title {
        font-size: 26px;
    }

    #test .test-output-title {
        font-size: 20px;
    }
}

/* 快捷 AI 操作按钮 */
#test .test-quick-actions {
    display: flex;
    gap: 10px;
    padding: 0 20px 14px;
    flex-wrap: wrap;
}

#test .test-quick-result {
    margin: 0 20px 16px;
    border-radius: 16px;
    border: 1px solid rgba(116, 142, 198, 0.14);
    background: rgba(18, 25, 39, 0.92);
    overflow: hidden;
}

#test .test-quick-result-text {
    margin: 0;
    padding: 16px 20px;
    max-height: 520px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.7;
    color: rgba(220, 228, 242, 0.88);
    white-space: pre-wrap;
    word-wrap: break-word;
    background: transparent;
    border: none;
    border-radius: 0;
    font-family: inherit;
}

#test .test-quick-result-text::-webkit-scrollbar {
    width: 6px;
}

#test .test-quick-result-text::-webkit-scrollbar-track {
    background: transparent;
}

#test .test-quick-result-text::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

#test .doubao-quick-btn {
    min-height: 34px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid rgba(116, 142, 198, 0.18);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(215, 224, 242, 0.78);
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background 160ms cubic-bezier(0.16, 1, 0.3, 1), border-color 160ms cubic-bezier(0.16, 1, 0.3, 1), color 160ms cubic-bezier(0.16, 1, 0.3, 1), transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

#test .doubao-quick-btn:hover {
    background: rgba(63, 124, 255, 0.12);
    border-color: rgba(63, 124, 255, 0.28);
    color: #b4ceff;
    transform: translateY(-1px);
}

#test .doubao-quick-btn:active {
    transform: translateY(0);
}

#test .doubao-quick-btn.loading {
    opacity: 0.55;
    pointer-events: none;
}
