/* Home Page Specific Styles */
.hero-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-banner::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" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: cover;
    opacity: 0.3;
}

.hero-content h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Featured Collections */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.featured-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.featured-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-card:hover .featured-image img {
    transform: scale(1.05);
}

.featured-overlay {
    position: absolute;
    bottom: 15px;
    left: 15px;
}

.featured-tag {
    background: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.featured-content {
    padding: 25px;
}

.featured-title {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #333;
    line-height: 1.4;
}

.featured-summary {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.featured-meta {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: #888;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Theme Grid */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.theme-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
}

.theme-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f5f5f5;
}

.theme-title {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-articles {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.theme-article {
    display: flex;
    gap: 15px;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.theme-article:hover {
    background-color: #f9f9f9;
}

.article-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-info h4 {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.4;
}

.article-meta {
    display: flex;
    gap: 10px;
    font-size: 0.8rem;
    color: #888;
}

.article-meta .category {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
}

/* Hot Topics */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0 40px;
}

.topic-card {
    background: white;
    border-radius: 12px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.topic-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 1.8rem;
}

.topic-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #333;
}

.topic-card p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.btn-outline {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

/* Popular Grid */
.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 25px 0 40px;
}

.popular-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
}

.popular-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.popular-image {
    height: 160px;
    overflow: hidden;
    position: relative;
}

.popular-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 87, 34, 0.9);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.popular-content {
    padding: 20px;
}

.popular-content h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #333;
    line-height: 1.4;
}

.popular-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #888;
}



.widget-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f5f5f5;
}

.trending-list, .most-viewed-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.trending-item, .most-viewed-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.trending-item:last-child, .most-viewed-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.trending-rank, .view-rank {
    background: #f0f0f0;
    color: #333;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.trending-content h5, .view-content h5 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    color: #333;
    line-height: 1.4;
}

.trending-meta, .view-meta {
    display: flex;
    gap: 10px;
    font-size: 0.8rem;
    color: #888;
}

.quick-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-tag {
    background: #f8f9fa;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #555;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: 1px solid #eaeaea;
}

.category-tag:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
}

.newsletter-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.newsletter-widget .widget-title {
    color: white;
    border-bottom-color: rgba(255,255,255,0.2);
}

.newsletter-widget p {
    opacity: 0.9;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

#newsletterForm {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

#newsletterForm input {
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255,255,255,0.9);
}

#newsletterForm button {
    background: white;
    color: #667eea;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#newsletterForm button:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

.small-text {
    font-size: 0.85rem;
    opacity: 0.7;
    text-align: center;
}



@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Footer */
.main-footer {
    background: #2d3748;
    color: #cbd5e0;
    padding: 60px 0 30px;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3, .footer-section h4 {
    color: white;
    margin-bottom: 20px;
}

.footer-section p {
    line-height: 1.6;
    opacity: 0.8;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    color: white;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.social-links a:hover {
    opacity: 1;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #a0aec0;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: #cbd5e0;
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}



.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 在 home.css 的末尾添加 */
.content-wrapper {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    width: 100%;
    max-width: 100%;
    align-items: flex-start; /* 顶部对齐 */
}

.content-left {
    flex: 1;
    min-width: 0; /* 防止内容溢出 */
}

.sidebar {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    height: auto; /* 改为auto，让内容决定高度 */
    overflow: visible; /* 确保内容可见 */
}

.section {
    margin-bottom: 40px;
}

/* 确保侧边栏 widget 正常显示 */
.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden; /* 隐藏可能的溢出 */
}

/* 修复 #sidebarThemes 样式 */
#sidebarThemes {
    list-style: none;
    padding: 0;
    margin: 0;
}

#sidebarThemes li {
    margin-bottom: 8px;
}

#sidebarThemes a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #555;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

#sidebarThemes a:hover {
    background: #667eea;
    color: white;
    transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .content-wrapper {
        gap: 30px;
    }
    
    .sidebar {
        width: 300px; /* 稍微缩小侧边栏 */
    }
    
    /* 调整网格布局 */
    .featured-grid,
    .theme-grid {
        grid-template-columns: repeat(2, 1fr); /* 改为2列 */
    }
}

@media (max-width: 992px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        margin-top: 30px;
    }
    
    .theme-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
}