/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 隐藏滚动条 */
::-webkit-scrollbar {
    display: none;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #0f172a;
    color: #e2e8f0;
    line-height: 1.6;
    /* 添加背景图片 */
    background-image: url('../assets/faqbg.svg');
    /* background-image: url('https://s21.ax1x.com/2025/01/15/pEFld6P.png'); */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* 确保背景覆盖整个页面 */
    min-height: 100vh;
    /* 隐藏滚动条（兼容非webkit浏览器） */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* 容器 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto 0;
    /* 添加上边距40px */
    padding: 0 20px;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding-bottom: 60px;
    /* 增加容器底部内边距 */
}

/* 调整标题部分的间距 */
.page-header {
    text-align: center;
    padding: 40px 0 30px;
    /* 减少顶部内边距 */
}

.page-title {
    font-size: 2.5rem;
    color: #38bdf8;
    /* 改为更亮的蓝色 */
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
    font-size: 1.1rem;
    color: #cbd5e1;
    /* 改为更亮的灰色 */
}

/* FAQ项目 */
.faq-section {
    margin-bottom: 40px;
}

.faq-category {
    font-size: 1.5rem;
    color: #00c3ff;
    /* 与标题颜色一致 */
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #334155;
}

.faq-item {
    background: rgba(30, 41, 59, 0.9);
    /* 提高不透明度 */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    border-left: 4px solid #334155;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-left-color: #38bdf8;
}

.faq-question {
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #e2e8f0;
    /* 问题文字更亮 */
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: rgba(15, 23, 42, 0.9);
    /* 更深的背景 */
    color: #e2e8f0;
    /* 答案文字更亮 */
}

.faq-item.active .faq-answer {
    padding: 20px;
    max-height: 500px;
}

.faq-toggle {
    transition: transform 0.3s ease;
    color: #38bdf8;
    /* 箭头使用主题色 */
}

/* 响应式调整 */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .faq-question {
        font-size: 1rem;
        padding: 15px;
    }
}

/* 增强列表项的可读性 */
ol,
ul {
    color: #e2e8f0;
}

li {
    margin-bottom: 8px;
}

/* 增强卡片内容的可读性 */
[style*="background: #1e293b"] {
    background: rgba(15, 23, 42, 0.9) !important;
    color: #e2e8f0 !important;
}

/* 增强链接的可视性 */
a {
    color: #000000 !important;
    transition: all 0.2s ease;
}

a:hover {
    color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.1) !important;
}

/* 搜索框样式 */
.search-box {
    margin: 30px auto 40px;
    max-width: 600px;
    display: flex;
    gap: 10px;
}

#faq-search {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: #e2e8f0;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#faq-search:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 10px rgba(56, 189, 248, 0.2);
}

#faq-search::placeholder {
    color: #94a3b8;
}

#search-btn {
    padding: 0 25px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#search-btn:hover {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#search-btn:active {
    transform: translateY(0);
}

/* 移动端响应式调整 */
@media (max-width: 768px) {
    .search-box {
        flex-direction: column;
        gap: 10px;
    }

    #search-btn {
        padding: 12px;
    }
}

/* 代码块样式 */
.code-block {
    background: #1e293b;
    border-radius: 6px;
    margin: 15px 0;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: #334155;
    color: #e2e8f0;
}

.copy-btn {
    background: #38bdf8;
    border: none;
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    color: white;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: #0ea5e9;
}

pre {
    padding: 12px;
    margin: 0;
    overflow-x: auto;
    color: #e2e8f0;
    font-family: 'Courier New', Courier, monospace;
}

/* 警告框样式 */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin: 15px 0;
    color: #e2e8f0;
}

.alert-info {
    background: rgba(56, 189, 248, 0.1);
    border-left: 4px solid #38bdf8;
}

.alert-warning {
    background: rgba(234, 179, 8, 0.1);
    border-left: 4px solid #eab308;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid #ef4444;
}

/* 步骤流程样式 */
.steps-container {
    margin: 20px 0;
}

.step {
    display: flex;
    margin-bottom: 15px;
}

.step-number {
    width: 30px;
    height: 30px;
    background: #38bdf8;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.step-content {
    flex-grow: 1;
    color: #e2e8f0;
}

.step-content h4 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #e2e8f0;
}

/* 表格样式 */
.responsive-table {
    overflow-x: auto;
    margin: 15px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(30, 41, 59, 0.9);
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #334155;
    color: #e2e8f0;
}

th {
    background: #334155;
    color: #e2e8f0;
}

/* 视频容器 */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 比例 */
    height: 0;
    overflow: hidden;
    margin: 15px 0;
    border-radius: 6px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-caption {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #94a3b8;
    text-align: center;
}

/* 可折叠内容 */
.collapse-group {
    margin: 15px 0;
}

.collapse-item {
    margin-bottom: 10px;
}

.collapse-header {
    width: 100%;
    padding: 12px;
    background: #334155;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 6px;
    color: #e2e8f0;
    transition: background 0.2s;
}

.collapse-header:hover {
    background: #3c4a63;
}

.collapse-content {
    padding: 12px;
    background: #1e293b;
    border-radius: 0 0 6px 6px;
    display: none;
    color: #e2e8f0;
}

.collapse-item.active .collapse-content {
    display: block;
}

.collapse-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s;
}

.collapse-item.active .collapse-icon {
    transform: rotate(180deg);
}

/* 评分系统样式 */
/* 更新评分反馈样式 */
.rating-feedback {
    display: none;
    margin-top: 8px;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 4px;
    background-color: #f5f5f5;
    transition: all 0.3s ease;
}

/* 成功状态 */
.rating-feedback.success {
    color: #4CAF50;
    background-color: #e8f5e9;
}

/* 错误状态 */
.rating-feedback.error {
    color: #F44336;
    background-color: #ffebee;
}

/* 加载状态 */
.rating-feedback.loading {
    color: #2196F3;
    background-color: #e3f2fd;
}

.rating-container p {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #555;
}

.stars {
    display: flex;
    gap: 5px;
}

.star {
    font-size: 24px;
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

.star:hover,
.star.active {
    color: #ffc107;
    transform: scale(1.2);
}

.rating-feedback {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #4a90e2;
    font-style: italic;
}

/* 视频外层容器（插入视频功能有问题） */
.video-wrapper {
    margin: 15px 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 视频容器 - 保持16:9比例但确保内容完整显示 */
.video-container {
    position: relative;
    width: 100%;
    height: auto;
    /* 高度自动调整 */
    aspect-ratio: 16/9;
    /* 设置宽高比 */
    overflow: hidden;
    margin: 15px 0;
    border-radius: 6px;
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* 视频标题 */
.video-caption {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #94a3b8;
    text-align: center;
    padding: 0 10px;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .video-wrapper {
        margin: 10px -20px;
        /* 在小屏幕上扩展到边缘 */
        border-radius: 0;
    }
}