/* Bootstrap 风格自定义样式 */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background-color: #f8f9fa;
    color: #212529;
    min-height: 100vh;
}

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

/* 语言切换按钮 */
.lang-btn {
    cursor: pointer;
}

.lang-btn.active {
    background-color: #0d6efd;
    color: white;
}

/* 文章卡片样式 */
.post-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.post-card:hover {
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.post-thumbnail-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail {
    transform: scale(1.05);
}

.post-card-link {
    display: block;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.post-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.post-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #212529;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    font-weight: 500;
}

.post-card .post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6c757d;
    flex-wrap: wrap;
}

.post-card .post-meta .author,
.post-card .post-meta .date,
.post-card .post-meta time {
    font-weight: 500;
}

.post-card .preview {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    color: #6c757d;
}

.empty-state h2 {
    margin-bottom: 0.5rem;
    color: #212529;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .jumbotron h1 {
        font-size: 2rem;
    }
    
    .jumbotron .lead {
        font-size: 1rem;
    }
    
    .post-card h3 {
        font-size: 1.1rem;
    }
}

/* 文章内容页面样式 */
.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #212529;
    margin-bottom: 1.5rem;
}

.post-content h1,
.post-content h2,
.post-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #212529;
}

.post-content h1 {
    font-size: 1.75rem;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 0.5rem;
}

.post-content h2 {
    font-size: 1.5rem;
}

.post-content h3 {
    font-size: 1.25rem;
}

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

.post-content ul,
.post-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

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

.post-content code {
    background: #f8f9fa;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    color: #d63384;
}

.post-content pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.375rem;
    overflow-x: auto;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: #212529;
}

.post-content blockquote {
    border-left: 4px solid #0d6efd;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #6c757d;
    font-style: italic;
}

.post-content a {
    color: #0d6efd;
    text-decoration: none;
}

.post-content a:hover {
    text-decoration: underline;
}

/* 模态框样式（如果还需要） */
.modal-content {
    border-radius: 0.375rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #212529;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

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

.form-group textarea {
    resize: vertical;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    line-height: 1.6;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* 测评卡片样式 */
.review-card {
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.review-thumbnail-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f8f9fa;
    border-radius: 0.5rem 0.5rem 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.review-card:hover .review-thumbnail {
    transform: scale(1.05);
}

.review-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #6c757d;
    font-size: 0.9rem;
}

.source-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
}

/* 分页样式优化 */
.pagination {
    margin-top: 2rem;
}

.pagination .page-link {
    color: #667eea;
    border-color: #dee2e6;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination .page-item.active .page-link {
    background-color: #667eea;
    border-color: #667eea;
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

/* 固定在右上角的语言切换 */
.lang-switcher-fixed {
    position: fixed;
    top: 10px;
    right: 20px;
    z-index: 1050;
}

.lang-switcher-fixed .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    min-width: 60px;
}

@media (max-width: 991px) {
    .lang-switcher-fixed {
        position: relative;
        top: auto;
        right: auto;
        margin-left: auto;
        margin-top: 0.5rem;
    }
}

/* 电商引流横幅样式 */
.shop-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    animation: bannerPulse 3s ease-in-out infinite;
}

.shop-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 3s infinite;
}

@keyframes bannerPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(102, 126, 234, 0.5);
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.shop-banner-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.shop-banner h3 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.shop-banner p {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    opacity: 0.95;
}

.shop-banner-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.shop-banner-btn {
    display: inline-block;
    padding: 12px 30px;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.shop-banner-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.shop-banner-btn:hover::before {
    width: 300px;
    height: 300px;
}

.shop-banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    color: #5568d3;
}

.shop-banner-btn:active {
    transform: translateY(0);
}

.shop-banner-btn .emoji {
    margin-right: 8px;
    font-size: 1.2em;
}

@media (max-width: 768px) {
    .shop-banner h3 {
        font-size: 1.2rem;
    }
    
    .shop-banner p {
        font-size: 0.95rem;
    }
    
    .shop-banner-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .shop-banner-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .shop-banner-btn {
        width: 90%;
        max-width: 300px;
    }
}
