/* =========================
   RESET
========================= */
* {
    box-sizing: border-box;
}

@font-face {
    font-family: 'Transport';
    src: url('/Chomage.otf') format('truetype');
}

body {
    margin: 0;
    min-height: 100vh;
    background: rgb(20, 20, 20);
    font-family: Arial, Helvetica, sans-serif;
    color: white;
}

@keyframes heartPop {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    40% {
        transform: scale(1.4);
        opacity: 1;
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* floating heart effect */
.floating-heart {
    position: absolute;
    font-size: 40px;
    color: red;
    animation: heartFloat 0.8s ease-out forwards;
    pointer-events: none;
}

@keyframes heartFloat {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translateY(-60px) scale(1.2);
        opacity: 0;
    }
}

/* =========================
   HEADER
========================= */
.topcontainer {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    width: 100%;
    min-height: 70px;
    background: rgba(1, 63, 78, 0.39);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
}

.logo {
    position: absolute;
    left: 15px;
    width: 45px;
    height: 45px;
}

.topcontainer h1 {
    margin: 0;
    font-family: 'Transport';
    font-size: clamp(1.2rem, 3vw, 1.8rem);
}

/* =========================
   SEARCH BAR
========================= */
.searchbar {
    display: flex;
    justify-content: center;
    margin: 20px;
}

.searchbar input {
    width: 60%;
    max-width: 400px;

    padding: 10px 14px;
    border: none;
    outline: none;

    border-radius: 10px;
    background: rgb(35, 35, 35);
    color: white;
}

.searchbar input::placeholder {
    color: rgb(160, 160, 160);
}

/* =========================
   FILTERS
========================= */
.filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px;
    margin-top: 90px;
}


.filter-btn {
    background: rgb(35, 35, 35);
    color: white;

    border: none;
    padding: 8px 14px;
    border-radius: 8px;

    cursor: pointer;
    transition: 0.2s;
}

.filter-btn:hover {
    background: rgb(70, 70, 70);
}

.filter-btn.active {
    background: rgb(0, 140, 150);
    color: black;
    font-weight: bold;
}

/* =========================
   GRID
========================= */
.gridbox {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;

    width: 95%;
    max-width: 1200px;

    margin: 30px auto;
    padding: 10px;
}

/* CARD */
.griditem {
    position: relative;

    background: rgb(35, 35, 35);
    border-radius: 12px;
    overflow: hidden;

    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.griditem:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.45);
}

/* IMAGE */
.griditem img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

/* TEXT */
.card-content {
    padding: 12px;
}

.card-title {
    margin: 0 0 6px 0;
    font-size: 1.1rem;
}

.card-desc {
    margin: 0;
    font-size: 0.9rem;
    color: rgb(180,180,180);
}

/* =========================
   FAVORITE BUTTON
========================= */
.like-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    /* Increase touch target for mobile (44px recommended minimum) */
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgb(37, 37, 37);
    border-radius: 50%;

    cursor: pointer;
    transition: 0.2s;

    /* Ensure button sits above the image for reliable taps */
    z-index: 5;

    font-size: 18px;

    /* Improve mobile tap behaviour */
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

.like-btn:hover {
    transform: scale(1.2);
}

.like-btn.active {
    color: red;
}

/* =========================
   LIGHTBOX
========================= */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;

    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;

    z-index: 999;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}


/* NAV BUTTONS */
.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    background: rgba(0,0,0,0.5);
    color: white;

    border: none;
    font-size: 30px;
    padding: 10px 15px;

    cursor: pointer;
    border-radius: 8px;
}

.prev { left: 20px; }
.next { right: 20px; }

.nav:hover {
    background: rgba(255,255,255,0.2);
}

/* =========================
   UTILITIES
========================= */
.hidden {
    display: none !important;
}

.highlight {
    background: rgb(255,200,0);
    color: black;
    padding: 2px 4px;
    border-radius: 4px;
}

.no-results {
    display: none;
    text-align: center;
    margin: 30px;
    color: rgb(180,180,180);
}


.griditem video {
    width: 100%;
    height: 160px;        /* same as your images */
    object-fit: cover;    /* crops like an image */
    display: block;
}



.footer {
    background: rgb(25, 25, 25);
    color: white;
    margin-top: 40px;
    padding: 30px 20px 10px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    max-width: 1200px;
    margin: auto;
}

.footer-left h3 {
    margin: 0 0 10px 0;
}

.footer-left p {
    color: rgb(180, 180, 180);
    max-width: 400px;
}

.footer-links,
.footer-social {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer a {
    color: rgb(200, 200, 200);
    text-decoration: none;
    transition: 0.2s;
}

.footer a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid rgb(50, 50, 50);
    font-size: 0.85rem;
    color: rgb(150, 150, 150);
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    margin-right: 10px;

    background: rgb(35,35,35);
    border-radius: 10px;

    color: white;
    font-size: 18px;

    transition: 0.2s;
    text-decoration: none;
}

.footer-social a:hover {
    background: rgb(70,70,70);
    transform: translateY(-3px);
}

.NCT {
    width: 160px;

}

.tags {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tags span {
    font-size: 0.75rem;
    background: rgb(45,45,45);
    color: rgb(200,200,200);

    padding: 3px 8px;
    border-radius: 6px;

    cursor: pointer;
    transition: 0.2s;
}
