/* ============ 基础变量 ============ */
:root {
    --bg: #f7f8fc;
    --surface: #ffffff;
    --surface-soft: #f3f4fa;
    --text: #1d2235;
    --muted: #798198;
    --primary: #6d5efc;
    --primary-dark: #5747e8;
    --primary-soft: #eeecff;
    --border: #e8eaf2;
    --success: #16a34a;
    --error: #dc2626;
    --warning: #d97706;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 10px 32px rgba(37, 41, 82, .07);
    --shadow-lg: 0 22px 60px rgba(37, 41, 82, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
h1, h2, h3, p { margin-top: 0; }
.container { width: min(1200px, calc(100% - 48px)); margin: 0 auto; }
.eyebrow { display: inline-block; font-size: 11px; letter-spacing: .18em; font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.gradient-text { background: linear-gradient(100deg, #6d5efc, #9b5cf6 60%, #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }

/* ============ 站点导航 ============ */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark {
    width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 11px; color: #fff; background: linear-gradient(135deg, #6d5efc, #9b5cf6);
    box-shadow: 0 6px 16px rgba(109, 94, 252, .32);
}
.brand-mark.huge { width: 64px; height: 64px; border-radius: 18px; }
.site-nav { display: flex; gap: 8px; align-items: center; }
.site-nav a { padding: 8px 15px; border-radius: 9px; color: var(--muted); font-weight: 600; transition: .18s; }
.site-nav a:hover { color: var(--text); background: var(--surface-soft); }
.site-nav a.active { color: var(--primary); background: var(--primary-soft); }
.site-nav .nav-admin { border: 1px solid var(--border); background: #fff; color: var(--text); margin-left: 8px; }
.site-nav .nav-admin:hover { border-color: var(--primary); color: var(--primary); }

/* ============ 通用组件 ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    border: 1px solid transparent; border-radius: 10px; padding: 10px 18px;
    font-weight: 650; cursor: pointer; transition: .18s; background: var(--surface-soft); color: var(--text);
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--primary), #8a5cf5); color: #fff; box-shadow: 0 8px 20px rgba(109, 94, 252, .25); }
.btn-primary:hover { box-shadow: 0 10px 26px rgba(109, 94, 252, .35); }
.btn-ghost { background: #fff; border-color: var(--border); color: var(--muted); }
.btn-ghost:hover { color: var(--primary); border-color: var(--primary); }
.btn-danger { background: #fff1f1; color: #dc2626; border-color: #fecaca; }
.btn-danger:hover { background: #fee2e2; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field > span { font-size: 12px; font-weight: 700; color: #535b72; }
input[type="text"], input[type="password"], input[type="search"], input[type="number"], select, textarea {
    width: 100%; border: 1px solid var(--border); background: #fff; color: var(--text);
    border-radius: 10px; padding: 10px 13px; outline: none; transition: .18s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(109, 94, 252, .12); }
textarea { resize: vertical; }
input[type="color"] { width: 100%; height: 42px; border: 1px solid var(--border); border-radius: 10px; padding: 4px; background: #fff; cursor: pointer; }

.flash-wrap { margin-top: 18px; display: grid; gap: 8px; }
.flash { padding: 11px 15px; border-radius: 10px; font-weight: 600; border: 1px solid transparent; margin-bottom: 14px; }
.flash-success { background: #edf9f1; border-color: #bbf7d0; color: #15803d; }
.flash-error { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.flash-info { background: var(--primary-soft); border-color: #ddd6fe; color: #5b21b6; }

.empty-state { padding: 38px 20px; text-align: center; color: var(--muted); border-radius: 12px; background: var(--surface-soft); }
.empty-state.large { display: grid; justify-items: center; gap: 10px; padding: 70px 20px; background: #fff; border: 1px dashed var(--border); border-radius: var(--radius); margin: 30px 0; }
.empty-state.large span { font-size: 40px; }
.empty-state.large h3 { margin: 0; color: var(--text); font-size: 19px; }
.empty-state.large p { margin: 0 0 12px; }

.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-heading h2 { font-size: 19px; margin-bottom: 2px; letter-spacing: -.02em; }
.section-heading p { color: var(--muted); font-size: 12px; margin: 0; }
.badge { font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 99px; color: var(--primary); background: var(--primary-soft); }
.tag { display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: 7px; background: var(--surface-soft); color: var(--muted); }

/* ============ 首屏 ============ */
.hero { position: relative; overflow: hidden; padding: 62px 0 74px; background: linear-gradient(135deg, #f2f0ff 0%, #f8f7ff 50%, #fdf2f8 100%); border-bottom: 1px solid var(--border); }
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; filter: blur(10px); opacity: .45; }
.hero::before { width: 340px; height: 340px; background: #dcd6ff; top: -160px; left: -80px; }
.hero::after { width: 420px; height: 420px; background: #fde2f3; bottom: -280px; right: -60px; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.25fr .75fr; gap: 46px; align-items: center; }
.hero-copy h1 { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.15; letter-spacing: -.04em; margin-bottom: 16px; }
.hero-copy p { font-size: 16px; color: #656d84; max-width: 560px; margin-bottom: 28px; }
.hero-stats { display: flex; gap: 34px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 20px; letter-spacing: -.02em; }
.hero-stats span { color: var(--muted); font-size: 12px; }
.hero-art { position: relative; height: 260px; }
.art-card { position: absolute; border-radius: 18px; background: #fff; box-shadow: var(--shadow-lg); }
.art-card-1 { width: 220px; height: 160px; top: 10px; right: 10px; padding: 18px; transform: rotate(6deg); }
.art-dot { display: block; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #fbbf24, #f97316); margin-bottom: 14px; }
.art-line { display: block; height: 9px; border-radius: 5px; background: #eceaf7; margin-bottom: 9px; }
.art-line.short { width: 60%; }
.art-card-2 { width: 132px; height: 132px; left: 12px; top: 78px; display: grid; place-items: center; color: var(--primary); transform: rotate(-8deg); }
.art-card-3 { width: 176px; height: 92px; bottom: 6px; right: 44px; padding: 18px; display: flex; align-items: flex-end; gap: 10px; transform: rotate(-3deg); }
.art-bar { width: 22px; height: 42px; border-radius: 6px; background: linear-gradient(180deg, #c4b5fd, #6d5efc); }
.art-bar.mid { height: 62px; background: linear-gradient(180deg, #f9a8d4, #ec4899); }
.art-bar.small { height: 30px; background: linear-gradient(180deg, #93c5fd, #3b82f6); }

/* ============ 上传区 ============ */
.announcement { display: flex; align-items: center; gap: 10px; margin: 26px 0 0; padding: 12px 16px; border-radius: 12px; background: linear-gradient(90deg, #eeecff, #fdf2f8); color: #55489b; font-weight: 600; border: 1px solid #e4e0ff; }
.announcement-icon { color: var(--primary); }
.upload-card { margin: 22px 0 48px; }
.upload-main { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.dropzone { border: 2px dashed #d7d5ec; border-radius: 14px; background: #fcfbff; padding: 40px 20px; text-align: center; cursor: pointer; transition: .2s; outline: none; }
.dropzone:hover, .dropzone:focus-visible, .dropzone.dragging { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-1px); }
.dropzone-icon { width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center; color: var(--primary); background: #fff; box-shadow: var(--shadow); }
.dropzone-title { font-size: 16px; font-weight: 700; margin-bottom: 5px; }
.dropzone-title span { color: var(--primary); }
.dropzone-hint { color: var(--muted); font-size: 12px; margin: 0; }
.selected-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--surface-soft); }
.selected-preview { display: flex; gap: 6px; overflow: hidden; }
.selected-preview img { width: 42px; height: 42px; border-radius: 7px; object-fit: cover; border: 2px solid #fff; }
.selected-actions { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.upload-options { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 14px; align-items: end; margin-top: 18px; }
.upload-options .field { margin: 0; }
.upload-options .btn { height: 42px; }
.progress-wrap { height: 6px; border-radius: 6px; background: var(--surface-soft); overflow: hidden; margin-top: 16px; }
.progress-bar { height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--primary), #ec4899); transition: width .2s; }

/* ============ 上传结果 ============ */
.results { margin-bottom: 52px; }
.result-list { display: grid; gap: 14px; }
.result-card { display: grid; grid-template-columns: 110px 1fr; gap: 18px; padding: 16px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.result-card img { width: 110px; height: 110px; border-radius: 10px; object-fit: cover; background: var(--surface-soft); }
.result-info { min-width: 0; }
.result-info h4 { margin: 0 0 2px; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-info .result-sub { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.link-field { display: block; margin-top: 8px; }
.link-field > span { display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.link-input { display: flex; gap: 7px; }
.link-input input { flex: 1; min-width: 0; font-size: 12px; padding: 7px 10px; background: var(--surface-soft); border-color: transparent; }

/* ============ 特性区 ============ */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 60px; }
.feature { padding: 24px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.feature-icon { font-size: 24px; }
.feature h3 { margin: 10px 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 13px; }
.site-footer { border-top: 1px solid var(--border); background: #fff; }
.footer-inner { display: flex; justify-content: space-between; padding: 22px 0; color: var(--muted); font-size: 12px; }

/* ============ 图片广场 / 详情 ============ */
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 42px 0 8px; }
.page-head.compact { padding-bottom: 0; }
.page-head h1 { font-size: 30px; letter-spacing: -.03em; margin-bottom: 4px; }
.page-head p { color: var(--muted); margin: 0; }
.back-link { display: inline-block; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.back-link:hover { color: var(--primary); }
.filter-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin: 24px 0; padding: 14px; background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.filter-tabs { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 99px; font-size: 12px; font-weight: 650; color: var(--muted); background: var(--surface-soft); transition: .18s; }
.chip:hover, .chip.active { color: #fff; background: var(--primary); }
.search-box { display: flex; gap: 7px; }
.search-box input { width: 210px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 18px; }
.gallery-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: .2s; }
.gallery-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #d8d3ff; }
.gallery-thumb { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-soft); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-card:hover img { transform: scale(1.05); }
.gallery-meta { padding: 11px 13px; display: grid; gap: 2px; }
.gallery-title { font-weight: 650; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-sub { color: var(--muted); font-size: 11px; }
.pagination { display: flex; justify-content: center; gap: 7px; margin: 34px 0 60px; flex-wrap: wrap; }
.page-btn { min-width: 34px; height: 34px; padding: 0 10px; display: grid; place-items: center; border-radius: 8px; background: #fff; border: 1px solid var(--border); font-size: 12px; font-weight: 650; }
.page-btn:hover, .page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.view-layout { display: grid; grid-template-columns: 1fr 380px; gap: 22px; margin: 26px 0 50px; align-items: start; }
.view-preview { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; }
.view-preview img { max-height: 65vh; margin: 0 auto 14px; border-radius: 10px; object-fit: contain; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.panel h2, .panel h3 { font-size: 15px; margin-bottom: 12px; }
.view-side { display: grid; gap: 18px; }
.info-list { margin: 0; }
.info-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 12px; }
.info-list > div:last-child { border-bottom: 0; }
.info-list dt { color: var(--muted); flex-shrink: 0; }
.info-list dd { margin: 0; text-align: right; word-break: break-all; }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
    .container { width: min(100% - 32px, 1200px); }
    .hero-inner { grid-template-columns: 1fr; }
    .hero-art { display: none; }
    .upload-options { grid-template-columns: 1fr; }
    .features { grid-template-columns: 1fr; }
    .view-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .site-nav a { padding: 7px 9px; font-size: 12px; }
    .site-nav .nav-admin { margin-left: 0; }
    .brand { font-size: 15px; }
    .hero { padding: 42px 0 50px; }
    .hero-stats { gap: 18px; }
    .result-card { grid-template-columns: 1fr; }
    .result-card img { width: 100%; height: 180px; object-fit: cover; }
    .footer-inner { flex-direction: column; gap: 4px; }
}
