/* FAQ 专用样式 */
.faq-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.faq-container {
    background: #f8fafc;
}

/* Hero 区域 */
.faq-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.faq-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.faq-hero .container {
    position: relative;
    z-index: 1;
}

.faq-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.faq-hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* 搜索框 */
.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 15px 20px;
    font-size: 1rem;
    outline: none;
}

.search-box button {
    background: #667eea;
    color: white;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #5a6fd8;
}

/* 主要内容区域 */
.faq-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    padding: 60px 0;
}

/* 分类卡片 */
.faq-categories {
    margin-bottom: 60px;
}

.faq-categories h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #1a202c;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.category-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e2e8f0;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1a202c;
}

.category-card p {
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.category-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s;
}

.category-link:hover {
    transform: translateY(-2px);
}

/* 热门问题 */
.popular-questions h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #1a202c;
}

.question-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.question-item {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    transition: transform 0.3s, box-shadow 0.3s;
}

.question-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.question-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.question-tag {
    background: #e0e7ff;
    color: #3730a3;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.question-views {
    color: #64748b;
    font-size: 0.875rem;
}

.question-item h3 {
    margin-bottom: 0.5rem;
}

.question-item h3 a {
    color: #1a202c;
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

.question-item h3 a:hover {
    color: #667eea;
}

.question-item p {
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* 侧边栏 */
.faq-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
}

.sidebar-widget h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1a202c;
}

.quick-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quick-nav li {
    margin-bottom: 0.5rem;
}

.quick-nav a {
    color: #64748b;
    text-decoration: none;
    padding: 8px 0;
    display: block;
    transition: color 0.3s;
}

.quick-nav a:hover {
    color: #667eea;
}

.recent-questions {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-questions li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.recent-questions li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-questions a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.4;
    transition: color 0.3s;
}

.recent-questions a:hover {
    color: #667eea;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .faq-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .faq-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .faq-hero h1 {
        font-size: 2.5rem;
    }
    
    .faq-hero p {
        font-size: 1.125rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .search-box {
        flex-direction: column;
        border-radius: 12px;
    }
    
    .search-box input,
    .search-box button {
        border-radius: 0;
    }
    
    .search-box input {
        border-bottom: 1px solid #e2e8f0;
    }
}

/* 问题详情页样式 */
.question-detail {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.question-header {
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.question-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1rem;
}

.question-meta-detail {
    display: flex;
    gap: 20px;
    color: #64748b;
    font-size: 0.875rem;
}

.answer-content {
    line-height: 1.8;
    color: #374151;
}

.answer-content h3 {
    color: #1a202c;
    margin: 2rem 0 1rem;
}

.answer-content p {
    margin-bottom: 1rem;
}

.answer-content ul, .answer-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.answer-content li {
    margin-bottom: 0.5rem;
}

.answer-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875rem;
}

.answer-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.answer-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* 相关问题推荐 */
.related-questions {
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    margin-top: 30px;
}

.related-questions h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1a202c;
}

.related-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-list li {
    margin-bottom: 0.75rem;
}

.related-list a {
    color: #64748b;
    text-decoration: none;
    display: block;
    padding: 8px 0;
    transition: color 0.3s;
}

.related-list a:hover {
    color: #667eea;
}

/* 分类页面样式 */
.category-header {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 40px;
}

.category-title-section {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.category-icon-large {
    font-size: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
}

.category-info {
    flex: 1;
}

.category-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.category-description {
    color: #64748b;
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.category-meta {
    display: flex;
    gap: 20px;
    color: #64748b;
    font-size: 0.875rem;
}

.category-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.back-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.back-link:hover {
    color: #5a6fd8;
}

.category-filter select {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
}

/* 问题列表样式 */
.questions-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.question-item.featured {
    border: 2px solid #667eea;
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
}

.question-item {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.question-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.question-status {
    position: absolute;
    top: 16px;
    right: 16px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.hot {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
}

.question-content {
    padding-right: 80px;
}

.question-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.question-tag {
    background: #e0e7ff;
    color: #3730a3;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.question-views, .question-date {
    color: #64748b;
    font-size: 0.875rem;
}

.question-title {
    margin: 8px 0 12px;
}

.question-title a {
    color: #1a202c;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.3s;
}

.question-title a:hover {
    color: #667eea;
}

.question-summary {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 16px;
}

.question-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.difficulty {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.difficulty.easy {
    background: #dcfce7;
    color: #166534;
}

.difficulty.medium {
    background: #fef3c7;
    color: #92400e;
}

.difficulty.hard {
    background: #fee2e2;
    color: #991b1b;
}

.answer-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #f0fdf4;
    color: #166534;
}

.answer-status.pending {
    background: #fef3c7;
    color: #92400e;
}

/* 分页 */
.pagination {
    text-align: center;
    padding: 20px 0;
    color: #64748b;
    font-size: 0.875rem;
}

/* 侧边栏分类导航 */
.category-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-nav-list li {
    margin-bottom: 8px;
}

.category-nav-list li.active a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.category-nav-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #64748b;
    transition: all 0.3s;
}

.category-nav-list a:hover {
    background: #f8fafc;
    color: #374151;
}

.nav-icon {
    font-size: 1.25rem;
}

.nav-text {
    flex: 1;
    font-weight: 500;
}

.nav-count {
    background: #e2e8f0;
    color: #64748b;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.category-nav-list li.active .nav-count {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* 快速链接 */
.quick-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quick-links li {
    margin-bottom: 8px;
}

.quick-links a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s;
}

.quick-links a:hover {
    color: #667eea;
}

/* 统计网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-item {
    text-align: center;
    padding: 16px 8px;
    background: #f8fafc;
    border-radius: 8px;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

/* 响应式设计 - 分类页面 */
@media (max-width: 768px) {
    .category-title-section {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .category-icon-large {
        width: 60px;
        height: 60px;
        font-size: 2.5rem;
    }
    
    .category-title {
        font-size: 2rem;
    }
    
    .category-nav {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .question-content {
        padding-right: 0;
    }
    
    .question-status {
        position: static;
        margin-bottom: 8px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
} 