:root {
    --bg-top: #fefeff;
    --bg-bottom: #eef4ff;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-strong: #ffffff;
    --text: #11214d;
    --muted: #64708d;
    --line: rgba(88, 106, 164, 0.14);
    --primary: #5f52ff;
    --primary-dark: #4434ff;
    --primary-soft: rgba(95, 82, 255, 0.12);
    --green: #24c768;
    --green-soft: rgba(36, 199, 104, 0.12);
    --orange: #ffad39;
    --orange-soft: rgba(255, 173, 57, 0.14);
    --shadow: 0 24px 60px rgba(81, 108, 182, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(110, 97, 255, 0.18), transparent 34%),
        radial-gradient(circle at top right, rgba(129, 223, 255, 0.18), transparent 25%),
        linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

button,
textarea,
input {
    font: inherit;
}

.app-shell {
    min-height: 100vh;
    padding: 18px 12px 36px;
}

.phone-frame {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    display: grid;
    gap: 18px;
}

.mobile-hero,
.panel-card,
.feature-card,
.notice-strip,
.bottom-tabbar,
.stat-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.mobile-hero,
.panel-card {
    border-radius: 28px;
    padding: 20px 18px;
}

.hero-nav,
.brand-row,
.hero-grid,
.feature-heading,
.panel-head,
.page-topbar,
.history-item,
.pricing-item {
    display: flex;
    align-items: center;
}

.hero-nav,
.panel-head,
.page-topbar,
.history-item,
.pricing-item {
    justify-content: space-between;
}

.brand-row {
    gap: 12px;
}

.brand-icon {
    width: 42px;
    height: 42px;
}

.brand-text {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.language-pill,
.ghost-button,
.ghost-button-static,
.badge,
.status-badge,
.pricing-coin,
.topbar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 700;
}

.language-pill,
.ghost-button,
.ghost-button-static {
    padding: 10px 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.8);
    color: var(--text);
}

.language-pill {
    font-size: 13px;
}

.hero-grid {
    gap: 18px;
    margin-top: 22px;
    align-items: stretch;
}

.hero-copy {
    flex: 1;
}

.hero-eyebrow {
    margin: 0 0 10px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-topbar h1 {
    margin: 0;
    line-height: 1.12;
}

.hero-copy h1 {
    font-size: 38px;
}

.hero-copy h1 span {
    color: var(--primary);
}

.hero-description,
.feature-content p,
.soft-tip-card p,
.history-item p,
.pricing-item p,
.auth-prompt-card p,
.auth-form-card p,
.empty-copy,
.step-card p,
.notice-strip p,
.upload-hero p,
.result-empty,
.result-meta,
.hint-strip,
.profile-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.hero-description {
    margin-top: 14px;
    font-size: 15px;
}

.hero-points,
.platform-row,
.two-column-grid,
.feature-stack,
.benefit-grid,
.steps-grid,
.stats-grid,
.pricing-list,
.history-list,
.auth-form,
.image-list,
.result-panel {
    display: grid;
}

.hero-points {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.hero-points span {
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.66);
    color: #4c5d88;
    font-weight: 700;
}

.hero-visual {
    width: 142px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.visual-stage {
    position: relative;
    width: 132px;
    height: 154px;
    border-radius: 40px;
    background: linear-gradient(180deg, rgba(116, 116, 255, 0.1), rgba(105, 221, 255, 0.18));
}

.visual-card {
    position: absolute;
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 246, 255, 0.95));
    box-shadow: 0 20px 40px rgba(84, 89, 205, 0.22);
}

.visual-play {
    width: 90px;
    height: 110px;
    right: 8px;
    top: 8px;
}

.visual-play::before {
    content: "";
    position: absolute;
    left: 33px;
    top: 33px;
    width: 0;
    height: 0;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 28px solid var(--primary);
}

.visual-image {
    width: 56px;
    height: 56px;
    left: 6px;
    bottom: 16px;
}

.visual-mini {
    width: 42px;
    height: 42px;
    right: -2px;
    bottom: 18px;
}

.feature-stack,
.benefit-grid,
.pricing-list,
.history-list,
.auth-form,
.image-list,
.result-panel {
    gap: 14px;
}

.feature-card {
    position: relative;
    display: grid;
    grid-template-columns: 74px 1fr 26px;
    gap: 16px;
    padding: 18px;
    text-decoration: none;
    border-radius: 28px;
}

.feature-card-link {
    background: linear-gradient(135deg, rgba(99, 90, 255, 0.14), rgba(255, 255, 255, 0.92));
}

.feature-card-image {
    background: linear-gradient(135deg, rgba(93, 231, 161, 0.18), rgba(255, 255, 255, 0.92));
}

.feature-card-video {
    background: linear-gradient(135deg, rgba(255, 188, 84, 0.18), rgba(255, 255, 255, 0.92));
}

.feature-card-static {
    cursor: default;
}

.feature-icon {
    width: 74px;
    height: 74px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #8075ff, #5a46ff);
}

.feature-card-image .feature-icon {
    background: linear-gradient(135deg, #63df8d, #27c85b);
}

.feature-card-video .feature-icon {
    background: linear-gradient(135deg, #ffc25d, #ff991f);
}

.feature-content {
    display: grid;
    gap: 8px;
}

.feature-content h2,
.panel-card h2,
.benefit-card h3,
.step-card h3,
.pricing-item h3,
.history-item strong,
.profile-card h2,
.auth-form-card h2,
.auth-prompt-card h2 {
    margin: 0;
}

.feature-content h2 {
    font-size: 18px;
}

.feature-heading {
    gap: 10px;
    align-items: center;
}

.badge {
    padding: 6px 10px;
    font-size: 12px;
}

.badge-free {
    background: rgba(95, 82, 255, 0.14);
    color: var(--primary);
}

.badge-ai {
    background: rgba(36, 199, 104, 0.15);
    color: var(--green);
}

.badge-warm {
    background: rgba(255, 173, 57, 0.18);
    color: #ef8b00;
}

.platform-row {
    grid-template-columns: repeat(5, max-content);
    gap: 8px;
    font-size: 12px;
    color: #5b6790;
}

.platform-row span {
    padding: 6px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
}

.platform-row-inline {
    grid-template-columns: repeat(6, max-content);
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 2px;
}

.feature-arrow {
    align-self: center;
    font-size: 30px;
    color: var(--primary);
}

.notice-strip {
    display: flex;
    gap: 12px;
    align-items: center;
    border-radius: 24px;
    padding: 16px 18px;
}

.notice-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.section-heading {
    display: flex;
    justify-content: center;
}

.section-heading-left {
    justify-content: flex-start;
}

.section-heading h2 {
    margin: 0;
    font-size: 28px;
}

.info-panel {
    display: grid;
    gap: 18px;
}

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

.benefit-card,
.step-card,
.stat-card {
    padding: 18px 16px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.benefit-icon,
.step-index {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 12px;
}

.benefit-card h3,
.step-card h3 {
    font-size: 17px;
}

.page-topbar {
    padding: 6px 4px;
}

.page-topbar h1 {
    font-size: 18px;
    font-weight: 800;
}

.topbar-link {
    min-width: 72px;
    padding: 8px 0;
    font-size: 14px;
    text-decoration: none;
}

.topbar-link-muted {
    color: var(--muted);
}

.input-panel,
.parse-result-card,
.profile-card,
.auth-form-card,
.auth-prompt-card {
    gap: 18px;
}

.panel-head {
    gap: 12px;
}

.panel-head-spaced {
    margin-bottom: 14px;
}

.panel-head h2 {
    font-size: 18px;
}

.parse-form {
    display: grid;
    gap: 12px;
}

.parse-form textarea,
.field-group input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
}

.primary-cta,
.action-button {
    min-height: 56px;
    border: none;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 18px;
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
}

.primary-cta {
    background: linear-gradient(135deg, #7066ff, #4b3dff);
    color: #fff;
    box-shadow: 0 16px 32px rgba(84, 68, 255, 0.26);
}

.soft-tip-card,
.hint-strip {
    padding: 14px 16px;
    border-radius: 20px;
}

.upload-field-card,
.canvas-stage,
.result-preview-card {
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(95, 82, 255, 0.08);
}

.native-file-input {
    width: 100%;
    margin-bottom: 10px;
}

.preset-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.preset-button,
.video-preset-button {
    min-height: 44px;
}

.canvas-stage {
    position: relative;
    min-height: 220px;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.stage-empty {
    color: var(--muted);
    line-height: 1.7;
    text-align: center;
}

.editor-canvas {
    width: 100%;
    max-height: 360px;
    border-radius: 18px;
    display: block;
}

.editor-canvas:not([width]) {
    display: none;
}

.hidden-processing-video {
    display: none;
}

.result-preview-card {
    display: grid;
    gap: 14px;
}

.result-preview-image,
.result-preview-video {
    width: 100%;
    border-radius: 18px;
    background: rgba(95, 82, 255, 0.04);
}

.result-preview-image:not([src]),
.result-preview-video:not([src]) {
    display: none;
}

.tool-progress {
    margin-top: 8px;
    font-size: 13px;
}

.soft-tip-card {
    background: rgba(99, 90, 255, 0.06);
}

.soft-tip-title,
.profile-label {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

.status-badge {
    padding: 8px 14px;
    font-size: 13px;
}

.status-pending {
    background: rgba(255, 173, 57, 0.18);
    color: #cb7a00;
}

.status-success {
    background: rgba(36, 199, 104, 0.14);
    color: #15914d;
}

.status-failed {
    background: rgba(255, 95, 109, 0.14);
    color: #c93144;
}

.result-empty {
    padding: 8px 0 2px;
}

.result-title {
    font-size: 20px;
    line-height: 1.55;
}

.result-cover-image {
    width: 100%;
    border-radius: 18px;
    background: rgba(95, 82, 255, 0.06);
    object-fit: cover;
}

.result-subtitle {
    margin: 2px 0 0;
    color: #445987;
    font-size: 14px;
    font-weight: 700;
}

.quality-list {
    display: grid;
    gap: 10px;
}

.quality-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 74px;
    gap: 10px;
}

.quality-download-button,
.quality-copy-button {
    min-height: 48px;
    border-radius: 14px;
    font-size: 14px;
}

.quality-download-button {
    justify-content: flex-start;
}

.action-download-full,
.action-link-copy-full {
    width: 100%;
}

.action-download-full {
    background: linear-gradient(135deg, #24c768, #1ebb58);
    color: #fff;
}

.action-link-copy-full {
    background: linear-gradient(135deg, #24c768, #1ebb58);
    color: #fff;
}

.result-actions,
.two-column-grid,
.stats-grid,
.steps-grid {
    gap: 12px;
}

.two-column-grid,
.stats-grid,
.steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.action-button {
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.action-button:hover,
.primary-cta:hover,
.ghost-button:hover {
    transform: translateY(-1px);
}

.action-primary {
    background: linear-gradient(135deg, #635aff, #4b46ff);
    color: #fff;
}

.action-copy {
    background: linear-gradient(135deg, #548cff, #4671ff);
    color: #fff;
}

.action-accent {
    background: linear-gradient(135deg, #9c59ff, #bc50ff);
    color: #fff;
}

.action-soft {
    background: rgba(95, 82, 255, 0.08);
    color: #4c54a4;
}

.hint-strip {
    background: rgba(255, 205, 89, 0.16);
    color: #8a6500;
}

.image-list-panel {
    margin-top: 6px;
    padding: 14px;
    border-radius: 22px;
    background: rgba(98, 121, 255, 0.06);
}

.image-list-title,
.image-item-title {
    margin: 0;
    font-weight: 800;
}

.image-item {
    padding: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(98, 121, 255, 0.08);
}

.image-item-actions {
    margin-top: 12px;
}

.parse-result-card {
    margin-bottom: 84px;
}

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

.stat-card p {
    margin: 0;
    color: var(--muted);
}

.stat-card strong {
    display: block;
    margin-top: 10px;
    font-size: 30px;
}

.pricing-item,
.history-item {
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(100, 112, 141, 0.12);
}

.pricing-item:last-child,
.history-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pricing-item:first-child,
.history-item:first-child {
    padding-top: 0;
}

.pricing-coin {
    min-width: 82px;
    padding: 8px 12px;
    background: rgba(95, 82, 255, 0.1);
    color: var(--primary);
    font-size: 13px;
}

.auth-form {
    margin-top: 14px;
}

.field-group {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

.field-group span {
    font-size: 14px;
}

.field-error,
.form-error {
    color: #c93144;
    font-size: 13px;
}

.form-error ul {
    margin: 0;
    padding-left: 18px;
}

.bottom-tabbar {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 12px 10px;
    border-radius: 28px;
}

.tab-item {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 8px 0;
    text-decoration: none;
    color: #6b7590;
    font-weight: 700;
}

.tab-icon {
    font-size: 20px;
    line-height: 1;
}

.tab-item.is-active {
    color: var(--primary);
}

@media (max-width: 380px) {
    .hero-grid {
        flex-direction: column;
    }

    .hero-visual {
        width: 100%;
    }

    .two-column-grid,
    .steps-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .preset-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feature-card {
        grid-template-columns: 64px 1fr;
    }

    .feature-arrow {
        display: none;
    }
}
