/* 常见问题弹窗样式 */
.faq-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.faq-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
    position: relative;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.faq-modal-header {
    padding: 30px 30px 16px;
    text-align: center;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 12px 12px 0 0;
}

.faq-modal-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 6px 0;
    letter-spacing: 1px;
}

.faq-modal-header .subtitle {
    font-size: 14px;
    color: #666;
    margin: 0;
    font-weight: 400;
}

.faq-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #bdc3c7;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.faq-modal-close:hover {
    background: #f8f9fa;
    color: #e74c3c;
    transform: rotate(90deg);
}

.faq-modal-body {
    padding: 20px 30px 30px;
    flex: 1;
    overflow-y: auto;
    /* 隐藏滚动条但保持可滚动 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE和Edge */
}

/* Webkit浏览器隐藏滚动条 */
.faq-modal-body::-webkit-scrollbar {
    display: none;
}

.faq-search {
    position: relative;
    margin-bottom: 25px;
}

.faq-search input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.faq-search input:focus {
    border-color: #fd7e14;
}

.faq-search i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 16px;
}

.faq-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.faq-category-btn {
    padding: 8px 16px;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    background: #fff;
    color: #6c757d;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.faq-category-btn:hover,
.faq-category-btn.active {
    border-color: #fd7e14;
    background: #fd7e14;
    color: white;
    text-decoration: none;
}

.faq-section {
    margin-bottom: 30px;
}

.faq-section:last-child {
    margin-bottom: 0;
}

.faq-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #fd7e14;
    display: inline-block;
}

.faq-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.faq-item.hidden {
    display: none;
}

.faq-question {
    background: #f8f9fa;
    padding: 16px 20px;
    cursor: pointer;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.3s ease;
    position: relative;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-question::before {
    content: "❓";
    font-size: 16px;
    flex-shrink: 0;
}

.faq-question::after {
    content: "▼";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #666;
    transition: transform 0.3s ease;
}

.faq-question.active::after {
    transform: translateY(-50%) rotate(180deg);
}

.faq-answer {
    padding: 20px;
    color: #555;
    line-height: 1.7;
    display: none;
    background: #fff;
}

.faq-answer.active {
    display: block;
}

.faq-answer h4 {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

.faq-answer p {
    margin: 0 0 12px 0;
    font-size: 14px;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

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

.faq-answer li {
    margin-bottom: 6px;
    font-size: 14px;
}

.faq-answer strong {
    color: #333;
    font-weight: 600;
}

.faq-highlight {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #fd7e14;
    margin: 15px 0;
}

.faq-highlight p {
    margin: 0;
    color: #856404;
    font-weight: 500;
}

.faq-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    display: none;
}

.faq-no-results.show {
    display: block;
}

.faq-no-results i {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 15px;
}

.faq-no-results h4 {
    font-size: 18px;
    color: #6c757d;
    margin: 0 0 10px 0;
}

.faq-no-results p {
    font-size: 14px;
    color: #adb5bd;
    margin: 0;
}

.faq-footer {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 0 0 12px 12px;
    text-align: center;
    flex-shrink: 0;
    border-top: 1px solid #eee;
}

.faq-footer p {
    font-size: 13px;
    color: #666;
    margin: 0 0 12px 0;
}

.faq-contact {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.faq-contact-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.faq-contact-btn.primary {
    background: #fd7e14;
    color: white;
}

.faq-contact-btn.primary:hover {
    background: #e8690b;
    transform: translateY(-2px);
}

.faq-contact-btn.secondary {
    background: #6c757d;
    color: white;
}

.faq-contact-btn.secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .faq-modal-content {
        width: 95%;
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .faq-modal-header,
    .faq-modal-body,
    .faq-footer {
        padding: 20px;
    }
    
    .faq-modal-header h2 {
        font-size: 20px;
    }
    
    .faq-section h3 {
        font-size: 16px;
    }
    
    .faq-categories {
        gap: 8px;
    }
    
    .faq-category-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .faq-question {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .faq-answer {
        padding: 16px;
    }
    
    .faq-contact {
        flex-direction: column;
        align-items: center;
    }
    
    .faq-contact-btn {
        width: 200px;
        justify-content: center;
    }
    
    .faq-search input {
        padding: 10px 40px 10px 12px;
    }
}
