/* 心灵图谱 - 全局样式 & 响应式布局 */

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: #F8F9FA;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* 头部导航 */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    color: #666;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s;
}

.nav a:hover {
    color: #6C63FF;
}

/* 英雄区 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: 18px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 30px;
}

.hero-buttons {
    margin-bottom: 40px;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: white;
    color: #667eea;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: bold;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
}

/* 测试模式选择 */
.mode-section {
    padding: 60px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 32px;
    color: #333;
    margin-bottom: 40px;
}

.mode-cards {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.mode-card {
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    background: #F8F9FA;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.mode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.mode-quick {
    border-color: #4CAF50;
}

.mode-quick:hover {
    border-color: #45a049;
}

.mode-pro {
    border-color: #6C63FF;
}

.mode-pro:hover {
    border-color: #5a52e0;
}

.mode-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.mode-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.mode-count {
    font-size: 42px;
    font-weight: bold;
    color: #6C63FF;
    margin: 15px 0;
}

.mode-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.mode-tag {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    background: #F0F0FF;
    color: #6C63FF;
}

/* 关于MBTI */
.about-section {
    padding: 60px 0;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    text-align: center;
    margin-bottom: 40px;
}

.about-text p {
    color: #666;
    font-size: 16px;
    margin-bottom: 15px;
}

.dimensions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.dimension-item {
    background: white;
    padding: 25px 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.dim-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.dim-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.dim-desc {
    font-size: 12px;
    color: #999;
}

/* 16种人格类型 */
.types-section {
    padding: 60px 0;
    background: white;
}

.types-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.type-card {
    background: #F8F9FA;
    padding: 25px 20px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

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

.type-emoji {
    font-size: 36px;
    margin-bottom: 10px;
}

.type-code {
    font-size: 20px;
    font-weight: bold;
    color: #6C63FF;
}

.type-name {
    font-size: 14px;
    color: #333;
    margin: 5px 0;
}

.type-trait {
    font-size: 12px;
    color: #999;
}

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

.footer p {
    margin-bottom: 10px;
}

.footer-note {
    font-size: 12px;
    color: #999;
}

/* ==================== 响应式设计 ==================== */

/* 平板设备 (宽度 <= 1024px) */
@media screen and (max-width: 1024px) {
    .hero-title {
        font-size: 36px;
    }
    
    .hero-stats {
        gap: 40px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .dimensions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .types-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 大手机设备 (宽度 <= 768px) */
@media screen and (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 15px;
        padding: 0 10px;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .stat {
        flex: 1 1 80px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .mode-cards {
        flex-direction: column;
        align-items: center;
    }
    
    .mode-card {
        width: 100%;
        max-width: 320px;
    }
    
    .dimensions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .dimension-item {
        padding: 20px 15px;
    }
    
    .types-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .type-card {
        padding: 20px 15px;
    }
    
    .nav {
        gap: 15px;
    }
    
    .nav a {
        font-size: 13px;
    }
}

/* 手机设备 (宽度 <= 480px) */
@media screen and (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .header-content {
        height: 50px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .logo-icon {
        font-size: 22px;
    }
    
    .hero {
        padding: 30px 0;
    }
    
    .hero-badge {
        font-size: 12px;
        padding: 5px 12px;
    }
    
    .hero-title {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    .btn {
        padding: 12px 30px;
        font-size: 14px;
    }
    
    .hero-stats {
        gap: 15px;
    }
    
    .stat {
        flex: 1 1 60px;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .section-title {
        font-size: 20px;
        margin-bottom: 25px;
    }
    
    .mode-section,
    .about-section,
    .types-section {
        padding: 40px 0;
    }
    
    .mode-card {
        padding: 25px 20px;
    }
    
    .mode-icon {
        font-size: 36px;
    }
    
    .mode-count {
        font-size: 32px;
    }
    
    .dimensions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .dimension-item {
        padding: 15px 10px;
    }
    
    .dim-icon {
        font-size: 24px;
    }
    
    .dim-name {
        font-size: 13px;
    }
    
    .types-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .type-card {
        padding: 15px 10px;
    }
    
    .type-emoji {
        font-size: 28px;
    }
    
    .type-code {
        font-size: 16px;
    }
    
    .type-name {
        font-size: 12px;
    }
    
    .footer {
        padding: 25px 0;
    }
}

/* 小屏手机 (宽度 <= 360px) */
@media screen and (max-width: 360px) {
    .hero-title {
        font-size: 20px;
    }
    
    .dimensions-grid {
        grid-template-columns: 1fr;
    }
    
    .types-grid {
        grid-template-columns: 1fr;
    }
}
