:root {
    --pfaqs-primary-color: #4A90D9;
    --pfaqs-text-color: #1F1F1F;
    --pfaqs-muted-color: #6B7280;
    --pfaqs-border-color: #E5E7EB;
    --pfaqs-bg-light: #F9FAFB;
}

.pfaqs-container {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--pfaqs-text-color);
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

/* 头部背景区域 */
.pfaqs-header {
    position: relative;
    margin-bottom: 32px;
}

.pfaqs-header-bg {
    background: linear-gradient(120deg, rgba(74, 144, 217, 0.9), rgba(74, 144, 217, 0.72));
    color: #fff;
    border-radius: 16px;
    padding: 32px 24px;
    position: relative;
    overflow: hidden;
}

.pfaqs-header-bg::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -80px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
}

.pfaqs-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

/* 搜索区域 */
.pfaqs-search-wrapper {
    margin-top: 16px;
}

.pfaqs-search-box {
    display: grid;
    grid-template-columns: 220px 1fr 120px;
    gap: 12px;
    align-items: center;
}

.pfaqs-search-dropdown {
    position: relative;
}

.pfaqs-search-dropdown select,
.pfaqs-search-input {
    width: 100%;
    padding: 12px 14px;
    min-height: 48px;
    font-size: 16px;
    line-height: 1.4;
    border-radius: 12px;
    border: 1px solid var(--pfaqs-border-color);
    background: #fff;
    color: #111;
    outline: none;
}

.pfaqs-model-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px 16px;
}

.pfaqs-search-dropdown::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 10px;
    height: 10px;
    pointer-events: none;
    transform: translateY(-50%) rotate(45deg);
    border-right: 2px solid #111;
    border-bottom: 2px solid #111;
}

.pfaqs-search-input::placeholder {
    color: #9CA3AF;
}

.pfaqs-search-dropdown select {
    color: #111;
    background: #fff;
}

.pfaqs-search-dropdown option {
    color: #111;
}

.pfaqs-search-btn {
    background: #fd7546;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.pfaqs-search-btn:hover {
    background: #fd7546;
    transform: translateY(-1px);
}

.pfaqs-search-btn svg {
    width: 16px;
    height: 16px;
}

/* 主内容布局 */
.pfaqs-content {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
}

.pfaqs-sidebar {
    background: #fff;
    border: 1px solid var(--pfaqs-border-color);
    border-radius: 12px;
    padding: 16px;
    position: sticky;
    top: 20px;
    height: fit-content;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.pfaqs-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pfaqs-filter-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.pfaqs-filter-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
}

.pfaqs-filter-content {
    margin-top: 8px;
}

.pfaqs-model-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pfaqs-model-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.pfaqs-model-item input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #fd7546;
    border-radius: 50%;
    display: inline-grid;
    place-content: center;
    background: #fff;
    margin: 0;
}

.pfaqs-model-item input[type="radio"]::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fd7546;
    transform: scale(0);
    transition: transform 0.15s ease-in-out;
}

.pfaqs-model-item input[type="radio"]:checked::after {
    transform: scale(1);
}

.pfaqs-model-item label:hover {
    background: var(--pfaqs-bg-light);
}

.pfaqs-main {
    background: #fff;
    border: 1px solid var(--pfaqs-border-color);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.pfaqs-full-width {
    grid-column: 1 / -1;
}

.pfaqs-results-info {
    color: var(--pfaqs-muted-color);
    margin-bottom: 12px;
}

.pfaqs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pfaqs-item {
    border: 1px solid var(--pfaqs-border-color);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.pfaqs-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
}

.pfaqs-question-text {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--pfaqs-text-color);
}

.pfaqs-toggle-btn {
    background: #fd7546;
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.pfaqs-toggle-btn:hover {
    background: #fd7546;
}

.pfaqs-toggle-btn:focus,
.pfaqs-toggle-btn:focus-visible,
.pfaqs-toggle-btn:active {
    background: #fd7546;
    color: #fff;
    outline: none;
    box-shadow: none;
}

.pfaqs-item.active .pfaqs-toggle-btn:hover {
    background: #fd7546;
    color: #fff;
}

.pfaqs-toggle-btn[aria-expanded="true"] .pfaqs-icon-plus {
    display: none;
}

.pfaqs-toggle-btn[aria-expanded="false"] .pfaqs-icon-minus {
    display: none;
}

.pfaqs-answer {
    display: none;
    padding: 0 16px 14px;
    color: var(--pfaqs-muted-color);
    line-height: 1.6;
}

.pfaqs-answer-content p {
    margin: 0;
}

.pfaqs-item.active .pfaqs-answer {
    display: block;
}

.pfaqs-item.active .pfaqs-toggle-btn {
    background: #fd7546;
    color: #fff;
}

.pfaqs-toggle-btn svg {
    display: none;
    width: 16px;
    height: 16px;
}

.pfaqs-toggle-btn::before {
    content: '+';
    font-size: 16px;
    line-height: 1;
    font-weight: 700;
}

.pfaqs-toggle-btn[aria-expanded="true"]::before {
    content: '-';
}

.pfaqs-no-results {
    text-align: center;
    padding: 16px;
    color: var(--pfaqs-muted-color);
}

/* 加载更多 */
.pfaqs-load-more {
    text-align: center;
    margin-top: 12px;
}

.pfaqs-load-more-btn {
    background: #fd7546;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pfaqs-load-more-btn:hover {
    background: #fd7546;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(253, 117, 70, 0.25);
}

/* 加载指示 */
.pfaqs-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    color: var(--pfaqs-muted-color);
    margin-top: 12px;
}

.pfaqs-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #E5E7EB;
    border-top-color: var(--pfaqs-primary-color);
    border-radius: 50%;
    animation: pfaqs-spin 0.8s linear infinite;
}

@keyframes pfaqs-spin {
    to { transform: rotate(360deg); }
}

/* 移动端筛选 */
.pfaqs-mobile-filter-btn {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 16px;
    background: #fd7546;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 16px;
    box-shadow: 0 14px 30px rgba(74, 144, 217, 0.35);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pfaqs-mobile-filter-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1100;
}

.pfaqs-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.pfaqs-modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    padding: 16px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.pfaqs-modal-header,
.pfaqs-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pfaqs-modal-body {
    overflow-y: auto;
    margin: 12px 0;
}

.pfaqs-modal-close,
.pfaqs-modal-apply {
    background: transparent;
    border: none;
    cursor: pointer;
}

.pfaqs-modal-apply {
    background: #fd7546;
    color: #fff;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
}

.pfaqs-mobile-model-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pfaqs-mobile-model-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--pfaqs-border-color);
}

/* 响应式 */
@media (max-width: 900px) {
    .pfaqs-content {
        grid-template-columns: 1fr;
    }

    .pfaqs-sidebar {
        display: none;
    }

    .pfaqs-full-width {
        grid-column: 1;
    }

    .pfaqs-mobile-filter-btn {
        display: none;
    }
}

@media (max-width: 640px) {
    .pfaqs-container {
        padding: 16px 12px 32px;
    }

    .pfaqs-search-box {
        grid-template-columns: 1fr;
    }

    .pfaqs-search-btn {
        width: 100%;
    }
}
