:root {
    --pc-green: #006140;
    --pc-red: #e12626;
    --pc-yellow: #ffd900;
    --pc-light: #d3d3d3;
    --pc-white: #ffffff;
    --pc-dark: #333333;
    --pc-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* --- Form --- */
.pc-upload-container {
    margin: 0 auto;
    background: var(--pc-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--pc-shadow);
    max-width: 100%;
}

.pc-drop-zone {
    border: 2px dashed var(--pc-green);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    background: #f9f9f9;
    margin-bottom: 1.5rem;
}

.pc-drop-zone.dragover {
    background: rgba(0, 97, 64, 0.1);
    border-color: var(--pc-yellow);
}

.pc-drop-content input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.pc-drop-content .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: var(--pc-green);
    margin-bottom: 1rem;
}

#pc-preview-area {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

#pc-preview-img {
    max-height: 200px;
    border-radius: 4px;
    box-shadow: var(--pc-shadow);
}

#pc-remove-img {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--pc-red);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    line-height: 24px;
    padding: 0;
}

[placeholder="Photo Title"] {
    Margin: 0 0 1rem 0!important;
    padding: 10px 8px!important;
}

.pc-form-fields input {
    width: 100%;
    padding: 10px 8px !important;
    margin-bottom: 1rem !important;
    border: 1px solid var(--pc-light);
    border-radius: 6px;
}

#pc-submit-btn {
    width: 100%;
    background: var(--pc-green);
    color: var(--pc-white);
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s;
}

#pc-submit-btn:hover {
    background: #004d33;
}

.pc-progress-bar {
    height: 6px;
    background: var(--pc-light);
    border-radius: 3px;
    margin-top: 1rem;
    overflow: hidden;
    display: none;
}

.pc-progress-fill {
    height: 100%;
    background: var(--pc-yellow);
    width: 0%;
    transition: width 0.2s;
}

.desktop-msg {
    display: block;
    font-family: "PT Sans Narrow", sans-serif!important;
    font-size: 1.3em!important;
    font-weight: 550!important;
}

.mobile-msg {
    display: none;
}

@media (max-width: 768px) {
    .desktop-msg {
        display: none;
    }

    .mobile-msg {
        display: block;
    }
}

/* --- Gallery --- */
.pc-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.pc-card {
    background: var(--pc-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--pc-shadow);
    transition: transform 0.2s;
}

.pc-card:hover {
    transform: translateY(-4px);
}

.pc-card-image-wrap {
    position: relative;
    padding-bottom: 75%;
    /* 4:3 Aspect Ratio */
    cursor: pointer;
    background: var(--pc-light);
}

.pc-card-image-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pc-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.pc-card-image-wrap:hover .pc-overlay {
    opacity: 1;
}

.pc-overlay .dashicons {
    color: white;
    font-size: 32px;
}

.pc-card-meta {
    padding: 1rem;
}

.pc-card-meta h4 {
    margin: 0 0 0.5rem 0;
    color: var(--pc-dark);
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pc-author {
    font-size: 0.9rem;
    color: #666;
    display: block;
    margin-bottom: 0.8rem;
}

.pc-like-btn {
    background: transparent;
    border: 1px solid var(--pc-light);
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--pc-dark);
    transition: all 0.2s;
}

.pc-like-btn:hover {
    border-color: var(--pc-red);
    color: var(--pc-red);
}

.pc-like-btn.voted {
    background: var(--pc-red);
    color: white;
    border-color: var(--pc-red);
}

/* --- Lightbox --- */
.pc-lightbox {
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.pc-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.pc-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.pc-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 10px;
    /* Touch target */
}

#pc-lb-img {
    max-width: 100%;
    max-height: 80vh;
    border: 4px solid var(--pc-white);
    border-radius: 4px;
}

.pc-lb-caption {
    color: white;
    margin-top: 1rem;
    text-align: center;
}

/* --- Leaderboard --- */
.pc-leaderboard {
    background: var(--pc-white);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: var(--pc-shadow);
}

.pc-leaderboard-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--pc-light);
}

.pc-leaderboard-item:last-child {
    border: none;
}

.pc-rank {
    width: 30px;
    height: 30px;
    background: var(--pc-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
}

.pc-leaderboard-item:nth-child(1) .pc-rank {
    background: var(--pc-yellow);
    color: var(--pc-dark);
}

.pc-thumb img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 1rem;
}

.pc-info {
    flex-grow: 1;
}

.pc-info strong {
    display: block;
    color: var(--pc-dark);
}

.pc-info span {
    font-size: 0.85rem;
    color: #666;
}

.pc-score {
    font-weight: bold;
    color: var(--pc-red);
}

/* --- Modal --- */
.pc-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.pc-modal.show {
    display: flex;
}

.pc-modal-content {
    background-color: var(--pc-white);
    padding: 2rem;
    border-radius: 12px;
    width: 300px;
    text-align: center;
    animation: slideDown 0.3s ease;
}

.pc-modal-actions {
    display: flex;
    justify-content: space-around;
    margin-top: 1.5rem;
}

.pc-modal-actions button {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    font-weight: bold;
}

#pc-confirm-no {
    background: var(--pc-light);
    color: var(--pc-dark);
}

#pc-confirm-yes {
    background: var(--pc-green);
    color: white;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}