.ps-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 24px 80px;
}

/* Grid */
.ps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.ps-tile {
    background: var(--bg-card, #1a1a2e);
    border: 1px solid var(--border-color, #2a2a4a);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.ps-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}

.ps-tile-image {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #1a0a14, #0a0515);
}

.ps-tile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
    user-select: none;
}

.ps-tile-meta {
    padding: 10px 12px 12px;
    font-size: 13px;
    color: var(--text-secondary, #aaa);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ps-tile-info {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ps-tile-title {
    font-size: 13px;
    font-weight: 600;
    color: #f5f5f5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ps-tile-date {
    font-size: 11px;
    color: #8b8b9a;
}
.ps-tile-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(8px);
    pointer-events: none;
}

/* Locked tiles */
.ps-tile-locked {
    cursor: pointer;
}

.ps-tile-blur {
    background: linear-gradient(135deg, #2a1a35, #110817);
}

.ps-tile-blur::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(239, 68, 68, 0.18), transparent 60%),
        radial-gradient(circle at 80% 70%, rgba(147, 51, 234, 0.18), transparent 60%);
    backdrop-filter: blur(40px);
}

.ps-tile-lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.55);
    pointer-events: none;
}

/* Paywall CTA below the grid */
.ps-paywall-cta {
    margin-top: 40px;
    text-align: center;
    padding: 36px 24px;
    background: var(--bg-card, #1a1a2e);
    border: 1px solid var(--border-color, #2a2a4a);
    border-radius: 16px;
}

.ps-paywall-cta h2 {
    margin: 0 0 8px;
}

.ps-paywall-cta p {
    color: var(--text-muted, #8b8b9a);
    margin: 0 0 20px;
}

.ps-cta {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.15s, box-shadow 0.15s;
}

.ps-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(239, 68, 68, 0.45);
}

/* Empty / loading */
.ps-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted, #8b8b9a);
}

/* Paywall modal */
.ps-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    align-items: center;
    justify-content: center;
}

.ps-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.ps-modal-card {
    position: relative;
    background: var(--bg-card, #1a1a2e);
    border: 1px solid var(--border-color, #2a2a4a);
    border-radius: 16px;
    padding: 36px 32px 28px;
    max-width: 440px;
    width: calc(100% - 32px);
    text-align: center;
    color: var(--text-primary, #fff);
}

.ps-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-muted, #8b8b9a);
    font-size: 28px;
    cursor: pointer;
}

.ps-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.ps-modal-card h2 {
    margin: 0 0 8px;
}

.ps-modal-card p {
    color: var(--text-secondary, #aaa);
    line-height: 1.55;
    margin: 0 0 18px;
}

.ps-modal-cta {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
}

.ps-modal-sub {
    margin-top: 16px !important;
    color: var(--text-muted, #8b8b9a);
    font-size: 0.85rem;
}

.ps-modal-sub a {
    color: #ef4444;
}

/* Lightbox (subscriber) */
.ps-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.94);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.ps-lightbox-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 90vw;
    max-height: 90vh;
}

.ps-lightbox-inner img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    -webkit-user-drag: none;
    user-select: none;
}

.ps-lightbox-close,
.ps-lightbox-nav {
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.ps-lightbox-close { top: 20px; right: 20px; width: 44px; height: 44px; font-size: 28px; }
.ps-lightbox-nav { top: 50%; transform: translateY(-50%); width: 56px; height: 56px; font-size: 32px; }
.ps-lightbox-prev { left: 24px; }
.ps-lightbox-next { right: 24px; }

.ps-lightbox-close:hover,
.ps-lightbox-nav:hover { background: rgba(255, 255, 255, 0.2); }

.ps-lightbox-footer {
    display: flex;
    gap: 16px;
    align-items: center;
    color: white;
}

.ps-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
}

.ps-like-btn.active {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
}

.ps-lightbox-counter {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

@media (max-width: 600px) {
    .ps-page { padding: 32px 16px 48px; }
    .ps-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
    .ps-lightbox-prev { left: 8px; }
    .ps-lightbox-next { right: 8px; }
    .ps-lightbox-nav { width: 44px; height: 44px; font-size: 24px; }
}
