/**
 * 顶部导航栏 + 底部导航栏 + 移动端菜单 CSS
 * 从 about.html 提取
 */

/* ==================== 基础重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.6;
}

/* ==================== 顶部导航栏 ==================== */
.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #ff552e;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-size: 15px;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #ff552e;
    transform: scale(1.05);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff552e, #ffa800);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
    left: 0;
    transform: translateX(0);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 200px;
    padding: 8px 35px 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: #ff552e;
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #ff552e;
    cursor: pointer;
    padding: 5px 10px;
}

.login-btn {
    background-color: #ff552e;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: #e64a28;
}

/* ==================== 移动端菜单按钮 ==================== */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s;
}

/* ==================== 移动端菜单 ==================== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 8px;
}

.mobile-nav {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 8px;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
    transition: all 0.3s;
    background: #fafafa;
}

.mobile-nav-item:last-child {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-item.active {
    color: #ff552e;
    background: #fff5f2;
    border-color: #ff552e;
}

.mobile-nav-item:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.mobile-nav-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff552e, #ffa800);
    border-radius: 10px;
    color: #fff;
}

/* ==================== 移动端底部快捷菜单 ==================== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #f32d00, #5c18ff);
    z-index: 1000;
    padding: 8px 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}

.mobile-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 0;
    text-decoration: none;
    color: rgba(255,255,255,0.8);
    font-size: 11px;
    transition: all 0.3s;
    flex: 1;
}

.mobile-bottom-item.active {
    color: #fff;
}

.mobile-bottom-icon {
    font-size: 20px;
}

.mobile-bottom-text {
    font-weight: 500;
}

/* ==================== 页脚 ==================== */
.footer {
    background-color: #2d2d2d;
    color: #999;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    color: #ff552e;
    font-size: 24px;
    margin-bottom: 15px;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.8;
}

.footer-column h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 20px;
}

.footer-column ul {
    list-style: none;
}

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

.footer-column a {
    color: #999;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.footer-column a:hover {
    color: #ff552e;
    padding-left: 8px;
}

.footer-column a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ff552e;
    transition: width 0.3s ease;
}

.footer-column a:hover::after {
    width: 100%;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
}

/* ==================== 全局图片自适应样式 ==================== */

/* 所有图片默认自适应 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 文章详情页内容区图片 */
.article-content img,
.content-detail img,
.detail-content img,
.page-content img,
.editor-content img,
.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
}

/* 模板预览图 */
.preview-main img,
.template-preview img,
.screenshot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 缩略图 */
.thumb-img,
.item-thumb,
.card-thumb img,
.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* 视频缩略图 */
.video-thumb img,
.video-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 下载图标 */
.download-icon,
.download-card-icon {
    max-width: 64px;
    max-height: 64px;
    object-fit: contain;
}

/* 链接图标 */
.link-icon,
.link-favicon {
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
}

/* 专题封面图 */
.topic-cover,
.topic-cover-classic,
.collection-cover img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
}

/* 团队头像 */
.team-avatar,
.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* 相册/图集图片 */
.gallery-img,
.album-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-img:hover,
.album-item img:hover {
    transform: scale(1.05);
}

/* 新闻封面 */
.news-cover img,
.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 响应式图片尺寸调整 */
@media (max-width: 1200px) {
    .article-content img,
    .content-detail img,
    .detail-content img,
    .page-content img,
    .editor-content img,
    .post-content img {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    /* 移动端图片优化 */
    img {
        max-width: 100%;
    }

    .article-content img,
    .content-detail img,
    .detail-content img,
    .page-content img,
    .editor-content img,
    .post-content img {
        margin: 15px auto;
        border-radius: 6px;
    }

    /* 移动端下载图标缩小 */
    .download-icon,
    .download-card-icon {
        max-width: 48px;
        max-height: 48px;
    }

    /* 移动端专题封面 */
    .topic-cover,
    .topic-cover-classic {
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    /* 小屏手机进一步优化 */
    .article-content img,
    .content-detail img,
    .detail-content img,
    .page-content img,
    .editor-content img,
    .post-content img {
        margin: 10px auto;
        border-radius: 4px;
    }

    .download-icon,
    .download-card-icon {
        max-width: 40px;
        max-height: 40px;
    }
}

/* ==================== 编辑器按钮样式（公共资源）==================== */
.editor-btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 10px 0;
}
.editor-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    margin: 4px 0;
}
/* 基础按钮样式 - 确保文字颜色 */
.editor-btn,
a.editor-btn {
    color: #fff !important;
    text-decoration: none !important;
}
.editor-btn-primary,
a.editor-btn-primary {
    background: linear-gradient(135deg, #ff552e 0%, #ff7a59 100%);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(255, 85, 46, 0.3);
}
.editor-btn-primary:hover,
a.editor-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 85, 46, 0.4);
    color: #fff !important;
}
.editor-btn-success,
a.editor-btn-success {
    background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(82, 196, 26, 0.3);
}
.editor-btn-success:hover,
a.editor-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(82, 196, 26, 0.4);
    color: #fff !important;
}
.editor-btn-danger,
a.editor-btn-danger {
    background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(255, 77, 79, 0.3);
}
.editor-btn-danger:hover,
a.editor-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 77, 79, 0.4);
    color: #fff !important;
}
.editor-btn-warning,
a.editor-btn-warning {
    background: linear-gradient(135deg, #faad14 0%, #ffc53d 100%);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(250, 173, 20, 0.3);
}
.editor-btn-warning:hover,
a.editor-btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(250, 173, 20, 0.4);
    color: #fff !important;
}
.editor-btn-info,
a.editor-btn-info {
    background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}
.editor-btn-info:hover,
a.editor-btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(24, 144, 255, 0.4);
    color: #fff !important;
}
.editor-btn-purple,
a.editor-btn-purple {
    background: linear-gradient(135deg, #722ed1 0%, #9254de 100%);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(114, 46, 209, 0.3);
}
.editor-btn-purple:hover,
a.editor-btn-purple:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(114, 46, 209, 0.4);
    color: #fff !important;
}
.editor-btn-pink,
a.editor-btn-pink {
    background: linear-gradient(135deg, #eb2f96 0%, #f759ab 100%);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(235, 47, 150, 0.3);
}
.editor-btn-pink:hover,
a.editor-btn-pink:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(235, 47, 150, 0.4);
    color: #fff !important;
}
.editor-btn-cyan,
a.editor-btn-cyan {
    background: linear-gradient(135deg, #13c2c2 0%, #36cfc9 100%);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(19, 194, 194, 0.3);
}
.editor-btn-cyan:hover,
a.editor-btn-cyan:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(19, 194, 194, 0.4);
    color: #fff !important;
}
.editor-btn-black,
a.editor-btn-black {
    background: linear-gradient(135deg, #262626 0%, #434343 100%);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(38, 38, 38, 0.3);
}
.editor-btn-black:hover,
a.editor-btn-black:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(38, 38, 38, 0.4);
    color: #fff !important;
}
.editor-btn-gray,
a.editor-btn-gray {
    background: linear-gradient(135deg, #8c8c8c 0%, #bfbfbf 100%);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(140, 140, 140, 0.3);
}
.editor-btn-gray:hover,
a.editor-btn-gray:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(140, 140, 140, 0.4);
    color: #fff !important;
}

/* ==================== 标签页样式（公共资源）==================== */
.editor-tabs {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    margin: 16px 0;
    background: #fff;
}
.editor-tabs-header {
    display: flex;
    border-bottom: 1px solid #e8e8e8;
    background: #fafafa;
    border-radius: 8px 8px 0 0;
}
.editor-tab-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}
.editor-tab-btn:hover {
    color: #ff552e;
    background: #fff;
}
.editor-tab-btn.active {
    color: #ff552e;
    background: #fff;
    border-bottom-color: #ff552e;
    font-weight: 500;
}
.editor-tabs-content {
    padding: 16px;
    min-height: 100px;
}
.editor-tab-pane {
    display: none;
}
.editor-tab-pane.active {
    display: block;
}
.editor-tab-pane p {
    margin: 0 0 10px 0;
    line-height: 1.8;
}
.editor-tab-pane p:last-child {
    margin-bottom: 0;
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 70px;
    }

    .nav-menu,
    .search-box,
    .login-btn {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}
