/* ===== 全局重置与基础 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a2236;
    --border: #2a3349;
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --accent-red: #ef4444;     /* 跌：股市红 */
    --accent-green: #10b981;   /* 涨：股市绿 */
    --accent-gold: #f59e0b;
    --accent-blue: #3b82f6;
    --gradient: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
                 "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(239, 68, 68, 0.06) 0%, transparent 50%);
}

.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
}

/* ===== 屏幕切换 ===== */
.screen {
    display: none;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

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

/* ===== 欢迎页 ===== */
.hero {
    text-align: center;
    padding: 60px 20px;
}

.logo {
    font-size: 42px;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    letter-spacing: 2px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.05;
}

.brand-name {
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.hero h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.dimensions-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 40px 0;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.dim-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 16px 8px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s, border-color 0.2s;
}

.dim-item:hover {
    transform: translateY(-3px);
    border-color: var(--accent-gold);
}

.dim-letter {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-gold);
}

.dim-item span:last-child {
    font-size: 13px;
    color: var(--text-secondary);
}

.hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 16px;
}

/* ===== 按钮 ===== */
.btn-primary {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 12px 30px;
    font-size: 15px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.btn-secondary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== 测试页 ===== */
.quiz-header {
    margin-bottom: 40px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-card);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient);
    width: 0%;
    transition: width 0.3s ease;
}

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

.quiz-body h2 {
    font-size: 24px;
    line-height: 1.5;
    margin-bottom: 32px;
    text-align: center;
    padding: 0 10px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 40px;
}

.option {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 20px 24px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
    color: var(--text-primary);
    text-align: left;
    line-height: 1.5;
}

.option:hover {
    border-color: var(--accent-gold);
    transform: translateX(4px);
    background: rgba(245, 158, 11, 0.05);
}

.option.selected {
    border-color: var(--accent-gold);
    background: rgba(245, 158, 11, 0.1);
}

.option-letter {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background: var(--bg-primary);
    border-radius: 50%;
    margin-right: 12px;
    font-weight: 700;
    color: var(--accent-gold);
}

.quiz-footer {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* ===== 结果页 ===== */
.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.result-badge {
    display: inline-block;
    background: var(--gradient);
    color: white;
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 4px;
    margin-bottom: 20px;
}

.result-card h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.result-tagline {
    font-size: 16px;
    color: var(--accent-gold);
    margin-bottom: 30px;
    font-style: italic;
}

.result-bars {
    margin: 30px 0;
    padding: 24px;
    background: var(--bg-primary);
    border-radius: 12px;
}

.bar-item {
    margin-bottom: 18px;
}

.bar-item:last-child {
    margin-bottom: 0;
}

.bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 6px;
}

.bar-labels .active {
    color: var(--accent-gold);
    font-weight: 700;
}

.bar-track {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    transition: width 0.8s ease;
}

.result-section {
    margin: 24px 0;
    text-align: left;
}

.result-section h3 {
    font-size: 17px;
    margin-bottom: 10px;
    color: var(--accent-gold);
}

.result-section p, .result-section ul {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.7;
}

.result-section ul {
    list-style: none;
    padding-left: 0;
}

.result-section li {
    padding: 6px 0 6px 20px;
    position: relative;
}

.result-section li::before {
    content: "•";
    position: absolute;
    left: 6px;
    color: var(--accent-gold);
    font-weight: 700;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 32px;
    flex-wrap: wrap;
}

/* ===== 移动端适配 ===== */
@media (max-width: 600px) {
    .container {
        padding: 20px 16px;
    }
    .logo { font-size: 48px; }
    .hero h1 { font-size: 26px; }
    .quiz-body h2 { font-size: 19px; }
    .result-card { padding: 28px 20px; }
    .result-card h1 { font-size: 24px; }
    .result-grid { grid-template-columns: 1fr; }
    .dimensions-preview {
        grid-template-columns: repeat(2, 1fr);
    }
    .option { padding: 16px 18px; font-size: 14px; }
}
