/* WeChat 响应式模板样式 */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
    -webkit-font-smoothing: antialiased;
}

/* 头部 */
.header {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.header-inner {
    max-width: 750px;
    margin: 0 auto;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    color: #07c160;
    font-size: 18px;
    font-weight: 600;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #333;
    transition: 0.3s;
}

/* 导航 */
.nav-menu {
    background: #fff;
    border-top: 1px solid #eee;
}

.nav-inner {
    max-width: 750px;
    margin: 0 auto;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 15px;
}

.nav-inner::-webkit-scrollbar {
    display: none;
}

.nav-item {
    display: block;
    padding: 12px 16px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}

.nav-item.active,
.nav-item:hover {
    color: #07c160;
    border-bottom-color: #07c160;
}

/* 子导航 */
.nav-item-wrapper {
    position: relative;
}

.sub-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 120px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border-radius: 4px;
    padding: 5px 0;
    z-index: 101;
}

.nav-item-wrapper:hover .sub-nav {
    display: block;
}

.sub-nav-item {
    display: block;
    padding: 10px 16px;
    color: #666;
    text-decoration: none;
    font-size: 13px;
    white-space: nowrap;
    transition: 0.3s;
}

.sub-nav-item:hover,
.sub-nav-item.active {
    color: #07c160;
    background: #f5f5f5;
}

/* 主容器 */
.main-container {
    max-width: 750px;
    margin: 0 auto;
    padding: 15px;
    min-height: calc(100vh - 200px);
}

/* 区块 */
.section {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

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

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    position: relative;
    padding-left: 10px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: #07c160;
    border-radius: 2px;
}

.more-link {
    color: #999;
    font-size: 13px;
    text-decoration: none;
}

/* 文章列表 */
.article-list {
    padding: 0 0px;
}

.article-item {
    border-bottom: 1px solid #f5f5f5;
}

.article-item:last-child {
    border-bottom: none;
}

.article-link {
    display: flex;
    padding: 15px 0;
    text-decoration: none;
    color: inherit;
}

.article-thumb {
    width: 100px;
    height: 75px;
    flex-shrink: 0;
    margin-right: 12px;
    border-radius: 4px;
    overflow: hidden;
    background: #f0f0f0;
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.article-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.article-desc {
    font-size: 13px;
    color: #999;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.article-meta {
    font-size: 12px;
    color: #999;
}

.article-meta .dot {
    margin: 0 5px;
}

/* 文章详情 */
.article-detail {
    background: #fff;
    border-radius: 8px;
    padding: 20px 15px;
}

.article-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.article-detail .article-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
}

.article-detail .article-meta {
    font-size: 13px;
}

/* 视频 */
.video-wrapper {
    margin: 15px 0;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.video-wrapper video {
    width: 100%;
    display: block;
}

/* 图集 */
.gallery-section {
    margin: 20px 0;
}

.gallery-slider {
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.gallery-item {
    display: none;
    position: relative;
    aspect-ratio: 16/9;
}

.gallery-item.active {
    display: block;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-btn.prev {
    left: 10px;
}

.gallery-btn.next {
    right: 10px;
}

/* 文章内容 */
.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.article-content p {
    margin-bottom: 16px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

/* 标签 */
.article-tags {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    background: #f5f5f5;
    color: #666;
    font-size: 13px;
    border-radius: 12px;
    margin-right: 8px;
    margin-bottom: 8px;
}

/* 分享 */
.share-section {
    margin-top: 30px;
    text-align: center;
}

.share-btn {
    background: #07c160;
    color: #fff;
    border: none;
    padding: 12px 40px;
    border-radius: 24px;
    font-size: 15px;
    cursor: pointer;
    transition: 0.3s;
}

.share-btn:hover {
    background: #06ad56;
}

/* 底部 */
.footer {
    background: #fff;
    margin-top: 30px;
    padding: 20px 15px;
    text-align: center;
}

.footer-inner {
    max-width: 750px;
    margin: 0 auto;
}

.footer-links {
    margin-bottom: 10px;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 13px;
}

.footer-links .divider {
    color: #ddd;
    margin: 0 10px;
}

.copyright {
    color: #999;
    font-size: 12px;
}

/* 响应式 */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .nav-menu.show {
        display: block;
    }
    
    .nav-inner {
        flex-direction: column;
        padding: 10px 15px;
    }

    .nav-item-wrapper {
        display: block;
        width: 100%;
    }

    .nav-item {
        padding: 12px 0;
        border-bottom: 1px solid #f5f5f5;
    }

    .sub-nav {
        position: static;
        display: block;
        box-shadow: none;
        padding: 0 0 0 20px;
        background: #fafafa;
        border-radius: 0;
    }

    .sub-nav-item {
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .sub-nav-item:last-child {
        border-bottom: none;
    }
    
    .article-detail .article-title {
        font-size: 20px;
    }
    
    .article-content {
        font-size: 15px;
    }
}

@media (min-width: 769px) {
    body {
        background: #e8e8e8;
    }
    
    .main-container {
        padding: 20px;
    }
    
    .section,
    .article-detail {
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
}
