/* 摄影作品集 · 单页样式（移动端优先，配色跟随参考截图：白底 + 黑字 + 主色高亮） */

:root {
    --pf-main: #f76b1c;
    --pf-text: #222;
    --pf-muted: #888;
    --pf-line: #ececec;
    --pf-bg: #fff;
    --pf-radius: 10px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--pf-bg);
    color: var(--pf-text);
    font-size: 15px;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.pf-page { max-width: 720px; margin: 0 auto; padding: 16px 14px 60px; }

/* ---------- 首屏骨架 ---------- */
.pf-boot { max-width: 720px; margin: 0 auto; padding: 24px 14px; }
.pf-skel {
    background: linear-gradient(100deg, #f0f0f0 30%, #fafafa 50%, #f0f0f0 70%);
    background-size: 300% 100%;
    animation: pf-shimmer 1.3s ease-in-out infinite;
    border-radius: 8px;
}
.pf-boot-profile { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.pf-skel-avatar { width: 60px; height: 60px; border-radius: 50%; }
.pf-skel-line { height: 14px; margin-bottom: 8px; }
.pf-skel-tabs { height: 36px; margin-bottom: 16px; }
.pf-boot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pf-skel-card { padding-top: 130%; }
@keyframes pf-shimmer { 0% { background-position: 150% 0; } 100% { background-position: -50% 0; } }

/* ---------- 摄影师信息 ---------- */
.pf-profile { display: flex; align-items: center; gap: 12px; padding: 4px 0 14px; }
.pf-avatar { position: relative; flex: 0 0 auto; width: 60px; height: 60px; }
.pf-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--pf-line); display: block; }
.pf-pro {
    position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%);
    padding: 0 6px; font-size: 10px; line-height: 15px; font-weight: 700; letter-spacing: .5px;
    color: #fff; background: #1f1f1f; border-radius: 4px;
}
.pf-info { flex: 1; min-width: 0; }
.pf-name { font-size: 18px; font-weight: 700; line-height: 1.3; }
.pf-desc { margin-top: 2px; font-size: 12px; color: var(--pf-muted); }
.pf-total { text-align: center; line-height: 1.15; padding-left: 6px; }
.pf-total b { display: block; font-size: 20px; }
.pf-total span { font-size: 11px; color: var(--pf-muted); }

/* ---------- 分类标签栏 ---------- */
.pf-tabs {
    display: flex; gap: 18px; overflow-x: auto; padding: 2px 0 10px; margin-bottom: 12px;
    border-bottom: 1px solid var(--pf-line); -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.pf-tabs::-webkit-scrollbar { display: none; }
.pf-tab { flex: 0 0 auto; font-size: 14px; color: var(--pf-muted); white-space: nowrap; position: relative; }
.pf-tab em { font-style: normal; font-size: 11px; opacity: .7; margin-left: 1px; }
.pf-tab.is-active { color: var(--pf-main); font-weight: 700; }
.pf-tab.is-active::after {
    content: ''; position: absolute; left: 50%; bottom: -11px; transform: translateX(-50%);
    width: 22px; height: 3px; border-radius: 2px; background: var(--pf-main);
}

/* ---------- 作品网格：2 列 ---------- */
.pf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pf-card {
    position: relative; display: block; border-radius: var(--pf-radius); overflow: hidden;
    background: var(--pf-line); transition: transform .2s;
}
.pf-card:active { transform: scale(.98); }
.pf-cover { position: relative; width: 100%; padding-top: 132%; overflow: hidden; }
.pf-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-noimg { position: absolute; inset: 0; }

/* 水印：CSS 叠加，不预生成 */
.pf-wm {
    position: absolute; right: 8px; bottom: 26px; z-index: 2;
    font-size: 11px; font-weight: 700; letter-spacing: 1px; font-style: italic;
    color: rgba(255,255,255,.85); text-shadow: 0 1px 3px rgba(0,0,0,.45); pointer-events: none;
}
.pf-wm-item { bottom: 10px; right: 10px; font-size: 12px; }

.pf-badge {
    position: absolute; right: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 7px; font-size: 11px; line-height: 17px; color: #fff;
    background: rgba(0,0,0,.45); border-radius: 10px; backdrop-filter: blur(2px);
}
.pf-title {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px;
    font-size: 12px; color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0));
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pf-empty { padding: 40px 0; text-align: center; font-size: 13px; color: var(--pf-muted); }

/* ---------- 作品详情 ---------- */
.pf-work-page { padding-top: 10px; }
.pf-topbar {
    position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px;
    padding: 8px 0; margin: 0 -2px 8px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
}
.pf-back {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--pf-line); background: var(--pf-bg);
}
.pf-progress { font-size: 13px; color: var(--pf-muted); }
.pf-progress b { font-size: 15px; color: var(--pf-text); }
.pf-topbar-sp { flex: 1; }
.pf-work-title { font-size: 17px; font-weight: 700; margin: 2px 0 12px; }

.pf-waterfall { column-count: 2; column-gap: 8px; }
.pf-item {
    position: relative; margin: 0 0 8px; border-radius: var(--pf-radius); overflow: hidden;
    background: var(--pf-line); break-inside: avoid; -webkit-column-break-inside: avoid;
}
.pf-item img { display: block; width: 100%; height: auto; opacity: 0; transition: opacity .45s ease; }
.pf-item.is-loaded img { opacity: 1; }
.pf-skel {
    position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(100deg, #f0f0f0 30%, #fafafa 50%, #f0f0f0 70%);
    background-size: 300% 100%; animation: pf-shimmer 1.3s ease-in-out infinite;
}
.pf-item.is-loaded .pf-skel { display: none; }
.pf-item.is-error .pf-skel { display: none; }
.pf-item.is-error::after {
    content: '图片加载失败'; position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center; font-size: 12px; color: #aaa;
}

.pf-cattag {
    position: fixed; left: 14px; bottom: 22px; z-index: 20;
    padding: 4px 12px; font-size: 12px; color: #fff;
    background: rgba(0,0,0,.5); border-radius: 14px; backdrop-filter: blur(4px); pointer-events: none;
}
.pf-share {
    position: fixed; right: 16px; bottom: 18px; z-index: 20;
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; color: #333; background: var(--pf-bg);
    border: 1px solid var(--pf-line); border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0,0,0,.16); cursor: pointer; transition: transform .2s;
}
.pf-share:active { transform: scale(.92); }

.pf-toast {
    position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%) translateY(10px);
    z-index: 99; padding: 8px 18px; font-size: 13px; color: #fff;
    background: rgba(0,0,0,.75); border-radius: 18px; opacity: 0; transition: all .25s;
}
.pf-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

.pf-404 { padding: 60px 0; text-align: center; color: var(--pf-muted); }
.pf-back-home { text-align: center; }
.pf-btn {
    display: inline-block; padding: 9px 26px; border-radius: 20px;
    color: #fff !important; background: var(--pf-main); font-size: 14px;
}

/* ---------- 宽屏增强 ---------- */
@media (min-width: 768px) {
    .pf-avatar { width: 72px; height: 72px; }
    .pf-name { font-size: 20px; }
    .pf-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .pf-waterfall { column-count: 3; column-gap: 12px; }
    .pf-item { margin-bottom: 12px; }
}
@media (min-width: 1200px) {
    .pf-grid { grid-template-columns: repeat(4, 1fr); }
    .pf-waterfall { column-count: 4; }
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
    :root { --pf-text: #eee; --pf-muted: #999; --pf-line: #2a2a2a; --pf-bg: #161616; }
    .pf-share { color: #eee; background: #222; }
    .pf-topbar { background: rgba(22,22,22,.92); }
    .pf-skel, .pf-skel2 { background: linear-gradient(100deg, #242424 30%, #2e2e2e 50%, #242424 70%); background-size: 300% 100%; }
}
