/* 供需发布平台样式 - 黑白灰配色 */

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
.header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #000;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* 手机端导航栏 - 默认隐藏 */
.nav-mobile {
    display: none;
}

.nav a {
    color: #666;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav a:hover {
    background: #f0f0f0;
    color: #000;
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: #000;
    color: #fff;
}

.btn-primary:hover {
    background: #333;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

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

/* 搜索框 */
.search-box {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-form input,
.search-form select {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.search-form button {
    padding: 12px 32px;
}

/* 分类标签 */
.category-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.category-tab {
    padding: 8px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    transition: all 0.3s;
}

.category-tab:hover,
.category-tab.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* 发布列表 */
.post-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* 发布列表 - 3列网格 */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.post-card {
    background: #fff;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.post-card.top {
    border-left: 4px solid #000;
}

.post-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.post-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 20px;
    position: relative;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.post-card-body {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.post-card-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
}

.post-card-content-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

/* 发布卡片角标 */
.post-card-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
}

.post-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    color: #fff;
    background: #000;
    white-space: nowrap;
    line-height: 1.2;
}

.post-badge-top {
    background: #000;
    color: #fff;
}

.post-badge-hot {
    background: #333;
    color: #fff;
}

.post-badge-guarantee {
    background: #000;
    color: #fff;
    border: 1px solid #666;
}

/* 列表页角标（内联显示） */
.post-badges-inline {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.post-item .post-badge {
    font-size: 11px;
    padding: 3px 8px;
}

.post-card-header {
    margin-bottom: 12px;
    flex-shrink: 0;
}

.post-card-content-wrapper .post-card-header {
    margin-bottom: 8px;
}

.post-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin-bottom: 8px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #999;
    flex-wrap: wrap;
}

.category-badge {
    background: #f0f0f0;
    color: #333;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

/* 不同分类的背景色 - 使用黑白灰配色 */
.category-badge.category-badge-1 {
    background: #e0e0e0 !important;
    color: #000 !important;
}

.category-badge.category-badge-2 {
    background: #d5d5d5 !important;
    color: #000 !important;
}

.category-badge.category-badge-3 {
    background: #c0c0c0 !important;
    color: #000 !important;
}

.category-badge.category-badge-4 {
    background: #b0b0b0 !important;
    color: #000 !important;
}

.category-badge.category-badge-5 {
    background: #a0a0a0 !important;
    color: #fff !important;
}

.category-badge.category-badge-6 {
    background: #909090 !important;
    color: #fff !important;
}

.category-badge.category-badge-7 {
    background: #808080 !important;
    color: #fff !important;
}

.category-badge.category-badge-8 {
    background: #707070 !important;
    color: #fff !important;
}

.category-badge.category-badge-9 {
    background: #606060 !important;
    color: #fff !important;
}

.category-badge.category-badge-10 {
    background: #505050 !important;
    color: #fff !important;
}

/* 如果分类ID超过10，使用循环颜色 */
.category-badge.category-badge-11,
.category-badge.category-badge-15,
.category-badge.category-badge-19 {
    background: #e0e0e0 !important;
    color: #000 !important;
}

.category-badge.category-badge-12,
.category-badge.category-badge-16,
.category-badge.category-badge-20 {
    background: #d0d0d0 !important;
    color: #000 !important;
}

.category-badge.category-badge-13,
.category-badge.category-badge-17 {
    background: #c0c0c0 !important;
    color: #000 !important;
}

.category-badge.category-badge-14,
.category-badge.category-badge-18 {
    background: #b0b0b0 !important;
    color: #000 !important;
}

/* 三角形角标 */
.post-corner-badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    z-index: 10;
}

.post-corner-badge::before {
    content: attr(data-text);
    position: absolute;
    top: 8px;
    right: 8px;
    background: #000;
    color: #fff;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 100%, 0 100%);
    transform: rotate(45deg);
    transform-origin: top right;
}

.post-corner-badge-top::before {
    background: #000;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%);
}

.post-corner-badge-guarantee::before {
    background: #333;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%);
}

.post-corner-badge-hot::before {
    background: #666;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%);
}

/* 使用CSS ribbon方式 - 三角形角标 */
.post-ribbon {
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    overflow: hidden;
    z-index: 100;
    pointer-events: none;
}

.post-ribbon::before {
    content: attr(data-text);
    position: absolute;
    width: 140px;
    padding: 6px 0;
    background: #000;
    color: #fff;
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    transform: rotate(45deg);
    transform-origin: 0 0;
    top: 20px;
    right: -40px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.post-ribbon-top::before {
    background: #000;
}

.post-ribbon-guarantee::before {
    background: #333;
}

.post-ribbon-hot::before {
    background: #666;
}

/* Bootstrap卡片角标 */
/* Bootstrap卡片角标容器 */
.card.shadow-sm[style*="position: relative"],
.card.shadow-sm.h-100[style*="position: relative"] {
    overflow: visible !important;
}

/* 图片角标样式 */
.card-badge-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    object-fit: contain;
    z-index: 100;
    pointer-events: none;
    max-width: 30px;
    max-height: 30px;
}

.card-badge-icon + .card-badge-icon {
    right: 46px;
}

.card-badge-icon + .card-badge-icon + .card-badge-icon {
    right: 82px;
}

.post-badge-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    object-fit: contain;
    z-index: 100;
    pointer-events: none;
    max-width: 30px;
    max-height: 30px;
}

.post-badge-icon + .post-badge-icon {
    right: 46px;
}

.post-badge-icon + .post-badge-icon + .post-badge-icon {
    right: 82px;
}

/* 详情页角标（图片） */
.detail-badge-icons {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 100;
    pointer-events: none;
}

.detail-badge-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    max-width: 30px;
    max-height: 30px;
}

.detail-cover {
    background: #f5f5f5;
}

.card-ribbon {
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    overflow: hidden;
    z-index: 100;
    pointer-events: none;
}

.card-ribbon::before {
    content: attr(data-text);
    position: absolute;
    width: 140px;
    padding: 6px 0;
    background: #000;
    color: #fff;
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    transform: rotate(45deg);
    transform-origin: 0 0;
    top: 20px;
    right: -40px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.card-ribbon-top::before {
    background: #000;
}

.card-ribbon-guarantee::before {
    background: #333;
}

.card-ribbon-hot::before {
    background: #666;
}

.post-card-content {
    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;
}

.post-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
    margin-top: auto;
}

.post-card-content-wrapper .post-card-footer {
    margin-top: 8px;
    padding-top: 8px;
}

.post-card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.post-card-tag {
    font-size: 12px;
    color: #666;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
}

.post-card-time {
    font-size: 12px;
    color: #999;
}

.post-item {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
    border: 1px solid #f0f0f0;
}

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

.post-item.top {
    border-left: 4px solid #000;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.post-title {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin-bottom: 8px;
    text-decoration: none;
    display: block;
}

.post-title:hover {
    color: #333;
}

.post-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #999;
    flex-wrap: wrap;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-content {
    color: #666;
    line-height: 1.8;
    margin: 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.post-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    padding: 4px 12px;
    background: #f5f5f5;
    border-radius: 12px;
    font-size: 12px;
    color: #666;
}

.post-time {
    font-size: 12px;
    color: #999;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #000;
}

/* 详情页 */
.post-detail {
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.detail-header {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 20px;
    margin-bottom: 24px;
}

.detail-title {
    font-size: 28px;
    font-weight: 600;
    color: #000;
    margin-bottom: 16px;
}

.detail-meta {
    display: flex;
    gap: 24px;
    font-size: 14px;
    color: #666;
    flex-wrap: wrap;
}

.detail-content {
    line-height: 1.8;
    color: #333;
    font-size: 15px;
    margin-bottom: 24px;
}

.detail-info {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 24px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #666;
    font-weight: 500;
}

.info-value {
    color: #000;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
    background: #fff;
}

.pagination a:hover {
    background: #f0f0f0;
    border-color: #000;
}

.pagination .current {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* 消息提示 */
.message {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.message.success {
    background: #f0f0f0;
    color: #000;
    border-left: 4px solid #000;
}

.message.error {
    background: #fff;
    color: #d32f2f;
    border-left: 4px solid #d32f2f;
}

/* 单个广告位样式 */
.banner-single {
    margin-bottom: 30px;
}

.banner-single .ad-item {
    width: 100%;
}

.ad-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
    border: 1px solid #f0f0f0;
    height: 100%;
}

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

.ad-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.ad-image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.ad-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.ad-item:hover .ad-image-wrapper img {
    transform: scale(1.05);
}

/* 角标样式 */
.ad-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    background: #000;
    z-index: 2;
    white-space: nowrap;
}

.ad-badge-black {
    background: #000;
    color: #fff;
}

.ad-badge-red {
    background: #333;
    color: #fff;
}

.ad-badge-blue {
    background: #333;
    color: #fff;
}

.ad-badge-green {
    background: #333;
    color: #fff;
}

.ad-title {
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

/* 轮播导航 */
.ad-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    pointer-events: none;
    z-index: 10;
}

.ad-slider-prev,
.ad-slider-next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.ad-slider-prev:hover,
.ad-slider-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.ad-slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.ad-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s;
}

.ad-dot.active {
    background: #000;
    width: 24px;
    border-radius: 5px;
}

/* 弹窗样式 - 半透明悬浮弹窗 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 16px 60px rgba(0, 0, 0, 0.35);
    max-width: 440px;
    width: 90%;
    animation: slideUp 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

@keyframes slideUp {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    padding: 22px 26px 18px;
    border-bottom: 1px solid #efefef;
    background: linear-gradient(180deg, #ffffff 0%, #f6f6f6 100%);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-body {
    padding: 18px 26px 8px;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

.modal-footer {
    padding: 14px 26px 22px;
    display: flex;
    justify-content: center;
    gap: 10px;
    background: #fff;
}

.modal-footer .btn {
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 14px;
}

.modal-body {
    padding: 28px;
    color: #333;
    line-height: 1.8;
    text-align: center;
    min-height: 60px;
    font-size: 15px;
}

.modal-body p {
    margin: 0;
    font-size: 15px;
    color: #666;
}

.modal-footer {
    padding: 20px 28px 24px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
    background: #fafafa;
}

.modal-footer .btn {
    min-width: 120px;
    padding: 12px 24px;
    font-size: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-footer .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 手机端响应式 - 类似APP的底部导航栏 */
@media (max-width: 768px) {
    /* 为底部导航栏留出空间 */
    body {
        padding-bottom: 70px;
    }
    
    /* 容器响应式 */
    .container {
        padding: 0 12px;
        padding-bottom: 0;
        max-width: 100%;
    }
    
    /* 头部导航 - 移到底部，类似APP */
    .header {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        padding: 0;
        margin: 0;
        border-top: 1px solid #e0e0e0;
        border-bottom: none;
        background: #fff;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
        z-index: 999;
    }
    
    .header .container {
        padding: 0;
        max-width: 100%;
    }
    
    .header-content {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        padding: 0;
        height: 60px;
    }
    
    /* 隐藏logo和桌面导航 */
    .logo {
        display: none;
    }
    
    .nav {
        display: none; /* 手机端隐藏桌面导航 */
    }
    
    /* 手机端底部导航栏 - APP风格 */
    .nav-mobile {
        display: flex;
        width: 100%;
        justify-content: space-around;
        align-items: center;
        gap: 0;
        padding: 0;
        height: 100%;
    }
    
    .nav-mobile-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        flex: 1;
        padding: 8px 0;
        font-size: 11px;
        color: #666;
        text-decoration: none;
        border-radius: 0;
        transition: all 0.2s;
        min-width: 0;
        height: 100%;
        position: relative;
    }
    
    .nav-mobile-item:active {
        background: #f5f5f5;
    }
    
    .nav-icon {
        font-size: 20px;
        line-height: 1;
    }
    
    .nav-text {
        font-size: 11px;
        margin-top: 2px;
    }
    
    /* 搜索框响应式 */
    .search-box {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .search-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-form input,
    .search-form select {
        width: 100%;
        min-width: 100%;
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .search-form button {
        width: 100%;
        padding: 12px;
    }
    
    /* 广告位响应式 */
    .banner-single {
        margin-bottom: 20px;
    }
    
    .ad-item {
        border-radius: 8px;
    }
    
    .ad-image-wrapper {
        height: 150px;
    }
    
    .ad-title {
        font-size: 13px;
        padding: 10px;
    }
    
    /* 卡片网格 - 手机端单列 */
    .post-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        margin-bottom: 20px;
    }
    
    .post-list {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    .post-card {
        padding: 0;
    }
    
    .post-card-link {
        padding: 12px;
    }
    
    .post-card-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .post-card-image {
        width: 100%;
        height: auto;
        aspect-ratio: 1/1;
    }
    
    .post-card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    
    .post-card-title {
        font-size: 13px;
        line-height: 1.4;
        margin-bottom: 6px;
    }
    
    .post-card-meta {
        font-size: 10px;
        gap: 6px;
    }
    
    .post-card-content {
        font-size: 12px;
        margin: 10px 0;
        line-height: 1.5;
    }
    
    .post-card-footer {
        padding-top: 10px;
        gap: 6px;
    }
    
    .post-card-tag {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .post-card-time {
        font-size: 10px;
    }
    
    /* 分页响应式 */
    .pagination {
        flex-wrap: wrap;
        gap: 6px;
        margin: 30px 0;
        justify-content: center;
    }
    
    .pagination a,
    .pagination span {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 36px;
    }
    
    /* 详情页优化 */
    .post-detail {
        padding: 20px;
    }
    
    .detail-title {
        font-size: 20px;
    }
    
    .detail-meta {
        font-size: 12px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    /* 列表页优化 */
    .post-list {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    .post-item {
        padding: 14px;
    }
    
    .post-title {
        font-size: 15px;
    }
    
    .post-meta {
        font-size: 11px;
        flex-wrap: wrap;
    }
    
    .post-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    /* 分页优化 */
    .pagination {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .pagination a,
    .pagination span {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    /* 广告位 */
    .ad-image-wrapper {
        height: 150px;
    }
    
    /* 弹窗响应式 */
    .modal-content {
        width: 85%;
        max-width: 350px;
    }
    
    .modal-header {
        padding: 20px 24px 16px;
    }
    
    .modal-body {
        padding: 24px;
    }
    
    .modal-footer {
        padding: 16px 24px 20px;
    }
    
    .modal-title {
        font-size: 18px;
    }
    
    .modal-body p {
        font-size: 14px;
    }
}

/* 小屏手机优化 */
@media (max-width: 480px) {
    body {
        padding-bottom: 65px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .header-content {
        height: 55px;
    }
    
    .nav-mobile-item {
        padding: 6px 0;
    }
    
    .nav-icon {
        font-size: 18px;
    }
    
    .nav-text {
        font-size: 10px;
    }
    
    /* 搜索框 */
    .search-box {
        padding: 12px;
        margin-bottom: 16px;
    }
    
    .search-form input,
    .search-form select {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    /* 广告位 */
    .ad-image-wrapper {
        height: 120px;
    }
    
    .ad-title {
        font-size: 12px;
        padding: 8px;
    }
    
    /* 卡片网格 - 单列 */
    .post-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 16px;
    }
    
    .post-card {
        padding: 12px;
    }
    
    .post-card-title {
        font-size: 13px;
    }
    
    .post-card-meta {
        font-size: 10px;
    }
    
    .post-card-content {
        font-size: 12px;
    }
    
    /* 分页 */
    .pagination {
        gap: 4px;
        margin: 20px 0;
    }
    
    .pagination a,
    .pagination span {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 32px;
    }
    
    /* 详情页 */
    .detail-title {
        font-size: 18px;
    }
}

/* =========================
   全站主题（黑白灰）
   默认：夜间模式（dark）
   切换：html[data-theme="light"]
   ========================= */

:root {
    color-scheme: dark;
    --pt-bg: #0b0b0b;
    --pt-surface: #111111;
    --pt-surface-2: #1f1f1f;
    --pt-border: #2a2a2a;
    --pt-text: #eaeaea;
    --pt-muted: #a8a8a8;
    --pt-shadow: rgba(0, 0, 0, 0.6);
}

html[data-theme="light"] {
    color-scheme: light;
    --pt-bg: #f5f5f5;
    --pt-surface: #ffffff;
    --pt-surface-2: #f0f0f0;
    --pt-border: #e0e0e0;
    --pt-text: #222222;
    --pt-muted: #666666;
    --pt-shadow: rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--pt-bg);
    color: var(--pt-text);
}

/* 框内内容背景：暗灰色（统一） */
.card .card-body,
.post-card,
.post-detail,
.search-box,
.category-tab,
.post-card-image,
.post-card-tag,
.post-card-time {
    background: var(--pt-surface-2) !important;
    border-color: var(--pt-border) !important;
}

/* 置顶卡片：无论黑/白天都保持白天背景 */
.top-post-card,
.top-post-card .card-body,
.post-card.top,
.post-card.top .post-card-body,
.post-card.top .post-card-content-wrapper,
.post-card.top .post-card-footer {
    background: #ffffff !important;
}

.post-card.top .post-card-image {
    background: #f5f5f5 !important;
}

.top-post-card,
.top-post-card .text-dark,
.post-card.top {
    color: #111111 !important;
}

.top-post-card .text-muted,
.post-card.top .text-muted {
    color: #666666 !important;
}

/* 详情页在主题模式下的覆盖（避免使用亮色固定值） */
.post-detail .detail-header {
    border-bottom-color: var(--pt-border) !important;
}

.post-detail .detail-title {
    color: var(--pt-text) !important;
}

.post-detail .detail-meta {
    color: var(--pt-muted) !important;
}

.post-detail .detail-content {
    color: var(--pt-text) !important;
}

.post-detail .detail-info {
    background: var(--pt-surface) !important;
    border: 1px solid var(--pt-border) !important;
}

.post-detail .info-row {
    border-bottom-color: var(--pt-border) !important;
}

.post-detail .info-label {
    color: var(--pt-muted) !important;
}

.post-detail .info-value {
    color: var(--pt-text) !important;
}

.post-detail .detail-cover {
    background: var(--pt-surface) !important;
    border: 1px solid var(--pt-border) !important;
}

.post-card {
    box-shadow: 0 2px 8px var(--pt-shadow) !important;
}

.post-card:hover {
    box-shadow: 0 4px 16px var(--pt-shadow) !important;
}

.search-box {
    box-shadow: 0 2px 8px var(--pt-shadow) !important;
}

/* Bootstrap / 通用灰阶覆盖 */
.bg-white {
    background-color: var(--pt-surface) !important;
}

.text-dark {
    color: var(--pt-text) !important;
}

.text-muted {
    color: var(--pt-muted) !important;
}

/* 你提到的徽章：灰底白字（覆盖 bg-light + text-dark 组合） */
.badge.bg-light.text-dark {
    background-color: #fdebd1 !important;
    color: #111111 !important;
    border: 1px solid var(--pt-border) !important;
}

.badge.bg-light.text-dark i,
.badge.bg-light.text-dark svg {
    color: #111111 !important;
}

/* 右下角反馈悬浮按钮 */
.pt-feedback-fab {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1060;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: none;
    background: #2de370;
    color: #111111;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.pt-feedback-fab:hover {
    filter: brightness(0.98);
}

.pt-feedback-offcanvas {
    background: var(--pt-surface);
    color: var(--pt-text);
    border-left: 1px solid var(--pt-border);
}

.pt-feedback-offcanvas .offcanvas-header {
    border-bottom: 1px solid var(--pt-border);
}

.pt-feedback-offcanvas .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

html[data-theme="light"] .pt-feedback-offcanvas .btn-close {
    filter: none;
}

.border,
.border-top,
.border-bottom,
.border-start,
.border-end {
    border-color: var(--pt-border) !important;
}

.card,
.topbar {
    background: var(--pt-surface);
    border-color: var(--pt-border);
    box-shadow: 0 2px 4px var(--pt-shadow);
}

.table {
    color: var(--pt-text);
    background: var(--pt-surface-2);
}

.table-bordered,
.table-bordered > :not(caption) > * {
    border-color: var(--pt-border);
}

.form-control,
.form-select,
textarea,
input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"] {
    background-color: var(--pt-surface-2) !important;
    color: var(--pt-text) !important;
    border-color: var(--pt-border) !important;
}

.form-control::placeholder,
textarea::placeholder {
    color: var(--pt-muted) !important;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    border-color: var(--pt-border) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.06) !important;
}

.btn-outline-dark {
    color: var(--pt-text) !important;
    border-color: var(--pt-border) !important;
}

.btn-outline-dark:hover {
    background: var(--pt-surface-2) !important;
    border-color: var(--pt-border) !important;
}

.btn-dark {
    background: var(--pt-surface-2) !important;
    border-color: var(--pt-border) !important;
    color: var(--pt-text) !important;
}

.btn-dark:hover {
    background: var(--pt-surface) !important;
    border-color: var(--pt-border) !important;
}

.navbar.navbar-light .navbar-brand,
.navbar.navbar-light .navbar-nav .nav-link,
.navbar.navbar-light .navbar-text {
    color: var(--pt-text) !important;
}

.navbar.navbar-light .navbar-nav .nav-link {
    color: var(--pt-muted) !important;
}

.navbar.navbar-light .navbar-nav .nav-link:hover,
.navbar.navbar-light .navbar-nav .nav-link:focus,
.navbar.navbar-light .navbar-nav .nav-link.active {
    color: var(--pt-text) !important;
}

.pagination .page-link {
    background: var(--pt-surface) !important;
    border-color: var(--pt-border) !important;
    color: var(--pt-text) !important;
}

.pagination .page-item.active .page-link {
    background: var(--pt-surface-2) !important;
    border-color: var(--pt-border) !important;
    color: var(--pt-text) !important;
}
