* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    line-height: 1.6;
}

/* 广告容器（审核通过前隐藏） */
.ad-container {
    display: none !important;
}

.ad-sidebar-left,
.ad-sidebar-right {
    display: none !important;
}

/* 头部导航 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.nav {
    display: flex;
    gap: 10px;
}

.nav-btn {
    padding: 10px 20px;
    border: none;
    background: rgba(255,255,255,0.2);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.nav-btn:hover,
.nav-btn.active {
    background: white;
    color: #667eea;
}

/* 面包屑导航 */
.breadcrumb {
    background: white;
    padding: 10px 30px;
    border-bottom: 1px solid #eee;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    gap: 10px;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* 主内容区 */
.main-content {
    display: block;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* 页面切换 */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* 首页 */
.hero {
    text-align: center;
    padding: 50px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
}

.section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 4px solid #667eea;
}

/* 页面头部 */
.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.page-desc {
    color: #666;
    margin-bottom: 20px;
}

/* 筛选标签 */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 14px;
    font-weight: bold;
    color: #555;
    white-space: nowrap;
    min-width: 70px;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

/* 卡片网格 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* 栏目头部 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* 更多按钮 */
.more-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* 手抄报卡片 */
.hw-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #f0f0f0;
}

.hw-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.hw-preview {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.hw-preview-content {
    width: 100%;
    height: 100%;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.hw-title {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(255,255,255,0.9);
    border-radius: 8px;
}

.hw-body {
    flex: 1;
    background: rgba(255,255,255,0.8);
    border-radius: 8px;
    padding: 10px;
    font-size: 12px;
    line-height: 1.6;
}

.hw-info {
    padding: 15px;
}

.hw-info h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
}

.hw-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.hw-tag {
    padding: 3px 10px;
    background: #f0f3ff;
    color: #667eea;
    border-radius: 12px;
    font-size: 12px;
}

/* 作文卡片 */
.comp-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid transparent;
}

.comp-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.comp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.comp-type {
    padding: 5px 12px;
    background: #667eea;
    color: white;
    border-radius: 15px;
    font-size: 12px;
}

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

.comp-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    font-weight: bold;
}

.comp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.comp-grade {
    padding: 2px 8px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 10px;
    font-size: 11px;
}

.comp-theme {
    padding: 2px 8px;
    background: #e3f2fd;
    color: #1565c0;
    border-radius: 10px;
    font-size: 11px;
}

.comp-special {
    padding: 2px 8px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
}

.comp-preview {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-card {
    text-align: center;
    padding: 30px 20px;
}

.category-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* 详情页面 */
.back-btn {
    padding: 10px 20px;
    border: none;
    background: #f0f0f0;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 20px;
    font-size: 14px;
    transition: background 0.3s;
}

.back-btn:hover {
    background: #e0e0e0;
}

/* 手抄报详情 */
.hw-detail {
    background: white;
    border-radius: 24px;
    padding: 50px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border: 1px solid #f5f5f5;
}

.hw-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.hw-detail-header h2 {
    font-size: 24px;
    color: #333;
}

.hw-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f3ff;
    color: #667eea;
    border: 2px solid #e0e7ff;
}

.btn-secondary:hover {
    background: #e0e7ff;
    transform: translateY(-2px);
}

.hw-paper {
    min-height: 600px;
    padding: 40px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.hw-paper-title {
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255,255,255,0.95);
    border-radius: 10px;
}

.hw-paper-content {
    font-size: 16px;
    line-height: 2;
    background: rgba(255,255,255,0.95);
    padding: 30px;
    border-radius: 10px;
}

.hw-paper-content h4 {
    color: #667eea;
    margin: 20px 0 10px;
    font-size: 18px;
}

.hw-paper-content p {
    text-indent: 2em;
    margin-bottom: 10px;
}

.hw-materials {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.hw-materials h4 {
    margin-bottom: 15px;
    color: #333;
}

.hw-materials ul {
    list-style: none;
    padding-left: 0;
}

.hw-materials li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    color: #666;
}

.hw-materials li:before {
    content: "✓ ";
    color: #667eea;
    font-weight: bold;
}

/* 作文详情 */
.comp-detail {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.comp-detail-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.comp-detail-title {
    font-size: 28px;
    color: #333;
    margin-bottom: 15px;
}

.comp-detail-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    color: #666;
    font-size: 14px;
    flex-wrap: wrap;
}

.comp-detail-special {
    padding: 3px 12px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
    border-radius: 12px;
    font-size: 13px;
    font-weight: bold;
}

.comp-detail-body {
    font-size: 16px;
    line-height: 2;
    color: #333;
}

.comp-detail-body p {
    text-indent: 2em;
    margin-bottom: 15px;
}

.comp-tips {
    margin-top: 30px;
    padding: 20px;
    background: #f0f3ff;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.comp-tips h4 {
    color: #667eea;
    margin-bottom: 10px;
}

.comp-tips ul {
    list-style: none;
    padding-left: 0;
}

.comp-tips li {
    padding: 5px 0;
    color: #666;
}

.comp-tips li:before {
    content: "💡 ";
}

/* 页脚 */
.footer {
    background: #333;
    color: white;
    padding: 40px 20px;
    text-align: center;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-links a {
    color: #667eea;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-desc {
    color: #999;
    font-size: 14px;
    margin-top: 20px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
    grid-column: 1 / -1;
}

/* 手抄报卡片图片样式 */
.hw-preview {
    position: relative;
    height: 250px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    background: #f5f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hw-cover-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
    padding: 10px;
}

.hw-card:hover .hw-cover-img {
    transform: scale(1.05);
}

.hw-image-count {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
}

.hw-preview-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: white;
    text-align: center;
}

.hw-preview-placeholder .hw-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.hw-preview-placeholder .hw-body {
    font-size: 14px;
    opacity: 0.9;
}

/* 手抄报详情图片样式 */
.hw-cover-section {
    margin-bottom: 35px;
}

.hw-cover-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border: 3px solid #fff;
}

.hw-cover-image img {
    width: 100%;
    max-height: 550px;
    object-fit: contain;
    display: block;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.hw-cover-image:hover .image-overlay,
.image-item:hover .image-overlay {
    opacity: 1;
}

.view-hd {
    background: white;
    color: #333;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
}

.download-btn {
    width: 100%;
    padding: 15px;
    font-size: 16px;
}

/* 图片画廊 */
.hw-images-gallery {
    margin: 40px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    padding: 30px;
    border-radius: 20px;
}

.hw-images-gallery h4 {
    margin-bottom: 8px;
    color: #333;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gallery-tip {
    color: #888;
    font-size: 14px;
    margin-bottom: 25px;
    padding-left: 5px;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.image-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 3/4;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
    background: white;
    padding: 8px;
}

.image-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.25);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    border-radius: 10px;
}

.image-item:hover img {
    transform: scale(1.08);
}

/* 图片查看器 */
.image-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.image-viewer-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.viewer-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
}

.viewer-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.viewer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding: 15px 20px;
    background: white;
    border-radius: 10px;
}

.viewer-title {
    font-size: 16px;
    color: #333;
    font-weight: bold;
}

/* 打印样式 */
@media print {
    .header,
    .breadcrumb,
    .back-btn,
    .hw-actions,
    .filter-tabs,
    .ad-container,
    .ad-sidebar-left,
    .ad-sidebar-right,
    .footer {
        display: none !important;
    }
    
    .main-content {
        display: block;
        padding: 0;
    }
    
    .page {
        grid-column: 1;
    }
    
    .hw-detail,
    .comp-detail {
        box-shadow: none;
        padding: 20px;
    }
}

/* 响应式 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .ad-sidebar-left,
    .ad-sidebar-right {
        display: none;
    }
}

/* 回到顶端按钮 */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    z-index: 1000;
}

.back-to-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero h1 {
        font-size: 24px;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .hw-detail,
    .comp-detail {
        padding: 20px;
    }
    
    .hw-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-tabs {
        justify-content: flex-start;
    }

    .filter-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-label {
        min-width: auto;
    }
    
    .comp-detail-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

/* 写作技巧卡片样式 */
.writing-tip-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.writing-tip-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: #667eea;
}

.writing-tip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.writing-tip-category {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.writing-tip-date {
    color: #999;
    font-size: 13px;
}

.writing-tip-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.writing-tip-summary {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.writing-tip-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.writing-tip-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #999;
}

.writing-tip-author {
    color: #888;
}

.writing-tip-date {
    color: #aaa;
}

.writing-tip-tag {
    background: #f0f3ff;
    color: #667eea;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

/* 写作技巧详情样式 */
.writing-tip-detail {
    background: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.writing-tip-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.writing-tip-detail-category {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
}

.writing-tip-detail-date {
    color: #999;
    font-size: 14px;
}

.writing-tip-detail-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.3;
}

.writing-tip-detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #999;
}

.detail-author {
    color: #888;
}

.detail-date {
    color: #aaa;
}

.writing-tip-detail-summary {
    font-size: 16px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.writing-tip-detail-content {
    margin-bottom: 35px;
}

.writing-tip-detail-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 25px 0 15px;
    padding-left: 15px;
    border-left: 4px solid #667eea;
}

.writing-tip-detail-content p {
    font-size: 16px;
    color: #444;
    line-height: 1.9;
    margin-bottom: 15px;
    text-align: justify;
}

.writing-tip-detail-content li {
    font-size: 16px;
    color: #444;
    line-height: 1.8;
    margin-left: 25px;
    padding: 8px 0;
    position: relative;
}

.writing-tip-detail-content li::before {
    content: '✓';
    position: absolute;
    left: -22px;
    color: #667eea;
    font-weight: bold;
}

.writing-tip-detail-tips {
    background: linear-gradient(135deg, #fff5f5 0%, #fff0f6 100%);
    border-radius: 16px;
    padding: 25px;
    margin-top: 30px;
}

.writing-tip-detail-tips h4 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.tips-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tip-item {
    background: white;
    border: 2px solid #feb2b2;
    color: #e53e3e;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .writing-tip-detail {
        padding: 20px;
    }
    
    .writing-tip-detail-title {
        font-size: 22px;
    }
    
    .writing-tip-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
