.all {
    font-size: 20px;
    color: #22334d;
    line-height: 1.8;
    font-family: 'Comic Mono', '微软雅黑', Arial, sans-serif;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: 'Comic Mono', '微软雅黑', Arial, sans-serif;
    color: #1a2533;
    margin-top: 1.5em;
    margin-bottom: 0.6em;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.01em;
}

h1 {
    font-size: 2.2em;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.2em;
}

h2 {
    font-size: 1.9em;
    border-left: 4px solid #b0bec5;
    padding-left: 0.5em;
}

h3 {
    font-size: 1.5em;
    color: #fff;
    -webkit-text-stroke: 1.8px #000;
}

h4 {
    font-size: 1.1em;
    color: #3e4c5c;
}

h5 {
    font-size: 1em;
    color: #495057;
    font-weight: 600;
}


.qa-item {
    background: white;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.qa-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.question {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 20px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.question::before {
    content: "Q";
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.question:hover {
    background: linear-gradient(135deg, #43a5f5 0%, #1de9b6 100%);
}

.answer {
    padding: 0 25px;
    background: #fafafa;
    border-left: 4px solid #4facfe;
    position: relative;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.answer::before {
    content: "A";
    background: #4facfe;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    position: absolute;
    left: 22px;
    top: 50%;
}

.answer-content {
    margin-left: 35px;
    color: #333;
    line-height: 1.8;
    word-wrap: break-word;
    word-break: break-all;
    /* white-space: pre-wrap; 保留换行符和空格 */
}

.answer-content p {
    margin: 0 0 15px 0;
}

.answer-content ul,
.answer-content ol {
    margin: 10px 0;
    padding-left: 25px;
}

.answer-content li {
    margin-bottom: 8px;
}

.answer-content code {
    background: #e8f4fd;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #2196F3;
}

/* 展开状态 */
.qa-item.active .answer {
    max-height: 1000px;
    /* 根据内容调整 */
    padding: 25px;
}

.qa-item.active .question::before {
    content: "Q";
    transform: translateY(-50%) rotate(180deg);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qa-item {
    animation: fadeIn 0.5s ease forwards;
}

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

    .question {
        font-size: 16px;
        padding: 15px;
    }

    .answer {
        padding: 0 15px; /* 隐藏状态的padding调整 */
    }

    .qa-item.active .answer {
        padding: 20px 15px;
    }

    .answer::before {
        left: 8px; /* 移动端调整A图标位置 */
    }

    .answer-content {
        margin-left: 30px; /* 移动端调整内容左边距 */
    }
}

/* 主题色变化 */
.qa-item:nth-child(2n) .question {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.qa-item:nth-child(3n) .question {
    background: linear-gradient(135deg, #a8edea 0%, #ff6898 100%);
}

.qa-item:nth-child(4n) .question {
    background: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%);
}