/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-color);
    background-image:
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==================== 头部样式 ==================== */
.hero {
    text-align: center;
    padding: 60px 20px 40px;
    animation: fadeInDown 0.8s ease-out;
}

.title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ==================== 卡片样式 ==================== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.feature-list {
    list-style: none;
}

.feature-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-list li:last-child {
    border-bottom: none;
}

/* ==================== 定价卡片 ==================== */
.pricing {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-color: var(--primary-color);
}

.price-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 24px 0;
}

.price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
}

.original-price {
    font-size: 1.5rem;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.badge {
    background: var(--danger-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.price-desc {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.price-features {
    list-style: none;
    margin: 20px 0;
}

.price-features li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
}

.price-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.payment-info {
    background: rgba(0, 0, 0, 0.2);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
}

.payment-info p {
    margin: 8px 0;
    color: var(--text-secondary);
}

/* ==================== 按钮样式 ==================== */
.action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 40px 0;
}

.btn {
    padding: 16px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-lg);
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.btn-icon {
    font-size: 1.3rem;
}

/* ==================== 统计数据 ==================== */
.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 40px;
    padding: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ==================== 模态框 ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease-out;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.4s ease-out;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--text-primary);
}

.modal-content h2 {
    margin-bottom: 24px;
    color: var(--text-primary);
}

#codeForm input {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 16px;
    transition: border-color 0.3s;
}

#codeForm input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.error-message {
    color: var(--danger-color);
    margin-top: 12px;
    display: none;
}

.error-message.show {
    display: block;
}

.help-text {
    text-align: center;
    margin-top: 16px;
    color: var(--text-secondary);
}

.help-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.help-text a:hover {
    text-decoration: underline;
}

/* ==================== 答题页面样式 ==================== */
.quiz-header {
    text-align: center;
    margin-bottom: 30px;
}

.quiz-container {
    max-width: 800px;
    margin: 40px auto;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-1);
    transition: width 0.5s ease;
    border-radius: 10px;
}

.progress-text {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.question-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.question-number {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.question-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    line-height: 1.4;
}

.options-grid {
    display: grid;
    gap: 16px;
}

.option-item {
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}

.option-item:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    transform: translateX(5px);
}

.option-item.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.2);
}

.option-radio {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.option-item.selected .option-radio {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.option-item.selected .option-radio::after {
    content: '✓';
    color: white;
    font-size: 14px;
}

.quiz-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 16px;
}

/* ==================== 结果页面样式 ==================== */
.result-container {
    max-width: 1000px;
    margin: 40px auto;
}

.result-header {
    text-align: center;
    margin-bottom: 40px;
}

.result-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.chart-container {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.chart-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    text-align: center;
    color: var(--primary-color);
}

.chart-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.keywords-highlight {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.2rem;
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

#radarChart {
    max-height: 400px;
}

.analysis-section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.analysis-section h2 {
    color: var(--primary-color);
    margin-bottom: 24px;
    font-size: 1.5rem;
}

.analysis-content {
    line-height: 1.8;
    color: var(--text-secondary);
}

.analysis-content p {
    margin-bottom: 16px;
}

.trait-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
}

.trait-tag {
    padding: 10px 20px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid var(--primary-color);
    border-radius: 25px;
    color: var(--primary-color);
    font-weight: 600;
}

.suggestions-section {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    border: 1px solid var(--success-color);
}

.suggestions-section h2 {
    color: var(--success-color);
}

.suggestion-item {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-bottom: 16px;
    border-left: 4px solid var(--success-color);
}

.suggestion-item h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

/* ==================== 加载动画 ==================== */
.loading-container {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 30px;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.loading-tips {
    margin-top: 30px;
    color: var(--text-secondary);
    font-style: italic;
}

/* ==================== 页脚 ==================== */
.footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    margin-top: auto;
}

/* ==================== 动画 ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== 得分卡片网格 ==================== */
.scores-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.score-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
}

.score-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.score-card.score-high {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.05);
}

.score-card.score-medium {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.score-card.score-low {
    border-color: var(--warning-color);
    background: rgba(245, 158, 11, 0.05);
}

.score-card.score-very-low {
    border-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.05);
}

.score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.score-header h3 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--text-primary);
}

.score-type {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--primary-color);
    color: white;
}

.score-high .score-type {
    background: var(--success-color);
}

.score-low .score-type {
    background: var(--warning-color);
}

.score-very-low .score-type {
    background: var(--danger-color);
}

.score-value {
    text-align: center;
    margin-bottom: 8px;
}

.score-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.score-high .score-number {
    color: var(--success-color);
}

.score-low .score-number {
    color: var(--warning-color);
}

.score-very-low .score-number {
    color: var(--danger-color);
}

.score-max {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-left: 4px;
}

.score-percentage {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.score-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* ==================== 关系维度卡片样式 ==================== */
.relationship-section {
    margin-bottom: 30px;
}

.section-title {
    text-align: center;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.relation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.relation-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
}

.relation-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.relation-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.relation-icon {
    font-size: 1.5rem;
}

.relation-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.relation-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.relation-positive,
.relation-concern {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.relation-label {
    font-weight: 600;
    min-width: 100px;
}

.relation-words {
    color: var(--text-secondary);
    flex: 1;
}

.relation-positive .relation-words {
    color: var(--success-color);
}

.relation-concern .relation-words {
    color: var(--warning-color);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .hero {
        padding: 40px 20px 20px;
    }

    .card {
        padding: 20px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .stats {
        gap: 20px;
    }

    .question-card {
        padding: 24px;
    }

    .question-text {
        font-size: 1.2rem;
    }

    .quiz-buttons {
        flex-direction: column-reverse;
    }

    .chart-container,
    .analysis-section {
        padding: 24px;
    }
}
