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

body {
    min-height: 100vh;
    background: #F9F3EE;
    font-family: 'Noto Sans SC', sans-serif;
    color: #5C4A3A;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212,163,115,0.12) 0%, transparent 70%);
    top: -150px;
    right: -150px;
    pointer-events: none;
    z-index: 0;
}
body::after {
    content: '';
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(188,143,106,0.1) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    pointer-events: none;
    z-index: 0;
}

.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 20px 80px;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}
.header h1 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 46px;
    color: #7A5C47;
    letter-spacing: 6px;
    line-height: 1;
}
.header p {
    margin-top: 12px;
    font-size: 13px;
    color: #B09080;
    letter-spacing: 3px;
    font-weight: 300;
}

.btn {
    position: relative;
    margin-top: 24px;
    padding: 14px 44px;
    font-size: 15px;
    font-family: 'Noto Sans SC', sans-serif;
    letter-spacing: 3px;
    color: #fff;
    background: linear-gradient(135deg, #D4A373 0%, #C3905D 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(195,144,93,0.35);
    transition: all 0.25s ease;
    overflow: hidden;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(195,144,93,0.45);
}
.btn:active { transform: translateY(0px) scale(0.97); }
.btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* ---------- 瀑布流 ---------- */
.gallery {
    column-count: 4;
    column-gap: 18px;
}
@media (max-width: 1024px) { .gallery { column-count: 3; } }
@media (max-width: 720px)  { .gallery { column-count: 2; } }
@media (max-width: 420px)  { .gallery { column-count: 1; } }

.card {
    break-inside: avoid;
    margin-bottom: 18px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 6px rgba(120,80,50,0.06), 0 16px 48px rgba(120,80,50,0.08);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    animation: fadeUp 0.5s ease both;
}
.card:hover { box-shadow: 0 6px 16px rgba(120,80,50,0.10), 0 24px 64px rgba(120,80,50,0.14); }

.card img {
    display: block;
    width: 100%;
    cursor: zoom-in;
    background: #FAF6F2;
}

.card-caption {
    padding: 12px 16px 16px;
    font-size: 14px;
    line-height: 1.8;
    color: #6B5A4A;
    letter-spacing: 0.5px;
}
.card-caption.pending {
    color: #C4AE9E;
    font-size: 13px;
}
.card-caption .created {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    color: #D4C4B4;
    letter-spacing: 1px;
}

.empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 0;
    color: #C9B8B0;
    font-size: 14px;
    letter-spacing: 2px;
}

.footer-text {
    display: block;
    text-align: center;
    margin-top: 40px;
    font-size: 12px;
    color: #C9B8B0;
    letter-spacing: 2px;
}

/* ---------- 标签筛选 ---------- */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: -12px 0 28px;
}
.filter-chip {
    padding: 6px 16px;
    font-size: 13px;
    font-family: inherit;
    color: #A07D60;
    background: #FBF5EE;
    border: 1px solid #E8D8C8;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
}
.filter-chip:hover { background: #F3E7D8; }
.filter-chip.active {
    color: #fff;
    background: linear-gradient(135deg, #D4A373 0%, #C3905D 100%);
    border-color: transparent;
    box-shadow: 0 3px 12px rgba(195,144,93,0.3);
}

.tag-badge {
    display: inline-block;
    margin-bottom: 8px;
    padding: 2px 10px;
    font-size: 12px;
    color: #8A6A4E;
    background: #F3E7D8;
    border-radius: 20px;
    letter-spacing: 1px;
}
.card-caption .tag-badge { display: block; }
.card-caption.pending .tag-badge { display: none; }

/* ---------- 随机掉落弹层 ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(80, 55, 35, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 20px;
}
.modal-overlay[hidden], .lightbox[hidden] { display: none; }

.modal {
    background: #fff;
    border-radius: 24px;
    padding: 20px;
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 24px 80px rgba(80,55,35,0.35);
    position: relative;
    animation: fadeUp 0.35s ease both;
}
.modal-image-wrap {
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FAF6F2;
    border-radius: 16px;
    overflow: hidden;
}
.modal-image-wrap img {
    width: 100%;
    max-height: 62vh;
    object-fit: contain;
}
.modal-caption {
    margin-top: 14px;
    font-size: 15px;
    line-height: 1.9;
    color: #6B5A4A;
    letter-spacing: 0.5px;
    min-height: 24px;
    white-space: pre-wrap;
}
.modal-btn { display: block; width: 100%; margin-top: 16px; }

.modal-close, .lightbox-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(120,80,50,0.15);
    color: #7A5C47;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
}
.modal-close:hover, .lightbox-close:hover { background: rgba(120,80,50,0.28); }

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #EDD9C8;
    border-top-color: #D4A373;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: absolute;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 灯箱 ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(40, 28, 18, 0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 60;
    padding: 40px 20px;
}
.lightbox img {
    max-width: 90vw;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-caption {
    margin-top: 18px;
    max-width: 560px;
    text-align: center;
    color: #EFE3D8;
    font-size: 15px;
    line-height: 1.8;
    white-space: pre-wrap;
}
.lightbox-close { background: rgba(255,255,255,0.15); color: #fff; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
