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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 加载动画 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #07c160;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 主容器 */
.container {
    max-width: 677px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
}

/* 文章头部 */
.article-header {
    padding: 20px 16px;
    border-bottom: 1px solid #e7e7e7;
}

.article-title {
    font-size: 22px;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 12px;
    color: #000;
}

.article-meta {
    font-size: 14px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 12px;
}

.article-meta .author {
    color: #576b95;
    font-weight: 500;
}

/* 主要内容 */
.article-content {
    padding: 0 16px 20px;
}

/* 封面图片 */
.cover-image {
    margin: 20px 0;
    text-align: center;
}

.cover-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 章节标题 */
section h2 {
    font-size: 18px;
    font-weight: bold;
    margin: 24px 0 12px;
    color: #000;
}

/* 段落文本 */
section p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 16px;
    color: #333;
}

/* 产品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.product-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    transition: transform 0.2s ease;
}

.product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}

.product-item h3 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #000;
}

.product-item .price {
    font-size: 16px;
    font-weight: bold;
    color: #ff6b6b;
}

/* 活动卡片 */
.activity-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin: 16px 0;
}

.activity-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    text-align: center;
}

.activity-card ul {
    list-style: none;
}

.activity-card li {
    padding: 6px 0;
    font-size: 15px;
}

/* 图片画廊 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.image-gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.image-gallery img:hover {
    transform: scale(1.02);
}

/* 联系信息 */
.contact-info {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
}

.contact-info p {
    margin-bottom: 8px;
    font-size: 15px;
}

.contact-info strong {
    color: #576b95;
    margin-right: 8px;
}

/* 底部互动栏 */
.article-footer {
    border-top: 1px solid #e7e7e7;
    padding: 16px;
    background: #fff;
    position: sticky;
    bottom: 0;
}

.interaction-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.interaction-bar button {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 12px;
    color: #888;
}

.interaction-bar button:hover {
    background-color: #f0f0f0;
}

.interaction-bar button.active {
    color: #07c160;
}

.interaction-bar .icon {
    font-size: 20px;
}

/* 分享弹窗 */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.share-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    width: 90%;
    max-width: 320px;
    text-align: center;
}

.share-content h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.share-option {
    background: #f8f9fa;
    border: none;
    padding: 16px 8px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease;
}

.share-option:hover {
    background-color: #e9ecef;
}

.share-option .icon {
    font-size: 24px;
}

.close-modal {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .container {
        margin: 0;
    }
    
    .article-title {
        font-size: 20px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .share-options {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}
