* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: #f4f5f7;
    background-image:
        repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.015), rgba(0, 0, 0, 0.015) 1px, transparent 1px, transparent 8px),
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.015), rgba(0, 0, 0, 0.015) 1px, transparent 1px, transparent 8px);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* AI客服按钮 */
.ai-service-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: #1f2b3a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(44, 95, 141, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
}

.ai-service-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 14px rgba(31, 43, 58, 0.5);
}

.ai-service-btn svg {
    width: 28px;
    height: 28px;
}

@media (max-width: 768px) {
    .ai-service-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .ai-service-btn svg {
        width: 24px;
        height: 24px;
    }
}

/* PC端提示页面 */
.pc-tip {
    display: none;
}

@media (min-width: 769px) {
    .pc-tip {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        background: #e7eaee;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        z-index: 999;
    }

    .pc-tip-content {
        text-align: center;
        background: #ffffff;
        padding: 48px 32px;
        border-radius: 12px;
        box-shadow: 0 15px 35px rgba(20, 23, 26, 0.1);
        border: 1px solid #d9dee7;
        max-width: 480px;
        width: 90%;
        margin: 0 auto;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .pc-tip-content h1 {
        font-size: 2rem;
        color: #1a3a5f;
        margin-bottom: 20px;
        font-weight: 700;
    }

    .pc-tip-content p {
        font-size: 1.2rem;
        color: #4a6fa5;
    }

    .pc-tip .footer {
        width: 100%;
        position: absolute;
        bottom: 0;
        left: 0;
    }

    body {
        overflow: hidden;
    }

    .page {
        display: none !important;
    }
}

/* 隐藏滚动条但保持滚动功能 */
*::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

* {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html::-webkit-scrollbar {
    display: none;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 80px);
}

/* 欢迎页面的容器居中 */
#welcome-page .container {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 问卷页面容器左右不留边 */
#quiz-page .container {
    max-width: 100%;
    padding: 0;
    margin: 0;
}

@media (max-width: 768px) {
    #quiz-page .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }
}

.page {
    display: none;
    min-height: 100vh;
    position: relative;
}

.page.active {
    display: flex;
    flex-direction: column;
}

/* 引导页样式 */
.welcome-content {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border: 1px solid #dfe3eb;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.main-title {
    font-size: 2.5rem;
    color: #1e2a36;
    margin-bottom: 20px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.2rem;
    color: #4a6fa5;
    margin-bottom: 40px;
}

.description-box {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    margin: 30px 0;
    text-align: left;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    border: 1px solid #e0e4ea;
}

.description-box h2 {
    color: #1a3a5f;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.description-box p {
    color: #555;
    margin-bottom: 10px;
    line-height: 1.8;
}

/* 按钮样式 */
.btn-primary {
    background: #1f2b3a;
    color: #ffffff;
    border: 2px solid #1f2b3a;
    padding: 10px 24px;
    font-size: 0.95rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    box-shadow: none;
    font-weight: 600;
    margin-top: 0;
    flex: 1;
}

.btn-primary:hover {
    background: #253447;
    border-color: #253447;
}

.btn-primary:active {
    background: #162030;
    border-color: #162030;
}

.btn-secondary {
    background: #f7f8fa;
    color: #1f2b3a;
    border: 2px solid #1f2b3a;
    padding: 10px 24px;
    font-size: 0.95rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    font-weight: 600;
    flex: 1;
}

.btn-secondary:hover {
    background: #e7eaee;
}

/* 问卷页面样式 */
.quiz-header {
    background: #ffffff;
    padding: 20px;
    border-radius: 0;
    margin: 0;
    border-bottom: 1px solid #e0e4ea;
    box-shadow: none;
    height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: #1f2b3a;
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 5%;
}

.progress-text {
    text-align: center;
    color: #4a6fa5;
    font-weight: 600;
    font-size: 0.9rem;
}

.quiz-content {
    background: #ffffff;
    padding: 40px;
    border-radius: 0;
    border-bottom: 1px solid #e0e4ea;
    box-shadow: none;
    margin: 0;
    margin-bottom: 0;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.question-text {
    font-size: 1.4rem;
    color: #1a3a5f;
    margin-bottom: 30px;
    font-weight: 600;
    line-height: 1.6;
    min-height: 80px;
    display: flex;
    align-items: center;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
    justify-content: center;
}

.option-item {
    background: #f9fafc;
    border: 1px solid #dadddf;
    border-radius: 6px;
    padding: 18px 20px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 70px;
    height: 70px;
}

.option-item:hover {
    background: #eef2f7;
    border-color: #1f2b3a;
}

.option-item.selected {
    background: #e4e9f1;
    border-color: #1f2b3a;
    box-shadow: inset 0 0 0 1px rgba(31, 43, 58, 0.15);
}

.option-label {
    font-weight: 700;
    color: #1f2b3a;
    font-size: 1.1rem;
    min-width: 30px;
}

.option-text {
    color: #333;
    font-size: 1rem;
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
}

.quiz-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin: 0;
    margin-bottom: 0;
    padding: 20px;
    background: #f7f8fa;
    border-top: 1px solid #e0e4ea;
    width: 100%;
}

/* 结果页面样式 */
.result-content {
    background: #ffffff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(20, 23, 26, 0.08);
    border: 1px solid #e0e4ea;
    margin-top: 40px;
    text-align: center;
}

.result-title {
    font-size: 2rem;
    color: #1a3a5f;
    margin-bottom: 30px;
    font-weight: 700;
}

.result-main {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #e0e4ea;
}

.animal-name {
    font-size: 2.5rem;
    color: #1f2b3a;
    font-weight: 700;
    margin-bottom: 15px;
}

.personality-type {
    font-size: 1.1rem;
    color: #1f2b3a;
    margin-bottom: 20px;
    padding: 10px;
    background: #f4f6f9;
    border-radius: 6px;
    border: 1px dashed #c7ced8;
}

.result-details {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e0e4ea;
    text-align: left;
    margin-bottom: 30px;
}

.detail-section {
    margin-bottom: 25px;
}

.detail-section h3 {
    color: #1a3a5f;
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e8f0;
}

.detail-section p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 10px;
}

.detail-section ul {
    list-style: none;
    padding-left: 0;
}

.detail-section li {
    color: #555;
    line-height: 1.8;
    padding-left: 20px;
    position: relative;
    margin-bottom: 8px;
}

.detail-section li:before {
    content: "•";
    color: #2c5f8d;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.score-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.score-item {
    background: #f9fafc;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e0e4ea;
}

.score-item.highlight {
    background: #e4e9f1;
    border-color: #1f2b3a;
    box-shadow: inset 0 0 0 1px rgba(31, 43, 58, 0.1);
}

.score-item .animal {
    font-weight: 700;
    color: #2c5f8d;
    margin-bottom: 5px;
}

.score-item .score {
    font-size: 1.5rem;
    color: #1a3a5f;
    font-weight: 700;
}

/* 页脚样式 */
.footer {
    background: #151f2b;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: auto;
    font-size: 0.75rem;
}

.footer a {
    color: #cccccc;
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

.footer a:hover {
    opacity: 0.8;
    color: #e0e0e0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #quiz-page .container {
        padding: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
    }

    .container {
        padding: 15px;
    }

    .main-title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .welcome-content {
        padding: 40px 20px;
        margin: 0 auto;
    }

    .description-box {
        padding: 20px;
    }

    .quiz-content {
        padding: 25px 15px;
        min-height: 450px;
        margin: 0;
        width: 100%;
    }

    .quiz-header {
        height: 85px;
        padding: 15px;
        margin: 0;
        width: 100%;
    }

    .quiz-footer {
        padding: 15px;
        margin: 0;
        width: 100%;
    }

    .question-text {
        font-size: 1.2rem;
        min-height: 70px;
    }

    .option-item {
        padding: 15px;
        min-height: 65px;
        height: 65px;
    }

    .result-content {
        padding: 25px 20px;
    }

    .result-title {
        font-size: 1.6rem;
    }

    .animal-name {
        font-size: 2rem;
    }

    .score-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .quiz-footer {
        flex-direction: row;
        padding: 15px;
    }

    .btn-primary, .btn-secondary {
        flex: 1;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.6rem;
    }

    .question-text {
        font-size: 1.1rem;
        min-height: 60px;
    }

    .quiz-content {
        min-height: 400px;
        padding: 20px 12px;
        margin: 0;
        width: 100%;
    }

    .quiz-header {
        margin: 0;
        width: 100%;
    }

    .quiz-footer {
        margin: 0;
        width: 100%;
    }

    .quiz-header {
        height: 80px;
        padding: 12px;
    }

    .quiz-footer {
        flex-direction: row;
        padding: 12px;
    }

    .btn-primary, .btn-secondary {
        flex: 1;
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .option-item {
        min-height: 60px;
        height: 60px;
        padding: 12px;
    }

    .option-label {
        font-size: 1rem;
    }

    .option-text {
        font-size: 0.9rem;
    }

    .score-list {
        grid-template-columns: 1fr;
    }
}

