body {
    background-color: #111;
    margin: 0;
    padding: 20px;
    overflow-y: scroll;
    font-family: 'Pretendard', sans-serif;
    color: #fff;
}

#loading {
    text-align: center;
    margin-top: 50px;
    color: #888;
    font-size: 1.2rem;
}

/* Masonry 레이아웃 */
.masonry-container {
    column-count: 4;
    column-gap: 15px;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.masonry-container.loaded { opacity: 1; }

@media (max-width: 1600px) { .masonry-container { column-count: 4; } }
@media (max-width: 1200px) { .masonry-container { column-count: 3; } }
@media (max-width: 500px) { .masonry-container { column-count: 2; } }

/* 아이템 스타일 */
.item {
    break-inside: avoid;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #1a1a1a;
    transition: transform 0.2s;
}

.item:hover {
    transform: translateY(-2px);
}

.click-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 10;
    cursor: zoom-in;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 30%);
}

.item img, .item video {
    width: 100%;
    height: auto;
    display: block;
}

/* 유저 프로필 오버레이 */
.user-info {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 11;
    pointer-events: none; /* 클릭 통과 */
}

.user-info img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
}

.user-info span {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* 비디오 래퍼 */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
}
.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
}

/* 라이트박스 */
#lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#lightbox.active { opacity: 1; pointer-events: auto; }

.lightbox-content-wrapper {
    max-width: 95%; max-height: 90%;
    display: flex; justify-content: center; align-items: center;
    transition: transform 0.3s ease;
}

.slide-next { transform: translateX(-30px); opacity: 0; }
.slide-prev { transform: translateX(30px); opacity: 0; }

.lightbox-content-wrapper img, 
.lightbox-content-wrapper video {
    max-width: 100%; max-height: 85vh;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.lightbox-video-container {
    width: 80vw; max-width: 1000px; aspect-ratio: 16 / 9;
}
.lightbox-video-container iframe { width: 100%; height: 100%; border-radius: 4px; }

.close-btn {
    position: absolute; top: 20px; right: 30px;
    color: #fff; font-size: 40px; cursor: pointer; z-index: 10000;
}
.nav-hint {
    position: absolute; bottom: 20px;
    color: rgba(255,255,255,0.4); font-size: 13px;
}