:root {
    --primary-color: #5B6B7C;
    --primary-hover: #4A5A6B;
    --secondary-color: #F5F0EB;
    --secondary-hover: #E8E0D8;
    --text-color: #2D3436;
    --text-light: #636E72;
    --bg-color: #FAF8F5;
    --card-bg: #ffffff;
    --success-color: #10b981;
    --border-radius: 8px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-color);
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 粒子网络背景 */
#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* 背景装饰 - 移动端显示 */
.bg-decoration {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
}

.circle-1 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #5B6B7C, #7B8B9C);
    top: -30px;
    right: -30px;
    animation: float1 8s ease-in-out infinite;
}

.circle-2 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #8B7B6C, #A89888);
    bottom: 80px;
    left: -20px;
    animation: float2 10s ease-in-out infinite;
}

.circle-3 {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #6B8B7C, #8BA898);
    top: 50%;
    left: 60%;
    animation: float3 12s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-15px, 15px) scale(1.03); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(10px, -10px) scale(1.02); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-8px, 8px) scale(1.01); }
}

.container {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.page {
    display: none;
    width: 100%;
    animation: fadeIn 0.4s ease;
}

.page.active {
    display: block;
}

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

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 48px 40px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 32px;
}

.divider {
    width: 40px;
    height: 2px;
    background: var(--primary-color);
    margin: 32px auto;
    opacity: 0.4;
}

.description {
    color: var(--text-light);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.time-info {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 24px;
}

.btn {
    padding: 14px 36px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--secondary-hover);
}

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

/* 进度条 */
.progress-container {
    margin-bottom: 40px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--secondary-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 6.25%;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* 题目 */
.question-container {
    margin-bottom: 40px;
}

.question-text {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 24px;
    line-height: 1.5;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.option-btn {
    padding: 16px 20px;
    background: var(--card-bg);
    border: 1px solid var(--secondary-hover);
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    color: var(--text-color);
}

.option-btn:hover {
    border-color: var(--primary-color);
    background: var(--card-bg);
}

.option-btn.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.nav-buttons .btn {
    flex: 1;
}

/* 结果页 */
.result-card {
    padding: 56px 40px;
}

.result-label {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 12px;
}

.result-emoji {
    font-size: 4rem;
    margin-bottom: 16px;
    line-height: 1;
}

.result-code {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    letter-spacing: 4px;
}

.result-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.result-slogan {
    font-size: 1.1rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 12px;
    padding: 8px 16px;
    background: var(--secondary-color);
    border-radius: 6px;
    display: inline-block;
}

.result-description {
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.7;
}

.result-traits {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.trait-tag {
    padding: 6px 16px;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-size: 0.85rem;
}

.result-fun-facts {
    background: var(--secondary-color);
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 24px;
    text-align: left;
}

.result-fun-facts h3 {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 12px;
    text-align: center;
}

.result-fun-facts ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.result-fun-facts li {
    color: var(--text-light);
    font-size: 0.95rem;
    padding: 8px 0;
    border-bottom: 1px dashed var(--secondary-hover);
}

.result-fun-facts li:last-child {
    border-bottom: none;
}

.result-fun-facts li::before {
    content: "• ";
    color: var(--primary-color);
}

.result-careers {
    background: var(--secondary-color);
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.result-careers h3 {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 8px;
}

.result-careers p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* 底部提示 */
.footer {
    text-align: center;
    padding: 16px 20px;
    color: var(--text-light);
    font-size: 0.8rem;
    opacity: 0.7;
}

/* 响应式设计 - 平板 */
@media (max-width: 768px) {
    #bgCanvas {
        display: none;
    }

    .bg-decoration {
        display: block;
    }

    body {
        overflow: hidden;
        height: 100vh;
    }

    .container {
        padding: 16px;
        align-items: center;
        justify-content: center;
        padding-top: 40px;
        height: 100vh;
        overflow: hidden;
    }

    .card {
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }

    .card {
        padding: 32px 24px;
    }

    .title {
        font-size: 2.2rem;
    }

    .result-code {
        font-size: 3.5rem;
    }

    .question-text {
        font-size: 1.1rem;
    }
}

/* 响应式设计 - 手机 */
@media (max-width: 480px) {
    #bgCanvas {
        display: none;
    }

    .bg-decoration {
        display: block;
    }

    body {
        overflow: hidden;
        height: 100vh;
    }

    .container {
        padding: 12px;
        padding-top: 24px;
        align-items: center;
        justify-content: center;
        height: 100vh;
        overflow: hidden;
    }

    .card {
        max-height: calc(100vh - 48px);
        overflow-y: auto;
    }

    .card {
        padding: 24px 16px;
    }

    .title {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
        margin-bottom: 16px;
    }

    .description {
        font-size: 0.85rem;
    }

    .time-info {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .question-text {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .option-btn {
        padding: 14px 16px;
        font-size: 0.9rem;
    }

    .result-card {
        padding: 32px 16px;
    }

    .result-code {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }

    .result-name {
        font-size: 1.2rem;
    }

    .result-description {
        font-size: 0.9rem;
    }

    .trait-tag {
        padding: 5px 12px;
        font-size: 0.8rem;
    }

    .result-careers {
        padding: 16px;
    }

    .result-careers h3 {
        font-size: 0.9rem;
    }

    .result-careers p {
        font-size: 0.85rem;
    }

    .footer {
        font-size: 0.75rem;
        padding: 12px 16px;
    }
}

/* 小屏手机 */
@media (max-width: 360px) {
    .container {
        padding: 8px;
        padding-top: 16px;
        align-items: center;
        justify-content: center;
    }

    .card {
        max-height: calc(100vh - 32px);
    }

    .card {
        padding: 20px 12px;
    }

    .title {
        font-size: 1.5rem;
    }

    .result-code {
        font-size: 2rem;
    }

    .nav-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .nav-buttons .btn {
        width: 100%;
    }
}
