/* ==========================================
   自由供求信息 · 前台样式
   从 index.php 分离
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: break-word;
}
body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
    background: #F9F6F0;
    color: #2C2418;
    line-height: 1.5;
    font-size: 16px;
    font-weight: 400;
    scroll-behavior: smooth;
}
a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 28px;
}
/* Hero 区域：去掉圆角 */
.hero {
    position: relative;
    background: linear-gradient(135deg, rgba(0,0,0,0.6), rgba(0,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: white;
}
.hero-content {
    max-width: 700px;
    padding: 20px;
}
.hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.hero p {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 30px;
}
.hero .btn-hero {
    background: white;
    color: #2C2418;
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: inline-block;
}
.hero .btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    background: #F0F4F9;
}
.site-header {
    background: linear-gradient(135deg, #2C2418 0%, #3E3124 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 245, 235, 0.15);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    width: 100%;
}
.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: 20px;
}
.logo {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.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;
}
.logo a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #F9F2E5;
}
.nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
    flex-wrap: wrap;
}
.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: #F1E8DC;
    transition: color 0.2s;
}
.nav-links a:hover {
    color: #E4C9A7;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    border: 1px solid transparent;
    background-color: #6B4C3A;
    color: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn:hover {
    background-color: #8B5A3C;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(107, 76, 58, 0.2);
}
.btn-outline {
    background-color: transparent;
    border: 1px solid #CBB99A;
    color: #3E2E22;
    box-shadow: none;
}
.btn-outline:hover {
    background-color: #EFE6DA;
    border-color: #A5835E;
    color: #5C3A26;
}
.btn-sm {
    padding: 6px 18px;
    font-size: 0.8rem;
    border-radius: 10px;
}
.btn-block {
    display: flex;
    width: 100%;
}
.btn-danger {
    background-color: #A55A4A;
    border-color: #A55A4A;
}
.btn-danger:hover {
    background-color: #874234;
    box-shadow: 0 6px 12px rgba(165, 90, 74, 0.2);
}
.btn-gray {
    background-color: #EDE3D6;
    color: #3E2E22;
    border-color: #DBCDBB;
    box-shadow: none;
}
.btn-gray:hover {
    background-color: #E1D3C2;
    color: #2A1E14;
}
.card {
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03), 0 0 0 1px rgba(0, 0, 0, 0.02);
    padding: 20px;
    margin: 20px 0;
    transition: all 0.25s ease;
}
.card:hover {
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.02);
}
.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;
    cursor: pointer;
    transition: transform 0.1s ease;
    margin-right: 20px;
}
.result-thumb:hover {
    transform: scale(0.98);
}
.result-info {
    flex: 1;
    min-width: 180px;
}
.result-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #2C2418;
}
.result-desc {
    font-size: 0.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: 0.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;
    align-self: center;
    min-width: 120px;
}
.location-city {
    font-size: 1.6rem;
    font-weight: 700;
    color: #8B5A3C;
    line-height: 1.2;
}
.location-city a:hover {
    color: #5C3A26;
    text-decoration: underline;
}
.location-district {
    font-size: 1rem;
    font-weight: 500;
    color: #A5835E;
    margin-top: 4px;
}
.location-district a:hover {
    color: #6B4C3A;
    text-decoration: underline;
}
.search-box {
    display: flex;
    border: 1px solid #E2D6C8;
    border-radius: 14px;
    overflow: hidden;
    margin: 36px auto 28px;
    max-width: 640px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.search-box:focus-within {
    border-color: #A5835E;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.search-box input {
    flex: 1;
    border: none;
    padding: 14px 20px;
    font-size: 1rem;
    outline: none;
    background: transparent;
    color: #2C2418;
}
.search-box button {
    border: none;
    background: #6B4C3A;
    color: white;
    padding: 0 28px;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.95rem;
}
.search-box button:hover {
    background: #8B5A3C;
}
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px auto 24px;
    justify-content: center;
}
.tag {
    padding: 6px 20px;
    background: #FFFFFF;
    border: 1px solid #DDD0BF;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4F3A28;
    transition: all 0.2s;
}
.tag:hover {
    background: #EBDBCB;
    border-color: #B99A7A;
    color: #3E2A1C;
}
.sort-bar {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin: 16px 0 8px;
    align-items: center;
    flex-wrap: wrap;
}
.sort-link {
    font-size: 0.85rem;
    padding: 6px 16px;
    border-radius: 30px;
    background: #F2EBE2;
    color: #4F3A28;
    font-weight: 500;
    transition: all 0.2s;
}
.sort-link.active {
    background: #6B4C3A;
    color: white;
}
.sort-link:hover {
    background: #DCCDBB;
    color: #2A1E14;
}
.form-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    padding: 36px 32px;
    max-width: 800px;
    margin: 30px auto;
    border: 1px solid #EFE3D6;
    width: 100%;
}
.form-card h3 {
    font-size: 1.7rem;
    font-weight: 600;
    margin-bottom: 28px;
    text-align: center;
    color: #2C2418;
    letter-spacing: -0.2px;
}
.form-group {
    margin-bottom: 24px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #3E2E22;
    font-size: 0.9rem;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid #E6D9CC;
    border-radius: 14px;
    font-size: 0.95rem;
    background: #FFFFFF;
    transition: all 0.2s;
    font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #A5835E;
    outline: none;
    box-shadow: 0 0 0 3px rgba(165, 131, 94, 0.1);
}
.price-input-wrapper {
    position: relative;
}
.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: 12px;
    overflow: hidden;
    border: 1px solid #E4D6C8;
    background: #F9F4EC;
}
.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.preview-item .delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.images-grid img {
    width: calc(33.33% - 8px);
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #E8DDD0;
    cursor: pointer;
    transition: 0.2s;
}
.images-grid img:hover {
    opacity: 0.92;
    transform: scale(0.98);
}
.message-box {
    border-top: 1px solid #EFE3D8;
    margin-top: 28px;
    padding-top: 24px;
}
.message-item {
    background: #FEFBF7;
    border-radius: 18px;
    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: white;
    border-radius: 14px;
    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,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%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.lightbox .close-btn {
    position: absolute;
    top: 20px;
    right: 24px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    width: 48px;
    height: 48px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}
.lightbox .nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    color: white;
    border: none;
    font-size: 32px;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 60px;
}
.lightbox .prev-btn { left: 16px; }
.lightbox .next-btn { right: 16px; }
.my-items-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    background: #F0E8DE;
    margin-right: 20px;
}
.back-button {
    margin: 20px 0 24px 0;
    display: inline-block;
}
.required-hint {
    display: inline-block;
    color: #A55A4A;
    font-size: 0.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;
    color: #2C2418;
}
.disclaimer {
    background: #FFFFFFD9;
    padding: 20px;
    border-radius: 20px;
    border-left: 4px solid #8B5A3C;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #3E2E22;
}
@media (max-width: 720px) {
    .lightbox .nav-btn { padding: 8px 16px; font-size: 28px; }
    .lightbox .close-btn { top: 12px; right: 16px; width: 44px; height: 44px; font-size: 32px; }
    .lightbox img { max-width: 95%; max-height: 70%; }
    .container { padding: 0 16px; }
    .header-inner { flex-direction: column; align-items: center; }
    .nav-links { gap: 18px; }
    .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; border-radius: 12px; }
    .result-info { margin-bottom: 12px; }
    .result-location { text-align: left; margin-right: 0; margin-top: 8px; align-self: flex-start; }
    .location-city { font-size: 1.3rem; }
    .sort-bar { justify-content: center; }
    .back-button { margin: 16px 0; }
    .hero h1 { font-size: 2rem; }
    .hero { min-height: 360px; }
}
.msg {
    background: #F4ECE2;
    border-left: 5px solid #8B5A3C;
    border-radius: 14px;
    padding: 14px 20px;
    margin: 24px 0;
    color: #3E2E22;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.msg .back-button-inline {
    background: transparent;
    border: 1px solid #A5835E;
    color: #5C3A26;
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    cursor: pointer;
}
.text-center {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
}
.text-center a {
    color: #8B5A3C;
    font-weight: 500;
}
.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: 38px;
    padding: 6px 12px;
    border-radius: 12px;
    background: #F2EAE0;
    color: #4F3A28;
    font-weight: 500;
}
.pagination a:hover {
    background: #DDCEBC;
    color: #2F2418;
}
.pagination .current {
    background: #6B4C3A;
    color: white;
    pointer-events: none;
}
::selection {
    background: rgba(139, 90, 60, 0.2);
}
textarea {
    resize: vertical;
}
.filter-back {
    margin: 10px 0;
}

/* 追加到 style_index.css 末尾 */
.guide-card {
    background: #FCF8F0;
    border-radius: 24px;
    padding: 16px 24px;
    margin: 20px 0 0;
    border: 1px solid #EFE3D6;
}
.profile-stats p {
    margin: 4px 0;
}
.card table {
    width: 100%;
    border-collapse: collapse;
}
.card table td, .card table th {
    padding: 8px;
    border-bottom: 1px solid #EFE3D8;
}