@font-face {
    font-family: "Yekan";

    src:
        url("../fonts/woff2/YekanBakhFaNum-Bold.woff2") format("woff2"),
        url("../fonts/woff/YekanBakhFaNum-Bold.woff") format("woff");

    font-display: swap;
}

:root {

    --bg: #05071d;

    --text: #ffffff;

    --muted: #b8c0d4;

    --cyan: #22d3ee;

    --pink: #ec4899;

    --glass:
        linear-gradient(
            145deg,
            rgba(255,255,255,.10),
            rgba(255,255,255,.035)
        );
}

* {
    box-sizing: border-box;
}

body {

    min-height: 100vh;

    margin: 0;

    padding: 26px;

    overflow-x: hidden;

    font-family: "Yekan", Tahoma, sans-serif;

    color: var(--text);

    background:
        radial-gradient(
            circle at 15% 5%,
            rgba(236,72,153,.24),
            transparent 28%
        ),

        radial-gradient(
            circle at 85% 18%,
            rgba(34,211,238,.18),
            transparent 30%
        ),

        linear-gradient(
            #05071d,
            #08051b
        );
}

/* =========================================================
   WRAPPER
========================================================= */

.gallery-wrapper {

    width: 100%;

    max-width: 1400px;

    margin: 0 auto;
}

/* =========================================================
   HEADER
========================================================= */

.gallery-header {

    text-align: center;

    margin-bottom: 46px;
}

.gallery-header h2 {

    margin: 0 0 14px;

    font-size: 44px;

    font-weight: 900;

    letter-spacing: -.03em;

    background:
        linear-gradient(
            90deg,
            #fff,
            var(--cyan),
            var(--pink)
        );

    -webkit-background-clip: text;

    color: transparent;
}

.gallery-header p {

    margin: 0 0 28px;

    color: var(--muted);

    font-size: 15px;

    line-height: 1.9;
}

/* =========================================================
   SEARCH
========================================================= */

.search-bar {

    position: relative;

    width: min(560px, 100%);

    margin: 0 auto;
}

.search-bar svg {

    position: absolute;

    right: 18px;

    top: 50%;

    transform: translateY(-50%);

    width: 20px;

    height: 20px;

    stroke: rgba(255,255,255,.62);

    stroke-width: 2;

    fill: none;

    pointer-events: none;
}

.search-bar input {

    width: 100%;

    height: 56px;

    border-radius: 18px;

    border:
        1px solid rgba(255,255,255,.14);

    background: var(--glass);

    backdrop-filter: blur(18px);

    color: #fff;

    font-family: inherit;

    font-size: 14px;

    direction: rtl;

    text-align: right;

    outline: none;

    padding-right: 54px;

    padding-left: 20px;

    transition:
        border-color .25s ease,
        box-shadow .25s ease,
        transform .25s ease;
}

.search-bar input::placeholder {

    color: rgba(255,255,255,.42);
}

.search-bar input:focus {

    border-color: rgba(34,211,238,.65);

    box-shadow:
        0 0 24px rgba(34,211,238,.18);

    transform: translateY(-1px);
}

/* =========================================================
   GRID
========================================================= */

.image-grid {

    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 24px;
}

/* =========================================================
   CARD
========================================================= */

.image-card {

    position: relative;

    overflow: hidden;

    height: 360px;

    cursor: pointer;

    border-radius: 28px;

    background: var(--glass);

    border:
        1px solid rgba(255,255,255,.13);

    backdrop-filter: blur(18px);

    box-shadow:
        0 0 35px rgba(34,211,238,.08),
        0 18px 45px rgba(0,0,0,.28);

    transition:
        transform .35s ease,
        border-color .35s ease,
        box-shadow .35s ease;
}

.image-card:hover {

    transform:
        translateY(-8px);

    border-color:
        rgba(34,211,238,.42);

    box-shadow:
        0 0 38px rgba(34,211,238,.16),
        0 18px 55px rgba(0,0,0,.35);
}

.image-card img {

    width: 100%;

    height: 100%;

    object-fit: cover;

    display: block;

    transition:
        transform .7s ease,
        filter .45s ease;
}

.image-card:hover img {

    transform: scale(1.1);

    filter:
        saturate(1.18)
        contrast(1.02);
}

/* =========================================================
   OVERLAY
========================================================= */

.image-overlay {

    position: absolute;

    inset: 0;

    z-index: 3;

    padding: 18px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    opacity: 0;

    transition: .32s ease;

    background:
        linear-gradient(
            to top,
            rgba(5,7,29,.92),
            rgba(5,7,29,.12) 45%,
            transparent 75%
        );
}

.image-card:hover .image-overlay {

    opacity: 1;
}

.overlay-top,
.overlay-bottom {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;
}

/* =========================================================
   COPY PROMPT BUTTON
========================================================= */

.copy-prompt-btn {

    height: 40px;

    padding: 0 14px;

    border:
        1px solid rgba(255,255,255,.14);

    border-radius: 999px;

    background:
        rgba(15,23,42,.58);

    color: #fff;

    font-family: "Yekan", Tahoma, sans-serif;

    font-size: 12px;

    font-weight: 900;

    cursor: pointer;

    display: inline-flex;

    align-items: center;

    gap: 8px;

    backdrop-filter: blur(16px);

    transition:
        transform .22s ease,
        border-color .22s ease,
        background .22s ease,
        box-shadow .22s ease;
}

.copy-prompt-btn:hover {

    transform: translateY(-2px);

    border-color:
        rgba(34,211,238,.55);

    background:
        linear-gradient(
            90deg,
            rgba(34,211,238,.22),
            rgba(236,72,153,.22)
        );

    box-shadow:
        0 0 20px rgba(34,211,238,.18);
}

.copy-prompt-btn.copied {

    background:
        rgba(25,195,125,.18);

    border-color:
        rgba(25,195,125,.55);

    color: #86efac;
}

/* =========================================================
   ICON BUTTONS
========================================================= */

.copy-prompt-btn svg,
.zoom-btn svg {

    width: 17px;

    height: 17px;

    stroke: currentColor;

    stroke-width: 2;

    fill: none;

    stroke-linecap: round;

    stroke-linejoin: round;

    flex-shrink: 0;
}

.zoom-btn,
.action-btn {

    border: none;

    outline: none;

    min-height: 40px;

    padding: 8px 14px;

    border-radius: 14px;

    cursor: pointer;

    color: #fff;

    background:
        rgba(255,255,255,.12);

    backdrop-filter: blur(12px);

    transition:
        background .25s ease,
        transform .25s ease,
        border-color .25s ease;
}

.zoom-btn {

    width: 40px;

    min-width: 40px;

    padding: 0;

    display: inline-flex;

    align-items: center;

    justify-content: center;
}

.zoom-btn:hover,
.action-btn:hover {

    background:
        linear-gradient(
            90deg,
            var(--cyan),
            var(--pink)
        );

    transform:
        translateY(-2px);
}

/* =========================================================
   USER INFO
========================================================= */

.user-info {

    display: flex;

    flex-direction: column;

    gap: 4px;
}

.username {

    font-size: 13px;

    font-weight: 800;

    color: #fff;
}

.prompt-preview {

    display: block;

    max-width: 220px;

    color:
        rgba(255,255,255,.68);

    font-size: 11px;

    line-height: 1.8;

    overflow-wrap: anywhere;
}

/* =========================================================
   LIKE
========================================================= */

.like-btn {

    display: flex;

    align-items: center;

    gap: 7px;

    font-family: inherit;

    font-size: 13px;

    font-weight: 700;
}

.like-btn.liked {

    background:
        rgba(236,72,153,.20);

    border:
        1px solid rgba(236,72,153,.65);

    color: #ec4899;
}

/* =========================================================
   EMPTY
========================================================= */

.empty-gallery {

    grid-column: 1 / -1;

    text-align: center;

    padding: 80px 20px;

    border-radius: 24px;

    background: var(--glass);

    border:
        1px solid rgba(255,255,255,.08);
}

.empty-gallery h3 {

    margin-bottom: 10px;

    font-size: 24px;
}

.empty-gallery p {

    color: var(--muted);
}

/* =========================================================
   LOAD MORE
========================================================= */

.load-more-wrapper {

    display: flex;

    justify-content: center;

    margin-top: 36px;
}

.load-more-btn {

    height: 50px;

    padding: 0 30px;

    border:
        1px solid rgba(34,211,238,.35);

    border-radius: 999px;

    background:
        linear-gradient(
            90deg,
            rgba(34,211,238,.18),
            rgba(236,72,153,.18)
        );

    color: #fff;

    font-family: "Yekan", Tahoma, sans-serif;

    font-size: 14px;

    font-weight: 900;

    cursor: pointer;

    backdrop-filter: blur(16px);

    box-shadow:
        0 0 24px rgba(34,211,238,.12);

    transition:
        transform .25s ease,
        border-color .25s ease,
        box-shadow .25s ease;
}

.load-more-btn:hover {

    transform:
        translateY(-2px);

    border-color:
        rgba(236,72,153,.6);

    box-shadow:
        0 0 28px rgba(236,72,153,.18);
}

/* =========================================================
   LIGHTBOX
========================================================= */

.lightbox {

    position: fixed;

    inset: 0;

    z-index: 9999;

    display: none;

    align-items: center;

    justify-content: center;

    padding: 24px;

    background:
        rgba(0,0,0,.82);

    backdrop-filter: blur(14px);
}

.lightbox.active {

    display: flex;
}

.lightbox img {

    max-width: 92vw;

    max-height: 86vh;

    border-radius: 24px;

    object-fit: contain;

    box-shadow:
        0 0 45px rgba(34,211,238,.18),
        0 0 70px rgba(236,72,153,.16);
}

.lightbox-close {

    position: absolute;

    top: 24px;

    left: 24px;

    width: 46px;

    height: 46px;

    border: none;

    border-radius: 50%;

    cursor: pointer;

    color: #fff;

    font-size: 26px;

    background:
        rgba(255,255,255,.15);

    backdrop-filter: blur(12px);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1200px) {

    .image-grid {

        grid-template-columns:
            repeat(3, 1fr);
    }
}

@media (max-width: 992px) {

    .image-grid {

        grid-template-columns:
            repeat(2, 1fr);
    }
}

@media (max-width: 600px) {

    body {

        padding: 14px;
    }

    .gallery-header h2 {

        font-size: 30px;
    }

    .gallery-header p {

        font-size: 13px;
    }

    .image-grid {

        grid-template-columns: 1fr;

        gap: 18px;
    }

    .image-card {

        height: 320px;
    }

    .copy-prompt-btn span {

        display: none;
    }

    .copy-prompt-btn {

        width: 40px;

        padding: 0;

        justify-content: center;
    }

    .prompt-preview {

        max-width: 170px;
    }
}
/* =========================================
   MOBILE FIX
========================================= */

@media screen and (max-width:768px){

    html,
    body{
        width:100%;
        overflow-x:hidden;
    }

    body{
        padding:0 !important;
        margin:0 !important;
    }

    .gallery-wrapper{

        width:100%;
        max-width:100%;

        padding:14px !important;

        margin:0 auto;
    }

    /* header */

    .gallery-header{
        margin-bottom:24px;
    }

    .gallery-header h2{
        font-size:24px;
    }

    .gallery-header p{
        font-size:12px;
        line-height:1.9;
        margin-top:6px;
    }

    /* search */

    .search-bar input{

        width:100%;
        max-width:100%;

        height:46px;

        font-size:13px;

        border-radius:14px;
    }

    /* GRID */

    .image-grid{

        display:grid;

        grid-template-columns:repeat(2,minmax(0,1fr)) !important;

        gap:12px;

        width:100%;
    }

    /* CARD */

    .image-card{

        width:100%;

        height:180px !important;

        border-radius:16px;

        overflow:hidden;
    }

    .image-card img{

        width:100%;
        height:100%;

        object-fit:cover;
    }

    /* overlay */

    .image-overlay{

        opacity:1;

        padding:10px;

        background:
            linear-gradient(
                to top,
                rgba(5,7,29,.96),
                rgba(5,7,29,.25) 60%,
                transparent
            );
    }

    .badge{
        font-size:9px;
        padding:4px 8px;
    }

    .username{
        font-size:11px;
    }

    .actions{
        display:flex;
        gap:6px;
    }

    .action-btn,
    .like-btn{

        height:30px;

        padding:0 8px;

        font-size:10px;

        border-radius:10px;
    }

    /* button */

    .btn-load-more{

        width:100%;

        height:46px;

        border-radius:14px;

        font-size:13px;
    }

}

/* =========================================
   VERY SMALL DEVICES
========================================= */

@media screen and (max-width:420px){

    .image-card{
        height:160px !important;
    }

}