/* 全局样式 */
body {
    font-family: "Microsoft YaHei", sans-serif;
    background-color: #f8f9fa;
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* 卡片样式 */
.card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: none;
    border-radius: 10px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

/* 文章内容样式 */
.article-content {
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

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

.article-content blockquote {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 5px solid #0d6efd;
    background-color: #f8f9fa;
    border-radius: 0 5px 5px 0;
}

.article-content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    color: #e83e8c;
    font-size: 0.9rem;
}

.article-content pre {
    padding: 1rem;
    margin-bottom: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    overflow-x: auto;
}

.article-content pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.article-content table {
    width: 100%;
    margin-bottom: 1.5rem;
    border-collapse: collapse;
}

.article-content table th,
.article-content table td {
    padding: 0.75rem;
    vertical-align: top;
    border: 1px solid #dee2e6;
}

.article-content table th {
    background-color: #f8f9fa;
}

/* 按钮样式 */
.btn {
    border-radius: 25px;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-2px);
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
}

.btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
    transform: translateY(-2px);
}

.btn-outline-danger:hover {
    transform: translateY(-2px);
}

/* 表单样式 */
.form-control {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
}

.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

#id_content {
    min-height: 300px;
    font-family: 'Courier New', monospace;
}

/* 模态框样式 */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* 评论样式 */
.comment-text {
    white-space: pre-wrap;
}

/* 相册图片展示样式 */
.image-gallery-container {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 10px 0;
    scrollbar-width: thin;
}

.image-gallery {
    display: inline-block;
}

.image-item {
    display: inline-block;
    vertical-align: top;
    margin-right: 15px;
    width: 250px;
}

.gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.05);
}

.image-caption {
    text-align: center;
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
    white-space: normal;
}

/* 懒加载图片样式 */
.gallery-image.lazy {
    background-color: #f0f0f0;
    filter: blur(5px);
    transition: filter 0.3s ease;
}

.gallery-image.lazy.loaded {
    filter: blur(0);
}

/* 滚动条样式 */
.image-gallery-container::-webkit-scrollbar {
    height: 8px;
}

.image-gallery-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.image-gallery-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.image-gallery-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 导航标签页样式 */
.nav-tabs .nav-link {
    border: 1px solid transparent;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    color: #6c757d;
    padding: 0.75rem 1.5rem;
}

.nav-tabs .nav-link.active {
    color: #0d6efd;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #0d6efd;
}

.nav-tabs .nav-link:hover {
    border-color: #e9ecef #e9ecef #adb5bd;
}

/* 首页特色样式 */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 2rem;
    border-radius: 10px;
}

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

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

.hero-btn {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* 卡片网格样式 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature-card {
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.feature-card-img {
    height: 200px;
    object-fit: cover;
}

.feature-card-body {
    padding: 1.5rem;
}

/* 统计信息样式 */
.stats-section {
    background-color: #fff;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #0d6efd;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6c757d;
    font-weight: 500;
}

/* 页脚样式 */
footer {
    background-color: #212529;
    color: #fff;
}

footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: #fff;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .image-item {
        width: 200px;
    }
    
    .gallery-image {
        height: 150px;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .hero-section {
        padding: 2rem 1rem;
    }
}