/* Protected gallery demo — watermarks & image theft deterrents */

.pg-nav {
    background: #1a1a2e;
    color: #fff;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.pg-nav .logo { font-weight: 800; font-size: 1.1rem; color: #c4b5fd; }
.pg-nav a { color: rgba(255, 255, 255, 0.8); text-decoration: none; font-size: 0.85rem; }
.pg-nav .spacer { flex: 1; }

.pg-hero {
    background: linear-gradient(135deg, #1a1a2e, #312e81);
    color: #fff;
    padding: 1.75rem 2rem;
    text-align: center;
}

.pg-hero h1 { margin: 0 0 0.35rem; font-size: 1.55rem; }
.pg-hero p { margin: 0; opacity: 0.9; font-size: 0.92rem; }

.pg-body {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem 2rem;
}

.pg-notice {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
    color: #92400e;
    margin-bottom: 1rem;
}

.pg-notice strong { display: block; margin-bottom: 0.15rem; }

.pg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.pg-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    background: #e2e8f0;
}

.pg-item::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 4;
    background: transparent;
}

.pg-item-visual {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
    background-size: cover;
    background-position: center;
}

.pg-watermark-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pg-watermark-layer[data-style="corner"] {
    align-items: flex-end;
    justify-content: flex-end;
    padding: 0.5rem;
}

.pg-watermark-layer[data-style="corner"] span {
    font-size: 0.65rem;
    opacity: 0.85;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
}

.pg-watermark-layer[data-style="center"] span {
    font-size: 1rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transform: rotate(-24deg);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.pg-watermark-layer[data-style="tiled"] {
    display: block;
}

.pg-watermark-layer[data-style="tiled"] .pg-tile-grid {
    position: absolute;
    inset: -20%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    transform: rotate(-30deg);
    opacity: 0.35;
}

.pg-watermark-layer[data-style="tiled"] .pg-tile-grid span {
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    white-space: nowrap;
}

.pg-item-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: rgba(26, 26, 46, 0.65);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.25s;
    font-size: 0.85rem;
    text-align: center;
    padding: 0.5rem;
}

.pg-item:hover .pg-item-overlay { opacity: 1; }

.pg-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.94);
    z-index: 300;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.pg-lightbox.open { display: flex; }

.pg-lb-frame {
    position: relative;
    max-width: 720px;
    width: 90%;
    border-radius: 12px;
    overflow: hidden;
}

.pg-lb-visual {
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    position: relative;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

.pg-lb-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.75;
    z-index: 310;
}

.pg-lb-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 0.85rem;
    text-align: center;
}

.pg-protection-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #7f1d1d;
    color: #fff;
    text-align: center;
    padding: 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
    z-index: 400;
    display: none;
}

.pg-protection-banner.show { display: block; }

/* Protection states on body */
body.pg-page-hidden .pg-item-visual,
body.pg-page-hidden .pg-lb-visual {
    filter: blur(28px) !important;
    transition: filter 0.12s;
}

body.pg-devtools-open .pg-item-visual,
body.pg-devtools-open .pg-lb-visual {
    filter: blur(18px) brightness(0.35) !important;
}

body.pg-screenshot-flash .pg-item-visual,
body.pg-screenshot-flash .pg-lb-visual {
    filter: blur(40px) brightness(0) !important;
}

@media (max-width: 640px) {
    .pg-grid { grid-template-columns: repeat(2, 1fr); }
}

@media print {
    .pg-item-visual, .pg-lb-visual { visibility: hidden !important; }
}

.pg-admin-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.82rem;
}

.pg-admin-toggle:last-child { border-bottom: none; }

.pg-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.pg-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pg-switch .slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 24px;
    cursor: pointer;
    transition: 0.2s;
}

.pg-switch .slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
}

.pg-switch input:checked + .slider { background: #16a34a; }
.pg-switch input:checked + .slider::before { transform: translateX(20px); }

.pg-wm-style-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.pg-wm-style-btns button {
    padding: 0.3rem 0.55rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}

.pg-wm-style-btns button.active {
    background: #312e81;
    color: #fff;
    border-color: #312e81;
}

.pg-wm-text-input {
    width: 100%;
    padding: 0.4rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.82rem;
    margin-top: 0.35rem;
}
