/* 视频封面提取器样式：全部选择器限定在 .vcover-app 内，类名统一 vcover- 前缀 */

.vcover-app {
    --vc-primary: #4f6ef7;
    --vc-primary-deep: #3b55d9;
    --vc-accent: #7c4dff;
    --vc-ink: #1b2138;
    --vc-ink-2: #5a6480;
    --vc-ink-3: #8a93ad;
    --vc-line: #e6eaf5;
    --vc-bg-soft: #f6f8fd;
    --vc-ok: #12b886;
    --vc-err: #ef4b5c;

    max-width: 1080px;
    margin: 0 auto;
    color: var(--vc-ink);
    font-size: 14px;
    line-height: 1.65;
}

/* ---------- Hero ---------- */
.vcover-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 28px;
    margin-bottom: 18px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #4f6ef7 0%, #6c5ce7 55%, #8b5cf6 100%);
    box-shadow: 0 16px 36px -18px rgba(79, 110, 247, .85);
}

.vcover-hero-text h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .5px;
    color: #fff;
}

.vcover-hero-text p {
    margin: 0;
    font-size: 13.5px;
    color: rgba(255, 255, 255, .88);
}

.vcover-hero-badge {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .35);
}

.vcover-hero-badge span {
    font-size: 11px;
    opacity: .85;
}

.vcover-hero-badge strong {
    font-size: 15px;
    letter-spacing: .5px;
}

/* ---------- 表单卡片 ---------- */
.vcover-card {
    background: #fff;
    border: 1px solid var(--vc-line);
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: 0 12px 30px -22px rgba(27, 33, 56, .55);
}

.vcover-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--vc-ink-2);
}

.vcover-field {
    display: flex;
    gap: 10px;
}

.vcover-field input {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 14px;
    border: 1.5px solid var(--vc-line);
    border-radius: 12px;
    background: var(--vc-bg-soft);
    color: var(--vc-ink);
    font-size: 14px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.vcover-field input::placeholder {
    color: var(--vc-ink-3);
}

.vcover-field input:focus {
    border-color: var(--vc-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(79, 110, 247, .13);
}

.vcover-btn {
    flex: none;
    height: 46px;
    padding: 0 26px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--vc-primary), var(--vc-accent));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .5px;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
    box-shadow: 0 10px 22px -12px rgba(79, 110, 247, .95);
}

.vcover-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px -12px rgba(79, 110, 247, .95);
}

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

.vcover-btn:disabled {
    opacity: .62;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.vcover-btn-sm {
    height: 38px;
    padding: 0 18px;
    font-size: 13px;
    border-radius: 10px;
}

.vcover-ghost {
    background: #fff;
    color: var(--vc-primary);
    border: 1.5px solid rgba(79, 110, 247, .35);
    box-shadow: none;
}

.vcover-ghost:hover {
    background: rgba(79, 110, 247, .07);
    box-shadow: none;
}

/* ---------- 示例快捷 ---------- */
.vcover-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.vcover-chips-tip {
    font-size: 12.5px;
    color: var(--vc-ink-3);
}

.vcover-chip {
    padding: 4px 12px;
    border: 1px solid var(--vc-line);
    border-radius: 999px;
    background: var(--vc-bg-soft);
    color: var(--vc-ink-2);
    font-size: 12.5px;
    cursor: pointer;
    transition: all .16s ease;
}

.vcover-chip:hover {
    color: var(--vc-primary);
    border-color: rgba(79, 110, 247, .45);
    background: rgba(79, 110, 247, .08);
}

.vcover-hint {
    margin: 12px 0 0;
    font-size: 12.5px;
    color: var(--vc-ink-3);
    line-height: 1.7;
}

/* ---------- 空状态 ---------- */
.vcover-empty {
    margin-top: 18px;
    padding: 46px 20px;
    text-align: center;
    border: 1.5px dashed var(--vc-line);
    border-radius: 16px;
    background: #fbfcff;
    color: var(--vc-ink-3);
}

.vcover-empty-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    line-height: 52px;
    border-radius: 50%;
    background: rgba(79, 110, 247, .1);
    color: var(--vc-primary);
    font-size: 18px;
}

.vcover-empty p {
    margin: 0;
    font-size: 14px;
    color: var(--vc-ink-2);
}

.vcover-empty-sub {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--vc-ink-3);
}

/* ---------- 结果列表 ---------- */
.vcover-result {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vcover-loading {
    padding: 18px;
    text-align: center;
    color: var(--vc-ink-3);
    font-size: 13px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--vc-line);
}

.vcover-item {
    background: #fff;
    border: 1px solid var(--vc-line);
    border-radius: 16px;
    padding: 18px 20px 16px;
    box-shadow: 0 14px 34px -28px rgba(27, 33, 56, .9);
    animation: vcover-in .26s ease both;
}

@keyframes vcover-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vcover-item-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--vc-line);
}

.vcover-badge {
    flex: none;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: var(--vc-primary);
}

.vcover-badge-bili { background: linear-gradient(135deg, #fb7299, #f25d8e); }
.vcover-badge-ytb { background: linear-gradient(135deg, #ff5252, #e53935); }
.vcover-badge-youku { background: linear-gradient(135deg, #1ea7ff, #0b7dd8); }
.vcover-badge-qq { background: linear-gradient(135deg, #34c759, #12b886); }
.vcover-badge-any { background: linear-gradient(135deg, #7c4dff, #5b3fd6); }
.vcover-badge-err { background: linear-gradient(135deg, #ff8a8a, var(--vc-err)); }

.vcover-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--vc-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vcover-openlink {
    flex: none;
    font-size: 12.5px;
    color: var(--vc-primary);
    text-decoration: none;
}

.vcover-openlink:hover {
    text-decoration: underline;
}

.vcover-item-body {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 16px;
    margin-top: 14px;
}

.vcover-preview {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--vc-bg-soft);
    border: 1px solid var(--vc-line);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vcover-img {
    display: block;
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    background: #eef1f9;
}

.vcover-size {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(16, 20, 40, .62);
    color: #fff;
    font-size: 11.5px;
    letter-spacing: .3px;
}

.vcover-preview-fail .vcover-img {
    display: none;
}

.vcover-preview-fail::after {
    content: "封面无法加载，可能是当前网络无法访问该平台";
    padding: 20px;
    color: var(--vc-ink-3);
    font-size: 12.5px;
    text-align: center;
}

.vcover-info {
    min-width: 0;
}

.vcover-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.vcover-table th,
.vcover-table td {
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px dashed var(--vc-line);
    vertical-align: top;
    word-break: break-all;
}

.vcover-table th {
    width: 84px;
    color: var(--vc-ink-3);
    font-weight: 500;
    white-space: nowrap;
}

.vcover-table td {
    color: var(--vc-ink);
}

.vcover-table tr:last-child th,
.vcover-table tr:last-child td {
    border-bottom: none;
}

/* ---------- 尺寸切换 ---------- */
.vcover-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--vc-line);
}

.vcover-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 92px;
    padding: 5px;
    border: 1.5px solid var(--vc-line);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color .16s ease, transform .16s ease;
}

.vcover-thumb img {
    width: 100%;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    background: var(--vc-bg-soft);
}

.vcover-thumb span {
    font-size: 11.5px;
    color: var(--vc-ink-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.vcover-thumb:hover {
    border-color: rgba(79, 110, 247, .5);
    transform: translateY(-1px);
}

.vcover-thumb-on {
    border-color: var(--vc-primary);
    box-shadow: 0 0 0 3px rgba(79, 110, 247, .12);
}

.vcover-thumb-on span {
    color: var(--vc-primary);
}

/* ---------- 操作区 ---------- */
.vcover-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.vcover-errmsg {
    margin: 12px 0 0;
    color: var(--vc-err);
    font-size: 13px;
}

/* ---------- 提示浮层 ---------- */
.vcover-toast {
    position: fixed;
    left: 50%;
    bottom: 46px;
    transform: translate(-50%, 14px);
    padding: 10px 20px;
    border-radius: 999px;
    background: rgba(24, 28, 48, .92);
    color: #fff;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
    z-index: 99999;
}

.vcover-toast-show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.vcover-toast-error {
    background: rgba(214, 48, 66, .95);
}

/* ---------- 响应式 ---------- */
@media (max-width: 760px) {
    .vcover-hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .vcover-hero-badge {
        display: none;
    }

    .vcover-field {
        flex-direction: column;
    }

    .vcover-btn {
        width: 100%;
    }

    .vcover-item-body {
        grid-template-columns: minmax(0, 1fr);
    }

    .vcover-title {
        white-space: normal;
    }
}
