/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部区域 */
.hero-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8eaff 100%);
    padding: 60px 0 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="%23f0f0ff" opacity="0.6"/><circle cx="80" cy="40" r="3" fill="%23e0e0ff" opacity="0.4"/><circle cx="40" cy="80" r="2" fill="%23f0f0ff" opacity="0.5"/><circle cx="90" cy="70" r="2" fill="%23e0e0ff" opacity="0.3"/></svg>');
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.mbti-logo {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.logo-svg {
    filter: drop-shadow(0 4px 8px rgba(138, 77, 158, 0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #8A4D9E 0%, #A855F7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 20px;
    font-weight: 400;
    line-height: 1.5;
}

.hero-question {
    font-size: 1.2rem;
    color: #8A4D9E;
    font-weight: 600;
    margin-top: 20px;
}

/* 测试版本选择 - 优化移动端并排显示 */
.test-selection {
    padding: 40px 0;
    background: #fff;
}

.version-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.version-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.version-card:hover {
    border-color: #cbd5e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.version-card.selected {
    border-color: #8A4D9E;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    box-shadow: 0 8px 25px rgba(138, 77, 158, 0.15);
    transform: translateY(-2px);
}

.recommended-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #8A4D9E;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.selected-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    background: #8A4D9E;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
}

.version-card.selected .selected-badge {
    display: flex;
}

.check-icon {
    width: 16px;
    height: 16px;
}

.version-header {
    margin-bottom: 12px;
}

.version-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.question-count {
    background: #f7fafc;
    color: #666;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.time-info {
    margin-bottom: 12px;
}

.duration {
    color: #666;
    font-size: 0.9rem;
}

.popularity {
    margin-top: 12px;
}

.users {
    color: #8A4D9E;
    font-weight: 600;
    font-size: 0.85rem;
}

/* CTA区域 */
.cta-section {
    padding: 40px 0;
    background: #fff;
    text-align: center;
}

.start-test-btn {
    background: linear-gradient(135deg, #8A4D9E 0%, #A855F7 100%);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(138, 77, 158, 0.3);
    position: relative;
    overflow: hidden;
}

.start-test-btn::before {
    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;
}

.start-test-btn:hover::before {
    left: 100%;
}

.start-test-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(138, 77, 158, 0.4);
}

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

.arrow-icon {
    transition: transform 0.3s ease;
}

.start-test-btn:hover .arrow-icon {
    transform: translateX(5px);
}

.cta-note {
    margin-top: 16px;
    color: #666;
    font-size: 0.95rem;
}

/* 测试须知 */
.test-notes {
    padding: 40px 0;
    background: #f8fafc;
}

.notes-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 600px;
    margin: 0 auto;
}

.notes-card h3 {
    color: #2d3748;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.notes-list {
    list-style: none;
}

.notes-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    color: #4a5568;
    line-height: 1.7;
}

.note-icon {
    color: #8A4D9E;
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 2px;
}

/* MBTI介绍 */
.mbti-intro {
    padding: 60px 0;
    background: white;
}

.intro-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 24px;
    text-align: center;
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 40px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.founder-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 600px;
    margin: 0 auto;
}

.founder {
    text-align: center;
    background: #f8fafc;
    padding: 24px;
    border-radius: 16px;
}

.founder-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.founder h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.founder p {
    color: #666;
    font-size: 0.95rem;
}

/* 核心维度 */
.dimensions-section {
    padding: 60px 0;
    background: #f8fafc;
}

.dimensions-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 40px;
    text-align: center;
}

.dimensions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.dimension-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.dimension-card:hover {
    transform: translateY(-5px);
}

.dimension-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 16px;
}

.dimension-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #8A4D9E;
}

.vs {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

.dimension-name {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 16px;
}

.dimension-desc {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.desc-item {
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 12px;
    border-left: 4px solid #8A4D9E;
}

.desc-item strong {
    color: #8A4D9E;
    font-weight: 600;
}

/* 16种人格类型 - 重新设计 */
.personality-types {
    padding: 60px 0;
    background: white;
}

.personality-types h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 40px;
    text-align: center;
}

.types-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.type-card {
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    transition: opacity 0.3s ease;
}

.type-card:hover::before {
    opacity: 0.2;
}

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

/* 人格类型颜色分类 - 使用渐变背景 */
.type-card.analyst {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #2196F3;
}

.type-card.analyst::before {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.type-card.diplomat {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-color: #9C27B0;
}

.type-card.diplomat::before {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
}

.type-card.guardian {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    border-color: #4CAF50;
}

.type-card.guardian::before {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
}

.type-card.explorer {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc02 100%);
    border-color: #FF9800;
}

.type-card.explorer::before {
    background: linear-gradient(135deg, #FF9800, #F57C00);
}

.type-header {
    margin-bottom: 12px;
}

.type-header h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
}

.type-category {
    background: rgba(255, 255, 255, 0.7);
    color: #666;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.type-card p {
    font-size: 0.9rem;
    color: #555;
    font-weight: 500;
}

/* 发展历程 */
.timeline-section {
    padding: 60px 0;
    background: #f8fafc;
}

.timeline-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 40px;
    text-align: center;
}

.timeline {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #8A4D9E, #A855F7);
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    position: relative;
}

.timeline-year {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #8A4D9E 0%, #A855F7 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(138, 77, 158, 0.3);
}

.timeline-content {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-left: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    flex: 1;
}

.timeline-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.timeline-content p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 页脚 */
.footer {
    background: #2d3748;
    color: #cbd5e0;
    padding: 40px 0;
    text-align: center;
}

.footer p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

/* 响应式设计 - 移动端优先 */
@media (min-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .types-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .dimensions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .founder-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .container {
        padding: 0 40px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .version-cards {
        grid-template-columns: repeat(2, 1fr);
        max-width: none;
    }
    
    .types-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .dimensions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .founder-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .types-grid {
        grid-template-columns: repeat(8, 1fr);
    }
    
    .dimensions-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .founder-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 选择效果 */
.version-card.selected {
    border-color: #8A4D9E;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    transform: translateY(-2px);
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 触摸设备优化 */
@media (hover: none) {
    .version-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    .start-test-btn:hover {
        transform: none;
    }
    
    .type-card:hover {
        transform: none;
    }
    
    .dimension-card:hover {
        transform: none;
    }
}

/* 移动端特殊优化 */
@media (max-width: 767px) {
    .version-card {
        min-height: 120px;
        padding: 16px;
    }
    
    .version-header h3 {
        font-size: 1rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .type-card {
        padding: 16px 12px;
    }
    
    .type-header h4 {
        font-size: 1rem;
    }
    
    .start-test-btn {
        padding: 14px 32px;
        font-size: 1rem;
    }
}