/* Premium Sponsor 样式 */
.premium-sponsor {
    border-radius: 16px;
    padding: 0.5rem 1rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

[data-bs-theme="dark"] .premium-sponsor {
    background: var(--card-bg-dark);
    border: 1px solid rgba(0, 247, 255, 0.1);
}

[data-bs-theme="light"] .premium-sponsor {
    background: var(--card-bg-light);
    border: 1px solid rgba(0, 81, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.premium-sponsor:hover {
    transform: translateY(-2px);
}

[data-bs-theme="dark"] .premium-sponsor:hover {
    box-shadow: var(--border-glow);
}

[data-bs-theme="light"] .premium-sponsor:hover {
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.15);
}

.sponsor-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    padding: 0;
    text-align: center;
    letter-spacing: 0.5px;
}

[data-bs-theme="light"] .sponsor-title {
    background: linear-gradient(45deg, #0051ff, #0066cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-bs-theme="dark"] .sponsor-title {
    background: linear-gradient(45deg, #00f7ff, #0051ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: var(--text-glow);
}

.sponsor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: center;
}

.sponsor-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    height: 80px;
    background: transparent !important;
    border: none !important;
}

.sponsor-item:hover {
    transform: translateY(-2px) scale(1.02);
    text-decoration: none;
}

.sponsor-logo {
    width: 120px !important;
    height: 50px !important;
    object-fit: contain !important;
    filter: grayscale(0.3) opacity(0.8);
    transition: all 0.3s ease;
}

.sponsor-item:hover .sponsor-logo {
    filter: grayscale(0) opacity(1);
    transform: scale(1.05);
}

/* Trending topics 间距调整 */
.trending-topics-section {
    margin-bottom: 1.5rem;
}

.trending-topics-section h4 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

/* Advertisement 样式调整 */
.advertisement-section {
    margin-top: 1.5rem;
}

.advertisement-section p {
    margin-top: 0.8rem;
    margin-bottom: 0;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--secondary-color) !important;
    opacity: 1;
    text-align: center;
}

[data-bs-theme="dark"] .advertisement-section p {
    color: #00f7ff !important;
}

[data-bs-theme="light"] .advertisement-section p {
    color: #0051ff !important;
}


/* 移动端响应式 */
@media (max-width: 768px) {
    .premium-sponsor {
        padding: 1rem;
        margin-bottom: 1.2rem;
        min-height: 120px;
    }

    .sponsor-title {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }

    .sponsor-grid {
        gap: 0.75rem;
    }

    .sponsor-item {
        padding: 0.75rem;
        height: 70px;
    }

    .sponsor-logo {
        width: 100px !important;
        height: 40px !important;
    }

    .trending-topics-section {
        margin-bottom: 1.2rem;
    }

    .trending-topics-section h4 {
        margin-top: 1.2rem;
        margin-bottom: 0.8rem;
    }

    .advertisement-section {
        margin-top: 1.2rem;
    }

    .advertisement-section p {
        margin-top: 0.8rem;
        margin-bottom: 0;
        font-size: 0.85rem;
        line-height: 1.4;
        color: var(--secondary-color) !important;
        opacity: 1;
        text-align: center;
    }

    [data-bs-theme="dark"] .advertisement-section p {
        color: #00f7ff !important;
    }

    [data-bs-theme="light"] .advertisement-section p {
        color: #0051ff !important;
    }
}


@media (max-width: 480px) {
    .sponsor-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .sponsor-item {
        height: 60px;
    }

    .sponsor-logo {
        width: 90px !important;
        height: 35px !important;
    }

    .premium-sponsor {
        margin-bottom: 1rem;
    }

    .trending-topics-section {
        margin-bottom: 1rem;
    }

    .trending-topics-section h4 {
        margin-top: 1rem;
        margin-bottom: 0.6rem;
    }

    .advertisement-section {
        margin-top: 1rem;
    }
}

/* Sticky Sidebar 样式 */
.sticky-sidebar {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    z-index: 10;
}

/* 确保sidebar容器的sticky行为 */
[data-sticky] {
    position: sticky !important;
    top: 80px !important;
    z-index: 10;
}

/* 在移动端禁用sticky */
@media (max-width: 991px) {
    [data-sticky] {
        position: relative !important;
        top: auto !important;
    }

    .sticky-sidebar {
        position: relative;
        top: auto;
        max-height: none;
        overflow-y: visible;
    }
}

/* 优化滚动条样式 */
.sticky-sidebar::-webkit-scrollbar {
    width: 4px;
}

.sticky-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sticky-sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 2px;
    opacity: 0.6;
}

[data-bs-theme="light"] .sticky-sidebar::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
}

.sticky-sidebar::-webkit-scrollbar-thumb:hover {
    opacity: 1;
}
