/* ─── Photo Card News Frontend Styles ─── */
.pcn-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.pcn-trigger-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.pcn-trigger-btn:hover::before {
    left: 100%;
}

.pcn-trigger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.25);
}

.pcn-trigger-btn:active {
    transform: translateY(0);
}

.pcn-trigger-btn i {
    font-size: 20px;
}

/* ─── Popup Overlay ─── */
.pcn-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    overflow-y: auto;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: pcnFadeIn 0.3s ease;
}

.pcn-overlay.active {
    display: flex;
}

@keyframes pcnFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pcnSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pcnSlideDown {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(30px) scale(0.95); }
}

/* ─── Popup Container ─── */
.pcn-popup-container {
    width: 100%;
    max-width: 440px;
    margin: 30px auto;
    animation: pcnSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pcn-popup-container.closing {
    animation: pcnSlideDown 0.3s ease forwards;
}

/* ─── Close Button ─── */
.pcn-close-btn {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 36px;
    height: 36px;
    background: #ef4444;
    color: #fff;
    border: 3px solid #fff;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    transition: all 0.2s;
}

.pcn-close-btn:hover {
    transform: scale(1.15) rotate(90deg);
    background: #dc2626;
}

/* ─── Photo Card ─── */
.pcn-photo-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
}

/* Card Header */
.pcn-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    color: #fff;
}

.pcn-head-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pcn-card-category {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
    background: rgba(255,255,255,0.15);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.pcn-card-date {
    font-size: 11px;
    opacity: 0.9;
}

.pcn-head-right img {
    height: 32px;
    max-width: 130px;
    object-fit: contain;
}

.pcn-head-right .pcn-site-name {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* Card Image */
.pcn-card-img {
    width: 100%;
    display: block;
}

/* Card Content */
.pcn-card-body {
    padding: 16px;
}

.pcn-card-title {
    font-size: 17px;
    font-weight: 800;
    margin: 0 0 8px 0;
    line-height: 1.5;
    word-wrap: break-word;
	text-align: center;
}

.pcn-card-detail {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 14px 0;
	text-align: center;
}

/* Card Ads */
.pcn-card-ad {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0;
    border: 1px solid #e5e7eb;
}

.pcn-card-ad a {
    display: block;
}

.pcn-card-ad img {
    width: 100%;
    display: block;
}

/* Card Footer */
.pcn-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    color: #fff;
}

.pcn-foot-left .pcn-foot-site {
    font-size: 12px;
    font-weight: 500;
}

.pcn-foot-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.pcn-foot-right a {
    color: #fff;
    font-size: 17px;
    transition: all 0.2s;
    text-decoration: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

.pcn-foot-right a:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.15);
}

/* ─── Controls Panel ─── */
.pcn-controls {
    margin-top: 16px;
    padding: 20px;
    border-radius: 14px;
    color: #fff;
}

.pcn-controls-title {
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 18px 0;
    color: #22d3ee;
}

/* Sliders */
.pcn-slider-group {
    margin-bottom: 16px;
}

.pcn-slider-group:last-of-type {
    margin-bottom: 20px;
}

.pcn-slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: #e2e8f0;
}

.pcn-slider-label span:last-child {
    color: #22d3ee;
    font-weight: 600;
    font-size: 12px;
}

.pcn-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.15);
    outline: none;
    cursor: pointer;
}

.pcn-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #22d3ee;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.5);
    border: 3px solid #fff;
    transition: box-shadow 0.2s;
}

.pcn-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.8);
}

.pcn-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #22d3ee;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.5);
    border: 3px solid #fff;
}

/* Action Buttons */
.pcn-action-btns {
    display: flex;
    gap: 12px;
}

.pcn-action-btn {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(34, 211, 238, 0.4);
    border-radius: 10px;
    background: rgba(34, 211, 238, 0.1);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.pcn-action-btn:hover {
    background: rgba(34, 211, 238, 0.25);
    border-color: #22d3ee;
    transform: translateY(-1px);
}

.pcn-action-btn.download-btn {
    background: rgba(34, 211, 238, 0.15);
}

.pcn-action-btn.download-btn:hover {
    background: rgba(34, 211, 238, 0.35);
}

.pcn-action-btn i {
    font-size: 16px;
}

/* ─── Loading Spinner ─── */
.pcn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #22d3ee;
    font-size: 18px;
}

.pcn-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(34, 211, 238, 0.2);
    border-top: 3px solid #22d3ee;
    border-radius: 50%;
    animation: pcnSpin 0.8s linear infinite;
    margin-right: 12px;
}

@keyframes pcnSpin {
    to { transform: rotate(360deg); }
}

/* ─── Mobile Responsive ─── */
@media (max-width: 480px) {
    .pcn-overlay {
        padding: 10px;
        align-items: flex-start;
    }

    .pcn-popup-container {
        margin: 15px auto;
        max-width: 100%;
    }

    .pcn-card-head {
        padding: 10px 12px;
    }

    .pcn-card-category {
        font-size: 10px;
    }

    .pcn-card-date {
        font-size: 10px;
    }

    .pcn-head-right img {
        height: 26px;
        max-width: 100px;
    }

    .pcn-card-body {
        padding: 12px;
    }

    .pcn-card-title {
        font-size: 15px;
    }

    .pcn-card-detail {
        font-size: 12px;
    }

    .pcn-card-foot {
        padding: 10px 12px;
    }

    .pcn-controls {
        padding: 16px;
    }

    .pcn-controls-title {
        font-size: 14px;
    }

    .pcn-action-btn {
        font-size: 13px;
        padding: 10px 12px;
        gap: 6px;
    }

    .pcn-trigger-btn {
        padding: 12px 22px;
        font-size: 15px;
    }

    .pcn-close-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
        top: -8px;
        right: -8px;
    }
}

@media (max-width: 360px) {
    .pcn-card-title {
        font-size: 14px;
    }

    .pcn-action-btns {
        flex-direction: column;
    }

    .pcn-action-btn {
        width: 100%;
    }
}

/* ─── Download toast ─── */
.pcn-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #059669;
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    z-index: 1000000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pcn-toast.show {
    transform: translateX(-50%) translateY(0);
}
