/* 全局样式变量 - 苹果风格配色 */
:root {
    /* 苹果风格的颜色方案 */
    --apple-white: #ffffff;
    --apple-light-gray: #f5f5f7;
    --apple-gray: #86868b;
    --apple-dark-gray: #1d1d1f;
    --apple-blue: #0071e3;
    --apple-light-blue: #40a9ff;
    --apple-green: #34c759; /* 苹果健康绿色 */
    --apple-red: #ff3b30; /* 苹果健康红色 */
    
    /* 健康主题的辅助色 */
    --health-light-green: #e8f5e9;
    --health-medium-green: #c8e6c9;
    --health-dark-green: #4caf50;
    --health-light-blue: #e3f2fd;
    --health-medium-blue: #bbdefb;
    --health-light-red: #ffebee;
    --health-medium-red: #ffcdd2;
    
    /* 字体和间距 */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* 圆角 */
    --border-radius-sm: 6px;
    --border-radius-md: 10px;
    --border-radius-lg: 16px;
    
    /* 阴影 */
    --shadow-light: 0 2px 5px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 4px 10px rgba(0, 0, 0, 0.08);
    --shadow-strong: 0 10px 20px rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--apple-white);
    color: var(--apple-dark-gray);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 内容容器 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* 导航栏 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 var(--spacing-md);
    box-shadow: var(--shadow-light);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.navbar-logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--apple-dark-gray);
    text-decoration: none;
}

.navbar-menu {
    display: flex;
    gap: var(--spacing-lg);
}

.navbar-menu a {
    color: var(--apple-gray);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    color: var(--apple-blue);
}

.language-selector {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.language-selector button {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.language-selector button.active {
    opacity: 1;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--border-radius-md);
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: var(--apple-blue);
    color: white;
}

.btn-primary:hover {
    background-color: var(--apple-light-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: var(--apple-light-gray);
    color: var(--apple-dark-gray);
}

.btn-secondary:hover {
    background-color: #e5e5e7;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-green {
    background-color: var(--apple-green);
    color: white;
}

.btn-green:hover {
    background-color: #2eb251;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1.1rem;
}

/* 主页区块 */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-xl) 0;
    background: linear-gradient(to bottom, #f5f5f7, #e8f5e9);
    min-height: 500px;
    width: 100%;
}

.hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    max-width: 800px;
    text-align: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--apple-gray);
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
    text-align: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* 卡片样式 */
.card {
    background-color: var(--apple-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-medium);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
}

.card-green {
    border-left: 4px solid var(--apple-green);
}

.card-blue {
    border-left: 4px solid var(--apple-blue);
}

.card-red {
    border-left: 4px solid var(--apple-red);
}

/* 测验表单 */
.quiz-form {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-xl) 0;
}

.question-card {
    display: none;
}

.question-card.active {
    display: block;
}

.question-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
}

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

.option-item {
    margin-bottom: var(--spacing-md);
}

.option-label {
    display: flex;
    align-items: center;
    padding: var(--spacing-md);
    border: 1px solid var(--apple-light-gray);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-label:hover {
    background-color: var(--apple-light-gray);
}

.option-radio {
    margin-right: var(--spacing-md);
}

.option-text {
    font-size: 1rem;
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: var(--spacing-xl);
}

/* 进度条 */
.progress-container {
    width: 100%;
    background-color: var(--apple-light-gray);
    border-radius: var(--border-radius-sm);
    margin: var(--spacing-lg) 0;
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--apple-blue);
    transition: width 0.3s ease;
}

/* 结果页样式 */
.result-container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-xl) 0;
}

.result-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.result-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(45deg, var(--apple-blue), var(--apple-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-subtitle {
    font-size: 1.2rem;
    color: var(--apple-gray);
}

.constitution-type {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: var(--spacing-xl) 0;
}

.constitution-icon {
    width: 80px;
    height: 80px;
    margin-right: var(--spacing-md);
}

.constitution-name {
    font-size: 2rem;
    font-weight: 600;
}

.recommendation-section {
    margin-top: var(--spacing-xl);
}

.recommendation-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--apple-green);
}

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

.recommendation-item {
    background-color: var(--health-light-green);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-left: 4px solid var(--apple-green);
    box-shadow: var(--shadow-light);
}

.recommendation-item h4 {
    margin-bottom: var(--spacing-xs);
    color: var(--apple-dark-gray);
}

.recommendation-item p {
    color: var(--apple-gray);
    font-size: 0.95rem;
}

/* 关于页面 */
.about-section {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-xl) 0;
}

.about-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-lg);
}

.about-text {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .navbar-menu {
        gap: var(--spacing-md);
    }
    
    .card {
        padding: var(--spacing-md);
    }
    
    .features {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .navbar {
        height: auto;
        padding: var(--spacing-sm);
    }
    
    .navbar .container {
        flex-direction: column;
        gap: var(--spacing-sm);
        padding: var(--spacing-sm) 0;
    }
    
    .navbar-menu {
        width: 100%;
        justify-content: center;
        gap: var(--spacing-md);
    }
    
    .language-selector {
        margin-top: var(--spacing-xs);
    }
    
    .constitution-type {
        flex-direction: column;
        text-align: center;
    }
    
    .constitution-icon {
        margin: 0 0 var(--spacing-md) 0;
    }
    
    .quiz-navigation {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .btn {
        width: 100%;
    }
    
    .hero {
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .features {
        margin: 32px 0;
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* 联系部分样式 */
.contact-section {
    text-align: center;
    padding: var(--spacing-lg) 0;
    background-color: var(--health-light-blue);
    border-radius: var(--border-radius-lg);
    margin: var(--spacing-xl) 0;
}

.contact-section h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--apple-blue);
}

.contact-email {
    font-size: 1.1rem;
    color: var(--apple-blue);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
}

.contact-email:hover {
    color: var(--apple-light-blue);
    text-decoration: underline;
}

/* 体质类型预览 */
.constitution-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
    justify-content: center;
}

.constitution-type-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 8px;
    border-radius: var(--border-radius-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.constitution-type-item:hover {
    background-color: var(--apple-light-gray);
    transform: translateY(-4px);
    box-shadow: var(--shadow-light);
}

.constitution-type-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 8px;
}

.constitution-type-name {
    margin-top: 8px;
    font-weight: 500;
}

@media (max-width: 576px) {
    .constitution-types-grid {
        grid-template-columns: repeat(2, 1fr);
    }
} 