/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    line-height: 1.8;
    color: #333;
    background-color: #f8f9fa;
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
}

/* 容器样式 */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 页面标题 */
.page-title {
    font-size: 2.5rem;
    color: #333;
    text-align: center;
    margin: 40px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* 按钮样式 */
.btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-primary {
    background-color: #667eea;
    color: white;
    border: 2px solid #667eea;
}

.btn-primary:hover {
    background-color: white;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

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

.btn-large {
    padding: 15px 40px;
    font-size: 1.2rem;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

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

.card-title {
    font-size: 1.8rem;
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
}

.card-content {
    font-size: 1.1rem;
    color: #666;
    text-align: center;
}

/* 导航栏 */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #333;
    padding: 20px 0;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #667eea;
}

/* 功能区 */
.features-section {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 60px 0;
    flex-wrap: wrap;
}

.feature-card {
    text-align: center;
    max-width: 300px;
}

/* 介绍区 */
.intro-section {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    margin: 60px 0;
}

.intro-title {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 30px;
    text-align: center;
}

.intro-content {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.8;
}

.intro-content h3 {
    color: #333;
    margin: 25px 0 15px;
}

.intro-content p {
    margin-bottom: 15px;
}

/* 底部信息区 */
.footer {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 30px 0;
    margin-top: 60px;
    text-align: center;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
}

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

/* 题库选择页 */
.test-options {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 60px 0;
    flex-wrap: wrap;
}

.test-option {
    text-align: center;
    max-width: 350px;
    cursor: pointer;
}

.test-option-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #667eea;
}

.test-option-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 15px;
}

.test-option-description {
    font-size: 1rem;
    color: #666;
    margin-bottom: 25px;
}

/* 答题页 */
.progress-bar {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 40px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.progress-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.question-section {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.question-text {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.options-section {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.option-btn {
    padding: 20px 40px;
    font-size: 1.2rem;
    border: 2px solid #667eea;
    background-color: white;
    color: #667eea;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.option-btn:hover {
    background-color: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

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

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

/* 结果页 */
.result-overview {
    text-align: center;
    margin-bottom: 40px;
}

.result-personality {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 10px;
    font-weight: bold;
}

.result-subtitle {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
}

.result-summary {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.dimensions-section {
    margin-bottom: 60px;
}

.dimension-bar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.dimension-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.dimension-progress {
    display: flex;
    height: 40px;
    background-color: #f0f0f0;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.dimension-left, .dimension-right {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-weight: bold;
    color: white;
    transition: width 0.5s ease;
}

.dimension-left {
    background-color: #667eea;
    width: 50%;
}

.dimension-right {
    background-color: #f06292;
    width: 50%;
}

.dimension-percentage {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #333;
    font-weight: bold;
}

.personality-description {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.description-title {
    font-size: 1.8rem;
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
}

.description-content {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
    text-align: center;
}

.result-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 60px;
    flex-wrap: wrap;
}

/* 人格列表页 */
.personality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 60px 0;
}

.personality-btn {
    background-color: white;
    border: 2px solid #667eea;
    border-radius: 10px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    color: #333;
}

.personality-btn:hover {
    background-color: #667eea;
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.personality-type {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.personality-name {
    font-size: 1rem;
    opacity: 0.8;
}

/* 人格博客页面 */
.article-section {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    padding: 40px;
    margin-bottom: 40px;
}

.article-title {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 20px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.article-subtitle {
    font-size: 1.5rem;
    color: #444;
    margin: 30px 0 15px;
}

.article-content {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.8;
}

.article-list {
    margin-left: 20px;
    margin-bottom: 20px;
}

.article-list li {
    margin-bottom: 10px;
}

.article-divider {
    height: 2px;
    background-color: #eee;
    margin: 60px 0;
}

.image-placeholder {
    width: 100%;
    height: 300px;
    background-color: #f0f0f0;
    border-radius: 10px;
    margin: 30px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 1.1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
        margin: 30px 0;
    }

    .features-section {
        gap: 30px;
        margin: 40px 0;
    }

    .card {
        padding: 20px;
        margin-bottom: 20px;
    }

    .card-title {
        font-size: 1.5rem;
    }

    .btn-large {
        padding: 12px 30px;
        font-size: 1.1rem;
    }

    .test-options {
        gap: 30px;
        margin: 40px 0;
    }

    .test-option {
        max-width: 100%;
    }

    .options-section {
        flex-direction: column;
        align-items: center;
    }

    .option-btn {
        width: 100%;
        max-width: 300px;
    }

    .navigation-buttons {
        flex-direction: column;
        align-items: center;
    }

    .result-personality {
        font-size: 2rem;
    }

    .result-subtitle {
        font-size: 1.2rem;
    }

    .personality-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
        margin: 40px 0;
    }

    .personality-btn {
        padding: 20px;
    }

    .personality-type {
        font-size: 1.2rem;
    }

    .article-section {
        padding: 20px;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .article-subtitle {
        font-size: 1.2rem;
    }

    .navbar-content {
        flex-direction: column;
        gap: 20px;
    }

    .nav-links {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .card {
        padding: 15px;
    }

    .question-text {
        font-size: 1.3rem;
    }

    .option-btn {
        padding: 15px 30px;
        font-size: 1.1rem;
    }

    .dimension-bar {
        padding: 15px;
    }

    .personality-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .personality-btn {
        padding: 15px;
    }

    .personality-type {
        font-size: 1.1rem;
    }

    .article-section {
        padding: 15px;
    }
}

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

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

/* 加载动画 */
.loading-spinner {
    border: 4px solid rgba(102, 126, 234, 0.3);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 提示框 */
.alert {
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: bold;
}

.alert-info {
    background-color: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid #667eea;
}

.alert-warning {
    background-color: rgba(240, 98, 146, 0.1);
    color: #f06292;
    border: 1px solid #f06292;
}