:root {
    --pt-primary: #552799;
    --pt-primary-dark: #3c1c6c;
    --pt-primary-light: #9163d5;
    --pt-bg: #ffffff;
    --pt-bg-hover: #f0f0f0;
    --pt-text: #111111;
    --pt-text-muted: #767676;
    --pt-border: #efefef;
    --pt-card-bg: #ffffff;
    --pt-card-shadow: rgba(0,0,0,0.08);
    --pt-overlay: rgba(0,0,0,0.5);
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--pt-bg); color: var(--pt-text); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== Header ===== */
.pt-header { position: sticky; top: 0; z-index: 100; background: #fff; padding: 10px 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.pt-header-inner { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.pt-logo { width: 42px; height: 42px; background: var(--pt-primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 22px; flex-shrink: 0; transition: transform .2s; }
.pt-logo:hover { transform: scale(1.08); }
.pt-search { flex: 1; position: relative; max-width: 800px; }
.pt-search input { width: 100%; padding: 13px 18px 13px 48px; border: none; border-radius: 24px; font-size: 15px; background: var(--pt-bg-hover); outline: none; transition: all .25s; }
.pt-search input:focus { background: #fff; box-shadow: 0 0 0 3px var(--pt-primary-light); }
.pt-search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--pt-text-muted); font-size: 16px; }
.pt-nav-btns { display: flex; gap: 6px; flex-shrink: 0; }
.pt-nav-btn { width: 42px; height: 42px; border-radius: 50%; border: none; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--pt-text); transition: background .2s; }
.pt-nav-btn:hover { background: var(--pt-bg-hover); }
.pt-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--pt-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 16px; cursor: pointer; flex-shrink: 0; }

/* ===== Category Pills ===== */
.pt-categories { background: #fff; padding: 10px 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; border-bottom: 1px solid var(--pt-border); }
.pt-categories::-webkit-scrollbar { display: none; }
.pt-categories-inner { max-width: 1400px; margin: 0 auto; display: flex; gap: 8px; white-space: nowrap; padding: 2px 0; }
.pt-cat-pill { padding: 10px 18px; border-radius: 22px; background: var(--pt-bg-hover); font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s; flex-shrink: 0; border: none; color: var(--pt-text); }
.pt-cat-pill:hover { background: #e0e0e0; }
.pt-cat-pill.active { background: var(--pt-text); color: #fff; }

/* ===== Masonry Grid ===== */
.pt-masonry { max-width: 1400px; margin: 0 auto; padding: 20px 16px; columns: 5 230px; column-gap: 16px; }
.pt-pin { break-inside: avoid; margin-bottom: 16px; border-radius: 16px; overflow: hidden; position: relative; cursor: zoom-in; background: var(--pt-card-bg); box-shadow: 0 1px 4px var(--pt-card-shadow); transition: box-shadow .2s; }
.pt-pin:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
.pt-pin-img { width: 100%; display: block; transition: transform .3s; }
.pt-pin:hover .pt-pin-img { transform: scale(1.02); }
.pt-pin-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.45); opacity: 0; transition: opacity .25s; display: flex; flex-direction: column; justify-content: space-between; padding: 14px; border-radius: 16px; pointer-events: none; }
.pt-pin:hover .pt-pin-overlay { opacity: 1; pointer-events: auto; }
.pt-pin-top { display: flex; justify-content: flex-end; }
.pt-save-btn { padding: 10px 20px; background: var(--pt-primary); color: #fff; border: none; border-radius: 24px; font-size: 15px; font-weight: 700; cursor: pointer; transition: all .2s; }
.pt-save-btn:hover { background: var(--pt-primary-dark); transform: scale(1.05); }
.pt-pin-bottom { display: flex; justify-content: space-between; align-items: flex-end; }
.pt-pin-title { color: #fff; font-size: 14px; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,0.6); max-width: 75%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-pin-user { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.95); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--pt-primary); flex-shrink: 0; }
.pt-pin-info { padding: 10px 6px 6px; }
.pt-pin-info h3 { font-size: 13px; font-weight: 600; margin-bottom: 2px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-pin-info h3 a { color: var(--pt-text); }
.pt-pin-info h3 a:hover { color: var(--pt-primary); }
.pt-pin-meta { font-size: 12px; color: var(--pt-text-muted); }

/* ===== Section Title ===== */
.pt-section-title { max-width: 1400px; margin: 0 auto; padding: 24px 16px 0; font-size: 20px; font-weight: 700; color: var(--pt-text); }

/* ===== Footer ===== */
.pt-footer { background: var(--pt-bg-hover); padding: 48px 16px 24px; margin-top: 48px; }
.pt-footer-inner { max-width: 1400px; margin: 0 auto; }
.pt-footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; margin-bottom: 32px; }
.pt-footer h4 { font-size: 14px; font-weight: 700; margin-bottom: 14px; color: var(--pt-text); }
.pt-footer ul { list-style: none; }
.pt-footer li { margin-bottom: 8px; }
.pt-footer a { font-size: 13px; color: var(--pt-text-muted); }
.pt-footer a:hover { color: var(--pt-primary); text-decoration: underline; }
.pt-footer-bottom { border-top: 1px solid var(--pt-border); padding-top: 18px; text-align: center; font-size: 12px; color: var(--pt-text-muted); }

/* ===== Responsive ===== */
@media(max-width:1200px) { .pt-masonry { columns: 4; } }
@media(max-width:900px) { .pt-masonry { columns: 3; } }
@media(max-width:600px) {
    .pt-masonry { columns: 2; column-gap: 8px; padding: 8px; }
    .pt-pin { margin-bottom: 8px; border-radius: 12px; }
    .pt-pin-overlay { border-radius: 12px; }
    .pt-header-inner { gap: 8px; }
    .pt-nav-btns { display: none; }
    .pt-search input { font-size: 14px; padding: 10px 12px 10px 40px; }
    .pt-categories { padding: 8px; }
    .pt-cat-pill { padding: 8px 14px; font-size: 13px; }
}
