/*
 * ┌──────────────────────────────────────────────┐
 * │ 菏泽明浩心理咨询服务有限公司 - 原创样式文件 │
 * │ © 2026 版权所有，未经许可禁止商业使用       │
 * │ 网站：https://www.love884.com                │
 * │ 备案号：鲁ICP备2022041703号                  │
 * └──────────────────────────────────────────────┘
 */
 * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a25;
    --accent-purple: #a855f7;
    --accent-neon: #d946ef;
    --accent-cyan: #06b6d4;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #2d2d3a;
    --shadow-glow: 0 0 30px rgba(168, 85, 247, 0.3);
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #0f0a1a 50%, var(--bg-primary) 100%);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(217, 70, 239, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

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

.page {
    display: none;
    flex: 1;
    flex-direction: column;
    animation: fadeIn 0.4s ease-out;
}

.page.active {
    display: flex;
}

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

.home-page {
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
}

.logo-icon {
    width: 100px;
    height: 100px;
    margin-bottom: 30px;
    position: relative;
}

.logo-icon::before {
    content: '🌙';
    font-size: 80px;
    filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.6));
}

.main-title {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-neon) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-weight: 400;
}

.intro-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    text-align: left;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.intro-card h3 {
    font-size: 16px;
    color: var(--accent-purple);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.intro-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.dimensions-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.dim-tag {
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-purple);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.btn-primary {
    width: 100%;
    max-width: 280px;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-neon) 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
    position: relative;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(168, 85, 247, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

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

.btn-primary:hover::after {
    left: 100%;
}

.quiz-page {
    padding: 0;
}

.quiz-header {
    padding: 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

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

.progress-text span {
    color: var(--accent-purple);
    font-weight: 600;
}

.skip-info {
    font-size: 12px;
    color: var(--text-muted);
}

.progress-bar {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-neon));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.quiz-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px 20px;
}

.question-number {
    font-size: 14px;
    color: var(--accent-purple);
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}

.question-text {
    font-size: 20px;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-primary);
    font-weight: 500;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 320px;
    margin: 0 auto;
    width: 100%;
}

.option-btn {
    padding: 16px 20px;
    font-size: 16px;
    text-align: center;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.option-btn:hover {
    border-color: var(--accent-purple);
    color: var(--text-primary);
    background: rgba(168, 85, 247, 0.1);
}

.option-btn.selected {
    border-color: var(--accent-purple);
    background: rgba(168, 85, 247, 0.2);
    color: var(--text-primary);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

.option-score {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.option-btn.selected .option-score {
    background: var(--accent-purple);
    color: white;
}

.quiz-footer {
    padding: 16px 20px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.btn-secondary {
    flex: 1;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--accent-purple);
    color: var(--text-primary);
}

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

.btn-skip {
    padding: 14px 16px;
    font-size: 14px;
    background: transparent;
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-skip:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.result-page {
    padding: 20px 0;
}

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

.result-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-neon) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.score-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.total-score {
    font-size: 56px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-neon) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}

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

.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    position: relative;
}

.chart-wrapper {
    position: relative;
    height: 320px;
}

.dimensions-list {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.dimensions-list h3 {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dimension-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.dimension-item:last-child {
    border-bottom: none;
}

.dim-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    margin-right: 12px;
    flex-shrink: 0;
}

.dim-rank.top {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-neon));
    color: white;
}

.dim-info {
    flex: 1;
}

.dim-name {
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.dim-bar-container {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.dim-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.dim-score {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-purple);
    margin-left: 12px;
    min-width: 45px;
    text-align: right;
}

.interpretation-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.interpretation-card h3 {
    font-size: 16px;
    color: var(--accent-cyan);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.interpretation-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.result-footer {
    padding: 0 20px 20px;
    display: flex;
    justify-content: center;
}

.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid var(--accent-purple);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (min-width: 501px) {
    body {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        padding: 20px;
        height: auto;
        min-height: 100vh;
    }
    
    .container {
        min-height: auto;
        height: auto;
        max-height: none;
        border-radius: 20px;
        box-shadow: 0 0 60px rgba(168, 85, 247, 0.2);
        overflow: visible;
    }

    .quiz-page {
        max-height: none;
    }

    .quiz-content {
        overflow-y: auto;
        max-height: calc(100vh - 200px);
        padding: 30px 20px;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}