/* General Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Poppins', sans-serif; background-color: #f0f2f5; color: #333; }

/* Header */
.main-header { background-color: #222; color: white; padding: 1rem 2rem; }
.header-content { max-width: 1400px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.header-content h1 { font-size: 1.5rem; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.nav-link { color: #ccc; text-decoration: none; font-weight: 500; transition: color 0.3s; }
.nav-link:hover { color: white; }

/* Main Container */
.gallery-container { max-width: 1400px; margin: 2rem auto; padding: 0 20px; }

/* Buttons & Inputs */
.toggle-container { display: flex; justify-content: flex-end; margin-bottom: 20px; }
.btn-toggle { background-color: #e60023; color: white; padding: 12px 25px; border-radius: 30px; border: none; cursor: pointer; font-weight: 600; font-size: 1rem; transition: 0.3s; }
.btn-toggle:hover { background-color: #ad081b; }

.upload-section { background: white; padding: 20px; border-radius: 15px; margin-bottom: 30px; text-align: center; transition: all 0.3s ease-in-out; opacity: 1; max-height: 500px; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.hidden { display: none; opacity: 0; max-height: 0; margin: 0; padding: 0; } /* Important: Keeps items hidden */

.upload-controls { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 15px; flex-wrap: wrap; }
button { padding: 10px 20px; border: none; border-radius: 8px; cursor: pointer; font-family: 'Poppins', sans-serif; font-weight: 600; display: flex; align-items: center; gap: 8px; transition: 0.2s; }
.btn-choose { background-color: #efefef; color: #333; }
.btn-choose:hover { background-color: #e2e2e2; }
.btn-add { background-color: #333; color: white; }
.btn-add:disabled { background-color: #ccc; cursor: not-allowed; }
.password-input { padding: 10px; border: 1px solid #ccc; border-radius: 8px; font-family: 'Poppins', sans-serif; outline: none; font-size: 0.9rem; width: 180px; }
.password-input:focus { border-color: #e60023; }

/* Masonry Grid */
.masonry-grid { column-count: 5; column-gap: 15px; }
.gallery-item { break-inside: avoid; margin-bottom: 15px; border-radius: 16px; overflow: hidden; position: relative; background-color: #ddd; }
.gallery-item img { width: 100%; height: auto; display: block; transition: transform 0.3s ease, filter 0.3s ease; }
/* Hover effects */
.gallery-item:hover img { transform: scale(1.02); filter: brightness(0.95); cursor: context-menu; /* Shows user they can right click */ }

/* --- NEW: Custom Right Click Menu --- */
.custom-context-menu {
    position: fixed; /* Fixed relative to screen */
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    width: 180px;
    z-index: 9999;
    overflow: hidden;
    padding: 5px 0;
    border: 1px solid #eee;
}

.menu-option {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e60023; /* Red text for delete */
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.menu-option:hover {
    background-color: #f8f8f8;
}

.menu-option i {
    font-size: 1rem;
}

/* Responsive */
/* Desktop */
.masonry-grid {
    column-count: 4;
    column-gap: 25px;
}

/* Laptop */
@media (max-width: 1200px) {
    .masonry-grid {
        column-count: 3;
    }
}

/* Tablet */
@media (max-width: 900px) {
    .masonry-grid {
        column-count: 2;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .masonry-grid {
        column-count: 1;
    }
}
