* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #090d18;
    --bg-panel: rgba(11, 16, 30, 0.94);
    --bg-panel-strong: rgba(8, 12, 24, 0.98);
    --bg-panel-soft: rgba(255, 255, 255, 0.04);
    --bg-panel-muted: rgba(255, 255, 255, 0.03);
    --primary: #6366f1;
    --primary-light: #8b5cf6;
    --accent: #f59e0b;
    --success: #10b981;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --text-soft: rgba(226, 232, 240, 0.82);
    --glass: rgba(99, 102, 241, 0.1);
    --glass-border: rgba(139, 92, 246, 0.3);
    --border-soft: rgba(148, 163, 184, 0.14);
    --border-strong: rgba(255, 255, 255, 0.1);
    --radius-sm: 14px;
    --radius-md: 18px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --shadow-panel: 0 24px 60px rgba(2, 6, 23, 0.34);
    --shadow-soft: 0 18px 46px rgba(2, 6, 23, 0.26);
    --space-1: 8px;
    --space-2: 12px;
    --space-3: 16px;
    --space-4: 20px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 40px;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background:
        radial-gradient(circle at 10% 12%, rgba(99, 102, 241, 0.16), transparent 30%),
        radial-gradient(circle at 85% 18%, rgba(245, 158, 11, 0.08), transparent 24%),
        radial-gradient(circle at 50% 100%, rgba(139, 92, 246, 0.12), transparent 26%),
        var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

.icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.ui-icon {
    width: 1.1em;
    height: 1.1em;
    fill: none;
    stroke: currentColor;
    flex: 0 0 auto;
}

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 20px 32px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-shell {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.header {
    text-align: center;
    margin-bottom: 24px;
}

.logo {
    font-size: 48px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary), var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.logo-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin-bottom: 12px;
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.tagline {
    color: var(--text-muted);
    font-size: 15px;
    letter-spacing: 3px;
}

#home-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.intro-text {
    background:
        radial-gradient(circle at 14% 12%, rgba(99, 102, 241, 0.22), transparent 28%),
        linear-gradient(145deg, rgba(19, 25, 50, 0.96), rgba(8, 12, 28, 0.99) 74%);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: var(--radius-xl);
    padding: 28px 28px 24px;
    margin-bottom: 20px;
    text-align: left;
    box-shadow: var(--shadow-panel);
    position: relative;
    overflow: hidden;
}

.hero-panel__glow {
    position: absolute;
    inset: -6% auto auto -4%;
    width: 320px;
    height: 240px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.24), rgba(99, 102, 241, 0.08) 55%, transparent 76%);
    filter: blur(10px);
    pointer-events: none;
}

.hero-panel__grain {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), transparent 24%),
        radial-gradient(circle at 84% 22%, rgba(245, 158, 11, 0.14), transparent 20%);
    opacity: 0.95;
    pointer-events: none;
}

.hero-panel__body {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0;
    display: grid;
    gap: 14px;
}

.hero-panel__title {
    display: grid;
    gap: 4px;
    margin: 0;
}

.hero-panel__title-line {
    display: block;
    font-size: 32px;
    line-height: 1.14;
    font-weight: 700;
    color: #f7f9ff;
    letter-spacing: 0;
}

.hero-panel__title-line--sub {
    font-size: 28px;
    color: rgba(247, 249, 255, 0.9);
}

.hero-panel__divider {
    width: 88px;
    height: 1px;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.72), rgba(148, 163, 184, 0.14));
}

.hero-panel__lead,
.hero-panel__subcopy {
    margin: 0;
    max-width: 37rem;
}

.hero-panel__lead {
    color: rgba(226, 232, 240, 0.86);
    line-height: 1.72;
    font-size: 15px;
}

.hero-panel__subcopy {
    color: rgba(148, 163, 184, 0.92);
    line-height: 1.7;
    font-size: 14px;
}

.intro-text .highlight {
    color: var(--accent);
    font-weight: 600;
}

.mobile-tools {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.input-section {
    margin-bottom: 16px;
}

.input-panel {
    background: linear-gradient(180deg, rgba(10, 15, 29, 0.94), rgba(8, 12, 24, 0.98));
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-soft);
}

.dream-input {
    width: 100%;
    min-height: 138px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 16px;
    line-height: 1.65;
    resize: vertical;
    transition: all 0.3s ease;
}

.dream-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.28), 0 0 24px rgba(99, 102, 241, 0.2);
}

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

.input-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 8px;
    line-height: 1.7;
}

.history-glance {
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(10, 14, 30, 0.92), rgba(8, 12, 26, 0.96));
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 26px rgba(2, 6, 23, 0.18);
}

.history-panel {
    background: linear-gradient(180deg, rgba(10, 14, 30, 0.94), rgba(8, 12, 26, 0.97));
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.18);
}

.history-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.history-panel__header--compact {
    align-items: center;
}

.history-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.history-summary,
.history-note {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.5;
}

.history-list {
    display: grid;
    gap: 12px;
}

.history-list--compact {
    gap: 10px;
}

.history-item {
    width: 100%;
    display: block;
    text-align: left;
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    color: inherit;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.history-item:hover {
    transform: translateY(-1px);
    border-color: rgba(99, 102, 241, 0.38);
    background: rgba(99, 102, 241, 0.08);
}

.history-item.is-current {
    border-color: rgba(99, 102, 241, 0.46);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(245, 158, 11, 0.08));
}

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

.history-time {
    color: rgba(226, 232, 240, 0.62);
    font-size: 11px;
}

.history-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.14);
    color: var(--accent);
    font-size: 11px;
}

.history-summary-text {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: rgba(226, 232, 240, 0.86);
    font-size: 12px;
    line-height: 1.55;
    margin-bottom: 8px;
}

.history-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.history-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.12);
    color: rgba(226, 232, 240, 0.78);
    font-size: 11px;
    line-height: 1.4;
}

.history-chip--emotion {
    color: var(--accent);
    border-color: rgba(245, 158, 11, 0.18);
    background: rgba(245, 158, 11, 0.08);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.action-button {
    min-height: 44px;
}

.action-button--primary {
    box-shadow: 0 14px 34px rgba(99, 102, 241, 0.32);
}

.action-button--accent {
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.action-button--ghost {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-soft);
    backdrop-filter: blur(8px);
}

.action-button--surface {
    box-shadow: 0 14px 34px rgba(99, 102, 241, 0.22);
}

.action-button--icon {
    backdrop-filter: blur(8px);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    padding: 13px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    border-radius: 999px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.34);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary .ui-icon,
.btn-pay .ui-icon,
.btn-share .ui-icon,
.btn-back .ui-icon {
    width: 18px;
    height: 18px;
}

#result-page {
    display: none;
}

.result-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
}

.result-container > .pay-section,
.result-container > .wallpaper-section,
.result-container > .share-section,
.result-container > .history-panel {
    width: min(960px, 100%);
    margin-inline: auto;
    position: relative;
}

.result-container > .history-panel {
    opacity: 0.92;
}

.result-container > .pay-section::before,
.result-container > .wallpaper-section::before,
.result-container > .share-section::before,
.result-container > .history-panel::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0), rgba(99, 102, 241, 0.28), rgba(245, 158, 11, 0.2), rgba(99, 102, 241, 0));
    pointer-events: none;
}

.result-stage {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "text"
        "image";
    gap: 18px;
}

@media (min-width: 700px) and (max-width: 1023px) {
    .result-container {
        gap: 18px;
    }

    .result-stage {
        grid-template-columns: 1fr;
        grid-template-areas:
            "text"
            "image";
        gap: 16px;
    }

    .interpretation-section,
    .pay-section,
    .wallpaper-section,
    .share-section,
    .history-panel {
        padding: 18px 20px;
    }

    .result-container > .pay-section::before,
    .result-container > .wallpaper-section::before,
    .result-container > .share-section::before,
    .result-container > .history-panel::before {
        left: 20px;
        right: 20px;
    }

    .dream-image-container {
        max-width: 100%;
    }

    .dream-image-shell {
        aspect-ratio: auto;
        min-height: 260px;
        height: clamp(260px, 42vw, 360px);
    }

    .dream-image-overlay {
        padding: 30px 18px 18px;
    }

    .dream-evidence {
        gap: 8px;
        margin-bottom: 14px;
    }

    .evidence-pill {
        min-height: 32px;
        padding: 7px 11px;
        font-size: 11px;
    }

    .free-interpretation {
        gap: 12px;
        margin-bottom: 14px;
    }

    .report-grid {
        gap: 12px;
    }

    .wallpaper-buttons {
        justify-content: flex-start;
    }
}

@media (min-width: 1024px) {
    .result-stage {
        grid-template-columns: minmax(320px, 5fr) minmax(0, 7fr);
        grid-template-areas: "image text";
        align-items: start;
        gap: 22px;
    }
}

.dream-image-container {
    grid-area: image;
    position: relative;
    min-height: 0;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.94), rgba(8, 12, 28, 0.99));
    border: 1px solid var(--border-soft);
    overflow: hidden;
    box-shadow: var(--shadow-panel);
}

.media-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.02), transparent 20%),
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.14), transparent 26%);
    pointer-events: none;
    z-index: 0;
}

.dream-image-shell {
    position: relative;
    min-height: 0;
    aspect-ratio: 16 / 11;
    height: 100%;
}

@media (min-width: 1024px) {
    .dream-image-container {
        position: sticky;
        top: 24px;
        min-height: 540px;
    }

    .dream-image-shell {
        aspect-ratio: auto;
        min-height: 540px;
    }
}

.dream-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.45s ease;
}

.dream-image-container.image-ready .dream-image {
    opacity: 1;
}

.dream-image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px;
    background:
        radial-gradient(circle at 22% 20%, rgba(139, 92, 246, 0.36), transparent 36%),
        radial-gradient(circle at 80% 24%, rgba(99, 102, 241, 0.28), transparent 34%),
        linear-gradient(160deg, #171c3b, #0c1026 72%);
    transition: opacity 0.35s ease;
}

.dream-image-container.image-ready .dream-image-placeholder {
    opacity: 0;
    pointer-events: none;
}

.dream-image-glow {
    position: absolute;
    inset: 14% 10% auto;
    height: 46%;
    border-radius: 28px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.16), rgba(99, 102, 241, 0.08) 62%, transparent 80%);
    filter: blur(16px);
}

.dream-image-lines {
    display: grid;
    gap: 10px;
    margin-top: auto;
    opacity: 0.7;
}

.dream-image-lines span {
    display: block;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.24), rgba(255,255,255,0.08));
    background-size: 220% 100%;
    animation: shimmer 2.8s infinite;
}

.dream-image-lines span:nth-child(1) {
    width: 72%;
}

.dream-image-lines span:nth-child(2) {
    width: 54%;
}

.dream-image-lines span:nth-child(3) {
    width: 64%;
}

.dream-image-overlay {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    padding: 44px 22px 20px;
    background: linear-gradient(180deg, rgba(7, 10, 22, 0), rgba(7, 10, 22, 0.76) 42%, rgba(7, 10, 22, 0.92));
    pointer-events: none;
}

.dream-image-status {
    position: relative;
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.58;
    font-size: 13px;
    max-width: 18em;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.dream-image-container.image-failed .dream-image-placeholder {
    background:
        radial-gradient(circle at 30% 20%, rgba(245, 158, 11, 0.18), transparent 32%),
        linear-gradient(160deg, #18162f, #0b0f23 72%);
}

.watermark {
    position: absolute;
    bottom: 18px;
    right: 18px;
    z-index: 3;
    background: rgba(4, 8, 20, 0.52);
    backdrop-filter: blur(8px);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: rgba(245, 158, 11, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.interpretation-section {
    grid-area: text;
    background: linear-gradient(180deg, rgba(12, 18, 36, 0.96), rgba(8, 12, 28, 0.98));
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 24px;
    min-height: 0;
    box-shadow: var(--shadow-panel);
}

.interpretation-section::before {
    content: '';
    display: block;
    width: 76px;
    height: 1px;
    margin-bottom: 18px;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.72), rgba(99, 102, 241, 0.12));
}

@media (min-width: 1024px) {
    .interpretation-section {
        min-height: 540px;
        padding: 24px;
    }
}

.section-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-heading {
    margin-bottom: 16px;
}

.eyebrow {
    color: var(--accent);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 600;
}

.dream-evidence {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.evidence-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-soft);
    color: rgba(226, 232, 240, 0.84);
    font-size: 12px;
    line-height: 1.4;
}

.free-interpretation {
    display: grid;
    gap: 14px;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 16px;
    max-width: 60ch;
}

.report-grid {
    display: grid;
    gap: 14px;
}

.dream-type-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin-bottom: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.2);
    color: white;
    font-size: 12px;
    letter-spacing: 0.04em;
}

.report-item {
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    background: var(--bg-panel-soft);
    border: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.report-label {
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.report-body {
    color: rgba(226, 232, 240, 0.78);
    font-size: 14px;
    line-height: 1.85;
}

.preview-block {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(245, 158, 11, 0.08));
    border: 1px dashed rgba(245, 158, 11, 0.36);
}

.preview-label {
    color: var(--accent);
    font-size: 12px;
    margin-bottom: 10px;
}

.preview-text {
    font-size: 14px;
    line-height: 1.8;
}

.blur-text {
    filter: blur(3px);
    user-select: none;
    opacity: 0.7;
}

.lock-hint {
    margin-top: 18px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(99, 102, 241, 0.08));
    border-radius: 16px;
    border: 1px dashed rgba(245, 158, 11, 0.36);
}

.lock-hint p {
    color: var(--accent);
    font-size: 14px;
    margin-bottom: 0;
}

.note-card {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.note-card--accent {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(99, 102, 241, 0.08));
}

.interpretation-notes {
    display: grid;
    gap: 12px;
}

.interpretation-note {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-panel-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.8;
}

.full-report {
    display: grid;
    gap: 16px;
}

.full-report-section {
    padding: 18px 18px 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.full-report-section h4 {
    font-size: 16px;
    margin-bottom: 12px;
}

.full-report-section p {
    color: rgba(226, 232, 240, 0.8);
    font-size: 14px;
    line-height: 1.85;
    margin-bottom: 12px;
}

.full-report-section p:last-child {
    margin-bottom: 0;
}

.tone-primary h4 {
    color: var(--primary-light);
}

.tone-accent h4 {
    color: var(--accent);
}

.tone-success h4 {
    color: var(--success);
}

.pay-benefits,
.support-points {
    list-style: none;
    display: grid;
    gap: 8px;
}

.support-points li {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.pay-section {
    background:
        radial-gradient(circle at 10% 10%, rgba(139, 92, 246, 0.12), transparent 28%),
        linear-gradient(145deg, rgba(76, 89, 163, 0.12), rgba(95, 76, 153, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.22);
    border-radius: var(--radius-lg);
    padding: 22px 22px 20px;
    text-align: left;
    box-shadow: var(--shadow-soft);
}

.pay-title {
    font-size: 22px;
    line-height: 1.28;
    font-weight: bold;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pay-copy {
    max-width: 34rem;
    margin: 0 0 10px;
    color: var(--text-soft);
    line-height: 1.72;
    font-size: 14px;
}

.pay-copy + .pay-copy {
    margin-top: -2px;
}

.pay-benefits {
    text-align: left;
    max-width: 400px;
    margin: 2px 0 14px;
}

.pay-benefits li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    color: var(--text);
}

.pay-benefits li::before {
    content: '✓';
    color: #10b981;
    font-weight: bold;
}

.btn-pay {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    background: linear-gradient(135deg, var(--accent), #f97316);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.34);
}

.btn-pay:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.38);
}

.wallpaper-section {
    background: linear-gradient(180deg, rgba(12, 18, 36, 0.96), rgba(8, 12, 28, 0.98));
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-soft);
}

.wallpaper-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-wallpaper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    border-radius: 16px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 156px;
}

.btn-wallpaper:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.wallpaper-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 20px;
}

.wallpaper-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.wallpaper-size {
    font-size: 12px;
    opacity: 0.8;
}

.wallpaper-name {
    font-size: 15px;
    font-weight: 600;
}

.share-section {
    text-align: center;
    padding: 20px;
    background: linear-gradient(180deg, rgba(12, 18, 36, 0.96), rgba(8, 12, 28, 0.98));
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.share-title {
    max-width: 18em;
    margin: 0 auto 12px;
    font-size: 14px;
    color: rgba(226, 232, 240, 0.76);
    line-height: 1.5;
}

.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-soft);
    border-radius: 50px;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-share:hover {
    background: rgba(255, 255, 255, 0.2);
}

.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.88);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.share-modal.active {
    display: flex;
}

.share-content {
    max-width: 520px;
    width: 100%;
    text-align: center;
}

.modal-panel__content {
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-panel);
}

.share-preview {
    background:
        linear-gradient(180deg, rgba(14, 20, 38, 0.98), rgba(8, 12, 24, 1));
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.share-preview img {
    width: 100%;
}

.share-caption {
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.94));
    color: rgba(248, 250, 252, 0.92);
    font-size: 14px;
    line-height: 1.55;
}

.share-platforms {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.share-help {
    color: rgba(226, 232, 240, 0.68);
    font-size: 11px;
    line-height: 1.5;
}

.platform-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-soft);
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.platform-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
}

.platform-btn .ui-icon {
    width: 20px;
    height: 20px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
}

.support-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.support-modal.active {
    display: flex;
}

.prompt-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.prompt-modal.active {
    display: flex;
}

.prompt-content {
    width: min(460px, 100%);
    padding: 26px 22px 20px;
    background:
        radial-gradient(circle at 16% 0%, rgba(99, 102, 241, 0.12), transparent 30%),
        linear-gradient(180deg, rgba(16, 24, 45, 0.98), rgba(8, 10, 24, 0.99));
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    text-align: left;
    position: relative;
    box-shadow:
        0 24px 80px rgba(2, 6, 23, 0.46),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.prompt-title {
    color: white;
    font-size: 22px;
    line-height: 1.28;
    margin-bottom: 10px;
}

.prompt-copy {
    color: rgba(226, 232, 240, 0.78);
    line-height: 1.78;
    font-size: 14px;
    margin: 0 0 18px;
}

.prompt-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.prompt-continue {
    width: auto;
    max-width: none;
    margin: 0;
    padding-inline: 18px;
}

.support-content {
    width: min(500px, 100%);
    padding: 28px 24px 22px;
    background:
        radial-gradient(circle at 20% 0%, rgba(139, 92, 246, 0.1), transparent 30%),
        linear-gradient(180deg, rgba(16, 24, 45, 0.98), rgba(8, 10, 24, 0.99));
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    text-align: left;
    position: relative;
    box-shadow:
        0 24px 80px rgba(2, 6, 23, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.support-title {
    color: white;
    font-size: 24px;
    margin-bottom: 10px;
}

.support-copy {
    color: rgba(226, 232, 240, 0.78);
    line-height: 1.68;
    font-size: 14px;
    max-width: 29em;
    margin: 0 0 16px;
}

.support-qr-wrap {
    margin: 0 0 14px;
    width: min(320px, 100%);
    min-height: 0;
    padding: 14px 14px 16px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 12px 30px rgba(2, 6, 23, 0.24);
}

.support-qr-label {
    align-self: stretch;
    margin: 0;
    color: rgba(226, 232, 240, 0.72);
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.support-qr {
    width: 100%;
    max-width: 236px;
    border-radius: 18px;
    background: white;
    padding: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.26);
}

.support-qr-fallback p {
    color: rgba(226, 232, 240, 0.74);
    font-size: 13px;
    line-height: 1.7;
}

.support-actions {
    display: grid;
    gap: 12px;
}

/* ============ 加载动画 ============ */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 26, 0.98);
    z-index: 500;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-overlay.active {
    display: flex;
}

/* 星座连线动画容器 */
.constellation-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 30px;
}

.constellation-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
}

.loading-spinner::before,
.loading-spinner::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.loading-spinner::before {
    background: var(--primary);
    animation-delay: 0s;
}

.loading-spinner::after {
    background: var(--accent);
    animation-delay: 1s;
}

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

/* 加载进度条 */
.loading-progress {
    width: 200px;
    height: 4px;
    background: var(--glass);
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

/* 加载提示文字 */
.loading-tips {
    margin-top: 30px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.loading-tips span {
    display: block;
    animation: tipsCycle 4s ease-in-out infinite;
}

@keyframes tipsCycle {
    0%, 20% { opacity: 1; transform: translateY(0); }
    25%, 95% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* 粒子散开动画 */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text);
    font-size: 16px;
    margin-top: 20px;
    animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-soft);
    border-radius: 50px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 18px;
    transition: all 0.3s ease;
}

.btn-back:hover {
    border-color: var(--primary);
    color: var(--text);
}

.footer {
    text-align: center;
    padding: 28px 0 18px;
    color: var(--text-muted);
    font-size: 13px;
}

.footer-meta {
    display: grid;
    gap: 8px;
    max-width: 46rem;
    margin: 16px auto 0;
    color: rgba(226, 232, 240, 0.62);
    line-height: 1.7;
}

.footer-meta p {
    margin: 0;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
}

.hidden {
    display: none !important;
}

@media (max-width: 767px) {
    .container {
        padding: 12px 14px 20px;
    }

    .header {
        margin-bottom: 14px;
    }

    .logo {
        font-size: 34px;
    }

    .logo-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 10px;
    }

    .tagline {
        font-size: 14px;
        letter-spacing: 2px;
    }

    .page-shell {
        gap: 14px;
    }

    .intro-text,
    .input-panel,
    .interpretation-section,
    .pay-section,
    .wallpaper-section,
    .share-section {
        padding: 14px;
    }

    .intro-text {
        margin-bottom: 14px;
        padding: 16px 16px 14px;
    }

    .interpretation-section,
    .dream-image-container,
    .dream-image-shell {
        min-height: unset;
    }

    .dream-image-shell {
        aspect-ratio: auto;
        min-height: 220px;
        height: clamp(220px, 52vw, 300px);
    }

    .hero-panel__title {
        gap: 2px;
    }

    .hero-panel__title-line {
        font-size: 20px;
        line-height: 1.16;
    }

    .hero-panel__title-line--sub {
        font-size: 22px;
        line-height: 1.18;
    }

    .hero-panel__body {
        gap: 10px;
    }

    .hero-panel__divider {
        width: 68px;
    }

    .hero-panel__lead {
        font-size: 13px;
        line-height: 1.6;
        max-width: 100%;
    }

    .hero-panel__subcopy {
        font-size: 12px;
        line-height: 1.58;
        max-width: 100%;
    }

    .hero-panel__glow {
        width: 220px;
        height: 180px;
        inset: -4% auto auto -10%;
    }

    .dream-input {
        min-height: 108px;
        padding: 14px 15px;
        font-size: 15px;
        line-height: 1.58;
    }

    .input-hint {
        font-size: 12px;
        margin-top: 6px;
    }

    .pay-title,
    .support-title {
        font-size: 18px;
    }

    .btn-pay {
        width: 100%;
        padding-inline: 20px;
        font-size: 16px;
    }

    .dream-evidence {
        gap: 8px;
    }

    .evidence-pill,
    .dream-type-chip {
        width: 100%;
        justify-content: center;
    }

    .share-platforms {
        gap: 10px;
        flex-wrap: wrap;
    }

    .history-panel,
    .history-glance {
        padding: 12px;
    }

    .result-container > .pay-section::before,
    .result-container > .wallpaper-section::before,
    .result-container > .share-section::before,
    .result-container > .history-panel::before {
        left: 16px;
        right: 16px;
    }

    .history-panel__header,
    .history-panel__header--compact {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 12px;
    }

    .history-title {
        font-size: 13px;
    }

    .history-summary,
    .history-note {
        margin-top: 4px;
        font-size: 10px;
    }

    .history-item {
        padding: 11px;
    }

    .history-summary-text {
        font-size: 11px;
        line-height: 1.5;
    }

    .history-chips {
        gap: 6px;
    }

    .history-chip {
        min-height: 26px;
        padding: 5px 9px;
        font-size: 11px;
    }

    .platform-btn {
        width: 46px;
        height: 46px;
    }

    .section-title {
        font-size: 18px;
    }

    .dream-image-overlay {
        padding: 34px 16px 16px;
    }

    .dream-image-status {
        max-width: 14em;
        font-size: 13px;
    }

    .support-content {
        padding: 22px 18px 18px;
        text-align: left;
    }

    .support-copy {
        margin-inline: 0;
    }

    .support-qr-wrap {
        margin-inline: 0;
        width: min(290px, 100%);
    }

    .prompt-content {
        padding: 22px 18px 18px;
    }

    .prompt-title {
        font-size: 20px;
    }

    .prompt-copy {
        font-size: 13px;
        line-height: 1.7;
        margin-bottom: 16px;
    }

    .prompt-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .prompt-continue {
        width: 100%;
    }
}
