/* 全局样式 - 极简主义风格 (基于UI/UX Pro Max设计系统) */
:root {
    /* 主色调 - 中性专业配色 */
    --color-primary: #18181B;
    --color-secondary: #3F3F46;
    --color-accent: #D97706;
    --color-background: #FAFAFA;
    --color-foreground: #09090B;
    
    /* 文本颜色 */
    --text-primary: #09090B;
    --text-secondary: #52525B;
    --text-muted: #71717A;
    
    /* 背景色 */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F4F4F5;
    --bg-tertiary: #E4E4E7;
    
    /* 卡片背景 */
    --card-bg: #FFFFFF;
    --card-border: #E4E4E7;
    
    /* 阴影 - 极简 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.08);
    
    /* 圆角 - 减少圆角 */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    
    /* 过渡 */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--color-background);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    touch-action: pan-y;
    -webkit-text-size-adjust: 100%;
}

/* 进度条 - 极简风格 */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--bg-tertiary);
    z-index: 1000;
}

.progress-bar {
    height: 100%;
    background: var(--color-primary);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    position: fixed;
    top: 24px;
    right: 24px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
    z-index: 1001;
    font-variant-numeric: tabular-nums;
}

/* 屏幕容器 - 移动端优化 */
.screen {
    display: none;
    min-height: 100vh;
    padding: 60px 16px 24px;
    animation: fadeIn 0.6s ease-out;
}

.screen.active {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
}

/* 欢迎页面 - 移动端优化 */
.welcome-content {
    text-align: center;
    max-width: 560px;
    width: 100%;
    animation: fadeIn 0.5s ease-out;
    padding: 0 16px;
}

.welcome-icon {
    font-size: 48px;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.welcome-title {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.welcome-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-weight: 400;
}

.welcome-description {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 24px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 32px;
    text-align: left;
}

.welcome-description p {
    margin: 10px 0;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 15px;
}

.welcome-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 48px;
    gap: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    flex: 1;
    transition: var(--transition);
}

.stat-item:hover {
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* 按钮样式 - 移动端优化 */
.btn-primary {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
    min-height: 48px;
    touch-action: manipulation;
}

.btn-primary:hover {
    background: var(--color-secondary);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* 问题卡片 - 移动端优化 */
.question-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    margin: 0 auto;
    width: 100%;
    max-width: 680px;
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.4s ease-out;
}

.question-number {
    display: inline-block;
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
    border: 1px solid var(--card-border);
}

.question-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    border: 1px solid var(--card-border);
}

.question-text {
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.question-description {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--color-primary);
}

/* 选项样式 - 移动端优化 */
.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option {
    background: var(--bg-secondary);
    border: 2px solid var(--card-border);
    padding: 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.option:hover {
    border-color: var(--color-primary);
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
}

.option.selected {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.option-icon {
    font-size: 14px;
    flex-shrink: 0;
    line-height: 1;
    font-weight: 700;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: var(--transition);
}

.option:hover .option-icon {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.option.selected .option-icon {
    background: white;
    border-color: white;
    color: var(--color-primary);
}

.option-content {
    flex: 1;
}

.option-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.option.selected .option-title {
    color: white;
}

.option-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.option.selected .option-subtitle {
    color: rgba(255, 255, 255, 0.85);
}

/* 导航按钮 - 移动端优化，固定在底部 */
.question-nav {
    display: flex;
    gap: 12px;
    justify-content: center;
    width: 100%;
    max-width: 680px;
    margin: 24px auto 0;
    padding: 0 16px;
}

.btn-nav {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    min-height: 48px;
    touch-action: manipulation;
}

.btn-nav:hover:not(:disabled) {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.btn-nav:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 结果页面 - 移动端优化 */
.result-content {
    text-align: center;
    max-width: 680px;
    width: 100%;
    animation: fadeIn 0.5s ease-out;
    padding: 0 16px;
}

.result-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.result-title {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.result-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 28px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    text-align: left;
}

.result-type {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.result-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 24px;
    white-space: pre-line;
}

.result-advice {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--radius-sm);
    margin: 24px 0;
    border-left: 3px solid var(--color-accent);
}

.result-advice strong {
    color: var(--text-primary);
    font-size: 15px;
    display: block;
    margin-bottom: 8px;
}

.result-advice p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.result-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.trait-tag {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--card-border);
    transition: var(--transition);
}

.trait-tag:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.share-section {
    margin-top: 32px;
    width: 100%;
}

.share-text {
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 14px;
}

.share-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-share, .btn-secondary {
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: 'Inter', sans-serif;
    min-height: 48px;
    touch-action: manipulation;
}

.btn-share {
    background: var(--color-accent);
    color: white;
    box-shadow: var(--shadow-sm);
    flex: 1;
}

.btn-share:hover {
    background: #B45309;
    box-shadow: var(--shadow-md);
}

.btn-share:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--card-border);
    flex: 1;
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--color-primary);
}

.btn-secondary:active {
    transform: scale(0.98);
}

/* 动画 - 简化 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 - 移动端优先 */
@media (max-width: 768px) {
    .screen {
        padding: 60px 12px 20px;
    }
    
    .welcome-title {
        font-size: 28px;
    }
    
    .welcome-subtitle {
        font-size: 16px;
    }
    
    .welcome-description {
        padding: 20px;
    }
    
    .question-card {
        padding: 20px 16px;
    }
    
    .question-text {
        font-size: 18px;
    }
    
    .question-image {
        height: 180px;
    }
    
    .option {
        padding: 14px;
    }
    
    .option-title {
        font-size: 14px;
    }
    
    .option-subtitle {
        font-size: 12px;
    }
    
    .welcome-stats {
        flex-direction: column;
        gap: 12px;
    }
    
    .stat-item {
        flex-direction: row;
        justify-content: center;
        gap: 12px;
        padding: 16px;
    }
    
    .share-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-share, .btn-secondary {
        width: 100%;
    }
    
    .result-card {
        padding: 24px 20px;
    }
    
    .question-nav {
        padding: 0 12px;
        gap: 10px;
    }
    
    .btn-nav {
        font-size: 14px;
        padding: 12px 16px;
    }
}

/* 小屏手机优化 */
@media (max-width: 375px) {
    .screen {
        padding: 60px 10px 16px;
    }
    
    .question-card {
        padding: 16px 12px;
    }
    
    .question-text {
        font-size: 17px;
    }
    
    .question-image {
        height: 160px;
    }
    
    .option {
        padding: 12px;
        gap: 10px;
    }
    
    .option-icon {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .welcome-title {
        font-size: 24px;
    }
    
    .btn-primary {
        padding: 12px 28px;
        font-size: 16px;
    }
}

/* 平板和桌面端 */
@media (min-width: 769px) {
    .screen {
        padding: 80px 24px 40px;
    }
    
    .question-card {
        padding: 32px 28px;
    }
    
    .question-image {
        height: 240px;
    }
    
    .option {
        padding: 18px 20px;
    }
    
    .option:hover {
        transform: translateX(4px);
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
