/* JobAI - 极简现代版 (Minimalism) */
/* Inspired by Swiss Style & Apple Minimalist Design */

:root {
    /* Base Colors - Dark Theme (Default) */
    --black: #0a0a0a;
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-400: #a3a3a3;
    --gray-600: #71717a;
    --gray-800: #27272a;
    --accent: #ff3d00;
    /* Vibrant Orange-Red */

    /* Semantic Colors (Dark) */
    --bg-app: var(--black);
    --text-main: var(--gray-100);
    --text-secondary: var(--gray-400);
    --border: var(--gray-800);
    --bg-input: var(--gray-800);
    --bg-surface: var(--gray-800);
    --bg-surface-hover: #3f3f46;
    --primary: var(--white);

    /* Fonts */
    --font-display: 'Playfair Display', serif;
    --font-body: 'DM Sans', sans-serif;

    /* Transitions */
    --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

[data-theme="light"] {
    /* Semantic Colors (Light) */
    --bg-app: var(--gray-50);
    --text-main: var(--black);
    --text-secondary: var(--gray-600);
    --border: var(--gray-200);
    --bg-input: var(--white);
    --bg-surface: var(--white);
    --bg-surface-hover: var(--gray-100);
    --primary: var(--black);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    height: 100%;
    font-family: var(--font-body);
    background-color: var(--bg-app);
    color: var(--text-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    transition: background-color 0.4s var(--ease-standard), color 0.4s var(--ease-standard);
}

/* 极简网格背景 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 480px;
    /* Mobile Default */
    margin: 0 auto;
    min-height: 100vh;
    padding: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.site-footer {
    margin-top: auto;
    padding-top: 24px;
    text-align: center;
    color: var(--text-secondary);
}

.site-footer-author {
    font-size: 12px;
    margin-bottom: 6px;
}

.site-footer-link {
    display: inline-block;
    font-size: 12px;
    color: var(--text-main);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.site-footer-link:hover {
    border-bottom-color: var(--text-main);
}

.site-footer .footer-socials {
    display: none;
}

#page-home.active~.site-footer .footer-socials {
    display: inline-flex;
}

.footer-socials {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    vertical-align: middle;
}

.footer-social-link {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 999px;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
    background: transparent;
}

.footer-social-link svg {
    width: 14px;
    height: 14px;
    display: block;
}

.footer-social-link[aria-label="微信"] svg,
.footer-social-link[aria-label="小红书"] svg {
    width: 15px;
    height: 15px;
}

.footer-social-link:hover {
    color: var(--text-main);
    border-color: var(--text-main);
    transform: translateY(-1px);
    background: color-mix(in srgb, var(--text-main) 6%, transparent);
}

@media (min-width: 1024px) {
    .app-container {
        max-width: 800px;
        /* PC Adaptation */
        padding: 40px;
    }

    .hero-title {
        font-size: 72px;
    }
}

/* Decorations */
.home-decoration {
    position: fixed;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-display);
    font-size: clamp(150px, 40vw, 300px);
    font-weight: 900;
    color: var(--text-main);
    opacity: 0.03;
    pointer-events: none;
    z-index: -1;
}

/* Page Transitions */
.page {
    display: none;
    flex: 1;
    flex-direction: column;
    animation: fadeIn 0.4s var(--ease-out) forwards;
}

.page.active {
    display: flex;
}

/* Prevent tap/click-through during page switch animations on mobile. */
.page.page-enter-guard {
    pointer-events: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Theme Toggle */
.theme-toggle {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    z-index: 1000;
    transition: all 0.2s ease;
}

@media (max-width: 480px) {
    .theme-toggle {
        top: 16px;
        right: 16px;
    }
}

.theme-toggle:hover {
    transform: scale(1.05);
    border-color: var(--text-main);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    position: absolute;
    transition: opacity 0.3s, transform 0.3s;
}

[data-theme="dark"] .icon-sun {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

[data-theme="dark"] .icon-moon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="light"] .icon-sun {
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="light"] .icon-moon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

/* ========== HOME PAGE ========== */
.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    align-self: flex-start;
    background: transparent;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.hero-title {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -2px;
}

.gradient-text {
    /* Override gradient with solid highlight style */
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: var(--text-main);
    position: relative;
    display: inline-block;
}

.gradient-text::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 100%;
    height: 12px;
    background: var(--accent);
    z-index: -1;
    transform: skewX(-5deg);
    opacity: 0.8;
}

.gradient-text {
    display: inline-block;
    animation: textFocus 2s var(--ease-standard) infinite alternate;
}

@keyframes textFocus {
    0% {
        filter: blur(10px);
        opacity: 0.3;
        transform: scale(0.9) translateY(5px);
    }

    100% {
        filter: blur(0);
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 48px;
    line-height: 1.6;
    max-width: none;
    text-align: left;
}

.hero .btn-primary {
    margin-top: 20px;
}

.author-note {
    margin-top: 20px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(127, 127, 127, 0.06);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.author-note-title {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.author-note-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-main);
}

.hero-illustration {
    display: none;
    /* Removed for minimalist design */
}

.btn-primary {
    width: 100%;
    padding: 20px 32px;
    background: var(--primary);
    color: var(--bg-app);
    font-size: 16px;
    font-weight: 700;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-transform: none;
    letter-spacing: 0;
    position: relative;
    overflow: hidden;
    line-height: 1;
    animation: pulseBtn 3s infinite;
}

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

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

    30% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes pulseBtn {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 61, 0, 0.4);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(255, 61, 0, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 61, 0, 0);
    }
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    background: var(--accent);
    color: white;
}

.btn-primary::after {
    content: '→';
    transition: transform 0.3s ease;
}

.btn-primary:hover::after {
    transform: translateX(4px);
}

.hero-note {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 24px;
}

.features {
    display: none;
    /* Removed for minimalist design */
}

/* ========== QUIZ PAGE ========== */
.quiz-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
    padding-top: 60px;
    /* Space for theme toggle */
}

@media (min-width: 1024px) {
    .quiz-header {
        padding-top: 20px;
    }
}

.btn-back {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
}

.btn-back:hover {
    background: var(--primary);
    color: var(--bg-app);
}

.progress-bar {
    flex: 1;
    height: 2px;
    background: var(--border);
    position: relative;
    border-radius: 0;
    box-shadow: none;
}

.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--text-main);
    width: 0%;
    transition: width 0.4s var(--ease-standard);
    box-shadow: none;
}

.progress-fill::after {
    display: none;
}

.progress-text {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 40px;
    text-align: right;
}

.question {
    display: none;
}

.question.active {
    display: block;
    animation: slideUp 0.4s var(--ease-out);
}

.question::before {
    content: "0" attr(data-step);
    display: block;
    font-family: var(--font-display);
    font-size: 80px;
    font-weight: 700;
    color: var(--border);
    line-height: 1;
    margin-bottom: 8px;
}

.question-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.2;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: var(--text-main);
}

.question-hint {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.question-subtitle {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-main);
    margin: 4px 0 10px;
}

.input-text,
.input-textarea {
    width: 100%;
    padding: 20px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-main);
    font-size: 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.input-text:focus,
.input-textarea:focus {
    outline: none;
    border-color: var(--text-main);
    box-shadow: none;
}

.quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.quick-tags-inline {
    margin-top: 12px;
    margin-bottom: 6px;
}

.tag {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 100px;
}

.tag.active {
    background: var(--primary);
    color: var(--bg-app);
    border-color: var(--primary);
}

@media (hover: hover) and (pointer: fine) {
    .tag:hover {
        background: var(--primary);
        color: var(--bg-app);
        border-color: var(--primary);
    }
}

.tag-loading {
    cursor: default;
    color: var(--text-secondary);
    background: var(--bg-input);
}

.tag-loading:hover {
    background: var(--bg-input);
    color: var(--text-secondary);
    border-color: var(--border);
}

.assist-note {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
    border-radius: 4px;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 32px;
}

.checkbox-item input {
    display: none;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
    text-align: left;
    height: 100%;
}

.checkbox-label.has-subtext {
    align-items: flex-start;
}

.checkbox-label.has-subtext .checkbox-icon {
    margin-top: 2px;
}

.checkbox-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.checkbox-main {
    line-height: 1.3;
}

.checkbox-subtext {
    font-size: 12px;
    line-height: 1.35;
    opacity: 0.72;
}

@media (hover: hover) and (pointer: fine) {
    .checkbox-label:hover {
        border-color: var(--text-main);
    }
}

.checkbox-icon {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-secondary);
    border-radius: 2px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.checkbox-item input:checked+.checkbox-label {
    background: var(--primary);
    color: var(--bg-app);
    border-color: var(--primary);
}

.checkbox-item input:checked+.checkbox-label .checkbox-icon {
    background: var(--accent);
    border-color: var(--accent);
}

/* Slider */
.slider-container {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 40px;
}

.slider {
    width: 100%;
    height: 2px;
    background: var(--border);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin: 20px 0;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.slider-labels span {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: none;
}

#creativity-value,
#rule-value,
#emotion-value {
    color: var(--accent);
    font-weight: 700;
}

.quiz-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 40px;
    align-items: stretch;
}

.quiz-footer-actions {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.quiz-footer-actions .btn-primary {
    width: auto;
    flex: 2;
}

.btn-secondary {
    flex: 1;
    padding: 20px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.btn-secondary:hover {
    border-color: var(--text-main);
    color: var(--text-main);
    background: transparent;
}

/* ========== LOADING PAGE ========== */
.loading-content {
    max-width: 320px;
    margin: 0 auto;
    text-align: center;
}

.loading-icon {
    width: 120px;
    height: 120px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 40px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: none;
}

.ai-brain {
    display: none;
}

.loading-particles {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-title {
    font-family: var(--font-display);
    font-size: 24px;
    margin-bottom: 8px;
}

.loading-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.loading-progress {
    display: none;
}

/* ========== RESULT PAGE ========== */
.result-header {
    text-align: center;
    padding: 20px 0;
}

.result-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-secondary);
    font-family: var(--font-body);
}

.result-score-card {
    background: transparent;
    border: none;
    box-shadow: none;
    text-align: center;
    padding: 20px 0;
}

.score-circle {
    width: 180px;
    height: 180px;
    margin: 0 auto;
    position: relative;
}

.score-circle svg {
    display: none;
    /* Switch to modern display */
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: 100px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
}

.score-unit {
    font-size: 30px;
    color: var(--text-secondary);
}

.score-bar-minimal {
    width: 100%;
    height: 8px;
    background: var(--border);
    margin: 40px 0;
    position: relative;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 1.5s var(--ease-standard);
}

.risk-badge {
    display: inline-block;
    padding: 8px 24px;
    background: var(--text-main);
    color: var(--bg-app);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 24px;
    border-radius: 0;
}

.risk-badge.high {
    background: var(--accent);
    color: white;
}

.result-summary {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 320px;
    margin: 0 auto 40px;
    text-align: center;
}

.result-radar {
    margin-bottom: 40px;
}

.section-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    text-align: center;
}

.dimension-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
    justify-content: center;
}

.dimension-chip {
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s;
}

.dimension-chip.active {
    background: var(--text-main);
    color: var(--bg-app);
    border-color: var(--text-main);
}

.dimension-explanation {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    background: var(--bg-surface);
    padding: 16px;
    border-radius: 4px;
}

.result-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-card {
    background: var(--bg-surface);
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.detail-card h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.detail-card ul {
    list-style: none;
}

.detail-card li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.detail-card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.viral-copy-card {
    background: var(--bg-surface);
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-top: 16px;
}

.btn-copy {
    margin-top: 16px;
    width: auto;
    background: transparent;
    border: 1px solid var(--text-main);
    color: var(--text-main);
    padding: 8px 20px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
}

/* Transformation Section */
.transformation-section {
    margin-top: 40px;
}

.btn-transformation {
    width: 100%;
    padding: 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-standard);
    min-height: 72px;
}

.btn-transformation:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 61, 0, 0.3);
}

.btn-transformation .btn-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.btn-transformation .btn-title {
    font-size: 16px;
    font-weight: 700;
}

.btn-transformation .btn-subtitle {
    font-size: 12px;
    opacity: 0.9;
    font-weight: 400;
}

.btn-transformation .btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.btn-transformation .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.transformation-result {
    background: var(--bg-surface);
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-top: 24px;
}

.transformation-result h3 {
    font-family: var(--font-display);
    font-size: 24px;
    margin-bottom: 24px;
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.transformation-result h4 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin: 32px 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.transformation-result ul {
    list-style: none;
    margin-bottom: 24px;
}

.transformation-result li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-main);
}

.transformation-result li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.transformation-result .content-summary {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: 4px;
    color: var(--text-main);
}

.transformation-result p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-main);
}

/* Share Modal */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    /* Flex when active */
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.share-modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 40px 32px 32px;
    width: 100%;
    max-width: 480px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-height: 90vh;
    overflow-y: auto;
}

.btn-close-modal {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 32px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.btn-close-modal:hover {
    color: var(--text-main);
}

.share-title {
    font-size: 24px;
    font-family: var(--font-display);
    margin-bottom: 8px;
    text-align: center;
}

.share-hint {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    text-align: center;
}

.share-preview {
    width: 100%;
    padding: 16px;
    background: var(--bg-app);
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

#share-canvas,
#share-img {
    max-width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: default;
}

.share-actions {
    width: 100%;
    display: flex;
    gap: 12px;
}

.share-actions button {
    flex: 1;
}

/* Result Actions Alignment */
.result-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 40px;
}

.result-share-sticky {
    margin-top: 20px;
}

.result-share-sticky .btn-primary {
    width: 100%;
}

.sticky-footer-author {
    display: none;
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.4;
    padding-top: 2px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sticky-footer-author .site-footer-author {
    display: inline;
    margin: 0;
}

.sticky-footer-author .footer-socials {
    margin-left: 0;
}

.sticky-footer-author .footer-social-link {
    width: 24px;
    height: 24px;
}

.sticky-footer-author .footer-social-link svg {
    width: 13px;
    height: 13px;
}

#page-home .home-sticky-author {
    flex-wrap: nowrap;
    gap: 6px;
}

#page-home .home-sticky-author .site-footer-author,
#page-home .home-sticky-author .site-footer-link,
#page-home .home-sticky-author .footer-socials {
    white-space: nowrap;
    flex-shrink: 0;
}

#page-home .home-sticky-author .footer-socials {
    gap: 4px;
}

#page-home .home-sticky-author .footer-social-link {
    width: 22px;
    height: 22px;
}

#page-home .home-sticky-author .footer-social-link svg {
    width: 12px;
    height: 12px;
}

#page-home .home-sticky-author .footer-social-link[aria-label="微信"] svg,
#page-home .home-sticky-author .footer-social-link[aria-label="小红书"] svg {
    width: 13px;
    height: 13px;
}

/* Global Toast */
.global-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    text-align: center;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    max-width: 80%;
    font-family: var(--font-body);
}

.global-toast.show {
    opacity: 1;
    visibility: visible;
}

/* Shake Animation */
.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 48px;
    }

    .site-footer {
        display: none;
    }

    .theme-toggle {
        width: 44px;
        height: 44px;
        top: 24px;
        right: 24px;
        border-radius: 4px;
        font-size: 18px;
    }

    #page-quiz .quiz-header {
        position: relative;
        padding-top: 0;
        padding-right: 56px;
        margin-bottom: 20px;
    }

    #page-quiz .question::before {
        margin-bottom: 4px;
        font-size: 72px;
    }

    /* Mobile sticky action areas */
    #page-quiz .quiz-content {
        padding-bottom: 156px;
    }

    #page-quiz .quiz-footer {
        position: sticky;
        bottom: 0;
        z-index: 30;
        margin-top: 20px;
        padding: 12px 0 calc(18px + env(safe-area-inset-bottom, 0px));
        background: var(--bg-app);
        background:
            linear-gradient(to top,
                color-mix(in srgb, var(--bg-app) 96%, transparent),
                color-mix(in srgb, var(--bg-app) 80%, transparent) 65%,
                transparent);
        backdrop-filter: blur(10px);
    }

    #page-quiz .quiz-footer {
        gap: 8px;
    }

    .sticky-footer-author {
        display: flex;
    }

    #page-home .home-sticky-author {
        padding-top: 10px;
        padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
    }

    #page-result .result-share-sticky {
        position: sticky;
        bottom: 0;
        z-index: 30;
        margin-top: 20px;
        padding: 12px 0 calc(18px + env(safe-area-inset-bottom, 0px));
        background: var(--bg-app);
        background:
            linear-gradient(to top,
                color-mix(in srgb, var(--bg-app) 96%, transparent),
                color-mix(in srgb, var(--bg-app) 80%, transparent) 65%,
                transparent);
        backdrop-filter: blur(10px);
    }

    /* Home author note sticks to the bottom on mobile */
    #page-home .hero {
        justify-content: flex-start;
        min-height: calc(100vh - 120px);
        min-height: calc(100dvh - 120px);
    }

    #page-home .author-note {
        margin-top: auto;
        position: sticky;
        bottom: 0;
        z-index: 20;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        background: var(--bg-app);
        background:
            linear-gradient(to top,
                color-mix(in srgb, var(--bg-app) 94%, transparent),
                color-mix(in srgb, var(--bg-app) 78%, transparent) 70%,
                transparent);
        backdrop-filter: blur(8px);
    }

    #page-home .hero .btn-primary {
        margin-bottom: 28px;
    }
}
