@charset "UTF-8";

/* ============ Theme Variables ============ */
/* 默认主题：赛时红 */
:root,
:root[data-faq-theme="red"] {
    --faq-primary: #D7000F;
    --faq-primary-dark: #b1000c;
    --faq-primary-rgb: 215, 0, 15;
    --faq-accent: #502c6c;
    --faq-accent-dark: #3c2151;
}

/* 紫色主题 */
:root[data-faq-theme="purple"] {
    --faq-primary: #502c6c;
    --faq-primary-dark: #3c2151;
    --faq-primary-rgb: 80, 44, 108;
    --faq-accent: #D7000F;
    --faq-accent-dark: #b1000c;
}

/* ============ FAQ Section Styles ============ */
.choice-faq-section {
    padding: 30px 0 60px;
    max-width: 1140px;
    margin: 0 auto;
}

/* Header */
.faq-header {
    text-align: center;
    margin-bottom: 25px;
    padding: 0 15px;
    position: relative;
}

.faq-title {
    font-size: 32px;
    font-weight: 600;
    color: #0C1B26;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.faq-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--faq-accent), var(--faq-primary));
    border-radius: 2px;
    transition: background 0.4s ease;
}

.faq-subtitle {
    font-size: 15px;
    color: #6c757d;
    margin: 0;
    line-height: 1.6;
}

/* ============ Theme Switcher ============ */
.faq-theme-switcher {
    position: absolute;
    top: 0;
    right: 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1.5px solid #e9ecef;
    border-radius: 30px;
    padding: 5px 8px 5px 16px;
    box-shadow: 0 2px 10px rgba(12, 27, 38, 0.06);
    cursor: pointer;
    font-size: 13px;
    color: #6c757d;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    z-index: 5;
}

.faq-theme-switcher:hover {
    border-color: var(--faq-primary);
    color: var(--faq-primary);
    box-shadow: 0 4px 16px rgba(var(--faq-primary-rgb), 0.2);
    transform: translateY(-1px);
}

.faq-theme-switcher .theme-label {
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.3px;
    transition: color 0.25s ease;
}

.faq-theme-switcher:hover .theme-label {
    color: var(--faq-primary);
}

.faq-theme-switcher .theme-dot-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    background: #f0f2f5;
    border-radius: 20px;
}

.faq-theme-switcher .theme-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.faq-theme-switcher .theme-dot:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.faq-theme-switcher .theme-dot[data-color="red"] {
    background: #D7000F;
}

.faq-theme-switcher .theme-dot[data-color="purple"] {
    background: #502c6c;
}

:root[data-faq-theme="red"] .faq-theme-switcher .theme-dot[data-color="red"] {
    border-color: #fff;
    box-shadow: 0 0 0 2px #D7000F, 0 1px 3px rgba(0, 0, 0, 0.15);
    transform: scale(1.1);
}

:root[data-faq-theme="purple"] .faq-theme-switcher .theme-dot[data-color="purple"] {
    border-color: #fff;
    box-shadow: 0 0 0 2px #502c6c, 0 1px 3px rgba(0, 0, 0, 0.15);
    transform: scale(1.1);
}

/* 主题切换器右侧提示气泡 */
.faq-theme-switcher::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(12, 27, 38, 0.9);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: all 0.25s ease;
    z-index: 10;
}

.faq-theme-switcher:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* ============ Search Box ============ */
.faq-search-box {
    max-width: 640px;
    margin: 0 auto 30px;
    position: relative;
    padding: 0 15px;
}

.faq-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    transition: transform 0.25s ease;
}

.faq-search-input-wrap:hover {
    transform: translateY(-1px);
}

.faq-search-input {
    width: 100%;
    padding: 15px 54px 15px 52px;
    font-size: 15px;
    color: #212529;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 30px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(12, 27, 38, 0.04);
    box-sizing: border-box;
}

.faq-search-input::placeholder {
    color: #adb5bd;
    transition: color 0.25s ease;
}

.faq-search-input-wrap:hover .faq-search-input {
    border-color: #c4cad3;
    box-shadow: 0 6px 20px rgba(12, 27, 38, 0.08);
}

.faq-search-input-wrap:hover .faq-search-input::placeholder {
    color: #6c757d;
}

.faq-search-input:focus {
    border-color: var(--faq-primary);
    box-shadow: 0 6px 24px rgba(var(--faq-primary-rgb), 0.2);
    background: #fff;
}

.faq-search-input:focus + .faq-search-clear,
.faq-search-input:focus ~ .faq-search-clear {
    display: inline-flex;
}

.faq-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #adb5bd;
    pointer-events: none;
    transition: color 0.25s ease;
}

.faq-search-input-wrap:hover .faq-search-icon,
.faq-search-input:focus ~ .faq-search-icon {
    color: var(--faq-primary);
}

.faq-search-clear {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    background: #f0f2f5;
    color: #6c757d;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    transition: all 0.25s ease;
    padding: 0;
    font-weight: 300;
}

.faq-search-clear:hover {
    background: var(--faq-primary);
    color: #fff;
    transform: translateY(-50%) rotate(90deg);
}

.faq-search-clear.visible {
    display: inline-flex;
}

/* ============ Search Results ============ */
.faq-search-results {
    display: none;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(12, 27, 38, 0.12);
    overflow: hidden;
    margin-top: -16px;
    margin-bottom: 30px;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #f0f2f5;
}

.faq-search-results.visible {
    display: block;
    animation: fadeInUp 0.3s ease;
}

.faq-search-results::-webkit-scrollbar {
    width: 8px;
}

.faq-search-results::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.faq-search-results::-webkit-scrollbar-thumb {
    background: #c4cad3;
    border-radius: 4px;
}

.faq-search-results::-webkit-scrollbar-thumb:hover {
    background: var(--faq-primary);
}

.faq-search-results-header {
    padding: 14px 22px;
    background: linear-gradient(135deg, var(--faq-primary) 0%, var(--faq-primary-dark) 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 2;
    transition: background 0.4s ease;
}

.faq-search-results-count {
    background: rgba(255, 255, 255, 0.25);
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.faq-search-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.faq-search-result-item {
    padding: 16px 22px 16px 22px;
    border-bottom: 1px solid #f0f2f5;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    position: relative;
    border-left: 4px solid transparent;
}

.faq-search-result-item:last-child {
    border-bottom: none;
}

.faq-search-result-item:hover {
    background: rgba(var(--faq-primary-rgb), 0.05);
    border-left-color: var(--faq-primary);
    padding-left: 26px;
}

.faq-search-result-item:active {
    background: rgba(var(--faq-primary-rgb), 0.1);
}

.faq-search-result-num {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--faq-primary), var(--faq-primary-dark));
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    margin-top: 2px;
    transition: transform 0.25s ease;
    box-shadow: 0 2px 6px rgba(var(--faq-primary-rgb), 0.25);
}

.faq-search-result-item:hover .faq-search-result-num {
    transform: scale(1.1) rotate(-5deg);
}

.faq-search-result-content {
    flex: 1;
    min-width: 0;
    padding-right: 30px;
    position: relative;
}

.faq-search-result-tab {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(var(--faq-primary-rgb), 0.1);
    color: var(--faq-primary);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
    transition: all 0.25s ease;
}

.faq-search-result-item:hover .faq-search-result-tab {
    background: var(--faq-primary);
    color: #fff;
}

.faq-search-result-question {
    font-size: 15px;
    color: #212529;
    font-weight: 600;
    margin: 0 0 5px;
    line-height: 1.5;
    transition: color 0.25s ease;
}

.faq-search-result-item:hover .faq-search-result-question {
    color: var(--faq-primary);
}

.faq-search-result-question em,
.faq-search-result-snippet em {
    background: rgba(255, 213, 0, 0.35);
    color: #0C1B26;
    font-style: normal;
    font-weight: 700;
    padding: 1px 3px;
    border-radius: 3px;
}

.faq-search-result-snippet {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.25s ease;
}

.faq-search-result-item:hover .faq-search-result-snippet {
    color: #495057;
}

.faq-search-result-arrow {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(var(--faq-primary-rgb), 0.1);
    color: var(--faq-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.faq-search-result-item:hover .faq-search-result-arrow {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    background: var(--faq-primary);
    color: #fff;
}

.faq-search-empty {
    padding: 50px 24px;
    text-align: center;
    color: #adb5bd;
    font-size: 14px;
    line-height: 1.7;
}

.faq-search-empty-icon {
    font-size: 44px;
    display: block;
    margin-bottom: 12px;
    opacity: 0.4;
}

.faq-search-empty-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #adb5bd;
    opacity: 0.8;
}

/* ============ Tab Navigation ============ */
.faq-tabs {
    margin-bottom: 30px;
}

.faq-tab-nav {
    display: flex;
    justify-content: center;
    gap: 0;
    border-bottom: 2px solid #e9ecef;
    flex-wrap: wrap;
}

.faq-tab-btn {
    flex: 1;
    max-width: 320px;
    min-width: 180px;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 500;
    color: #6c757d;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    margin-bottom: -2px;
}

.faq-tab-btn:hover {
    color: var(--faq-primary);
    background: rgba(var(--faq-primary-rgb), 0.04);
}

.faq-tab-btn.active {
    color: var(--faq-primary);
    border-bottom-color: var(--faq-primary);
    background: rgba(var(--faq-primary-rgb), 0.06);
}

.faq-tab-btn .tab-icon {
    font-size: 18px;
}

/* ============ Tab Panels ============ */
.faq-tab-panels {
    position: relative;
}

.faq-panel {
    display: none;
    animation: fadeInUp 0.4s ease;
}

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

.faq-panel.hidden-by-search {
    display: none !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ Highlight Match (Search) ============ */
.faq-item.search-match {
    animation: searchPulse 1.5s ease;
}

@keyframes searchPulse {
    0% { box-shadow: 0 0 0 0 rgba(var(--faq-primary-rgb), 0.6); }
    50% { box-shadow: 0 0 0 8px rgba(var(--faq-primary-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--faq-primary-rgb), 0); }
}

.faq-item.search-highlighted {
    background: rgba(var(--faq-primary-rgb), 0.06) !important;
    border-left: 4px solid var(--faq-primary) !important;
}

/* ============ Category Styles ============ */
.faq-category {
    margin-bottom: 35px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(12, 27, 38, 0.06);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.faq-category:hover {
    box-shadow: 0 4px 20px rgba(12, 27, 38, 0.1);
}

.faq-category-title {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--faq-primary) 0%, var(--faq-primary-dark) 100%);
    padding: 16px 24px;
    margin: 0;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    position: relative;
    transition: background 0.4s ease;
}

.faq-category-title::before {
    /*content: '';*/
    display: inline-block;
    width: 4px;
    height: 20px;
    background: var(--faq-accent);
    margin-right: 12px;
    border-radius: 2px;
    flex-shrink: 0;
    transition: background 0.4s ease;
}

.faq-category > .faq-item {
    border-bottom: 1px solid #f0f2f5;
}

.faq-category > .faq-item:last-child {
    border-bottom: none;
}

/* ============ FAQ Item Styles ============ */
.faq-item {
    background: #fff;
}

.faq-question {
    width: 100%;
    padding: 18px 24px;
    font-size: 15px;
    font-weight: 500;
    color: #212529;
    background: #fff;
    border: none;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: background 0.25s ease, color 0.25s ease;
    line-height: 1.5;
}

.faq-question:hover {
    background: #f8f9fa;
    color: var(--faq-primary);
}

.faq-question[aria-expanded="true"] {
    background: rgba(var(--faq-primary-rgb), 0.04);
    color: var(--faq-primary);
}

.faq-q-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--faq-primary), var(--faq-primary-dark));
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.4s ease;
}

.faq-question[aria-expanded="true"] .faq-q-icon {
    background: linear-gradient(135deg, var(--faq-accent), var(--faq-accent-dark));
}

.faq-toggle-icon {
    margin-left: auto;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f0f2f5;
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 400;
    transition: transform 0.3s ease, background 0.25s ease, color 0.25s ease;
}

.faq-question[aria-expanded="true"] .faq-toggle-icon {
    background: var(--faq-primary);
    color: #fff;
    transform: rotate(45deg);
}

/* ============ FAQ Answer Styles ============ */
.faq-answer {
    padding: 20px 24px 20px 66px;
    color: #495057;
    font-size: 14.5px;
    line-height: 1.75;
}

.faq-answer p {
    margin: 0 0 12px;
    line-height: 1.75;
}

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

.faq-answer ol,
.faq-answer ul {
    margin: 0 0 12px;
    padding-left: 22px;
    line-height: 1.75;
}

.faq-answer ol li,
.faq-answer ul li {
    margin-bottom: 6px;
    line-height: 1.75;
}

.faq-answer ol li:last-child,
.faq-answer ul li:last-child {
    margin-bottom: 0;
}

.faq-answer ol {
    list-style-type: decimal;
}

.faq-answer ul {
    list-style-type: disc;
}

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

.faq-answer::-webkit-scrollbar {
    width: 6px;
}

.faq-answer::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* ============ Footer ============ */
.faq-footer {
    text-align: center;
    margin-top: 40px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f2f5 100%);
    border-radius: 8px;
}

.faq-footer p {
    margin: 0;
    font-size: 15px;
    color: #495057;
}

.faq-contact-link {
    color: var(--faq-primary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.25s ease;
}

.faq-contact-link:hover {
    color: var(--faq-accent);
    text-decoration: underline;
}

/* ============ Responsive Styles ============ */
@media (max-width: 991.98px) {
    .choice-faq-section {
        padding: 20px 0 40px;
    }

    .faq-title {
        font-size: 26px;
    }

    .faq-tab-btn {
        font-size: 14px;
        padding: 14px 12px;
        min-width: 140px;
    }

    .faq-category-title {
        font-size: 18px;
        padding: 14px 20px;
    }

    .faq-question {
        font-size: 14.5px;
        padding: 16px 20px;
        gap: 12px;
    }

    .faq-answer {
        padding: 0 20px 18px 58px;
        font-size: 14px;
    }

    .faq-theme-switcher {
        position: static;
        margin: 0 auto 20px;
    }

    .faq-header {
        text-align: center;
    }
}

@media (max-width: 767.98px) {
    .faq-title {
        font-size: 22px;
    }

    .faq-subtitle {
        font-size: 14px;
    }

    .faq-tab-nav {
        flex-direction: column;
        gap: 0;
    }

    .faq-tab-btn {
        max-width: 100%;
        width: 100%;
        padding: 14px 16px;
        font-size: 15px;
        border-bottom: 2px solid #e9ecef;
        border-left: 3px solid transparent;
        margin-bottom: 0;
    }

    .faq-tab-btn.active {
        border-bottom-color: #e9ecef;
        border-left-color: var(--faq-primary);
    }

    .faq-category {
        margin-bottom: 25px;
        border-radius: 6px;
    }

    .faq-category-title {
        font-size: 16px;
        padding: 12px 16px;
    }

    .faq-q-icon {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .faq-question {
        font-size: 14px;
        padding: 14px 16px;
        gap: 10px;
    }

    .faq-toggle-icon {
        width: 22px;
        height: 22px;
        font-size: 12px;
    }

    .faq-answer {
        padding: 0 16px 16px 44px;
        font-size: 13.5px;
    }

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

    .faq-footer {
        padding: 20px 16px;
    }

    .faq-search-input {
        padding: 12px 46px 12px 46px;
        font-size: 14px;
    }

    .faq-search-icon {
        left: 16px;
        width: 18px;
        height: 18px;
    }

    .faq-search-result-item {
        padding: 14px 16px;
        gap: 10px;
    }

    .faq-search-result-question {
        font-size: 14px;
    }

    .faq-theme-switcher {
        font-size: 12px;
    }
}

@media (max-width: 575.98px) {
    .choice-faq-section {
        padding: 15px 0 30px;
    }

    .faq-title {
        font-size: 20px;
    }

    .faq-category-title {
        font-size: 15px;
    }

    .faq-question {
        font-size: 13.5px;
        padding: 12px 14px;
    }

    .faq-answer {
        padding: 0 14px 14px 40px;
        font-size: 13px;
    }

    .faq-search-results-header {
        padding: 12px 16px;
        font-size: 13px;
    }

    .faq-search-result-item {
        padding: 12px 14px;
    }
}

/* ============ Toolbar: Expand/Collapse All ============ */
.faq-toolbar {
    display: flex;
    justify-content: flex-end;
    margin: 4px 0 16px;
}

.faq-expand-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--faq-primary);
    background: #fff;
    border: 1.5px solid var(--faq-primary);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-expand-all-btn:hover {
    background: var(--faq-primary);
    color: #fff;
    box-shadow: 0 4px 16px rgba(var(--faq-primary-rgb), 0.25);
    transform: translateY(-1px);
}

.faq-expand-all-btn:active {
    transform: translateY(0);
}

.faq-expand-all-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

/* 展开状态：图标翻转（双箭头朝上） */
.faq-expand-all-btn[aria-expanded="true"] .faq-expand-all-icon {
    transform: rotate(180deg);
}

@media (max-width: 576px) {
    .faq-toolbar {
        justify-content: center;
    }

    .faq-expand-all-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 18px;
    }
}
