/* Reset & base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f5f7;
    color: #222;
}

/* Top bar (like Pinterest) */
.top-bar {
    position: sticky;
    top: 0;
      left: 0;
    width: 100%;
    z-index: 9000;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: #ffffffee;
    backdrop-filter: blur(15px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.35s ease;
}
.top-bar.hide {
    transform: translateY(-100%);
    opacity: 0;
}
.logo {
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: 0.03em;
}

.logo span {
    color: #e6007a;
}

.search-wrapper {
    flex: 1 0 100%;   
    max-width: 600px;
     margin-top: 10px;
}

.search-wrapper input {
    width: 100%;
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    border: 1px solid #ddd;
    outline: none;
    font-size: 0.95rem;
    background: #f3f3f6;
    margin-bottom: 10px;
}

.search-wrapper input:focus {
    border-color: #e6007a;
    background: #fff;
}

.top-nav {
    display: flex;
    gap: 0.5rem;
}
/* =========================
   MOBILE HEADER FIX
========================= */
@media (max-width: 699px) {

    /* Keep logo + buttons on same row */
    .top-bar {
        align-items: center;
    }

    .logo {
        order: 1;
        width:5px;
    }

    .top-nav {
        order: 2;
        margin-left: auto;   /* push buttons to right */
    }

    /* Search goes to second line */
    .search-wrapper {
        order: 3;
        flex: 1 0 100%;
        margin-top: 10px;
    }
}
@media (min-width: 700px) {
    .logo,
    .top-nav,
    .search-wrapper {
        order: initial;
    }
}
.btn {
    display: inline-block;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    border: none;
    background: #e6007a;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.btn:hover {
    background: #c6006a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-small {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
}
@media (min-width: 700px) {
    .search-wrapper {
        flex: 0 0 auto;   /* stays on same row for desktop */
        margin-top: 0;
        margin-left: 20px;
        width: 600px;     /* desktop width */
    }
}
@media (max-width: 700px) {
    .top-nav {
      
        margin-top: 10px;
       
    }
}


/* Category filter buttons */
.category-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 1rem 1.5rem 0.5rem;
}

.filter-btn {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border 0.15s;
}

.filter-btn.active,
.filter-btn:hover {
    background: #e6007a;
    color: #fff;
    border-color: #e6007a;
}

/* Gallery - masonry layout */
.gallery {
    padding: 1rem 1.5rem 2rem;
    column-count: 4;
    column-gap: 1rem;
}

.gallery-item {
    position: relative;
    margin-bottom: 1rem;
    break-inside: avoid;
    cursor: zoom-in;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    background: #fdfdfd;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.25s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.25));
    opacity: 0;
    transition: opacity 0.25s;
}

.gallery-item:hover::after {
    opacity: 1;
}

.empty-text {
    font-size: 1rem;
    color: #777;
}
.album-name {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #222;
    text-align: center;
}

.album-reactions {
    margin-top: 4px;
    text-align: center;
    font-size: 13px;
}
/* Responsive columns */
@media (max-width: 1200px) {
    .gallery {
        column-count: 3;
    }
}
@media (max-width: 900px) {
    .gallery {
        column-count: 2;
    }
}
@media (max-width: 600px) {
    .gallery {
        column-count: 1;
    }
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.lightbox.open {
    display: flex;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.6);
}

.lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1.5rem;
    font-size: 2.2rem;
    color: #fff;
    cursor: pointer;
}

.lightbox-caption {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: #f7f7f7;
    font-size: 0.9rem;
    text-align: center;
    max-width: 80%;
}

/* Admin layout (shared styles) */
.admin-wrapper {
    min-height: 100vh;
    display: flex;
}

.admin-sidebar {
    width: 240px;
    background: #111827;
    color: #fff;
    padding: 1.5rem 1rem;
}

.admin-sidebar h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.admin-sidebar a {
    display: block;
    padding: 0.5rem 0.8rem;
    margin-bottom: 0.25rem;
    color: #e5e7eb;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
}

.admin-sidebar a:hover {
    background: #1f2937;
}

.admin-main {
    flex: 1;
    padding: 1.5rem;
    background: #f3f4f6;
}

.card {
    background: #fff;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    margin-bottom: 1rem;
}

.card h1, .card h2 {
    margin-bottom: 0.75rem;
}

/* Admin login */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top left, #e6007a22, transparent),
                radial-gradient(circle at bottom right, #11182722, transparent),
                #f3f4f6;
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    padding: 2rem 2.25rem;
    border-radius: 1.25rem;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.login-card h1 {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 0.6rem;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #e6007a;
}

.text-error {
    color: #b91c1c;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}
.nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: #110e0e33;
    border: none;
    color: white;
    font-size: 2.5rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

#prevBtn { left: 20px; }
#nextBtn { right: 20px; }

.nav-btn:hover {
    background: #ffffff55;
}
/* ===============================
   DISPUTE POPUP MODAL
================================*/
.modal-overlay {
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.7);
    justify-content:center;
    align-items:center;
    z-index:9999;
}

.modal-overlay.active {
    display:flex;
}

.modal-box {
    background:#fff;
    padding:25px;
    width:90%;
    max-width:480px;
    border-radius:12px;
    position:relative;
}

.modal-close {
    position:absolute;
    right:15px;
    top:10px;
    font-size:26px;
    cursor:pointer;
}


.modal-form .form-group {
    margin-bottom: 1rem;
}

.modal-form label {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    display: block;
}

.modal-form input,
.modal-form textarea {
    width: 100%;
    padding: 0.55rem;
    border-radius: 0.5rem;
    border: 1px solid #ccc;
    font-size: 0.9rem;
}
.image-count {
    position: absolute;
    bottom: 8px;
    right: 12px;
    background: rgba(0,0,0,0.65);
    padding: 4px 8px;
    font-size: 0.75rem;
    color: #fff;
    border-radius: 6px;
    pointer-events: none;
}
/* Reaction Buttons */
.reactions {
    position: absolute;
    bottom: 8px;
    left: 10px;
    display: flex;
    gap: 6px;
}

.react-btn {
    border: none;
    background: rgba(0,0,0,0.55);
    color: #fff;
    padding: 3px 8px;
    font-size: 0.8rem;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
    transition: transform 0.15s ease, background 0.15s ease;
}

.react-btn:hover {
    transform: scale(1.15);
    background: rgba(0,0,0,0.7);
}

.react-btn span.count {
    font-weight: bold;
    color: #ffd700;
}
.reactions {
    pointer-events: auto !important;
    z-index: 10;
}

.gallery-item img {
    pointer-events: none; /* image should NOT capture clicks */
}

.gallery-item {
    position: relative;
    pointer-events: auto;
}
.lightbox-reactions {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 9999;
}

.lb-react {
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    gap: 5px;
}

.lb-react:hover {
    background: rgba(0,0,0,0.8);
}
/* Floating reaction animation */
.floating-reaction {
    position: fixed;
    font-size: 1.8rem;
    pointer-events: none;
    animation: floatUp 1s ease-out forwards;
    z-index: 99999;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    70% {
        transform: translateY(-40px) scale(1.3);
        opacity: 0.9;
    }
    100% {
        transform: translateY(-70px) scale(0.8);
        opacity: 0;
    }
}
#backToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: none;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
#backToTop:hover {
    background: rgba(0,0,0,0.85);
}
.logo-img {
    height: 50px;   /* adjust this */
    width: auto;
     display: block;
}
.logo-link {
    display: inline-block;
}
