/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 页面切换 */
.page {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 按钮样式 */
.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.btn-secondary:disabled {
    background: #f5f5f5;
    color: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 介绍页面样式 */
.intro-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.intro-content h1 {
    font-size: 2.5em;
    margin-bottom: 30px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chakra-symbols {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.symbol {
    font-size: 2em;
    padding: 10px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.symbol:hover {
    transform: scale(1.1) rotate(10deg);
}

.intro-text {
    font-size: 1.1em;
    color: #666;
    margin: 30px 0;
    line-height: 1.8;
}

.test-info {
    display: flex;
    justify-content: space-around;
    margin: 30px 0;
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.info-item .icon {
    font-size: 1.5em;
}

.info-item span:last-child {
    font-size: 0.9em;
    color: #666;
}

/* 测试页面样式 */
#test-page {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.test-header {
    margin-bottom: 30px;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    font-weight: 600;
    color: #667eea;
    min-width: 60px;
}

.chakra-indicator {
    text-align: center;
    padding: 10px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 15px;
    font-weight: 600;
}

.question-container {
    margin: 30px 0;
}

.question-text {
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
    line-height: 1.5;
}

.answer-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-item:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.option-item input[type="radio"] {
    margin-right: 15px;
    transform: scale(1.2);
}

.option-item label {
    cursor: pointer;
    font-size: 1.1em;
    flex: 1;
}

.option-item input[type="radio"]:checked + label {
    color: #667eea;
    font-weight: 600;
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 15px;
}

/* 加载页面样式 */
.loading-content {
    text-align: center;
    padding: 60px 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0 auto;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content h2 {
    color: #333;
    margin-bottom: 15px;
}

.loading-content p {
    color: #666;
    font-size: 1.1em;
}

/* 结果页面样式 */
.result-page {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.result-header {
    text-align: center;
    margin-bottom: 40px;
}

.result-header h1 {
    font-size: 2.2em;
    margin-bottom: 30px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.overall-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.score-number {
    font-size: 2.5em;
    font-weight: bold;
}

.score-label {
    font-size: 0.9em;
    opacity: 0.9;
}

.balance-description {
    font-size: 1.2em;
    color: #666;
    max-width: 600px;
    text-align: center;
}

/* 图表样式 */
.charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 40px 0;
}

.chart-container {
    background: #f8f9ff;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    position: relative;
}

.chart-container h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3em;
}

/* 图表画布响应式 */
.chart-container canvas {
    max-width: 100%;
    height: auto !important;
}

/* 雷达图特殊处理 */
#radarChart {
    max-height: 400px;
}

/* 柱状图特殊处理 */
#barChart {
    max-height: 300px;
}

/* 脉轮结果样式 */
.detailed-analysis h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8em;
    color: #333;
}

.chakra-results {
    display: grid;
    gap: 25px;
}

.chakra-result {
    background: #f8f9ff;
    padding: 25px;
    border-radius: 15px;
    border-left: 5px solid #667eea;
}

.chakra-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.chakra-icon {
    font-size: 2.5em;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.chakra-info h3 {
    font-size: 1.4em;
    color: #333;
    margin-bottom: 5px;
}

.chakra-score {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.score {
    font-size: 1.8em;
    font-weight: bold;
    color: #667eea;
}

.max-score {
    color: #999;
    font-size: 1.1em;
}

.percentage {
    color: #667eea;
    font-weight: 600;
    margin-left: 10px;
}

.chakra-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}

.chakra-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.chakra-keywords {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.keyword {
    background: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    color: #667eea;
    border: 1px solid #e0e0e0;
}

/* 脉轮颜色 */
.root-color { background: #e74c3c; }
.sacral-color { background: #f39c12; }
.solar-color { background: #f1c40f; }
.heart-color { background: #27ae60; }
.throat-color { background: #3498db; }
.third-eye-color { background: #9b59b6; }
.crown-color { background: #8e44ad; }

.root-chakra { border-left-color: #e74c3c; }
.sacral-chakra { border-left-color: #f39c12; }
.solar-chakra { border-left-color: #f1c40f; }
.heart-chakra { border-left-color: #27ae60; }
.throat-chakra { border-left-color: #3498db; }
.third-eye-chakra { border-left-color: #9b59b6; }
.crown-chakra { border-left-color: #8e44ad; }

/* 建议样式 */
.recommendations {
    margin: 40px 0;
}

.recommendations h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8em;
    color: #333;
}

.recommendations-content {
    background: #f8f9ff;
    padding: 30px;
    border-radius: 15px;
    line-height: 1.8;
}

.recommendation-item {
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.recommendation-item h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.recommendation-item p {
    color: #666;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
