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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

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

/* 头部样式 */
.header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo i {
    font-size: 2.5rem;
    color: #ff6b8b;
}

.logo h1 {
    font-size: 2.2rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* 主要内容区域 */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* 通用卡片样式 */
section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

h2 i {
    color: #6a11cb;
}

/* 介绍部分 */
.intro-section p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: #555;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.feature {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature i {
    font-size: 2.5rem;
    color: #2575fc;
    margin-bottom: 15px;
}

.feature h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.feature p {
    color: #666;
    font-size: 0.95rem;
}

/* 提取码部分 */
.access-section {
    margin-bottom: 40px;
}

.access-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.access-code-generator,
.access-code-input {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
}

.access-code-generator h3,
.access-code-input h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.access-code-generator h3 i {
    color: #6a11cb;
}

.access-code-input h3 i {
    color: #00b09b;
}

.access-code-generator p,
.access-code-input p {
    color: #666;
    margin-bottom: 20px;
    font-size: 1rem;
}

.generate-btn,
.verify-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.generate-btn:hover,
.verify-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(106, 17, 203, 0.3);
}

.verify-btn {
    background: linear-gradient(135deg, #00b09b, #96c93d);
}

.code-display {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    border: 2px dashed #6a11cb;
}

.code-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #6a11cb;
    letter-spacing: 5px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.code-hint {
    color: #666;
    font-size: 0.9rem;
    margin-top: 10px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

#access-code-input {
    flex: 1;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.1rem;
    text-align: center;
    letter-spacing: 3px;
    font-family: 'Courier New', monospace;
    transition: border-color 0.3s ease;
}

#access-code-input:focus {
    outline: none;
    border-color: #6a11cb;
}

.error-message {
    margin-top: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.code-types-info {
    margin-top: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #6a11cb;
}

.code-types-info p {
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
}

.code-types-info ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.code-types-info li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    color: #555;
}

.code-types-info li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #6a11cb;
    font-weight: bold;
}

.code-type-self {
    color: #2575fc;
    font-weight: 600;
}

.code-type-partner {
    color: #00b09b;
    font-weight: 600;
}

/* 测评类型选择器 */
.test-type-selector {
    margin-bottom: 30px;
}

.test-type-selector h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.test-type-selector h3 i {
    color: #6a11cb;
}

.test-type-options {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.test-type-btn {
    flex: 1;
    min-width: 200px;
    padding: 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.test-type-btn:hover {
    border-color: #6a11cb;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.test-type-btn.active {
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    border-color: #6a11cb;
    color: white;
}

.test-type-btn i {
    font-size: 2rem;
    margin-bottom: 5px;
}

.test-type-btn span {
    font-size: 1.2rem;
    font-weight: 600;
}

.test-type-btn p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

.test-type-btn.active i,
.test-type-btn.active span,
.test-type-btn.active p {
    color: white;
}

/* 测试部分 */
.test-instruction {
    color: #666;
    margin-bottom: 25px;
    font-size: 1.05rem;
}

.test-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
}

.question h3 {
    color: #6a11cb;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.question p {
    font-size: 1.2rem;
    margin-bottom: 25px;
    color: #333;
    font-weight: 500;
}

.options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.option {
    flex: 1;
    min-width: 120px;
    padding: 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option:hover {
    background: #f0f0f0;
    border-color: #6a11cb;
}

.option.selected {
    background: #6a11cb;
    color: white;
    border-color: #6a11cb;
}

/* 进度条 */
.progress-container {
    margin: 30px 0;
}

.progress-bar {
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6a11cb, #2575fc);
    width: 10%;
    border-radius: 6px;
    transition: width 0.5s ease;
}

.progress-text {
    text-align: center;
    color: #666;
    font-weight: 500;
}

/* 导航按钮 */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.nav-btn,
.submit-btn,
.restart-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.nav-btn {
    background: #6a11cb;
    color: white;
}

.nav-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.nav-btn:not(:disabled):hover {
    background: #5a0db5;
    transform: translateY(-2px);
}

.submit-btn {
    background: #00b09b;
    color: white;
}

.submit-btn:hover {
    background: #009688;
    transform: translateY(-2px);
}

.restart-btn {
    background: #ff6b8b;
    color: white;
    margin: 20px auto;
    display: block;
}

.restart-btn:hover {
    background: #ff4d6d;
    transform: translateY(-2px);
}

/* 维度部分 */
.dimensions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.dimension {
    text-align: center;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.dimension:hover {
    transform: translateY(-5px);
}

.dimension-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: white;
}

.dimension-icon.control {
    background: linear-gradient(135deg, #ff6b8b, #ff8e53);
}

.dimension-icon.jealousy {
    background: linear-gradient(135deg, #00b09b, #96c93d);
}

.dimension-icon.dependency {
    background: linear-gradient(135deg, #6a11cb, #2575fc);
}

.dimension-icon.insecurity {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
}

.dimension h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.dimension p {
    color: #666;
    font-size: 0.95rem;
}

/* 结果部分 */
.result-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 30px;
}

.score-display {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 30px rgba(106, 17, 203, 0.3);
}

.score-circle span {
    font-size: 3rem;
    font-weight: 700;
}

.score-circle p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.score-description {
    flex: 1;
    min-width: 300px;
}

.score-description h3 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.score-description p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* 维度得分条 */
.dimension-scores {
    margin-bottom: 40px;
}

.dimension-scores h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.score-bars {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.score-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.score-bar label {
    display: flex;
    justify-content: space-between;
    color: #2c3e50;
    font-weight: 600;
}

.bar-container {
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 10px;
    width: 0%;
    transition: width 1s ease;
}

.control-fill {
    background: linear-gradient(90deg, #ff6b8b, #ff8e53);
}

.jealousy-fill {
    background: linear-gradient(90deg, #00b09b, #96c93d);
}

.dependency-fill {
    background: linear-gradient(90deg, #6a11cb, #2575fc);
}

.insecurity-fill {
    background: linear-gradient(90deg, #ff416c, #ff4b2b);
}

/* 建议部分 */
.recommendations {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
}

.recommendations h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.recommendations h3 i {
    color: #ffc107;
}

#recommendations-content {
    color: #555;
    line-height: 1.7;
}

#recommendations-content p {
    margin-bottom: 15px;
}

/* 信息部分 */
.info-content {
    color: #555;
    line-height: 1.7;
}

.info-content p {
    margin-bottom: 20px;
}

.info-content ul {
    margin: 20px 0;
    padding-left: 25px;
}

.info-content li {
    margin-bottom: 10px;
    color: #444;
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: white;
    border-radius: 15px;
    padding: 40px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.6;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #95a5a6;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header {
        padding: 30px 15px;
    }

    .logo {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .logo h1 {
        font-size: 1.8rem;
    }

    section {
        padding: 20px;
    }

    h2 {
        font-size: 1.5rem;
    }

    .features,
    .dimensions {
        grid-template-columns: 1fr;
    }

    .options {
        flex-direction: column;
    }

    .option {
        min-width: 100%;
    }

    .navigation-buttons {
        flex-direction: column;
    }

    .score-display {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .score-description {
        min-width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .question p {
        font-size: 1.1rem;
    }

    .nav-btn,
    .submit-btn,
    .restart-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}