/* ============================================================
   PC bb 模板 —— 公共样式（header + footer + sidebar）
   对应 head.html / bottom.html，全站每页加载，务必保持精简
   ============================================================ */

/* ===== 全局基础重置 ===== */
/* 兜底 body 默认 margin（浏览器默认 8px，部分老 CSS 未清零） */
html,
body {
    margin: 0;
    padding: 0;
}

/* ===== Header 占位 ===== */
/* header 固定 60px 高，body 留出对应空间避免被遮 */
body {
    padding-top: 60px;
}

/* ===== 公共头部 ===== */
.modern-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
}

.modern-header__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modern-header__left {
    display: flex;
    align-items: center;
    gap: 36px;
}

.modern-header__logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.modern-header__logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #FF5252;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
}

.modern-header__logo-text {
    font-size: 1.35rem;
    font-weight: 700;
    color: #FF5252;
}

.modern-header__nav {
    display: flex;
    gap: 28px;
}

.modern-header__nav-item {
    color: #333;
    text-decoration: none;
    font-size: 0.98rem;
    padding: 6px 0;
    transition: color 0.2s;
}

.modern-header__nav-item:hover {
    color: #FF5252;
}

.modern-header__right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.modern-header__search {
    position: relative;
}

.modern-header__search-input {
    width: 220px;
    height: 36px;
    padding: 0 40px 0 14px;
    border: 1px solid #e0e0e0;
    border-radius: 18px;
    background: #f7f7f7;
    color: #333;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.modern-header__search-input::placeholder {
    color: #999;
}

.modern-header__search-input:focus {
    background: #fff;
    border-color: #FF5252;
}

.modern-header__search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-header__search-btn:hover {
    color: #FF5252;
}

.modern-header__actions {
    display: flex;
    gap: 6px;
}

.modern-header__btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border-radius: 6px;
    transition: all 0.2s;
    text-decoration: none;
    position: relative;
}

.modern-header__btn:hover {
    background: #f7f7f7;
    color: #FF5252;
}

.modern-header__btn-text {
    position: absolute;
    bottom: -26px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.modern-header__btn:hover .modern-header__btn-text {
    opacity: 1;
}

.modern-header__user {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #FF5252;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

/* ===== 公共底部 ===== */
.modern-footer {
    background: linear-gradient(135deg, #2C3E50 0%, #34495e 100%);
    color: rgba(255, 255, 255, 0.8);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.modern-footer__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.modern-footer__info {
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.8;
}

.modern-footer__info p {
    margin: 5px 0;
}

.modern-footer__info a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.modern-footer__info a:hover {
    color: white;
}

/* ===== 侧边工具栏 ===== */
.modern-sidebar {
    position: fixed;
    right: 20px;
    bottom: 100px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modern-sidebar__btn {
    width: 50px;
    height: 50px;
    background: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #2C3E50;
    transition: all 0.3s;
    position: relative;
}

.modern-sidebar__btn:hover {
    background: #FF5252;
    color: #fff;
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(255, 82, 82, 0.4);
}

.modern-sidebar__btn a {
    color: inherit;
}

.modern-sidebar__btn-text {
    position: absolute;
    right: 60px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modern-sidebar__btn:hover .modern-sidebar__btn-text {
    opacity: 1;
}

.modern-sidebar__btn.back-top {
    display: none;
}

.modern-sidebar__btn.back-top.show {
    display: flex;
}

/* ===== 响应式 ===== */
@media (max-width: 992px) {
    .modern-header__nav { display: none; }
    .modern-header__search-input { width: 160px; }
}

@media (max-width: 768px) {
    .modern-header__container { padding: 0 12px; }
    .modern-header__search-input { width: 130px; font-size: 0.85rem; }
    .modern-header__actions { gap: 2px; }
    .modern-footer__info p { font-size: 0.85rem; }
    .modern-sidebar { right: 10px; bottom: 80px; }
    .modern-sidebar__btn { width: 45px; height: 45px; font-size: 1.1rem; }
}
