
#delMenu{position:fixed; right:20px; top:20px; background-color:#dc3545; color:#fff; padding:10px 10px; font-size:16px; border:solid 1px #111; display:none;}
#delMenu:hover{background-color:#c82333 }

/*
#editMenu { display:none;  width: calc(100% - 50px); left: 25px; bottom:50px; background: rgba(0, 0, 0, 0.8);  flex-direction: row; justify-content: center; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px; border: 1px solid #ccc; border-radius: 5px; }
#editMenu input[type=checkbox] { width: 20px; height: 20px; }
#editMenu a { width: auto; min-width: 80px; }
#editMenu .category-item { display: flex; align-items: center; white-space: nowrap; min-width: 80px; }
#editMenu .category-item input[type="checkbox"] { margin-right: 5px; }
#editMenu .category-item label { cursor: pointer; font-size: 14px; display: inline-block; padding: 5px 5px 5px 0px; }
#editMenu .edit-link { margin-left: auto; padding: 8px 16px; background-color: #007bff; color: white; text-decoration: none; border-radius: 4px; }
*/


.total_gun{position:relative; }
.total_gun button{position:absolute; right:0px; top:0px; font-size:13px;}


/* 그리드 레이아웃 */
.media-grid { display: grid;  grid-template-columns: repeat(7, 1fr);  gap: 10px;  margin-top: 20px;}
.media-item { min-width: 110px; position: relative; cursor: pointer; border-radius: 8px; overflow: visible; background: #222; }
.media-item.active{border:solid 5px #007bff;}
.media-item-inner { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; }
.media-item p { position: absolute; left: 0px; bottom: 5px; width: 100%; font-size: 12px; color: #fff; text-align: center; }
.media-item input[type=checkbox] { width: 30px; height: 30px; position: absolute; left: 5px; top: 5px; opacity: 0.8; display: none; }
.media-thumbnail { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.media-item:hover .media-thumbnail { transform: scale(1.05); }
@media (max-width: 1280px) {
	.media-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 1024px) {
	.media-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 860px) {
	.media-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 640px) {
	.media-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
	.media-grid { grid-template-columns: repeat(2, 1fr); }
}

#albumForm.delete .media-item input[type=checkbox]{display:block;}
#albumForm.delete #delMenu{display:flex;}

/* 영상 표시 */
.video-overlay { position: absolute; bottom: 5px; right: 5px; background: rgba(0, 0, 0, 0.8); border-radius: 4px; padding: 2px 6px; font-size: 12px; color: white; }
.play-button { position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; background: rgba(0, 0, 0, 0.8); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 10px; }
/* 로딩 스피너 */
.loading { text-align: center; padding: 20px; color: #999; }






/* 팝업 뷰어 */
.popup-viewer { display: none; position: fixed;  top: 0; left: 0;  width: 100%;  height: 100%; background: #333; z-index: 1000;}
.main-media-container { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0px; position: relative; background: rgba(0, 0, 0, 0.8); width: 100%; height: 100%; padding-right:240px}
.main-media{max-width:100%; max-height:100%; width:auto !important; height:auto !important;  object-fit: cover;}

.viewer-sidebar{position:fixed; right:90px; top:0px; width:150px; height:100%; display:flex; flex-direction:column; justify-content:top; padding:10px; background-color:#111; }
.bottom-thumbnails { position:fixed;  right:0px; top:0px;  width:90px; height:100%; padding:5px; overflow-y:auto; display: flex;  flex-direction:column; align-items: center; gap: 10px; background-color:#111;}

.close-button{display:none !important}
.nav-button{display:none !important;}

/* 팝업 즐겨찾기 분류 */
.viewer-favorite { margin: 20px 0; }
.favorite-btn { width: 100%; padding: 12px 6px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 8px; color: white; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.favorite-btn:hover { background: rgba(255, 255, 255, 0.2); }
.favorite-btn.active { background: rgba(255, 215, 0, 0.2); border-color: rgba(255, 215, 0, 0.5); color: #ffd700; }
.favorite-btn .star-icon { font-size: 16px; transition: all 0.2s ease; }
.favorite-btn.active .star-icon { color: #ffd700; }
.viewer-categories { margin-top: 20px; }
.viewer-categories h4 { color: white; margin: 0 0 15px 0; font-size: 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.2); padding-bottom: 8px; }
.viewer-category-list { display: flex; flex-direction: column; gap: 8px; }
.viewer-category-btn { padding: 8px 12px; border: none; border-radius: 20px; font-size: 12px; color: white; cursor: pointer; opacity: 0.4; transition: all 0.2s ease; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); text-align: left; border: 1px solid rgba(255, 255, 255, 0.2); }
.viewer-category-btn.active { opacity: 1; font-weight: bold; transform: scale(1.02); box-shadow: 0 0 10px rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.4); }
.viewer-category-btn:hover { opacity: 0.8; transform: scale(1.01); }

/* 팝업썸네일리스트  */
.bottom-thumbnail { width: 100%; height: auto; object-fit: cover; border-radius: 4px; cursor: pointer; opacity: 0.6; transition: opacity 0.2s; flex-shrink: 0;  }
.bottom-thumbnail.active { opacity: 1; border: 2px solid #0a84ff; }


@media (max-width: 1280px) {
	.main-media-container{padding-right:0px}
	.popup-viewer.off .viewer-sidebar{display:none;}
	.popup-viewer.off .bottom-thumbnails{display:none;}

	
	
	.bottom-thumbnails { position:fixed;  right:0px; top:auto; bottom:70px;  width:100%; height:60px; padding:5px; overflow-y:hidden; overflow-x:auto; display: flex;  flex-direction:row; align-items: center; gap: 10px; background-color:rgba(0,0,0,0.3);}
	.bottom-thumbnail { width: 45px; height: 45px;  }
	
	.viewer-sidebar{right:0px; top:0px; width:100%; height:auto; background:none; display:inline-block;}
	.viewer-categories {position:fixed; width:calc(100% - 20px); height:auto; left:10px; top:30px; background-color:transparent; display:flex; }
	.viewer-categories .viewer-category-list {flex-direction:row; flex-wrap:wrap}
	.viewer-categories .viewer-category-btn{min-width:50px;}
	.viewer-favorite{position:fixed; right:10px; top:10px; margin:0px;}
	.favorite-btn{background-color:rgba(0,0,0,0.3);  padding:3px 10px;}
	.viewer-info h3, .viewer-info #viewerSize{display:none;}
}

/* 네비게이션 버튼 
.nav-button { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, 0.2); border: none; color: white; font-size: 24px; padding: 20px 15px; cursor: pointer; border-radius: 5px; transition: background 0.2s; }
.nav-button:hover { background: rgba(255, 255, 255, 0.4); }
.nav-button.prev { left: 20px; }
.nav-button.next { right: 20px; }
*/

/* 닫기 버튼 
.close-button { position: absolute; top: 20px; right: 20px; background: rgba(255, 255, 255, 0.2); border: none; color: white; font-size: 24px; padding: 10px 15px; cursor: pointer; border-radius: 5px; z-index: 1001; }
*/


/* 반응형 
@media (max-width: 768px) {
	
	.viewer-content {
        flex-direction: column;
    }

	.viewer-sidebar {
        width: 100%;
        height: auto;
        order: -1;
		overflow:visible;
    }

	.viewer-info {display:none;}

	.viewer-favorite{margin:0px; background:none; padding:0px; border:none; }
	.favorite-btn{width:130px; padding:5px 12px; }

    .viewer-categories h4{display:none;}
	.viewer-category-list{flex-direction:row; flex-wrap:wrap; }
	.viewer-category-btn {min-width:60px; text-align:center;}

    .main-media-container {
        flex: 1;
		padding-bottom:75px;
		padding:0px;
		position:relative;
    }
	

    .bottom-thumbnails {
        right: 0;
        height: 60px;
    }
    
    .favorite-star {
        width: 20px;
        height: 20px;
    }
    
    .favorite-star .star-icon {
        font-size: 12px;
    }


    
    .nav-button {
        font-size: 18px;
        padding: 15px 10px;
    }
    
    .nav-button.prev {
        left: 10px;
    }
    
    .nav-button.next {
        right: 10px;
    }
    
    
    .category-btn {
        font-size: 10px;
        padding: 3px 6px;
        min-width: 22px;
    }
    
    .category-buttons {
        padding: 4px;
        gap: 1px;
    }
}
*/




/* 로딩 상태 */
.viewer-loading {
    color: #ccc;
    text-align: center;
    padding: 20px;
    font-style: italic;
}







/* 우측 하단 필터 버튼 */
#filterButton {
    position: fixed;
    right: 20px;
    bottom: 100px; /* footerMenu 위에 위치 */
    z-index: 100;
}

#filterButton button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background-color:#fff;
    color: #111;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
	margin-top:10px
}

#filterButton button.delBtn.sel, #filterButton button.searchBtn.active{background-color:red !important; color:#fff; animation: pulse 2s infinite;}


@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(245, 87, 108, 0.6);
    }
    100% {
        box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
    }
}

#filterButton button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

#filterButton button:active {
    transform: scale(0.95);
}

/* 필터 모달 */
.filter-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.filter-modal select{width:100%; font-size:16px; background-color:#f8f8f8; padding:5px 10px;}
.filter-modal-content {
    background: white;
    border-radius: 12px;
    width: 400px;
    max-width: 90vw;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.filter-header h3 {
    margin: 0;
    font-size: 18px;
}

.filter-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.filter-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.filter-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.filter-section {
    margin-bottom: 15px;
}

.filter-section h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
    font-weight: bold;
}

.filter-divider {
    height: 1px;
    background: #eee;
    margin: 15px 0;
}

.filter-label {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.category-filter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-filter-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s;
    cursor: pointer;
}

.category-filter-item:hover {
    background: #f8f9fa;
}

.category-filter-item input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
}



.category-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.category-name {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.category-count {
    font-size: 12px;
    color: #666;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 10px;
}

.filter-footer {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.filter-footer .btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}



/* 반응형 */
@media (max-width: 768px) {
    #filterButton {
        right: 15px;
        bottom: 80px;
    }
    
    #filterButton button {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .filter-modal-content {
        width: 95vw;
        margin: 10px;
    }
    
    .filter-header,
    .filter-body,
    .filter-footer {
        padding: 15px;
    }
}












.favorite-star {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 25px;
    height: 25px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.favorite-star:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.favorite-star.active {
    background: rgba(255, 215, 0, 0.9);
    border-color: rgba(255, 215, 0, 0.5);
}

.favorite-star .star-icon {
    font-size: 14px;
    color: white;
    transition: all 0.2s ease;
}

.favorite-star.active .star-icon {
    color: #000;
    font-weight: bold;
}