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

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
    min-height: 100vh;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    display: flex;
    flex-direction: column;
}

/* 主容器 */
.main-wrapper {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
    flex: 1;
}

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 0;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    height: auto;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: bold;
    flex-shrink: 0;
}

.nav-brand i {
    font-size: 1.6rem;
    color: #ffd700;
}

.nav-brand a {
    color: white;
    text-decoration: none;
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.3s;
    white-space: nowrap;
    font-size: 1rem;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.15);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 5px;
    margin: 0;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
    color: white;
    text-align: center;
    padding: 40px 0;
    margin-bottom: 30px;
    width: 100%;
}

.hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero h1 {
    font-size: 2.4rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 25px;
    max-width: 600px;
    line-height: 1.5;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: 25px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    line-height: 1;
    min-height: 44px;
}

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

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

.btn-large {
    padding: 14px 32px;
    font-size: 1.1rem;
    min-height: 48px;
}

/* 线报区域 */
main {
    width: 100%;
    flex: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
}

.section-header h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.section-header p {
    color: #666;
    font-size: 1.1rem;
}

/* 竖版线报卡片 - 优化 */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
    width: 100%;
}

.post-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #eef2ff;
    overflow: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.post-content {
    padding: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* 线报描述 - 加粗加大字号 */
.post-description {
    font-size: 1.3rem; /* 加大字号 */
    line-height: 1.8; /* 增加行高 */
    color: #222; /* 加深颜色 */
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f4ff;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    font-weight: 600; /* 加粗 */
    letter-spacing: 0.3px; /* 增加字间距 */
}

.post-description p {
    margin-bottom: 15px;
    font-weight: 600; /* 确保段落也加粗 */
}

.post-description p:last-child {
    margin-bottom: 0;
}

.post-description strong,
.post-description b {
    font-weight: 800; /* 更粗的加粗 */
    color: #111;
}

/* 图片轮播区域 */
.post-images-slider {
    position: relative;
    margin-top: 10px;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f9ff;
}

.slider-container {
    position: relative;
    width: 100%;
    min-height: 200px;
    display: flex;
    overflow: hidden;
}

.slide {
    flex: 0 0 100%;
    width: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.slide.active {
    display: flex;
    opacity: 1;
}

.slide img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    cursor: zoom-in;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.slide img:hover {
    transform: scale(1.02);
}

/* 单张图片样式 */
.post-image-single {
    width: 100%;
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9ff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.post-image-single img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    cursor: zoom-in;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 轮播控制按钮 */
.slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    z-index: 10;
    pointer-events: none;
}

.slider-prev,
.slider-next {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    color: #333;
    font-size: 1rem;
    opacity: 0.9;
    z-index: 11;
    pointer-events: auto;
    flex-shrink: 0;
}

.slider-prev:hover,
.slider-next:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    opacity: 1;
}

.slider-prev i,
.slider-next i {
    font-size: 1.3rem;
}

/* 轮播指示点 */
.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
    padding: 8px;
    pointer-events: none;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
    flex-shrink: 0;
}

.dot.active {
    background: white;
    transform: scale(1.3);
}

.dot:hover {
    background: white;
    transform: scale(1.2);
}

/* 图片计数器 */
.image-counter {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10;
    white-space: nowrap;
}

.current-slide {
    color: #ffd700;
    font-weight: bold;
}

/* 发布线报区域 */
.publish-section {
    margin: 40px 0;
    text-align: center;
    width: 100%;
}

.publish-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border: 2px dashed #667eea;
    max-width: 600px;
    margin: 0 auto;
}

.publish-card i {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 3rem;
}

.publish-card h3 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

.publish-card p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0 20px;
    margin-top: 40px;
    width: 100%;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 20px;
    width: 100%;
}

.footer-section h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 1rem;
}

.footer-section a:hover {
    color: #667eea;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #aaa;
    font-size: 0.9rem;
    width: 100%;
}

/* =================== 响应式设计 =================== */

/* 平板设备 */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 20px;
        max-width: 100%;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .post-description {
        font-size: 1.25rem;
    }
    
    .slide img {
        max-height: 450px;
    }
}

/* 移动端 - 重点修复 */
@media screen and (max-width: 768px) {
    html, body {
        width: 100vw;
        overflow-x: hidden;
    }
    
    .container {
        padding: 0 15px;
        width: 100%;
        max-width: 100%;
    }
    
    /* 导航栏优化 */
    .navbar {
        padding: 10px 0;
    }
    
    .navbar .container {
        padding: 0 15px;
        position: relative;
    }
    
    .nav-brand {
        font-size: 1.2rem;
        gap: 8px;
    }
    
    .nav-brand i {
        font-size: 1.4rem;
    }
    
    .nav-menu {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        padding: 15px;
        gap: 0;
        flex-direction: column;
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
        z-index: 1001;
        border-radius: 0 0 15px 15px;
        margin: 0;
        width: 100%;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-toggle {
        display: flex;
        z-index: 1002;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        padding: 12px 15px;
        justify-content: center;
        width: 100%;
        border-radius: 10px;
        margin-bottom: 5px;
        font-size: 1.1rem;
    }
    
    /* 英雄区域优化 */
    .hero {
        padding: 30px 0;
        margin-bottom: 20px;
    }
    
    .hero h1 {
        font-size: 1.6rem;
        gap: 10px;
        margin-bottom: 10px;
        flex-direction: column;
        text-align: center;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 20px;
        padding: 0 10px;
    }
    
    /* 线报卡片优化 */
    .posts-grid {
        gap: 15px;
        margin-bottom: 30px;
    }
    
    .post-card {
        border-radius: 10px;
        margin: 0;
    }
    
    .post-content {
        padding: 15px;
    }
    
    .post-description {
        font-size: 1.15rem; /* 移动端保持较大字号 */
        line-height: 1.7;
        padding-bottom: 15px;
        margin-bottom: 15px;
        font-weight: 600;
    }
    
    /* 图片区域优化 */
    .post-images-slider {
        margin-top: 10px;
        border-radius: 6px;
    }
    
    .slider-container {
        min-height: 150px;
    }
    
    .slide {
        padding: 10px;
    }
    
    .slide img {
        max-height: 350px;
        max-width: 95%;
    }
    
    .post-image-single {
        min-height: 150px;
        border-radius: 6px;
    }
    
    .post-image-single img {
        max-height: 350px;
        max-width: 95%;
    }
    
    /* 轮播控制按钮优化 */
    .slider-controls {
        padding: 0 10px;
    }
    
    .slider-prev,
    .slider-next {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }
    
    .slider-prev i,
    .slider-next i {
        font-size: 1.1rem;
    }
    
    /* 指示点优化 */
    .slider-dots {
        bottom: 10px;
        gap: 6px;
        padding: 6px;
    }
    
    .dot {
        width: 8px;
        height: 8px;
        min-width: 8px;
        min-height: 8px;
    }
    
    /* 图片计数器优化 */
    .image-counter {
        top: 10px;
        right: 10px;
        padding: 4px 10px;
        font-size: 0.85rem;
    }
    
    /* 发布线报区域优化 */
    .publish-section {
        margin: 30px 0;
    }
    
    .publish-card {
        padding: 20px;
        margin: 0;
        border-radius: 10px;
    }
    
    .publish-card i {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }
    
    .publish-card h3 {
        font-size: 1.4rem;
        margin-bottom: 8px;
    }
    
    .publish-card p {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    /* 按钮优化 */
    .btn {
        padding: 10px 20px;
        font-size: 1rem;
        min-height: 44px;
        width: auto;
        min-width: 120px;
    }
    
    .btn-large {
        padding: 12px 24px;
        font-size: 1.05rem;
        min-height: 46px;
    }
    
    /* 页脚优化 */
    .footer {
        padding: 30px 0 15px;
        margin-top: 30px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-section h3 {
        font-size: 1.2rem;
    }
    
    .footer-section a {
        font-size: 1rem;
    }
    
    .footer-bottom {
        padding-top: 15px;
        font-size: 0.85rem;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
}

/* 小屏幕手机 */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .nav-brand {
        font-size: 1.1rem;
    }
    
    .hero {
        padding: 25px 0;
    }
    
    .hero h1 {
        font-size: 1.4rem;
        gap: 8px;
    }
    
    .hero p {
        font-size: 0.95rem;
        padding: 0;
    }
    
    .post-content {
        padding: 12px;
    }
    
    .post-description {
        font-size: 1.1rem; /* 小屏幕保持可读性 */
        line-height: 1.6;
        padding-bottom: 12px;
        margin-bottom: 12px;
    }
    
    .slide img {
        max-height: 280px;
    }
    
    .post-image-single img {
        max-height: 280px;
    }
    
    .slider-prev,
    .slider-next {
        width: 36px;
        height: 36px;
    }
    
    .slider-prev i,
    .slider-next i {
        font-size: 1rem;
    }
    
    .dot {
        width: 7px;
        height: 7px;
    }
    
    .publish-card {
        padding: 15px;
    }
    
    .publish-card h3 {
        font-size: 1.3rem;
    }
    
    .btn {
        padding: 9px 18px;
        font-size: 0.95rem;
    }
}

/* 超小屏幕手机 */
@media screen and (max-width: 360px) {
    .container {
        padding: 0 10px;
    }
    
    .post-description {
        font-size: 1.05rem;
    }
    
    .slide img {
        max-height: 240px;
    }
    
    .post-image-single img {
        max-height: 240px;
    }
    
    .btn {
        width: 100%;
    }
}

/* 防止图片过大 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .slider-prev,
    .slider-next,
    .dot {
        min-height: 44px;
        min-width: 44px;
    }
    
    .post-card {
        -webkit-tap-highlight-color: transparent;
    }
    
    .slide img:hover,
    .post-image-single img:hover {
        transform: none;
    }
}

/* 修复iOS Safari的100vh问题 */
@supports (-webkit-touch-callout: none) {
    body {
        min-height: -webkit-fill-available;
    }
    
    .hero {
        min-height: -webkit-fill-available;
        height: auto;
    }
}

/* 防止长链接换行问题 */
a {
    word-break: break-word;
}

/* 确保所有点击区域足够大 */
button, 
a, 
input, 
textarea, 
select {
    font-size: 16px; /* 防止iOS缩放 */
}