/* ========== BB 模板补充样式 ========== */

/* 粉色主题变量 */
:root {
    --header-bg: #ffffff;
    --header-text: #333333;
}
:root {
    --primary-color: #ff90bc;
    --secondary-color: #ffc0d9;
    --text-dark: #333333;
    --text-medium: #666666;
    --text-light: #999999;
    --bg-white: #ffffff;
    --bg-light: #f7f7f7;
    --link-color: #ff90bc;
    --link-hover: #d93978;
}

/* Footer 样式 */
.main-footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    padding: 60px 0 30px;
    margin-top: 60px;
}

.main-footer .footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.main-footer .footer-column h3 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.main-footer .footer-column p,
.main-footer .footer-column li {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    font-size: 14px;
}

.main-footer .footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-footer .footer-column ul li {
    margin-bottom: 12px;
}

.main-footer .footer-column ul li a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
}

.main-footer .footer-column ul li a:hover {
    color: #ffffff;
    padding-left: 5px;
}

.main-footer .footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.main-footer .footer-bottom p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    margin: 5px 0;
}

@media (max-width: 992px) {
    .main-footer .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .main-footer .footer-content {
        grid-template-columns: 1fr;
    }
}

/* 面包屑 */
.breadcrumb {
    background: var(--bg-light);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.breadcrumb .container {
    padding: 15px 20px;
    font-size: 14px;
    color: var(--text-medium);
}

.breadcrumb a {
    color: var(--link-color);
    font-weight: 600;
}

/* 文章页布局 */
.container main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    padding: 30px 0;
}

article {
    background: var(--bg-white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

article h1 {
    font-size: 26px;
    margin-bottom: 15px;
    color: var(--text-dark) !important;
}

article .meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

article .content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-dark);
}

.author-box {
    background: rgba(255, 144, 188, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    margin-top: 30px;
    border-radius: 0 12px 12px 0;
}

.author-box h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.post-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.post-nav a {
    color: var(--link-color);
}

/* 侧边栏 */
aside {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

aside .widget,
aside .cta-widget {
    background: var(--bg-white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

aside .cta-widget {
    background: rgba(255, 144, 188, 0.1);
    text-align: center;
}

aside .widget h3,
aside .cta-widget h3 {
    color: var(--primary-color);
    font-size: 16px;
    margin-bottom: 15px;
}

aside .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

aside .widget ul li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

aside .widget ul li:last-child {
    border-bottom: none;
}

aside .widget ul li a {
    color: var(--text-medium);
    font-size: 14px;
}

aside .widget ul li a:hover {
    color: var(--link-color);
}

aside .cta-widget .btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff !important;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
}

/* 相关文章 */
.related-articles-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.related-article-item {
    padding: 10px;
    background: var(--bg-light);
    border-radius: 8px;
}

.related-article-item:hover {
    background: rgba(255, 144, 188, 0.1);
}

.related-article-title a {
    color: var(--text-dark);
    font-size: 14px;
}

.related-article-title a:hover {
    color: var(--link-color);
}

.related-article-meta {
    font-size: 12px;
    color: var(--text-light);
}

/* 响应式 */
@media (max-width: 992px) {
    .container main {
        grid-template-columns: 1fr;
    }
    
    aside {
        order: 2;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    aside .widget,
    aside .cta-widget {
        flex: 1;
        min-width: 250px;
    }
}

@media (max-width: 600px) {
    article {
        padding: 20px;
    }
    
    article h1 {
        font-size: 20px;
    }
    
    aside {
        flex-direction: column;
    }
    
    aside .widget,
    aside .cta-widget {
        min-width: 100%;
    }
}

/* ==================== Sticky Header 样式修复 ==================== */
/* 滚动时固定 header 背景色 */
.header-wrapper.stuck,
.stuck .header-wrapper {
    background-color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-wrapper.stuck .header-bg-color,
.stuck .header-bg-color {
    background-color: #ffffff !important;
    opacity: 1 !important;
}

/* ===== 强制 header-bottom 和登录按钮在 stuck 状态可见 ===== */
.stuck .header-bottom,
.header-wrapper.stuck .header-bottom,
.stuck #wide-nav,
.header-wrapper.stuck #wide-nav {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 35px !important;
    overflow: visible !important;
    pointer-events: auto !important;
}

/* 确保 flex 容器内的元素可见 */
.stuck .header-bottom .flex-row,
.stuck #wide-nav .flex-row {
    display: flex !important;
    visibility: visible !important;
}

/* 桌面端只显示 hide-for-medium 的按钮 */
.stuck .header-bottom .hide-for-medium {
    display: flex !important;
}

.stuck .header-bottom .show-for-medium {
    display: none !important;
}

/* 移动端只显示 show-for-medium 的按钮 */
@media (max-width: 849px) {
    .stuck .header-bottom .hide-for-medium {
        display: none !important;
    }
    
    .stuck .header-bottom .show-for-medium {
        display: flex !important;
    }
}

/* 确保 header 文字可见 */
.header .nav-top-link {
    color: #333333 !important;
}

.stuck .nav-top-link,
.header-wrapper.stuck .nav-top-link {
    color: #333333 !important;
}

.stuck .nav-top-link:hover,
.header-wrapper.stuck .nav-top-link:hover {
    color: var(--primary-color) !important;
}

/* Logo 确保可见 */
.header .header_logo,
.header .header-logo {
    max-height: 60px;
}

/* 透明 header 时文字颜色 */
.header.transparent:not(.stuck) .nav-top-link {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 固定后的 header 层级 */
.stuck,
.header-wrapper.stuck {
    z-index: 999 !important;
}

/* ===== 登录按钮样式 ===== */
.stuck .button.primary,
.header-wrapper.stuck .button.primary {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    pointer-events: auto !important;
}

.stuck .button.primary:hover,
.header-wrapper.stuck .button.primary:hover {
    background-color: var(--link-hover) !important;
}
