@import url(
'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Pretendard&display=swap'
);


*{

    box-sizing:border-box;

}



body{

    margin:0;

    background:#0b0b10;

    color:#eeeeee;

    font-family:
        Pretendard,
        Inter,
        Arial,
        sans-serif;

}



.container{

    width:90%;

    max-width:1200px;

    margin:auto;

    padding:30px 0;

}



header{

    text-align:center;

    margin-bottom:30px;

}



h1{

    font-size:42px;

    font-weight:700;

}



.description{

    color:#aaa;

    font-size:18px;

}



.upload-box{

    background:#171720;

    padding:25px;

    border-radius:15px;

}



button{

    background:#8b5cf6;

    color:white;

    border:none;

    padding:10px 20px;

    border-radius:8px;

    cursor:pointer;

}



button:hover{

    opacity:.8;

}



.gallery-grid{

    display:grid;

    grid-template-columns:
    repeat(
        auto-fill,
        minmax(220px,1fr)
    );

    gap:20px;

}



.gallery-item{

    background:#171720;

    padding:12px;

    border-radius:15px;

}



.gallery-item img{

    width:100%;

    height:250px;

    object-fit:cover;

    border-radius:10px;

    cursor:pointer;

}



.gallery-item p{

    text-align:center;

    overflow:hidden;

    text-overflow:ellipsis;

}
/* =========================
   Footer Advertisement
   ========================= */

.footer-ad {
    width: 100%;
    margin-top: 40px;
    padding: 20px;
    background: #1b1b1b;
    border-top: 1px solid #333;
    text-align: center;
    overflow: hidden;

    --pc-ad-width: 1200px;
    --mobile-ad-height: 120px;
}


.footer-ad a,
.footer-ad picture {
    display: block;
    width: 100%;
}


.footer-ad img {
    display: block;
    width: 100%;
    max-width: var(--pc-ad-width);
    height: auto;
    max-height: 180px;
    object-fit: contain;
    margin: 0 auto;
    border-radius: 8px;
    transition: transform .2s ease;
}


.footer-ad img:hover {
    transform: scale(1.02);
}


@media (max-width:768px){

    .footer-ad {
        padding:10px;
    }


    .footer-ad img {

        width:100%;
        max-width:100%;
        max-height:var(--mobile-ad-height);
        object-fit:contain;

    }

}

.footer-ad {
    min-height: 200px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.footer-ad img {
    min-height: 50px !important;
    visibility: visible !important;
    opacity: 1 !important;
}



.footer-ad picture {
    display:block !important;
}

.footer-ad img {
    display:block !important;
    width:90% !important;
    max-width:1200px !important;
    height:auto !important;
    min-height:50px !important;
    opacity:1 !important;
    visibility:visible !important;
}

.content-layout {
    display:flex;
    gap:30px;
    align-items:flex-start;
}


.content-layout .gallery-grid {
    flex:1;
}


.sidebar-ad {
    flex-shrink:0;
}


.sidebar-ad img {
    display:block;
    border-radius:8px;
}



@media(max-width:768px){

    .content-layout {
        display:block;
    }


    .sidebar-ad {
        margin-top:20px;
        text-align:center;
    }


    .sidebar-ad img {
        max-width:100%;
        height:auto !important;
    }

}


/* sidebar layout */

.content-layout {
    display:flex;
    gap:30px;
    align-items:flex-start;
}


.main-gallery {
    flex:1;
    min-width:0;
}


.sidebar-ad {
    width:300px;
    flex-shrink:0;
    margin-top:60px;
}


.sidebar-ad img {
    display:block;
    width:100%;
    height:auto;
    border-radius:8px;
}



@media(max-width:900px){

    .content-layout {
        display:block;
    }


    .sidebar-ad {
        width:100%;
        margin-top:30px;
        text-align:center;
    }


    .sidebar-ad img {
        max-width:100%;
        height:auto !important;
    }

}



/* sidebar advertisement */
.sidebar-ad {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);

    width: 300px;

    z-index: 99999;
}

.sidebar-ad img {
    width:100%;
    height:auto;
    display:block;
}


@media(max-width:1200px){
    .sidebar-ad{
        display:none;
    }
}



/* sidebar size fix */
.sidebar-ad {
    width: 160px !important;
    max-width:160px !important;
}

.sidebar-ad img {
    width:160px !important;
    max-width:160px !important;
    height:auto !important;
}


/* FINAL SIDEBAR AD */
.sidebar-ad {
    position: fixed !important;
    right: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;

    width:160px !important;
    z-index:99999 !important;
}

.sidebar-ad img {
    width:160px !important;
    height:auto !important;
    display:block;
}

@media(max-width:1200px){
    .sidebar-ad{
        display:none;
    }
}



/* gallery + sidebar layout */

.content-layout {
    display:flex;
    align-items:flex-start;
    gap:20px;
}


.sidebar-ad {
    flex:0 0 160px;
    order:0;
}


.sidebar-ad img {
    width:160px;
    height:auto;
    display:block;
}


.main-gallery {
    flex:1;
}


@media(max-width:900px){

.content-layout {
    flex-direction:column;
}

.sidebar-ad {
    width:100%;
    text-align:center;
}

.sidebar-ad img {
    margin:auto;
}

}



/* SIDEBAR AD FINAL FIX */

.content-layout {
    display:flex;
    align-items:flex-start;
    gap:20px;
}


.sidebar-ad {
    flex:0 0 180px !important;
    width:180px !important;
    max-width:180px !important;

    display:block !important;
}


.sidebar-ad a {
    display:block;
}


.sidebar-ad img {
    width:180px !important;
    max-width:180px !important;
    height:auto !important;

    display:block;
    object-fit:contain;
}


/* 모바일 */
@media(max-width:900px){

    .content-layout {
        display:flex;
        flex-direction:column;
    }


    .sidebar-ad {
        width:100% !important;
        max-width:100% !important;

        order:2;
        text-align:center;
    }


    .sidebar-ad img {
        width:90% !important;
        max-width:400px !important;
        margin:auto;
    }

}



/* ===== SIDEBAR AD CLEAN OVERRIDE ===== */

.content-layout {
    display:flex !important;
    align-items:flex-start !important;
    gap:20px !important;
}


.sidebar-ad {
    position:static !important;

    flex:0 0 180px !important;
    width:180px !important;
    max-width:180px !important;

    display:block !important;

    background:none !important;
}


.sidebar-ad a {
    display:block !important;
}


.sidebar-ad img {
    width:180px !important;
    max-width:180px !important;
    height:auto !important;

    display:block !important;
    object-fit:contain !important;
}



/* 모바일 표시 */
@media(max-width:900px){

    .sidebar-ad {
        display:block !important;

        width:100% !important;
        max-width:100% !important;
    }


    .sidebar-ad img {
        width:90% !important;
        max-width:400px !important;
        margin:0 auto !important;
    }

}


/* sidebar size adjust */
.sidebar-ad {
    flex-basis:220px !important;
    width:220px !important;
    max-width:220px !important;
}

.sidebar-ad img {
    width:220px !important;
    max-width:220px !important;
}



/* sidebar ad vertical stretch */

.sidebar-ad img {
    width:220px !important;
    height:280px !important;

    object-fit:cover !important;
}




/* footer ad normal */

.footer-ad {
    min-height:auto !important;
    background:transparent !important;
    display:flex !important;
    justify-content:center;
    overflow:hidden;
}


.footer-ad img {
    width:auto !important;
    max-width:100% !important;
    height:auto !important;
    margin:0 auto !important;
}










/* ===== AD SYSTEM CLEAN ===== */


/* TOP / BOTTOM CONTAINER */

.top-ad,
.bottom-ad {
    width:100%;
    display:flex;
    justify-content:center;
    align-items:center;
    text-align:center;
    overflow:hidden;
}


/* LINK */

.top-ad a,
.bottom-ad a {
    display:block;
}


/* IMAGE */

.top-ad-image,
.bottom-ad img {

    display:block;

    width:auto;
    height:auto;

    max-width:100%;

    margin:0 auto;

    object-fit:contain;
}



/* PC */

@media(min-width:769px){

    .top-ad-image,
    .bottom-ad img {

        max-width:728px;
        max-height:250px;

    }

}



/* MOBILE */

@media(max-width:768px){

    .top-ad,
    .bottom-ad {

        width:100%;

    }


    .top-ad a,
    .bottom-ad a {

        width:100%;

    }


    .top-ad-image,
    .bottom-ad img {

        width:100%;
        max-width:100%;
        height:auto;

    }



    /* 사이드 광고 숨김 */

    .sidebar-ad {

        display:none !important;

    }

}



/* ===== SIDEBAR AD FIX ===== */

.content-layout {
    display:flex;
    align-items:flex-start;
}


.sidebar-ad {

    position:sticky;
    top:20px;

    width:300px;
    flex-shrink:0;

    margin-left:20px;

    order:2;

}


.sidebar-ad a {

    display:block;

}


.sidebar-ad img {

    display:block;

    width:300px;
    height:auto;

    max-width:300px;

    object-fit:contain;

}



/* MOBILE OFF */

@media(max-width:768px){

    .sidebar-ad {

        display:none !important;

    }

}



/* ===== SIDEBAR FLOAT FIX ===== */


.content-layout {
    position:relative;
}


/* 오른쪽 고정 사이드 광고 */

.sidebar-ad {

    position:fixed !important;

    right:20px;
    top:150px;

    width:300px;

    z-index:100;

}


.sidebar-ad img {

    width:300px;
    height:auto;

    display:block;

}



/* 본문이 광고와 겹치지 않게 */

.main-gallery {

    margin-right:340px;

}



/* 모바일 숨김 */

@media(max-width:768px){

    .sidebar-ad {

        display:none !important;

    }


    .main-gallery {

        margin-right:0;

    }

}




/* ===== AD RESPONSIVE SIZE FINAL ===== */

.top-ad,
.bottom-ad {
    width:100% !important;
    display:flex !important;
    justify-content:center !important;
    align-items:center !important;
    text-align:center !important;
    overflow:hidden !important;
}


.top-ad a,
.bottom-ad a {
    display:block !important;
}


.top-ad-image,
.bottom-ad img {
    display:block !important;
    width:var(--pc-width, auto);
    height:var(--pc-height, auto);
    max-width:728px;
    object-fit:contain;
    margin:0 auto;
}


@media(max-width:768px){

    .top-ad-image,
    .bottom-ad img {

        width:100% !important;
        max-width:100% !important;
        height:auto !important;

    }

}





/* =========================
   Profile Dropdown
========================= */

.profile-wrapper{
    position:relative;
    display:inline-block;
}


.profile-button{

    display:flex;
    align-items:center;
    gap:8px;

    background:#222;
    color:white;

    border:1px solid #555;

    padding:6px 12px;

    border-radius:25px;

    cursor:pointer;

    font-size:14px;

}


.header-profile-image{

    width:32px;
    height:32px;

    border-radius:50%;

    object-fit:cover;

}


.profile-dropdown{

    display:none;

    position:absolute;

    right:0;

    top:45px;

    background:#222;

    border:1px solid #444;

    border-radius:12px;

    padding:10px;

    min-width:150px;

    z-index:9999;

}


.profile-dropdown a{

    display:block;

    color:white;

    text-decoration:none;

    padding:10px;

    border-radius:8px;

}


.profile-dropdown a:hover{

    background:#ff66cc;

}


.profile-dropdown.show{

    display:block;

}



/* =========================
   FIX PROFILE DROPDOWN
========================= */

.profile-dropdown{
    display:none !important;
    position:absolute;
    right:0;
    top:45px;
}


.profile-dropdown.show{
    display:block !important;
}


.profile-menu{
    position:relative;
    display:inline-block;
}




/* PROFILE DROPDOWN FORCE FIX */

.profile-menu{
    position:relative !important;
}


.profile-dropdown{
    display:none !important;
    position:absolute !important;
    right:0 !important;
    top:45px !important;

    background:#222 !important;
    color:white !important;

    min-width:160px !important;
    padding:10px !important;

    border-radius:12px !important;
    border:1px solid #444 !important;

    z-index:99999 !important;
}


.profile-dropdown.show{
    display:block !important;
}




/* =========================
   Gallery Delete Button
========================= */

.image-delete-btn{

    margin-top:6px;

    padding:5px 12px;

    border:none;

    border-radius:12px;

    background:#2b1b22;

    color:#ff8fa3;

    font-size:12px;

    cursor:pointer;

    transition:0.2s;

}


.image-delete-btn:hover{

    background:#ff4d6d;

    color:white;

}


