*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}
body{
    font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans‑serif;
    background:#f3f4f6;
    color:#1f2937;
    line-height:1.55;
}

.top-nav{
    background:#2563eb;
    color:#fff;
}
.nav-inner{
    max-width:1200px;
    margin:0 auto;
    padding:14px 16px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}
.nav-title{
    font-size:18px;
    font-weight:600;
}
.nav-actions a{
    color:#ffffff;
    text-decoration:none;
    margin-left:18px;
}
.nav-actions a:hover{
    text-decoration:underline;
}

.container{
    max-width:1200px;
    margin:0 auto;
    padding:20px 16px;
}

/*公告模块 */
.notice-box{
    margin-bottom:16px;
}
.notice-item{
    background:#fff;
    padding:12px 16px;
    border-radius:8px;
    margin-bottom:8px;
}
.notice-top{
    background:#fff1f0;
    border:1px solid #ff4d4f;
}

/*广告网格板块 导航栏下方 */
.ad-grid-wrap{
    background:#ffffff;
    border-radius:12px;
    padding:16px;
    margin-bottom:24px;
    box-shadow:0 1px 4px rgba(0,0,0,0.07);
}
.ad-grid-title{
    font-size:15px;
    font-weight:600;
    margin-bottom:14px;
    color:#1f2937;
}
.ad-grid-list{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:14px;
}
.ad-card-item{
    background:#f9fafb;
    border-radius:8px;
    overflow:hidden;
    height:140px;
    border:1px solid #e5e7eb;
}
.ad-card-item img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.main-wrap{
    display:grid;
    grid-template-columns:280px 1fr;
    gap:20px;
}

.sidebar-filter{
    background:#ffffff;
    border-radius:10px;
    padding:18px;
    height:fit-content;
}
.sidebar-filter h3{
    margin-bottom:14px;
    font-size:16px;
}
.filter-item{
    margin-bottom:12px;
}
.filter-item label{
    display:block;
    margin-bottom:4px;
    font-size:14px;
    color:#374151;
}
.filter-item input,
.filter-item select,
.filter-item textarea{
    width:100%;
    padding:9px 11px;
    border:1px solid #d1d5db;
    border-radius:6px;
    font-size:14px;
}
.filter-item textarea{
    resize:vertical;
}

.btn{
    padding:9px 14px;
    border-radius:6px;
    border:none;
    cursor:pointer;
    font-size:14px;
}
.btn-primary{
    background:#2563eb;
    color:#fff;
}
.btn-gray{
    background:#6b7280;
    color:#fff;
}
.btn-danger{
    background:#dc2626;
    color:#fff;
}

.post-list{
    display:flex;
    flex-direction:column;
    gap:16px;
}
.post-card{
    background:#fff;
    border:2px solid #2563eb;
    border-radius:12px;
    padding:22px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
}
/*置顶帖子卡片加强高亮 */
.post-card-top{
    border-color:#f5222d;
    box-shadow: 0 4px 14px rgba(245,34,45,0.18);
}
.badge-top{
    background:#fff2e8;
    color:#fa541c;
}
.post-card h4{
    font-size:17px;
    margin-bottom:10px;
}
.post-meta-row{
    margin-bottom:8px;
}
.badge{
    display:inline-block;
    background:#dbeafe;
    color:#1d4ed8;
    padding:3px 9px;
    border-radius:99px;
    font-size:13px;
    margin-right:6px;
    margin-bottom:4px;
}
.badge-grey{
    background:#f3f4f6;
    color:#4b5563;
}
.post-desc{
    margin:10px 0;
}
.post-contact{
    color:#059669;
    font-weight:500;
    margin:8px 0;
}
.post-time{
    font-size:13px;
    color:#6b7280;
}

.form-wrap{
    max-width:520px;
    background:#fff;
    margin:30px auto;
    padding:24px;
    border-radius:10px;
}
.form-wrap h2{
    margin-bottom:18px;
}

.card-box{
    background:#fff;
    border-radius:10px;
    padding:20px;
    margin-bottom:18px;
}
.card-box h3{
    margin-bottom:14px;
}

table{
    width:100%;
    border-collapse:collapse;
}
th,td{
    border:1px solid #e5e7eb;
    padding:9px 10px;
    font-size:14px;
}
th{
    background:#f9fafb;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px;
    padding-bottom: 40px;
    overflow-y: auto;
}
.modal-box {
    background: #ffffff;
    width: 92%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}
.modal-header h4 {
    margin:0;
    font-size:17px;
}
.modal-close {
    background: transparent;
    border: none;
    font-size:22px;
    cursor: pointer;
    color:#666;
}
.modal-body {
    padding:20px;
}

@media(max-width:1100px){
    .ad-grid-list{
        grid-template-columns:repeat(2,1fr);
    }
}
@media(max-width:768px){
    .main-wrap{
        grid-template-columns:1fr;
    }
    .nav-inner{
        padding:12px 14px;
    }
    .modal-overlay{
        padding-top:20px;
        padding-bottom:20px;
    }
    .ad-grid-list{
        grid-template-columns:1fr;
    }
    .ad-card-item{
        height:160px;
    }
}
/* ========== 移动端全局适配 ========== */
@media(max-width:768px){
    .nav-inner{
        padding:8px 12px;
    }
    .nav-title{
        font-size:14px;
    }
    .main-wrap{
        flex-direction:column;
    }
    .sidebar-filter{
        width:100%;
        margin-bottom:16px;
    }
    .post-list{
        width:100%;
    }
}

/* ========== 帖子卡片缩小，适配手机 ========== */
.post-card{
    padding:14px 16px !important;
    gap:8px;
}
@media(max-width:768px){
    .post-card{
        padding:10px 12px !important;
    }
    .post-card h4{
        font-size:15px;
        margin:4px 0;
    }
    .badge{
        font-size:11px;
        padding:2px 6px;
        margin:2px;
    }
    .post-meta-row{
        flex-wrap:wrap;
        gap:4px;
    }
    .post-desc{
        font-size:14px;
        line-height:1.5;
    }
    .post-contact{
        font-size:14px;
    }
    .post-time{
        font-size:12px;
        color:#888;
    }
}

/* ========== 广告卡片图片修复，防止溢出 ========== */
.ad-grid-list{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(140px,1fr));
    gap:10px;
}
.ad-card-item{
    border-radius:6px;
    overflow:hidden;
    background:#eee;
}
.ad-card-item img{
    width:100%;
    height:120px;
    object-fit:cover;
    display:block;
}
@media(max-width:768px){
    .ad-grid-list{
        grid-template-columns:repeat(auto-fill,minmax(110px,1fr));
    }
    .ad-card-item img{
        height:90px;
    }
}

/* ========== 弹窗手机适配，弹窗不会超出屏幕 ========== */
.modal-box{
    width:92%;
    max-width:620px;
    max-height:85vh;
    overflow-y:auto;
}
@media(max-width:768px){
    .modal-box{
        width:94%;
    }
    .filter-item label{
        font-size:14px;
    }
}

