/* ==========================================
   自由供求信息 · 完全修复版
   汉堡菜单 + 模态框弹出
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    word-break: break-word;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #F9F6F0;
    color: #2C2418;
    line-height: 1.5;
    font-size: 16px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: .2s ease;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 28px;
}

/* Hero区域 */
.hero {
    background: linear-gradient(135deg, rgba(0,0,0,.6), rgba(0,0,0,.4)), url('https://images.pexels.com/photos/4483610/pexels-photo-4483610.jpeg?auto=compress&cs=tinysrgb&w=1600') center/cover no-repeat;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 40px;
    color: #fff;
}

.hero-content {
    max-width: 700px;
    padding: 20px;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -.02em;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: .95;
}

.hero .btn-hero {
    background: #fff;
    color: #2C2418;
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: 600;
    display: inline-block;
}

.hero .btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,.2);
    background: #F0F4F9;
}

/* 头部 */
.site-header {
    background: linear-gradient(135deg, #2C2418, #3E3124);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,245,235,.15);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 14px rgba(0,0,0,.05);
}

.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: 20px;
    position: relative;
}

.logo {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -.3px;
    color: #F9F2E5;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.logo svg {
    width: 32px;
    height: 32px;
    stroke: #D9C7A7;
    stroke-width: 1.8;
    fill: none;
}

/* 汉堡按钮（默认隐藏） */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #F1E8DC;
    padding: 0 12px;
    line-height: 1;
    z-index: 101;
}

/* 导航包裹层 */
.nav-wrapper {
    display: flex;
}

.nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    font-size: .95rem;
    font-weight: 500;
    color: #F1E8DC;
    padding: 8px 0;
}

.nav-links a:hover {
    color: #E4C9A7;
}

.earn-plan-link {
    background: rgba(255,215,150,.2);
    border-radius: 30px;
    padding: 6px 16px !important;
    font-weight: 600;
}

/* 按钮系统 */
.btn, .btn-outline, .btn-sm, .btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s cubic-bezier(.2,0,0,1);
    border: 1px solid transparent;
    min-height: 44px;
}

.btn {
    background: #6B4C3A;
    color: #fff;
    padding: 10px 24px;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

.btn:hover {
    background: #8B5A3C;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(107,76,58,.2);
}

.btn-outline {
    background: 0 0;
    border-color: #CBB99A;
    color: #3E2E22;
    padding: 10px 24px;
}

.btn-outline:hover {
    background: #EFE6DA;
    border-color: #A5835E;
    color: #5C3A26;
}

.btn-sm {
    padding: 6px 18px;
    font-size: .8rem;
    border-radius: 12px;
    min-height: 36px;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-danger {
    background: #A55A4A;
}

.btn-danger:hover {
    background: #874234;
}

.btn-gray {
    background: #EDE3D6;
    color: #3E2E22;
    border-color: #DBCDBB;
}

.btn-gray:hover {
    background: #E1D3C2;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,.03), 0 0 0 1px rgba(0,0,0,.02);
    padding: 20px;
    margin: 20px 0;
    transition: all .25s ease;
}

.card:hover {
    box-shadow: 0 12px 24px -10px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.02);
}

/* 我的信息列表 */
.my-item-card .my-item-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.my-items-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 14px;
    background: #F0E8DE;
}

.my-item-info {
    flex: 1;
    min-width: 150px;
}

.my-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2C2418;
}

.my-item-meta {
    font-size: .8rem;
    color: #8E7A64;
    margin-top: 6px;
}

.my-item-actions {
    display: flex;
    gap: 12px;
}

/* 搜索结果布局 */
.result-item-layout {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

.result-thumb {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 14px;
    background: #F0E8DE;
    flex-shrink: 0;
    margin-right: 20px;
    cursor: pointer;
}

.result-thumb:hover {
    transform: scale(.98);
}

.result-info {
    flex: 1;
    min-width: 180px;
}

.result-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2C2418;
}

.result-desc {
    font-size: .85rem;
    color: #5A4A38;
    margin: 6px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-meta {
    font-size: .75rem;
    color: #8E7A64;
    margin-top: 6px;
}

.price {
    font-weight: 600;
    color: #8B5A3C;
    font-size: 1.1rem;
    margin-top: 6px;
}

.result-location {
    flex-shrink: 0;
    text-align: right;
    margin-right: 24px;
    min-width: 120px;
}

.location-city {
    font-size: 1.6rem;
    font-weight: 700;
    color: #8B5A3C;
    line-height: 1.2;
}

.location-district {
    font-size: 1rem;
    font-weight: 500;
    color: #A5835E;
    margin-top: 4px;
}

/* 搜索框 */
.search-box {
    display: flex;
    border: 1px solid #E2D6C8;
    border-radius: 16px;
    overflow: hidden;
    margin: 36px auto 28px;
    max-width: 640px;
    background: #fff;
}

.search-box input {
    flex: 1;
    border: none;
    padding: 14px 20px;
    font-size: 1rem;
    outline: 0;
    background: 0 0;
    min-height: 48px;
}

.search-box button {
    border: none;
    background: #6B4C3A;
    color: #fff;
    padding: 0 28px;
    font-weight: 500;
    cursor: pointer;
    min-height: 48px;
}

.search-box button:hover {
    background: #8B5A3C;
}

/* 标签 */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px auto 24px;
    justify-content: center;
}

.tag {
    padding: 8px 22px;
    background: #fff;
    border: 1px solid #DDD0BF;
    border-radius: 40px;
    font-size: .85rem;
    font-weight: 500;
    color: #4F3A28;
    transition: .2s;
    min-height: 40px;
}

.tag:hover {
    background: #EBDBCB;
    border-color: #B99A7A;
}

/* 排序栏 */
.sort-bar {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin: 16px 0 8px;
    flex-wrap: wrap;
}

.sort-link {
    font-size: .85rem;
    padding: 8px 18px;
    border-radius: 40px;
    background: #F2EBE2;
    color: #4F3A28;
    font-weight: 500;
    min-height: 40px;
}

.sort-link.active {
    background: #6B4C3A;
    color: #fff;
}

/* 表单卡片 */
.form-card {
    background: #fff;
    border-radius: 24px;
    padding: 36px 32px;
    max-width: 800px;
    margin: 30px auto;
    border: 1px solid #EFE3D6;
}

.form-card h3 {
    font-size: 1.7rem;
    font-weight: 600;
    margin-bottom: 28px;
    text-align: center;
}

.form-group {
    margin-bottom: 24px;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid #E6D9CC;
    border-radius: 16px;
    font-size: .95rem;
    background: #fff;
    transition: .2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #A5835E;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(165,131,94,.1);
}

.price-input-wrapper .currency {
    position: absolute;
    left: 16px;
    top: 45px;
    color: #7A6A58;
}

.price-input-wrapper input {
    padding-left: 32px;
}

/* 图片预览 */
.image-preview-grid,
.images-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.preview-item {
    position: relative;
    width: 84px;
    height: 84px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #E4D6C8;
    background: #F9F4EC;
}

.preview-item img,
.images-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,.6);
    color: #fff;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
}

.images-grid img {
    width: calc(33.33% - 8px);
    aspect-ratio: 1;
    border-radius: 14px;
    border: 1px solid #E8DDD0;
    cursor: pointer;
}

/* 留言 */
.message-box {
    border-top: 1px solid #EFE3D8;
    margin-top: 28px;
    padding-top: 24px;
}

.message-item {
    background: #FEFBF7;
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 18px;
    border: 1px solid #EFE3D8;
}

.reply {
    margin-left: 28px;
    border-left: 2px solid #DBCDBB;
    padding-left: 20px;
    margin-top: 12px;
}

.reply-item {
    background: #fff;
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #F0E4D8;
}

/* 灯箱 */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.94);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    border-radius: 20px;
}

.lightbox .close-btn,
.lightbox .nav-btn {
    position: absolute;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(8px);
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox .close-btn {
    top: 20px;
    right: 24px;
    width: 48px;
    height: 48px;
    font-size: 40px;
}

.lightbox .nav-btn {
    top: 50%;
    transform: translateY(-50%);
    font-size: 32px;
    padding: 12px 20px;
}

.lightbox .prev-btn {
    left: 16px;
}

.lightbox .next-btn {
    right: 16px;
}

/* ========== 模态框（赚钱计划卡片弹出）========== */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.earn-modal-content {
    background: #FFFCF8;
    margin: auto;
    padding: 32px 28px;
    border-radius: 32px;
    width: 90%;
    max-width: 560px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    position: relative;
    animation: fadeInScale 0.2s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.earn-modal-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    color: #3E2A1C;
}

.earn-rules h4 {
    font-size: 1.2rem;
    margin: 20px 0 12px;
    color: #6B4C3A;
}

.earn-rules ul {
    margin-left: 24px;
    list-style: disc;
    line-height: 1.7;
}

.earn-rules p {
    background: #F9F2E9;
    padding: 14px;
    border-radius: 20px;
    margin: 10px 0;
}

.earn-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 28px;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 16px;
    font-size: 32px;
    font-weight: bold;
    color: #8E7A64;
    cursor: pointer;
}

.close-modal:hover {
    color: #A55A4A;
}

/* 辅助元素 */
.back-button {
    margin: 20px 0 24px;
    display: inline-block;
}

.required-hint {
    display: inline-block;
    color: #A55A4A;
    font-size: .8rem;
    margin-top: 4px;
}

.footer-guide {
    background: #F4ECE2;
    border-radius: 32px;
    padding: 32px;
    margin: 60px 0 30px;
}

.footer-guide h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.disclaimer,
.simple-disclaimer {
    background: #FFFFFFD9;
    padding: 20px;
    border-radius: 20px;
    border-left: 4px solid #8B5A3C;
    margin-top: 20px;
    font-size: .9rem;
}

.simple-disclaimer {
    background: #F0E8DE;
    text-align: center;
    margin: 40px 0 20px;
    border-left: none;
}

.msg {
    background: #F4ECE2;
    border-left: 5px solid #8B5A3C;
    border-radius: 16px;
    padding: 14px 20px;
    margin: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 36px 0 50px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 8px 14px;
    border-radius: 14px;
    background: #F2EAE0;
    font-weight: 500;
}

.pagination .current {
    background: #6B4C3A;
    color: #fff;
}

.table-responsive {
    overflow-x: auto;
}

.text-center {
    text-align: center;
    margin-top: 20px;
}

/* ========== 移动端响应式 + 汉堡菜单 ========== */
@media (max-width: 720px) {
    .container {
        padding: 0 16px;
    }

    /* 显示汉堡按钮 */
    .hamburger {
        display: block;
    }

    /* 导航包裹层默认隐藏（屏幕外） */
    .nav-wrapper {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: calc(100% - 70px);
        background: #2C2418;
        transition: left 0.3s ease;
        z-index: 100;
        overflow-y: auto;
        border-radius: 0 20px 20px 0;
        box-shadow: 2px 0 12px rgba(0,0,0,0.2);
        display: block;
    }

    .nav-wrapper.open {
        left: 0;
    }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        gap: 20px;
    }

    .nav-links a {
        font-size: 1.2rem;
        padding: 10px 0;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    body.menu-open {
        overflow: hidden;
    }

    .form-card {
        padding: 28px 20px;
    }

    .images-grid img {
        width: calc(50% - 8px);
    }

    .result-item-layout {
        flex-direction: column;
        align-items: stretch;
    }

    .result-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        margin-right: 0;
        margin-bottom: 12px;
    }

    .result-location {
        text-align: left;
        margin-right: 0;
        margin-top: 8px;
    }

    .location-city {
        font-size: 1.3rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero {
        min-height: 360px;
    }

    .lightbox .nav-btn {
        padding: 8px 16px;
        font-size: 28px;
    }

    .lightbox .close-btn {
        top: 12px;
        right: 16px;
        width: 44px;
        height: 44px;
        font-size: 32px;
    }
}

/* PC端确保导航正常显示 */
@media (min-width: 721px) {
    .hamburger {
        display: none !important;
    }
    .nav-wrapper {
        display: flex !important;
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        box-shadow: none;
        overflow: visible;
        left: auto;
    }
    .nav-links {
        flex-direction: row;
        padding: 0;
    }
    body.menu-open {
        overflow: auto;
    }
}