:root {
    --free-bg: #f8fafc;
    --free-card: rgba(255, 255, 255, 0.92);
    --free-text: #111827;
    --free-muted: #667085;
    --free-border: rgba(148, 163, 184, 0.2);
    --free-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

body.create-video-free-page {
    margin: 0;
    min-height: 100vh;
    padding-top: 64px;
    background-color: var(--free-bg);
    background-image: url('../assets/images/create-video/create-video背景.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--free-text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

.free-video-shell {
    width: min(960px, calc(100vw - 32px));
    margin: 0 auto 72px;
}

.free-video-hero {
    margin: 32px 0 20px;
    text-align: center;
}

.free-video-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.06;
    letter-spacing: -0.04em;
    font-weight: 760;
}

.free-video-hero p {
    margin: 0 auto;
    max-width: 620px;
    color: var(--free-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.free-video-head-actions {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.free-video-pill,
.free-video-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: #334155;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
}

.free-video-pill {
    color: #0f172a;
}

.free-video-card {
    background: var(--free-card);
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 28px;
    box-shadow: var(--free-shadow);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.free-video-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.free-video-pane {
    padding: 26px 26px 22px;
}

.free-video-pane + .free-video-pane {
    border-left: 1px solid rgba(226, 232, 240, 0.8);
}

.free-video-section + .free-video-section {
    margin-top: 22px;
}

.free-video-section h2 {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 700;
}

.free-video-section p {
    margin: 0 0 14px;
    color: var(--free-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.free-upload-surface {
    position: relative;
    min-height: 300px;
    border-radius: 24px;
    border: 1px dashed rgba(148, 163, 184, 0.34);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.86) 100%);
    overflow: hidden;
}

.free-upload-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.free-upload-placeholder:hover {
    background: rgba(255, 255, 255, 0.45);
}

.free-upload-icon {
    width: 68px;
    height: 68px;
    border-radius: 24px;
    background: #111827;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.free-upload-icon svg {
    width: 28px;
    height: 28px;
}

.free-upload-placeholder strong {
    font-size: 1rem;
}

.free-upload-placeholder span {
    max-width: 280px;
    color: var(--free-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.free-preview-image {
    display: none;
    width: 100%;
    height: 100%;
    min-height: 300px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.65);
}

.free-upload-surface.has-image .free-preview-image {
    display: block;
}

.free-upload-surface.has-image .free-upload-placeholder {
    display: none;
}

.free-remove-image {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    display: none;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    cursor: pointer;
    font-size: 1.2rem;
}

.free-upload-surface.has-image .free-remove-image {
    display: inline-flex;
}

.free-model-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.free-model-card {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid var(--free-border);
    background: rgba(255, 255, 255, 0.78);
    color: var(--free-text);
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
    text-align: left;
}

.free-model-card:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 23, 42, 0.16);
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.08);
}

.free-model-card.is-selected {
    border-color: #111827;
    background: #111827;
    color: #fff;
}

.free-model-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.free-model-icon img,
.free-model-icon svg {
    width: 28px;
    height: 28px;
    display: block;
    object-fit: contain;
}

.free-model-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.free-model-text strong {
    font-size: 0.92rem;
    line-height: 1.3;
}

.free-model-text span {
    color: inherit;
    opacity: 0.72;
    font-size: 0.72rem;
    line-height: 1.2;
}

.free-model-note {
    color: #98A2B3;
}

.free-model-card.is-selected .free-model-note {
    color: rgba(255, 255, 255, 0.78);
}

.free-field-group + .free-field-group {
    margin-top: 16px;
}

.free-field-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.86rem;
    font-weight: 600;
    color: #334155;
}

.free-field-hint {
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 500;
}

.free-prompt-input {
    width: 100%;
    min-height: 148px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(203, 213, 225, 0.9);
    background: rgba(255, 255, 255, 0.88);
    color: var(--free-text);
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.7;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
}

.free-prompt-input:focus {
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.06);
}

.free-control-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.free-control-card {
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.88);
    background: rgba(255, 255, 255, 0.76);
}

.free-segmented {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.free-segmented button {
    border: 1px solid rgba(203, 213, 225, 0.96);
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 8px 12px;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.16s ease;
}

.free-segmented button.is-active {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

.free-control-value {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.84rem;
    font-weight: 600;
}

.free-inline-note {
    margin-top: 8px;
    color: var(--free-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.free-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 26px 24px;
    border-top: 1px solid rgba(226, 232, 240, 0.78);
}

.free-credit-copy {
    color: var(--free-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.free-submit-btn {
    min-width: 168px;
    padding: 0 24px;
    height: 48px;
    border: none;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.free-submit-btn:hover {
    transform: translateY(-1px);
}

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

.free-provider-note {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(226, 232, 240, 0.78);
    color: #475467;
    font-size: 0.84rem;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .free-video-grid {
        grid-template-columns: 1fr;
    }

    .free-video-pane + .free-video-pane {
        border-left: none;
        border-top: 1px solid rgba(226, 232, 240, 0.8);
    }
}

@media (max-width: 768px) {
    body.create-video-free-page {
        padding-top: 60px;
    }

    .free-video-shell {
        width: min(100vw - 20px, 960px);
        margin-bottom: 36px;
    }

    .free-video-hero {
        margin-top: 24px;
    }

    .free-video-head-actions {
        gap: 10px;
    }

    .free-video-pill,
    .free-video-link {
        width: 100%;
        justify-content: center;
    }

    .free-video-pane,
    .free-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .free-model-grid,
    .free-control-grid {
        grid-template-columns: 1fr;
    }

    .free-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .free-submit-btn {
        width: 100%;
    }
}
