/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    /* padding: 20px; */
    min-height: 100vh;
}

/* 按钮样式 */
.btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(108, 99, 255, 0.2);
    margin: 20px 0;
}

.btn:hover {
    background-color: #5a52d5;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(108, 99, 255, 0.3);
}

/* 部分样式 */
.section {
    display: none;
    width: 100%;
    min-height: 100vh;
    padding: 20px;
}

.section.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 欢迎页面样式 */
.welcome-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.welcome-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #4CAF50;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.welcome-content p {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #555;
}

.welcome-content .description {
    font-size: 1rem;
    color: #777;
    margin-bottom: 30px;
}

/* 测试页面样式 */
.progress-container {
    width: 100%;
    max-width: 800px;
    margin-bottom: 40px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: #4CAF50;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: 1rem;
    color: #555;
}

.question-container {
    width: 100%;
    max-width: 800px;
    text-align: center;
}

.question-container h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #444;
}

.options-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.option {
    flex: 1;
    min-width: 300px;
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.option:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.option.selected {
    border: 2px solid #4CAF50;
    background-color: rgba(108, 99, 255, 0.05);
}

.option-image-container {
    width: 100%;
    /* height: 200px; */
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
}

.option-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    max-height: 25vh;
    object-fit: contain;
}

.option:hover .option-image {
    transform: scale(1.05);
}

.option-text {
    font-size: 1rem;
    color: #555;
    text-align: center;
}

/* 结果页面样式 */
.result-container {
    width: 100%;
    max-width: 900px;
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.result-container h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #444;
}

.personality-type {
    margin-bottom: 30px;
}

.personality-type h2 {
    font-size: 3.5rem;
    color: #4CAF50;
    margin-bottom: 10px;
}

.personality-type h3 {
    font-size: 1.8rem;
    color: #555;
}

.personality-image-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    border-radius: 50%;
    overflow: hidden;
    /* box-shadow: 0 5px 15px rgba(0,0,0,0.2); */
}

.personality-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.personality-description {
    margin-bottom: 30px;
    text-align: left;
}

.personality-description p {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
}

.personality-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.detail-section {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
}

.detail-section h3 {
    font-size: 1.3rem;
    color: #4CAF50;
    margin-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 8px;
}

.detail-section ul {
    list-style-position: inside;
    padding-left: 10px;
}

.detail-section li, .detail-section p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 8px;
}

.dimension-results {
    margin-bottom: 30px;
}

.dimension-results h3 {
    font-size: 1.5rem;
    color: #444;
    margin-bottom: 20px;
}

.dimension {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.dimension-label {
    width: 100px;
    font-size: 1rem;
    color: #555;
}

.dimension-bar {
    flex: 1;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.dimension-progress {
    height: 100%;
    background-color: #4CAF50;
    position: absolute;
    left: 0;
    top: 0;
    transition: width 1s ease;
}

.secondary-results {
    margin-bottom: 30px;
}

.secondary-results h3 {
    font-size: 1.5rem;
    color: #444;
    margin-bottom: 20px;
}

.secondary-type {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 15px;
}

.secondary-type h4 {
    font-size: 1.1rem;
    color: #555;
}

.secondary-percentage {
    font-size: 1.2rem;
    color: #4CAF50;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .welcome-content h1 {
        font-size: 2.2rem;
    }
    
    .options-container {
        flex-direction: column;
    }
    
    .option {
        min-width: 100%;
    }
    
    .personality-type h2 {
        font-size: 2.8rem;
    }
    
    .personality-type h3 {
        font-size: 1.5rem;
    }
    
    .personality-details {
        grid-template-columns: 1fr;
    }
    
    /* .dimension {
        flex-direction: column;
        align-items: flex-start;
    } */
    
    .dimension-label {
        width: auto;
        margin-bottom: 5px;
    }
    
    .dimension-bar {
        width: 100%;
        position: relative;
        display: block;
        margin: 0px 5px;
    }
    
    /* 确保进度条在移动设备上正确显示 */
    .dimension-progress {
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        /* 移除固定宽度，使用JavaScript设置的宽度值 */
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.slide-in {
    animation: slideIn 0.5s ease forwards;
}

/* 选项选中动画 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 0.5s ease;
}