/* ======================= 微信公众号风格 CSS - 全新设计 ======================= */
/* 此CSS文件独立使用，不依赖m.css */

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

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

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ======================= 微信绿色主题色 ======================= */
:root {
    --wechat-green: #07C160;
    --wechat-green-dark: #06AD56;
    --wechat-blue: #576B95;
    --wechat-bg: #f5f5f5;
    --wechat-card: #ffffff;
    --wechat-text: #333333;
    --wechat-text-secondary: #999999;
    --wechat-border: #e5e5e5;
}

/* ======================= 页面容器 ======================= */
.wechat-container {
    max-width: 750px;
    margin: 0 auto;
    background-color: var(--wechat-bg);
    min-height: 100vh;
}

/* ======================= 顶部导航栏 ======================= */
.wechat-header {
    background-color: var(--wechat-green);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(7, 193, 96, 0.2);
}

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

.wechat-logo {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.wechat-nav {
    display: flex;
    gap: 20px;
}

.wechat-nav a {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.wechat-nav a:hover,
.wechat-nav a.active {
    color: #fff;
    border-bottom-color: #fff;
}

/* ======================= 搜索框 ======================= */
.wechat-search {
    padding: 12px 16px;
    background-color: var(--wechat-card);
    margin-bottom: 10px;
}

.wechat-search-box {
    display: flex;
    align-items: center;
    background-color: #f5f5f5;
    border-radius: 20px;
    padding: 8px 16px;
}

.wechat-search-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
    color: #333;
}

.wechat-search-box input::placeholder {
    color: #999;
}

.wechat-search-box button {
    background: none;
    border: none;
    color: var(--wechat-green);
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
}

/* ======================= 卡片组件 ======================= */
.wechat-card {
    background-color: var(--wechat-card);
    margin: 0 0 10px 0;
    border-radius: 0;
    overflow: hidden;
}

.wechat-card-header {
    padding: 16px;
    border-bottom: 1px solid var(--wechat-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wechat-card-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--wechat-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.wechat-card-title::before {
    content: '';
    width: 4px;
    height: 18px;
    background-color: var(--wechat-green);
    border-radius: 2px;
}

.wechat-card-more {
    font-size: 13px;
    color: var(--wechat-text-secondary);
}

.wechat-card-count {
    font-size: 13px;
    color: var(--wechat-text-secondary);
}

.wechat-card-body {
    padding: 16px;
}

/* ======================= 内容列表 ======================= */
.wechat-list {
    display: flex;
    flex-direction: column;
}

.wechat-list-item {
    display: flex;
    padding: 12px 16px;
    border-bottom: 1px solid var(--wechat-border);
    transition: background-color 0.2s;
}

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

.wechat-list-item:active {
    background-color: #f5f5f5;
}

.wechat-list-thumb {
    width: 100px;
    height: 140px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #f0f0f0;
}

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

.wechat-list-info {
    flex: 1;
    margin-left: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.wechat-list-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--wechat-text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wechat-list-meta {
    font-size: 12px;
    color: var(--wechat-text-secondary);
    margin-top: 8px;
}

.wechat-list-tags {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.wechat-tag {
    font-size: 11px;
    color: var(--wechat-green);
    background-color: rgba(7, 193, 96, 0.1);
    padding: 2px 8px;
    border-radius: 3px;
}

/* ======================= 网格布局 ======================= */
.wechat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background-color: var(--wechat-border);
}

.wechat-grid-item {
    background-color: var(--wechat-card);
    padding: 12px;
    text-align: center;
}

.wechat-grid-thumb {
    width: 100%;
    padding-top: 140%;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.wechat-grid-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wechat-grid-title {
    font-size: 13px;
    color: var(--wechat-text);
    margin-top: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ======================= 详情页 ======================= */
.wechat-detail-header {
    background-color: var(--wechat-card);
    padding: 16px;
}

.wechat-detail-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--wechat-text);
    line-height: 1.4;
    margin-bottom: 12px;
}

.wechat-detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--wechat-text-secondary);
}

.wechat-detail-poster {
    width: 100%;
    max-width: 300px;
    margin: 0 auto 16px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wechat-detail-poster img {
    width: 100%;
    display: block;
}

.wechat-detail-section {
    background-color: var(--wechat-card);
    margin-bottom: 10px;
    padding: 16px;
}

.wechat-detail-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--wechat-text);
    margin-bottom: 12px;
    padding-left: 12px;
    border-left: 3px solid var(--wechat-green);
}

.wechat-detail-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--wechat-text);
}

.wechat-detail-content p {
    margin-bottom: 12px;
}

/* ======================= 按钮 ======================= */
.wechat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-size: 15px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.wechat-btn-primary {
    background-color: var(--wechat-green);
    color: #fff;
}

.wechat-btn-primary:active {
    background-color: var(--wechat-green-dark);
}

.wechat-btn-default {
    background-color: #f5f5f5;
    color: var(--wechat-text);
}

.wechat-btn-block {
    display: flex;
    width: 100%;
}

/* ======================= 面包屑 ======================= */
.wechat-breadcrumb {
    padding: 12px 16px;
    background-color: var(--wechat-card);
    font-size: 13px;
    color: var(--wechat-text-secondary);
    margin-bottom: 10px;
}

.wechat-breadcrumb a {
    color: var(--wechat-blue);
}

.wechat-breadcrumb a:hover {
    color: var(--wechat-green);
}

/* ======================= 分页 ======================= */
.wechat-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    gap: 8px;
}

.wechat-pagination a,
.wechat-pagination span {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 4px;
    background-color: var(--wechat-card);
    color: var(--wechat-text);
}

.wechat-pagination a:hover {
    background-color: var(--wechat-green);
    color: #fff;
}

.wechat-pagination .current {
    background-color: var(--wechat-green);
    color: #fff;
}

/* ======================= 底部 ======================= */
.wechat-footer {
    background-color: var(--wechat-card);
    padding: 20px 16px;
    text-align: center;
    margin-top: 20px;
}

.wechat-footer p {
    font-size: 12px;
    color: var(--wechat-text-secondary);
    margin: 4px 0;
}

/* ======================= 评论区 ======================= */
.wechat-comment {
    padding: 0;
}

.wechat-comment-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--wechat-border);
}

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

.wechat-comment-avatar {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.wechat-comment-content {
    flex: 1;
    min-width: 0;
}

.wechat-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.wechat-comment-author {
    font-size: 14px;
    color: var(--wechat-blue);
    font-weight: 500;
}

.wechat-comment-time {
    font-size: 12px;
    color: var(--wechat-text-secondary);
}

.wechat-comment-content p {
    font-size: 14px;
    color: var(--wechat-text);
    line-height: 1.6;
    margin: 0;
    word-wrap: break-word;
}

/* ======================= 标签云 ======================= */
.wechat-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wechat-tag {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    color: var(--wechat-green);
    background-color: #f0f9f0;
    border-radius: 16px;
    transition: all 0.3s;
}

.wechat-tag:hover {
    background-color: var(--wechat-green);
    color: #fff;
}

/* ======================= 视频播放器 ======================= */
#videoPlayerContainer {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
}

#videoPlayerContainer iframe,
#imagePlayer {
    width: 100%;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    color: #ccc;
    border: none;
}

@media (max-width: 768px) {
    #videoPlayerContainer iframe,
    #imagePlayer {
        height: 320px;
    }
}

@media (max-width: 480px) {
    #videoPlayerContainer iframe,
    #imagePlayer {
        height: 260px;
    }
}

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

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .wechat-detail-title {
        font-size: 18px;
    }
    
    .wechat-list-thumb {
        width: 80px;
        height: 112px;
    }
    
    .wechat-comment-avatar {
        width: 36px;
        height: 36px;
    }
}

/* ======================= 返回顶部 ======================= */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #07C160;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 999;
    color: white;
    font-size: 32px;
    line-height: 40px;
    text-align: center;
    font-weight: bold;
}
