/*=====================================================
    PROMPTHUB V2
======================================================*/

:root{

    --primary:#8B5CF6;
    --primary-hover:#7C3AED;

    --bg:#F6F7FB;

    --surface:#FFFFFF;

    --border:#ECEEF3;

    --text:#111827;

    --text-light:#6B7280;

    --shadow-sm:
        0 4px 12px rgba(15,23,42,.05);

    --shadow:
        0 10px 28px rgba(15,23,42,.08);

    --shadow-lg:
        0 22px 55px rgba(15,23,42,.14);

    --radius-sm:12px;

    --radius:18px;

    --radius-lg:26px;

}

/*=====================================================*/

*{

    margin:0;

    padding:0;

    box-sizing:border-box;

}

html{

    scroll-behavior:smooth;

}

body{

    font-family:"Inter",sans-serif;

    background:var(--bg);

    color:var(--text);

    min-height:100vh;

    -webkit-font-smoothing:antialiased;

}

/*=====================================================*/

.container{

    width:min(1550px,94%);

    margin:0 auto;

}

/*=====================================================

    NAVBAR

======================================================*/

.navbar{

    position:sticky;

    top:0;

    z-index:500;

    background:rgba(255,255,255,.88);

    backdrop-filter:blur(18px);

    border-bottom:1px solid var(--border);

    padding:14px 26px;

    display:flex;

    align-items:center;

    gap:24px;

}

/*----------------------------------------------------*/

.nav-logo{

    flex-shrink:0;

}

.nav-logo a{

    text-decoration:none;

    color:var(--text);

    font-size:1.9rem;

    font-weight:800;

}

.logo-purple{

    color:var(--primary);

}

/*----------------------------------------------------*/

.nav-categories{

    flex:1;

    display:flex;

    gap:12px;

    overflow-x:auto;

    scrollbar-width:none;

}

.nav-categories::-webkit-scrollbar{

    display:none;

}

.category-chip{

    border:none;

    background:#F2F4F8;

    color:#4B5563;

    border-radius:999px;

    padding:11px 18px;

    cursor:pointer;

    white-space:nowrap;

    font-weight:600;

    transition:.25s;

}

.category-chip:hover{

    background:#EDE9FE;

    color:var(--primary);

}

.category-chip.active{

    background:var(--primary);

    color:white;

}

/*----------------------------------------------------*/

.nav-actions{

    display:flex;

    align-items:center;

    gap:14px;

    flex-shrink:0;

}

/*=====================================================*/

.search-box{

    width:360px;

    height:46px;

    padding:0 18px;

    border-radius:999px;

    border:1px solid var(--border);

    background:white;

    outline:none;

    font-size:.95rem;

    transition:.25s;

}

.search-box:focus{

    border-color:var(--primary);

    box-shadow:0 0 0 4px rgba(139,92,246,.12);

}

.sort-select{

    height:46px;

    padding:0 18px;

    border-radius:999px;

    border:1px solid var(--border);

    background:white;

    cursor:pointer;

    font-weight:500;

    transition:.25s;

}

.sort-select:hover{

    border-color:var(--primary);

}

.empty-state{

    text-align:center;

    padding:120px 20px;

}

.empty-state h2{

    margin-bottom:12px;

}

.empty-state p{

    color:var(--text-light);

}

/*=====================================================

    CARD GRID

======================================================*/

.card-grid{

    display:grid;

    grid-template-columns:repeat(5,minmax(0,1fr));

    gap:24px;

    align-items:start;

}

/*----------------------------------------------------*/

@media (min-width:1700px){

    .card-grid{

        grid-template-columns:repeat(5,minmax(0,1fr));

    }

}

@media (max-width:1300px){

    .card-grid{

        grid-template-columns:repeat(4,minmax(0,1fr));

    }

}

@media (max-width:1000px){

    .card-grid{

        grid-template-columns:repeat(3,minmax(0,1fr));

    }

}

@media (max-width:700px){

    .card-grid{

        grid-template-columns:repeat(2,minmax(0,1fr));

        gap:24px;

    }

}

@media (max-width:520px){

    .card-grid{

        grid-template-columns:1fr;

        gap:26px;

    }

}

/*=====================================================

    CARD

======================================================*/

.card{

    background:var(--surface);

    border-radius:20px;

    overflow:hidden;

    box-shadow:var(--shadow-sm);

    transition:
        transform .28s ease,
        box-shadow .28s ease;

    display:flex;

    flex-direction:column;

    height:100%;

}

.card:hover{

    transform:translateY(-8px);

    box-shadow:var(--shadow-lg);

}

.poster{

    position:relative;

    overflow:hidden;

    background:#EEF2F7;

    aspect-ratio:0.72;
    

}

.poster img{

    width:100%;

    height:100%;

    display:block;

    object-fit:cover;

    transition:transform .45s ease;

}

.card:hover .poster img{

    transform:scale(1.05);

}

.card-body{

    padding:14px;

    display:flex;

    flex-direction:column;

    gap:10px;

    flex:1;

}

.card-body h2{

    font-size:.96rem;

    font-weight:700;

    line-height:1.35;

    margin:0;

    display:-webkit-box;

    -webkit-line-clamp:2;

    -webkit-box-orient:vertical;

    overflow:hidden;

}

.view-btn{

    margin-top:auto;

    width:100%;

    height:46px;

    border:none;

    border-radius:14px;

    background:linear-gradient(
        135deg,
        var(--primary),
        #A855F7
    );

    color:white;

    font-size:.95rem;

    font-weight:600;

    cursor:pointer;

    transition:
        transform .25s,
        box-shadow .25s;

}

.view-btn:hover{

    transform:translateY(-2px);

    box-shadow:

        0 12px 26px rgba(139,92,246,.28);

}

.view-btn:active{

    transform:translateY(0);

}

.htmx-request{

    opacity:.65;

    pointer-events:none;

}

.htmx-request .view-btn{

    cursor:wait;

}

.poster{

    background:

        linear-gradient(

            135deg,

            #F3F4F6,

            #E5E7EB

        );

}

@media(max-width:520px){

    .card{

        max-width:360px;

        width:100%;

        margin:auto;

    }

}

/*=====================================================

    GALLERY OVERLAY

======================================================*/

.gallery-overlay{

    position:fixed;

    inset:0;

    z-index:9999;

    background:rgba(15,23,42,.65);

    backdrop-filter:blur(14px);

    display:flex;

    justify-content:center;

    align-items:center;

    padding:32px;

    animation:fadeOverlay .22s ease;

}

/*=====================================================

    MODAL

======================================================*/

.gallery-modal{

    position:relative;

   width:min(1200px,96%);

    max-height:92vh;

    overflow-y:auto;

    background:var(--surface);

    border-radius:28px;

    box-shadow:var(--shadow-lg);

    padding:34px;

    animation:modalIn .28s ease;

}

.gallery-close{

    position:absolute;

    top:22px;

    right:22px;

    width:42px;

    height:42px;

    border:none;

    border-radius:50%;

    background:#F3F4F6;

    cursor:pointer;

    font-size:20px;

    transition:.25s;

}

.gallery-close:hover{

    background:#EDE9FE;

    color:var(--primary);

    transform:rotate(90deg);

}

.gallery-header{

    margin-bottom:28px;

}

.gallery-header h2{

    font-size:2rem;

    font-weight:700;

    color:var(--text);

}

.gallery-category{

    display:inline-flex;

    margin-top:14px;

    padding:8px 18px;

    border-radius:999px;

    background:#F3E8FF;

    color:var(--primary);

    font-size:.9rem;

    font-weight:600;

}

.gallery-main-image{

    border-radius:24px;

    overflow:hidden;

    background:#EEF2F7;

    box-shadow:var(--shadow-sm);

}

.gallery-main-image img{

    width:100%;

    max-height:70vh;

    object-fit:contain;

    display:block;

}

.gallery-thumbnails{

    display:flex;

    gap:16px;

    margin-top:18px;

    justify-content:center;

    flex-wrap:wrap;

}

.thumb{

    width:110px;

    aspect-ratio:2/3;

    border-radius:16px;

    object-fit:cover;

    cursor:pointer;

    opacity:.65;

    transition:.25s;

    border:3px solid transparent;

}

.thumb:hover{

    opacity:1;

    transform:translateY(-4px);

}

.thumb.active{

    opacity:1;

    border-color:var(--primary);

}

.prompt-container{

    margin-top:34px;

    border:1px solid var(--border);

    border-radius:22px;

    background:#FAFBFD;

    padding:20px;

}

.prompt-title{

    font-size:1.1rem;

    font-weight:700;

    margin-bottom:18px;

}

.prompt-text{

    white-space:pre-wrap;

    word-break:break-word;

    font-family:

        "JetBrains Mono",

        Consolas,

        monospace;

    line-height:1.75;

    font-size:.92rem;

    color:#374151;

    max-height:320px;

    overflow:auto;

    padding-right:10px;

}

.prompt-actions{

    display:grid;

    grid-template-columns:repeat(3,1fr);

    gap:12px;

}

.copy-btn,
.whatsapp-btn,
.download-btn{

    border:none;

    border-radius:14px;

    height:46px;

    padding:0 20px;

    cursor:pointer;

    font-weight:600;

    transition:.25s;

}

.copy-btn{

    background:var(--primary);

    color:white;

}

.copy-btn:hover{

    background:var(--primary-hover);

}

.whatsapp-btn{

    background:#25D366;

    color:white;

}

.whatsapp-btn:hover{

    background:#1DA851;

}

.download-btn{

    background:#2563EB;

    color:white;

}

.download-btn:hover{

    background:#1D4ED8;

}

.gallery-modal::-webkit-scrollbar,
.prompt-text::-webkit-scrollbar{

    width:8px;

}

.gallery-modal::-webkit-scrollbar-thumb,
.prompt-text::-webkit-scrollbar-thumb{

    background:#D1D5DB;

    border-radius:999px;

}

@keyframes fadeOverlay{

    from{

        opacity:0;

    }

    to{

        opacity:1;

    }

}

@keyframes modalIn{

    from{

        opacity:0;

        transform:translateY(18px) scale(.97);

    }

    to{

        opacity:1;

        transform:translateY(0) scale(1);

    }

}

@media(max-width:900px){

    .gallery-overlay{

        padding:18px;

    }

    .gallery-modal{

        padding:24px;

    }

    .gallery-header h2{

        font-size:1.5rem;

    }

    .thumb{

        width:90px;

    }

}

@media(max-width:600px){

    .gallery-modal{

        padding:18px;

        border-radius:20px;

    }

    .prompt-actions{

        flex-direction:column;

    }

    .copy-btn,
    .whatsapp-btn,
    .download-btn{

        width:100%;

    }

}

/*=====================================================

    PAGINATION

======================================================*/

.pagination{

    margin:48px 0 20px;

    display:flex;

    justify-content:center;

    align-items:center;

    gap:10px;

    flex-wrap:wrap;

}

.pagination a,
.pagination button{

    min-width:42px;

    height:42px;

    border:none;

    border-radius:12px;

    background:white;

    color:var(--text);

    cursor:pointer;

    font-weight:600;

    box-shadow:var(--shadow-sm);

    transition:.2s;

}

.pagination a:hover,
.pagination button:hover{

    background:var(--primary);

    color:white;

}

.pagination .active{

    background:var(--primary);

    color:white;

}

/*=====================================================

    HTMX

======================================================*/

.htmx-indicator{

    display:none;

}

.htmx-request .htmx-indicator{

    display:inline-block;

}

.htmx-request{

    cursor:progress;

}

.card-grid.htmx-swapping{

    opacity:.65;

    transition:.18s;

}

.card-grid.htmx-settling{

    opacity:1;

}

::selection{

    background:#DDD6FE;

    color:#111827;

}

a{

    color:inherit;

    text-decoration:none;

}

button{

    font-family:inherit;

}

button:focus-visible{

    outline:none;

    box-shadow:

        0 0 0 4px rgba(139,92,246,.18);

}

input,
select{

    font-family:inherit;

}

img{

    display:block;

    user-select:none;

    -webkit-user-drag:none;

}

.card,
button,
input,
select,
.thumb,
.category-chip{

    transition:

        background .22s ease,

        color .22s ease,

        transform .22s ease,

        box-shadow .22s ease,

        border-color .22s ease;

}

::-webkit-scrollbar{

    width:10px;

    height:10px;

}

::-webkit-scrollbar-thumb{

    background:#D1D5DB;

    border-radius:999px;

}

::-webkit-scrollbar-track{

    background:transparent;

}

/*=====================================================
    RESPONSIVE NAVBAR
======================================================*/

@media (max-width: 900px) {

    .navbar {

        display: grid;

        grid-template-columns: 1fr;

        gap: 16px;

        padding: 16px;

    }

    /* Center logo */

    .nav-logo {

        text-align: center;

    }

    .nav-logo a {

        font-size: 1.8rem;

    }

    /* Categories */

    .nav-categories {

        display: flex;

        overflow-x: auto;

        gap: 10px;

        padding-bottom: 4px;

        scrollbar-width: none;

    }

    .nav-categories::-webkit-scrollbar {

        display: none;

    }

    .category-chip {

        flex: 0 0 auto;

    }

    /* Search + Sort */

    .nav-actions {

        display: flex;

        gap: 12px;

        width: 100%;

    }

    .search-box {

        flex: 1;

        width: auto;

        min-width: 0;
    }

    .sort-select {

        width: 130px;

        flex-shrink: 0;

    }

}

@media (max-width: 600px) {

    .navbar {

        gap: 14px;

        padding: 14px;

    }

    .nav-logo a {

        font-size: 1.6rem;

    }

    .nav-actions {

        flex-direction: column;

    }

    .search-box {

        width: 100%;

    }

    .sort-select {

        width: 100%;

    }

    .category-chip {

        padding: 10px 16px;

        font-size: .88rem;

    }

}

.empty-state{

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    min-height:50vh;

}

.card:hover{

    box-shadow:

        0 18px 45px rgba(15,23,42,.12);

}

.search-box::placeholder{

    color:#9CA3AF;

}

.search-box:focus{

    background:white;
}

.poster{

    aspect-ratio:2/3;
}

.poster img{

    width:100%;

    height:100%;

}

.card-category{

    color:var(--text-light);

    font-size:.9rem;

    font-weight:500;

}

.card{

    position:relative;

    overflow:hidden;

}

.card::before{

    content:"";

    position:absolute;

    inset:0;

    background:

        linear-gradient(
            180deg,
            rgba(255,255,255,.08),
            transparent
        );

    opacity:0;

    transition:.3s;

    pointer-events:none;

}

.card:hover::before{

    opacity:1;

}

.poster{

    position:relative;

}

.poster::after{

    content:"";

    position:absolute;

    left:0;

    right:0;

    bottom:0;

    height:80px;

    background:

        linear-gradient(

            transparent,

            rgba(0,0,0,.08)

        );

}

.card-body h2{

    letter-spacing:-.02em;

}

.gallery-main-image{

    cursor:zoom-in;

}

.gallery-main-image img{

    transition:.35s;

}

.gallery-main-image:hover img{

    transform:scale(1.02);

}

.category-chip{

    font-size:.9rem;

    letter-spacing:.01em;

}

.view-btn:active{

    transform:scale(.98);

}

.navbar{

    box-shadow:

        0 2px 10px rgba(15,23,42,.05);

}

/*=====================================================

    HERO

======================================================*/

.hero{

    text-align:center;

    padding:40px 0 42px;

}

.hero h1{

    font-size:2.6rem;

    font-weight:800;

    color:var(--text);

    letter-spacing:-0.03em;

    margin-bottom:14px;

}

.hero p{

    width:min(760px,92%);

    margin:auto;

    color:var(--text-light);

    font-size:1.05rem;

    line-height:1.8;

}

.empty-state{

    padding:120px 20px;

    text-align:center;

}

.empty-state h2{

    font-size:2rem;

    margin-bottom:10px;

}

.empty-state p{

    color:var(--text-light);

}

.card{

    border:1px solid rgba(17,24,39,.05);

}

@media(max-width:600px){

    .prompt-actions{

        grid-template-columns:1fr;

    }

}

.view-btn:hover{

    background:var(--primary-hover);

}

.search-box,
.sort-select {

    height: 44px;

    border-radius: 999px;

    margin-top: 15px;

}


/* ==========================================
   AUTO HIDE NAVBAR
========================================== */

.navbar{

    position:sticky;

    top:0;

    z-index:1000;

    transition:
        transform .28s ease,
        box-shadow .28s ease;

}

@media (max-width:768px){

    .navbar.nav-hidden{

        transform:translateY(-110%);

        box-shadow:none;

    }

}

/*=====================================================

    MOBILE NAVBAR V2

======================================================*/

.mobile-search-btn{

    display:none;

}

@media(max-width:768px){

    .navbar{

        display:grid;

        grid-template-columns:1fr auto;

        grid-template-areas:

            "logo search"

            "categories categories"

            "form form";

        gap:14px;

        padding:14px 16px;

    }

    .nav-logo{

        grid-area:logo;

    }

    .mobile-search-btn{

        grid-area:search;

        display:flex;

        justify-content:center;

        align-items:center;

        width:42px;

        height:42px;

        border:none;

        border-radius:50%;

        background:white;

        box-shadow:var(--shadow-sm);

        cursor:pointer;

        font-size:20px;

    }

    .nav-categories{

        grid-area:categories;

        overflow-x:auto;

        flex-wrap:nowrap;

        scrollbar-width:none;

        padding-bottom:4px;

    }

    .nav-categories::-webkit-scrollbar{

        display:none;

    }

    .category-chip{

        flex:0 0 auto;

    }

    .mobile-search{

        grid-area:form;

        display:none;

        flex-direction:column;

        gap:12px;

    }

    .mobile-search.open{

        display:flex;

    }

    .search-box{

        width:100%;

    }

    .sort-select{

        width:100%;

    }

}

@media(max-width:768px){

.nav-hidden{

    transform:translateY(-58px);

}

}

@media (max-width:768px){

    .navbar{

        display:grid;

        grid-template-columns:1fr auto;

        grid-template-areas:
            "logo search"
            "categories categories"
            "form form";

        align-items:center;

        gap:14px;

        padding:14px 16px;

    }

    .nav-logo{

        grid-area:logo;

        text-align:left;

        justify-self:start;

    }

    .nav-logo a{

        font-size:1.45rem;

        font-weight:800;

    }

    .mobile-search-btn{

        grid-area:search;

        justify-self:end;

    }

    .nav-categories{

        grid-area:categories;

        display:flex;

        flex-wrap:nowrap;

        overflow-x:auto;

        gap:10px;

        scrollbar-width:none;

    }

    .nav-categories::-webkit-scrollbar{

        display:none;

    }

    .category-chip{

        flex:0 0 auto;

    }

    .mobile-search{

        grid-area:form;

        display:none;

        flex-direction:column;

        gap:12px;

    }

    .mobile-search.open{

        display:flex;

    }

    .search-box,
    .sort-select{

        width:100%;

    }

}



.auth-container,
.admin-form-container {
    min-height:80vh;
    display:flex;
    justify-content:center;
    align-items:center;
}


.auth-card,
.admin-form-container,
.stats-card,
.admin-card {

    background:white;

    border-radius:18px;

    padding:24px;

    box-shadow:
    0 10px 30px rgba(0,0,0,.08);

}



.form-group {

    display:flex;

    flex-direction:column;

    gap:8px;

    margin-bottom:18px;

}


.form-group input {

    padding:12px;

    border-radius:10px;

    border:1px solid #ddd;

}



.primary-btn {

    background:#a855f7;

    color:white;

    padding:10px 18px;

    border-radius:12px;

    border:none;

    cursor:pointer;

    text-decoration:none;

}



.secondary-btn {

    background:#eee;

    padding:10px 18px;

    border-radius:12px;

    text-decoration:none;

    color:#333;

}



.danger-btn {

    background:#ef4444;

    color:white;

    border:none;

    padding:10px 15px;

    border-radius:12px;

}

.category-item.active {
    background: #ead7f8;
    color: #8d45b9;
    font-weight: 600;
}



.infinite-scroll-trigger {
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
}

.infinite-scroll-trigger {
    grid-column: 1 / -1;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    border: 0;
}




