/* 时间认知评估 - 样式文件 */

/* ========== 基础变量 ========== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #06b6d4;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #ec4899 50%, #06b6d4 100%);
    --gradient-2: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --radius: 16px;
    --radius-sm: 8px;
}

/* ========== 重置样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* ========== 容器布局 ========== */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
}

.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 欢迎页面 ========== */
.hero {
    text-align: center;
    padding: 60px 0;
}

.title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
}

/* 概念卡片 */
.concept-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 48px;
}

.concept-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.concept-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.concept-card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.concept-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ========== 按钮样式 ========== */
.btn-primary {
    background: var(--gradient-2);
    color: white;
    border: none;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--bg-hover);
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-hover);
}

.btn-secondary:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(4px);
}

/* ========== 问卷页面 ========== */
.quiz-header {
    margin-bottom: 40px;
}

.progress-bar {
    height: 6px;
    background: var(--bg-card);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-2);
    width: 0%;
    transition: width 0.5s ease;
}

.question-counter {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.quiz-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 40px;
    margin-bottom: 32px;
    min-height: 400px;
}

.question-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 32px;
    line-height: 1.4;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.option {
    background: var(--bg-dark);
    border: 2px solid var(--bg-hover);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}

.option:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.option.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.2);
}

.option-marker {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.option.selected .option-marker {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.option-text {
    font-size: 1rem;
    color: var(--text-primary);
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

/* ========== 结果页面 ========== */
.result-header {
    text-align: center;
    margin-bottom: 40px;
}

.result-header h1 {
    font-size: 2.5rem;
}

.result-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 40px;
    margin-bottom: 32px;
}

.chart-container {
    max-width: 400px;
    margin: 0 auto 32px;
}

.scores-display {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.score-item {
    text-align: center;
    padding: 20px;
    background: var(--bg-dark);
    border-radius: var(--radius-sm);
}

.score-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.score-value {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.analysis-container {
    border-top: 1px solid var(--bg-hover);
    padding-top: 32px;
}

.analysis-container h3 {
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.analysis-content {
    background: var(--bg-dark);
    border-radius: var(--radius-sm);
    padding: 24px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.analysis-content p {
    margin-bottom: 16px;
}

.analysis-content p:last-child {
    margin-bottom: 0;
}

/* 加载动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-hover);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== 响应式设计 ========== */
@media (max-width: 640px) {
    .title {
        font-size: 2rem;
    }

    .concept-cards {
        grid-template-columns: 1fr;
    }

    .quiz-content {
        padding: 24px;
    }

    .question-text {
        font-size: 1.25rem;
    }

    .scores-display {
        grid-template-columns: 1fr;
    }

    .quiz-nav {
        flex-direction: column;
    }

    .btn-secondary,
    .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

/* ========== 姓名输入页面 ========== */
.name-input {
    width: 100%;
    max-width: 400px;
    padding: 16px 24px;
    font-size: 1.1rem;
    background: var(--bg-card);
    border: 2px solid var(--bg-hover);
    border-radius: var(--radius);
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
    text-align: center;
}

.name-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.name-input::placeholder {
    color: var(--text-secondary);
}

/* ========== 分析报告格式化样式 ========== */
.analysis-content h3,
.analysis-content h4 {
    color: var(--primary);
    margin: 1.5rem 0 0.75rem 0;
    font-weight: 600;
}

.analysis-content h3 {
    font-size: 1.25rem;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
}

.analysis-content h4 {
    font-size: 1.1rem;
}

.analysis-content .section-title {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 1.2rem;
    margin-top: 1.5rem;
}

.analysis-content ul {
    list-style: none;
    padding-left: 0;
    margin: 0.5rem 0;
}

.analysis-content li {
    padding: 0.5rem 0 0.5rem 1.5rem;
    position: relative;
    line-height: 1.6;
}

.analysis-content li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.analysis-content p {
    margin: 0.75rem 0;
    line-height: 1.8;
}

.analysis-content strong {
    color: white;
    font-weight: 600;
}