/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    text-align: center;
}

header h1 {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 10px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 15px;
}

.header-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.header-links a {
    display: inline-block;
    padding: 8px 20px;
    background-color: #f8f9fa;
    color: #555;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    border: 2px solid #e0e6ed;
    transition: all 0.2s;
}

.header-links a:hover {
    background-color: #e8f4f8;
    border-color: #3498db;
    color: #3498db;
    transform: translateY(-1px);
}

/* 筛选区域 */
.filter-section {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.filter-category {
    margin-bottom: 20px;
}

.filter-category:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.filter-label::before {
    content: '';
    width: 4px;
    height: 16px;
    background-color: #3498db;
    margin-right: 8px;
    border-radius: 2px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tag {
    padding: 8px 16px;
    border-radius: 20px;
    background-color: #f5f7fa;
    color: #555;
    border: 2px solid #e0e6ed;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.filter-tag:hover {
    background-color: #e8f4f8;
    border-color: #3498db;
    transform: translateY(-1px);
}

.filter-tag.active {
    background-color: #3498db;
    color: #fff;
    border-color: #3498db;
    font-weight: 500;
}

.filter-tag.knowledge-active {
    background-color: #e67e22;
    border-color: #e67e22;
    color: #fff;
}

.filter-actions {
    margin-top: 15px;
    text-align: right;
}

.btn-reset {
    padding: 10px 24px;
    background-color: #ecf0f1;
    color: #555;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reset:hover {
    background-color: #bdc3c7;
    transform: translateY(-1px);
}

/* 统计信息 */
.stats-section {
    background-color: #e8f4f8;
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #2c3e50;
}

/* 题目容器 */
.questions-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* 题目卡片 */
.question-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s;
}

.question-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

.question-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    align-items: center;
    flex-wrap: wrap;
}

.meta-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    background-color: #e8f4f8;
    color: #2980b9;
    font-weight: 500;
}

.knowledge-tag {
    background-color: #fef3e8;
    color: #e67e22;
}

.share-btn {
    padding: 4px 12px;
    background-color: #27ae60;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.share-btn:hover {
    background-color: #229954;
    transform: translateY(-1px);
}

.share-btn.copied {
    background-color: #3498db;
}

.question-number {
    font-size: 20px;
    font-weight: bold;
    color: #3498db;
}

.question-content {
    margin-bottom: 20px;
}

.question-content h3 {
    color: #2c3e50;
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 600;
}

.content-text {
    color: #333;
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 10px;
}

.content-image {
    margin: 15px 0;
    text-align: center;
}

.content-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.answer-section {
    background-color: #f0f9ff;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 4px solid #3498db;
}

.answer-section h3 {
    color: #2980b9;
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 600;
}

.answer-text {
    color: #2c3e50;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 8px;
}

.explanation-section {
    background-color: #f8faf9;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #27ae60;
}

.explanation-section h3 {
    color: #27ae60;
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 600;
}

.explanation-text {
    color: #555;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 8px;
}

/* 加载和空状态 */
.loading, .no-data {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-size: 16px;
}

/* 回到顶部 */
.back-to-top {
    text-align: center;
    padding: 30px 0;
    margin-top: 20px;
}

.back-to-top button {
    padding: 12px 30px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.back-to-top button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

/* 题目详情页面样式 */
.detail-header {
    padding: 20px 30px;
}

.detail-header h1 {
    font-size: 22px;
    margin-bottom: 12px;
}

.detail-card {
    margin-top: 20px;
}

#question-detail-container {
    margin-top: 20px;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: #7f8c8d;
    font-size: 13px;
    border-top: 1px solid #ecf0f1;
}

/* 关于页面样式 */
.about-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.about-card h2 {
    color: #2c3e50;
    font-size: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.about-card p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 10px;
}

.about-card ul {
    list-style: none;
    padding-left: 0;
}

.about-card ul li {
    color: #555;
    line-height: 1.8;
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.about-card ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #3498db;
    font-weight: bold;
}

.contact-card {
    background-color: #f0f9ff;
    border-left: 4px solid #3498db;
}

.contact-email {
    text-align: center;
    margin: 20px 0;
}

.contact-email a {
    display: inline-block;
    padding: 12px 30px;
    background-color: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.contact-email a:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.contact-note {
    text-align: center;
    color: #7f8c8d;
    font-size: 14px;
}

.btn-back {
    display: inline-block;
    padding: 12px 30px;
    background-color: #ecf0f1;
    color: #555;
    text-decoration: none;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.2s;
}

.btn-back:hover {
    background-color: #bdc3c7;
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 22px;
    }

    .filter-section {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group select {
        width: 100%;
    }

    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .question-meta {
        flex-direction: column;
        gap: 5px;
    }
}
