* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    user-select: none;
    overflow-x: hidden;
}

/* select, input, textarea 요소는 선택 가능하도록 설정 */
select, input, textarea, .form-control {
    user-select: auto;
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
}

/* 모달이 열렸을 때 body 스타일 */
body.modal-open {
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #2c3e50;
    color: white;
}

h1 {
    font-size: 2rem;
}

.file-explorer {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
}

.navigation-bar {
    background-color: #f0f0f0;
    padding: 5px 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
}

.breadcrumb {
    flex-grow: 1;
    font-size: 0.9rem;
}

.breadcrumb span {
    cursor: pointer;
    color: #007bff;
}

.breadcrumb span:hover {
    text-decoration: underline;
}

.file-actions {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #ddd;
}

.action-buttons {
    display: flex;
    gap: 10px;
}



.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.search-box {
    display: flex;
}

.search-box input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    width: 200px;
}

.search-box button {
    border-radius: 0 4px 4px 0;
}

.file-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.file-list {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    padding: 0;
    position: relative;
    width: 100%;
}

.file-view {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    position: relative;
    width: 100%;
    overflow-x: hidden;
}

/* 그리드 뷰 (아이콘 모드) */
.file-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
    gap: 5px;
    padding: 10px;
}

.file-view:not(.list-view) {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: flex-start;
    width: 100%;
}

.file-view:not(.list-view) .file-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    margin: 4px;
    width: 120px;
    height: 120px;
    flex: 0 0 auto;
    box-sizing: border-box;
}

.file-view:not(.list-view) .file-details {
    display: none;
}

.file-item {
    position: relative;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
    overflow: hidden;
    box-sizing: border-box;
    display: block;
    width: 100%;
}

/* 그리드뷰 스타일 */
.file-view:not(.list-view) .file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    margin: 4px;
    width: 100px;
    height: 100px;
}

.file-view:not(.list-view) .file-details {
    display: none;
}

/* 리스트뷰 스타일 */
.file-view.list-view {
    display: block;
    width: 100%;
}

.file-view.list-view .file-list-header,
.file-view.list-view .file-item {
    display: flex;
    align-items: center;
    padding: 4px 10px;
    border-bottom: 0px solid #eee;
    width: 100%;
    box-sizing: border-box;
    min-height: 24px;
}

.file-view.list-view .file-list-header {
    background-color: #f8f8fa;
    font-weight: bold;
    color: #495057;
    cursor: pointer;
    border-top: 1px solid #dee2e6;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
}

.file-view.list-view .file-list-header:hover {
    background-color: #e9ecef;
}

.file-view.list-view .file-item:hover {
    /* 리스트 뷰 호버 시 배경색도 선택 색상으로 통일 */
    background-color: #e3f2fd; 
}

/* 아이콘 열 (공통) */
.file-view.list-view .file-icon,
.file-view.list-view .header-icon {
    width: 30px;
    flex: 0 0 30px;
    text-align: center;
    margin-right: 10px;
    font-size: 18px;
}

/* === 내용 행 스타일 (5:1:1) ===  */
.file-view.list-view .file-item .file-name {
    flex-grow: 2; 
    flex-shrink: 1;
    flex-basis: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 0px;
    text-align: left; /* 내용: 이름 왼쪽 정렬 유지 */
    font-size: 0.95rem;
    white-space: nowrap;      /* 텍스트가 한 줄로 표시되도록 강제 */


}

.file-view.list-view .file-item .file-size {
    flex-grow: 1; 
    flex-shrink: 0;
    flex-basis: 0;
    min-width: 80px;
    text-align: center; /* 내용: 크기 왼쪽 정렬로 변경 */
    padding-right: 0px; /* 왼쪽 정렬 시 우측 여백 추가 */
    padding-left: 0; /* 왼쪽 여백 제거 */
    color: #6c757d;
    font-size: 0.95rem;
    white-space: nowrap;      /* 텍스트가 한 줄로 표시되도록 강제 */

}

.file-view.list-view .file-item .file-date {
    flex-grow: 1; 
    flex-shrink: 0;
    flex-basis: 0;
    min-width: 120px;
    text-align:center; /* 내용: 날짜 왼쪽 정렬로 변경 */
    padding-right: 0px; /* 왼쪽 정렬 시 우측 여백 추가 */
    padding-left: 0; /* 왼쪽 여백 제거 */
    color: #6c757d;
    font-size: 0.95rem;
    overflow: hidden;
    white-space: nowrap;      /* 텍스트가 한 줄로 표시되도록 강제 */

}

/* === 제목 행 스타일 (3:1:1) === */
.file-view.list-view .file-list-header .header-name {
    flex-grow: 2; /* 제목: 이름 비율 3으로 변경 */
    flex-shrink: 1;
    flex-basis: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center; /* 제목: 이름 가운데 정렬 유지 */
    padding-left: 0;
}

.file-view.list-view .file-list-header .header-size {
    flex-grow: 1; /* 제목: 크기 비율 1 유지 */
    flex-shrink: 0;
    flex-basis: 0;
    min-width: 80px;
    text-align: center; /* 제목: 크기 가운데 정렬 유지 */
    padding-left: 0; 
    color: #495057; 
    font-size: inherit; 
}

.file-view.list-view .file-list-header .header-date {
    flex-grow: 1; /* 제목: 날짜 비율 1 유지 */
    flex-shrink: 0;
    flex-basis: 0;
    min-width: 120px;
    text-align: center; /* 제목: 날짜 가운데 정렬 유지 */
    padding-left: 0; 
    color: #495057; 
    font-size: inherit; 
}

/* 크기 및 날짜 포함하는 details 영역 (숨김 처리 - 공통) */
.file-view.list-view .file-details {
    display: contents;
}

.file-item:hover {
    background-color: #e3f2fd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.file-item.cut {
    opacity: 0.5;
}

.file-item.dragging {
    /* 레이아웃에 영향을 주지 않도록 높이를 0으로 설정 */
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important; 
    border: 0 !important;
    overflow: hidden !important;
    
    /* 시각적으로 숨김 */
    opacity: 0;
    pointer-events: none;
    
    /* 커서 유지 */
    cursor: grabbing;
    
    /* 제거: z-index, outline, background-color, box-shadow */
}

.file-item.drag-over {
    /* background-color: rgba(0, 123, 255, 0.3); */
    border: 2px dashed #0056b3 !important;
    box-shadow: none; /* 그림자 제거: 좌우 스크롤 방지 */
    /* transform: scale(1.03); */ /* 스케일 효과 제거: 좌우 스크롤 방지 */
    transition: border-color 0.2s ease;
    z-index: 10;
}

.file-icon {
    margin-bottom: 5px;
    font-size: 26px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #007bff;
}

.file-icon i.fas.fa-folder {
    color: #ffc107;
}

.file-name {
    font-size: 0.75rem;
    text-align: center;
    word-break: break-word;
    max-width: 100%;
    max-height: 38px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item.renaming .file-name {
    display: none;
}

.rename-input {
    width: 90px;
    font-size: 0.85rem;
    text-align: center;
    display: none;
}

.file-item.renaming .rename-input {
    display: block;
}

#selectionBox {
    position: fixed;
    border: 1px dashed #007bff;
    background-color: rgba(0, 123, 255, 0.1);
    pointer-events: none;
    z-index: 9999;
    display: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}




.progress-container {
    display: none;
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px;
    margin: 10px 15px;
    z-index: 10;
}

.upload-file-info {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #333;
    display: block;
}

.upload-file-info span {
    font-weight: bold;
    word-break: break-all;
    display: inline-block;
}

.progress {
    height: 20px;
    background-color: #f5f5f5;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.progress-bar {
    height: 100%;
    width: 0;
    background-color: #28a745;
    transition: width 0.3s ease;
    position: relative;
    border-radius: 10px;
}

.upload-status {
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
    display: block;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

/* 모달 배경이 클릭을 가로막음 */
.modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.modal-close {
    cursor: pointer;
    font-size: 1.5rem;
    color: #aaa;
}

.modal-close:hover {
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.drop-zone {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(33, 150, 243, 0.15);
    color: white;
    font-size: 1.5em;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drop-zone.active, .drop-zone.dragging {
    opacity: 1;
    pointer-events: all;
}

.drop-zone i {
    font-size: 5rem;
    color: #2196F3;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

.drop-zone p {
    font-size: 1.8rem;
    color: #333;
    margin: 0.5rem 0;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.9);
}

.drop-zone-info {
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 5px;
}

.file-item:hover {
    background-color: #45a2e4;

   /* transform: translateY(-2px);*/
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.file-item.selected {
    background-color: #e3f2fd;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
/*    border: 1px solid #007bff;*/
    outline: 1px solid #007bff;
    outline-offset: -2px;
}

.file-item.cut {
    opacity: 0.5;
}

.file-item.drag-over {
    /* background-color: rgba(0, 123, 255, 0.3); */
    border: 2px dashed #0056b3 !important;
    box-shadow: none; /* 그림자 제거: 좌우 스크롤 방지 */
    /* transform: scale(1.03); */ /* 스케일 효과 제거: 좌우 스크롤 방지 */
    transition: border-color 0.2s ease;
    z-index: 10;
}

/* 폴더에 드래그 오버 시 강조 효과 강화 */
.file-item[data-is-folder="true"].drag-over {
    border: 2px dashed #0056b3 !important;
    box-shadow: none;
    transition: border-color 0.2s ease;
    z-index: 20;
    position: relative;
}

/* 외부 파일을 폴더에 드래그할 때 특별한 효과 강화 */
.file-item[data-is-folder="true"].drag-over::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(33, 150, 243, 0.15);
    border-radius: 4px;
    pointer-events: none;
}

/* 외부 파일을 폴더에 드래그할 때 아이콘 색상 변경 및 효과 강화 */
.file-item[data-is-folder="true"].drag-over .file-icon {
    color: #0056b3;
    transition: color 0.2s ease;
}

/* 폴더 아이콘 색상 강화 */
.file-item[data-is-folder="true"].drag-over .file-icon i.fas.fa-folder {
    color: #2196F3;
}

/* 리스트 뷰에서 폴더 드래그 오버 스타일 보완 */
.list-view .file-item[data-is-folder="true"].drag-over {
    border-left: 4px solid #0056b3 !important;
    border-top: 1px solid #e0e0e0 !important;
    border-right: 1px solid #e0e0e0 !important;
    border-bottom: 1px solid #e0e0e0 !important;
    transform: translateX(5px);
    padding-left: 15px;
}

.context-menu {
    position: absolute;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 0;
    min-width: 150px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
    display: none;
}

.context-menu-item {
    padding: 8px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
}

.context-menu-item:hover {
    background-color: #f0f0f0;
}

.context-menu-item i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.context-menu-separator {
    height: 1px;
    background-color: #ddd;
    margin: 5px 0;
}

.statusbar {
    padding: 6px 15px;
    background-color: #f0f0f0;
    border-top: 1px solid #ddd;
    font-size: 0.85rem;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.disk-usage-info {
    display: flex;
    flex-direction: column;
    margin-left: 15px;
    min-width: 200px;
}

.disk-usage-text {
    margin-bottom: 3px;
    font-size: 0.8rem;
    text-align: right;
}

.disk-usage-bar {
    width: 100%;
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.disk-usage-fill {
    height: 100%;
    background-color: #007bff;
    border-radius: 2px;
}

.list-view .file-view {
    display: block;
}

.list-view .file-item {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 34px;
    margin: 0;
    padding: 0 15px;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.list-view .file-item.drag-over {
    /* background-color: rgba(0, 123, 255, 0.15); */ /* 배경색 제거 */
    border: 1px dashed #007bff;
}

.list-view .file-icon {
    margin-right: 10px;
    margin-bottom: 0;
    font-size: 20px;
    width: 24px;
    height: 24px;
}

.list-view .file-name {
    flex-grow: 1;
    width: auto;
    margin: 0;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 150px;
    padding: 0 10px;
}

.file-details {
    font-size: 0.8rem;
    color: #666;
    display: none;
    margin-left: auto;
    text-align: right;
}

.list-view .file-details {
    display: block;
}

.view-options {
    display: flex;
    margin-left: 10px;
}

.view-option {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    margin-left: 5px;
}

.view-option.active {
    background-color: #e3f2fd;
    border-color: #007bff;
}


/* 저장소 정보 스타일 수정 */
.storage-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

#refreshBtn {
    background-color: #34495e;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#refreshBtn:hover {
    background-color: #4a6278;
}


.drop-zone-info {
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 5px;
}

/* 파일 리스트 헤더 스타일 추가 */
.file-list-header {
    display: flex;
    padding: 8px 12px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
    font-size: 0.9rem;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-icon {
    width: 30px;
}

.header-name {
    flex: 2;
    cursor: pointer;
    padding: 0 10px;
    font-size: 0.9rem;
}

.header-size {
    flex: 1;
    text-align: right;
    cursor: pointer;
    font-size: 0.9rem;
}

.header-date {
    flex: 1.5;
    text-align: right;
    cursor: pointer;
    margin-left: 10px;
    font-size: 0.9rem;
}

/* 일반 모드에서 숨김 처리 */
.file-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    width: 100%;
    color: #666;
    margin-top: 5px;
    opacity: 0.8;
}

/* 아이콘 뷰에서는 파일 세부 정보 표시 조정 */
.file-item:not(.list-view .file-item) .file-details {
    display: none; /* 아이콘 뷰에서 숨김 */
}

/* 정렬 아이콘 스타일 */
.header-item i.fas {
    margin-left: 5px;
    font-size: 12px;
}

.file-item.parent-dir {
    background-color: rgba(240, 240, 240, 0.5);
    border-bottom: 1px solid #e0e0e0;
}

.file-item.parent-dir:hover {
    background-color: rgba(230, 230, 230, 0.8);
}

.file-item.parent-dir .file-icon {
    color: #555;
}

/* 상위 폴더는 선택 스타일 적용되지 않도록 */
.file-item.parent-dir.selected,
.file-item.parent-dir:hover.selected,
.file-item[data-parent-dir="true"].selected,
.file-item[data-parent-dir="true"]:active {
    background-color: rgba(230, 230, 230, 0.8) !important;
    box-shadow: none !important;
    border-color: #e0e0e0 !important;
    pointer-events: auto;
}

/* 상위 폴더는 드래그 표시 적용되지 않도록 */
.file-item.parent-dir.dragging,
.file-item[data-parent-dir="true"].dragging {
    opacity: 1 !important;
    transform: none !important;
    box-shadow: none !important;
    outline: none !important;
    background-color: rgba(230, 230, 230, 0.8) !important;
    border: 1px solid #e0e0e0 !important;
}

/* 드래그 중인 폴더 강조 */
.file-item[data-is-folder="true"].drag-over {
    /* background-color: rgba(0, 123, 255, 0.3); */
    border: 2px dashed #0056b3;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
}

/* 잠긴 폴더 스타일 */
.locked-folder {
    background-color: rgba(255, 165, 0, 0.1);
    position: relative;
}

.locked-folder .file-icon i {
    color: #ff9800;
}

.lock-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff9800;
    font-size: 14px;
}

/* 접근 제한된 폴더 스타일 (상위 폴더가 잠긴 경우) */
.restricted-folder {
    background-color: rgba(158, 158, 158, 0.1);
    position: relative;
}

.restricted-folder .file-icon i {
    color: #9e9e9e;
}

.restricted-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #9e9e9e;
    font-size: 14px;
}

/* 목록 보기에서 잠긴 폴더 스타일 */
.view-list .locked-folder .lock-icon {
    right: 30px;
}




.files-container {
    width: 100%;
    padding: 15px 20px;
}

/* 부모 컨테이너 추가 설정 */
#fileList {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
}

/* 토스트 메시지 컨테이너 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
}

/* 토스트 메시지 스타일 */
.toast {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    color: white;
    font-size: 14px;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.3s ease;
    max-width: 350px;
    pointer-events: auto;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* 토스트 타입별 스타일 */
.toast-info {
    background-color: #3498db;
}

.toast-success {
    background-color: #2ecc71;
}

.toast-warning {
    background-color: #f39c12;
}

.toast-error {
    background-color: #e74c3c;
}

/* 파일 정보 모달 스타일 */
.file-info-content {
    padding: 10px 0;
}

.file-info-item {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    display: flex;
}

.file-info-item:last-child {
    border-bottom: none;
}

.file-info-item strong {
    min-width: 80px;
    display: inline-block;
    color: #555;
}

.file-info-item span {
    flex: 1;
    word-break: break-all;
}

/* 복사 버튼 스타일 */
.copy-path-btn {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.8rem;
    margin-left: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-path-btn:hover {
    background-color: #e9ecef;
}




/* === Upload Progress Modal Styling === */
/* === Upload Progress Modal Styling === */

/* 기존 스타일 유지 및 보완 */
#upload-progress-modal {
    background-color: rgba(0, 0, 0, 0.6); /* 어두운 반투명 배경 */
    z-index: 1001; /* 다른 모달과 겹치지 않도록 약간 높임 */
}
#upload-progress-modal {
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#upload-progress-modal .modal-content {
    background: linear-gradient(145deg, #ffffff, #e6e6e6); /* 밝은 그라데이션 배경 */
    border-radius: 12px; /* 둥근 모서리 */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); /* 부드러운 그림자 */
    padding: 25px 30px; /* 내부 여백 */
    width: 90%;
    max-width: 500px; /* 최대 너비 */
    text-align: center; /* 텍스트 중앙 정렬 */
    position: relative; /* 취소 버튼 위치 조정을 위해 */
}

#upload-progress-modal h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.4em;
    font-weight: 600;
}

/* 진행률 바 스타일 */
#overall-progress-bar-container {
    background-color: #e0e0e0;
    border-radius: 10px;
    margin: 20px 0;
    height: 16px;
    overflow: hidden;
}

#overall-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #4e8cff, #0052d4);
    border-radius: 10px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 텍스트 스타일 */
/* 시간 그룹 내 배치 조정 - #upload-time-remaining을 오른쪽으로 */
#upload-progress-modal .progress-time-group {
    display: flex;
    justify-content: space-between; /* 요소 사이 공간 분배 */
    align-items: center;
    margin: 10px 0;
    width: 100%; /* 전체 너비 사용 */
}

/* 전체 진행률 텍스트는 왼쪽에 배치 */
#overall-progress-text {
    flex: 3; /* 더 많은 공간 차지 */
    text-align: left;
    margin: 0 10px 0 0;
    font-size: 0.9em;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 남은 시간은 오른쪽에 배치 */
#upload-time-remaining {
    flex: 2; /* 더 적은 공간 차지 */
    text-align: right; /* 오른쪽 정렬 */
    margin: 0;
    font-size: 0.9em;
    color: #555;
    white-space: nowrap;
}

#total-upload-size,
#current-file-info {
    margin: 12px 0;
    font-size: 0.95em;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

#total-upload-size {
    font-weight: 500;
    color: #444;
}

/* 속도 및 남은 시간 그룹 */
#upload-progress-modal .speed-size-group {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 10px 0;
}

#upload-progress-modal .progress-time-group p,
#upload-progress-modal .speed-size-group p {
    flex: 1;
    margin: 0 10px;
    font-size: 0.9em;
    color: #555;
}

/* 현재 파일 정보 */
#upload-progress-modal #current-file-info {
    margin-top: 10px;
    font-size: 0.9em;
    color: #555;
    word-break: break-all;
}

/* 취소 버튼 스타일 */
#cancelUploadBtn {
    background-color: #dc3545;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#cancelUploadBtn:hover {
    background-color: #c82333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

#cancelUploadBtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 중지/재개 버튼 스타일 */
#resumeUploadBtn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#resumeUploadBtn.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

#resumeUploadBtn.btn-warning:hover {
    background-color: #e0a800;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

#resumeUploadBtn.btn-success {
    background-color: #28a745;
    color: white;
}

#resumeUploadBtn.btn-success:hover {
    background-color: #218838;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

#resumeUploadBtn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#resumeUploadBtn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    color: white;
}
/* 모달 footer 스타일 재정의 */
#upload-progress-modal .modal-footer {
    display: flex;
    justify-content: center; /* 버튼 중앙 정렬 */
    margin-top: 20px;
    gap: 10px;
}

/* === End of Upload Progress Modal Styling === */

#overall-progress-bar-container {
    background-color: #e0e0e0; /* 진행률 바 배경 */
    border-radius: 10px; /* 둥근 모서리 */
    margin: 20px 0;
    height: 16px; /* 높이 약간 증가 */
    overflow: hidden; /* 내부 바가 튀어나오지 않도록 */
}

#overall-progress-bar {
    width: 0%;
    height: 100%;
    /* 파란색 계열 그라데이션 */
    background: linear-gradient(90deg, #4e8cff, #0052d4);
    border-radius: 10px; /* 부드러운 전환을 위해 동일한 값 */
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* 부드러운 애니메이션 */
    /* 제거: text-align, line-height, color (바 위에 텍스트 표시 안 함) */
}

#overall-progress-text,
#total-upload-size, /* 총 용량 스타일 추가 */
#current-file-info {
    margin: 12px 0;
    font-size: 0.95em;
    color: #555; /* 약간 어두운 텍스트 */
    white-space: nowrap; /* 한 줄로 표시 */
    overflow: hidden; /* 넘치는 내용 숨김 */
    text-overflow: ellipsis; /* 말줄임표 처리 */
    display: block; /* 블록 요소로 만들어 너비 차지 */
}

#total-upload-size {
    font-weight: 500; /* 약간 굵게 */
    color: #444;
}

.upload-details {
    display: flex;
    justify-content: space-around; /* 균등 간격 배치 */
    margin: 20px 0 15px;
    padding: 12px 15px;
    background-color: #f0f0f0; /* 약간 다른 배경 */
    border-radius: 8px;
    font-size: 0.9em;
}

.upload-details p {
    margin: 0;
    color: #666;
}


/* === Upload Progress Modal Layout Adjustments === */
#upload-progress-modal .modal-content p {
    margin: 5px 0;
}

#upload-progress-modal .progress-time-group,
#upload-progress-modal .speed-size-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#upload-progress-modal #current-file-info {
    margin-top: 10px;
    font-size: 0.9em;
    color: #555;
    word-break: break-all;
}
/* === End of Upload Progress Modal Layout Adjustments === */

/* 잠금 모달 스타일 */
.modal input[type="password"],
.modal input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 16px;
    box-sizing: border-box;
}

.modal input[type="password"]:focus,
.modal input[type="text"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.modal-buttons button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.2s ease;
}

.modal-buttons button:first-child {
    background-color: #007bff;
    color: white;
}

.modal-buttons button:first-child:hover {
    background-color: #0069d9;
}

.modal-buttons button:last-child {
    background-color: #dc3545;
    color: white;
}

.modal-buttons button:last-child:hover {
    background-color: #c82333;
}

#systemResources {
    font-size: 0.8em;
    display: flex;
    flex-direction: column;
    gap: 0; /* gap 제거 */
}

#cpuStatus, #memoryStatus, .storage-info {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0; /* 모든 마진 제거 */
    padding: 0; /* 패딩도 제거 */
    line-height: 1.2; /* 줄 간격 최소화 */
}

#cpuStatus i, #memoryStatus i, .storage-info i {
    color: #ffffff; /* 흰색으로 변경 (기존값: #4dabf7) */
    width: 14px;
    text-align: center;
    margin: 0; /* 아이콘 마진 제거 */
}



#storageInfoText {
    display: flex;
    flex-direction: column;
    gap: 1px; /* 저장소 정보 내부 간격 최소화 */
}

.storage-info-text {
    color: #ffffff;
    font-weight:normal;
    margin: 0; /* 텍스트 마진 제거 */
    padding: 0; /* 텍스트 패딩 제거 */
}

.storage-bar-container {
    width: 120px;
    height: 4px; /* 높이 줄임 */
    background-color: #ecf0f1;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 1px; /* 바 위쪽 간격 최소화 */
}

.storage-bar {
    height: 100%;
    background-color: #2ecc71;
    border-radius: 2px;
    transition: width 0.3s ease;
}
/* 빛나는 전구 효과 */
.glowing-bulb {
    color: #ffee58;
    text-shadow: 0 0 5px #ffee58, 0 0 10px #ffee58, 0 0 15px #ffee58;
    animation: glowPulse 2s infinite alternate;
}

.off-bulb {
    color: #9e9e9e;
    opacity: 0.7;
}

/* 추가된 스타일 */
#serverStatusIcon {
    margin-right: 10px; /* 아이콘과 텍스트 사이 간격 */
}

/* 상태 텍스트 스타일 */
.status-text {
/*    font-weight: bold;*/
    padding: 2px 10px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

.status-on {
    color: #fff;
    background-color: #28a745;
    box-shadow: 0 0 2px rgba(40, 167, 69, 0.5);
}

.status-off {
    color: #fff;
    background-color: #dc3545;
    box-shadow: 0 0 2px rgba(220, 53, 69, 0.5);
}

/* 전구 깜빡임 애니메이션 */
@keyframes glowPulse {
    0% {
        color: #28a745;
        text-shadow: 0 0 5px rgba(40, 167, 69, 0.5);
    }
    50% {
        color: #28a745;
        text-shadow: 0 0 15px rgba(40, 167, 69, 0.8);
    }
    100% {
        color: #28a745;
        text-shadow: 0 0 5px rgba(40, 167, 69, 0.5);
    }
}




/* 모든 버튼에 동일한 크기 및 스타일 적용 */
.btn {
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    position: relative;
    z-index: 0;
    min-width: 80px; /* 모든 버튼에 최소 너비 설정 */
    text-align: center;
    height: 38px; /* 모든 버튼에 고정 높이 설정 */
    line-height: 1.5;
}

.upload-dropdown {
    position: relative;
    display: flex; /* inline-block에서 flex로 변경 */
    flex: 1; /* 부모의 flex 컨테이너 속성 상속 */
}

.upload-dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 80px;
    text-align: center;

    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 4px;
    top: 100%;
    left: 0;
}

.upload-dropdown-content button {
    padding: 8px 12px;
    width: 100%;
    text-align: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    display: block;
}

.upload-dropdown-content button:hover {
    background-color: #f1f1f1;
}

/* 드롭다운 표시 클래스 */
.show-dropdown {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 모바일에서도 아이콘과 메뉴 표시 */


/* 모바일 반응형 */
@media (max-width: 768px) {

}

@media (max-width: 768px) {
    .action-buttons {
        width: 100%;
        display: flex;
        justify-content: space-between;
        gap: 2px;

    }
    

    
    #uploadMainBtn {
        flex: 1 !important; /* 강제 적용 */
        min-width: 60px;
        height: 38px;
        font-size: 0.85rem;
    }

    /* 모바일에서도 모든 버튼 크기 통일 */
    .btn, .upload-dropdown button {
        min-width: 60px;
        height: 38px;
        text-align: center;

        font-size: 0.85rem;
        margin: 0 2px;
        flex: 1;
        white-space: nowrap;
    }
    
    /* 드롭다운 메뉴 위치 조정 */
    .upload-dropdown-content {
        right: 0;
        left: auto;
    }
    
    /* 드롭다운 내 버튼은 flex 속성 제거 */
    .upload-dropdown-content button {
        flex: none;
        min-width: 80px;
    }
    
    /* 모바일에서 버튼 아이콘 숨김, 드롭다운 내 아이콘 표시 */
    .btn i {
        display: none !important;
    }
    
    .upload-dropdown-content button i {
        display: inline-block !important;
        margin-right: 8px;
    }
    
    

    .search-box {
        display: none !important;
      }

    

    
    .modal-content {
        width: 80%;
    }

    .header-right {
        display: none; /* 모바일에서는 header-container 숨기기 */
    }

}

/* 공유 링크 모달 스타일 */
.share-link-container {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.share-link-container input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: #f8f8f8;
}

.share-link-container button {
    white-space: nowrap;
}

.share-link-info {
    margin-top: 10px;
    padding: 10px;
    background-color: #e7f3ff;
    border-left: 3px solid #007bff;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #0056b3;
}

.share-link-info i {
    margin-right: 5px;
}

/* 폼 그룹 스타일 */
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: #fff;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}


