/* 기본 스타일 */
body {
    font-family: Arial, sans-serif;
    font-size: 14px;
    margin: 0;
    padding: 20px;
    background-color: #f0f0f0;
}

/* 파일 관리자 스타일 */
.file-manager {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

h1 {
    font-size: 24px;
    margin-top: 0;
    color: #333;
}

nav {
    margin-bottom: 20px;
    font-size: 14px;
}

nav a {
    color: #0066cc;
    text-decoration: none;
    margin-right: 10px;
}

nav a:hover {
    text-decoration: underline;
}

.actions {
    margin-bottom: 20px;
}

.actions form {
    display: inline-block;
    margin-right: 10px;
}

input[type="file"],
input[type="text"],
input[type="password"],
input[type="submit"] {
    padding: 5px 10px;
    margin: 2px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
}

input[type="submit"] {
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    border: none;
}

input[type="submit"]:hover {
    background-color: #45a049;
}

.file-list {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.file-list th, .file-list td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.file-list th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.file-list tr:nth-child(even) {
    background-color: #f9f9f9;
}

.file-list tr:hover {
    background-color: #f5f5f5;
}

.fas {
    margin-right: 5px;
}

.fa-folder {
    color: #FFA500;
}

.fa-file {
    color: #4CAF50;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 팝업 스타일 */
.popup {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.popup-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 300px;
    border-radius: 5px;
}

/* 브레드크럼 스타일 */
#breadcrumb {
    margin-bottom: 10px;
    font-size: 14px;
}

#breadcrumb a {
    color: #0066cc;
    text-decoration: none;
}

#breadcrumb a:hover {
    text-decoration: underline;
}

/* 버튼 스타일 */
.delete-btn, .rename-btn, .move-btn {
    cursor: pointer;
    margin-right: 5px;
}

.delete-btn:hover, .rename-btn:hover, .move-btn:hover {
    color: #0066cc;
}

/* 알림 메시지 스타일 */
.alert {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}

.alert-error {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}

/* 반응형 디자인을 위한 미디어 쿼리 */
@media (max-width: 600px) {
    .file-manager {
        padding: 10px;
    }

    .file-list th, .file-list td {
        padding: 5px;
    }

    .actions form {
        display: block;
        margin-bottom: 10px;
    }
}

.fas {
    cursor: pointer;
    margin-right: 10px;
}

.fa-trash:hover {
    color: red;
}

.fa-edit:hover, .fa-arrows-alt:hover {
    color: blue;
}
.fa-download:hover {
    color: green;
}

/* 일괄 작업 스타일 */
.bulk-actions {
    margin: 10px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
}

.bulk-actions button {
    margin-right: 10px;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

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

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

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

.btn-warning:hover {
    background-color: #e0a800;
}

#selected-count {
    margin-left: 10px;
    font-weight: bold;
    color: #495057;
}

/* 체크박스 스타일 개선 */
.file-checkbox, #select-all {
    cursor: pointer;
    margin: 0;
}

.file-list th:first-child,
.file-list td:first-child {
    width: 30px;
    text-align: center;
}

/* 공유 기능 스타일 */
.fa-share-alt {
    color: #17a2b8;
    cursor: pointer;
    margin-right: 10px;
}

.fa-share-alt:hover {
    color: #138496;
}

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

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

/* 공유 모달 스타일 */
.share-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.share-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: none;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.share-modal-content.wide {
    max-width: 700px;
}

.share-modal-header {
    background-color: #f8f9fa;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.share-modal-header h3 {
    margin: 0;
    color: #333;
}

.share-modal-header .close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.share-modal-header .close:hover,
.share-modal-header .close:focus {
    color: #000;
    text-decoration: none;
}

.share-modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
}

.form-group select,
.form-group input[type="text"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

.form-actions {
    margin-top: 1.5rem;
    text-align: right;
}

.form-actions button {
    margin-left: 0.5rem;
}

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

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

.link-container {
    display: flex;
    gap: 0.5rem;
}

.link-container input {
    flex: 1;
}

.btn-copy {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

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

.pin-display {
    background-color: #f8f9fa;
    border: 2px solid #28a745;
    padding: 1rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.3rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    color: #28a745;
}

.share-result small {
    color: #6c757d;
    font-style: italic;
}

.existing-share-info {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 1rem;
    margin: 1rem 0;
}

.existing-share-info p {
    margin: 0.5rem 0;
}

/* 공유 관리 목록 스타일 */
.shares-list {
    max-height: 400px;
    overflow-y: auto;
}

.share-item {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.share-item.expired {
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.share-info h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    word-break: break-word;
}

.share-info p {
    margin: 0.25rem 0;
    color: #666;
    font-size: 0.9rem;
}

.expired-text {
    color: #721c24 !important;
    font-weight: bold;
}

.share-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-left: 1rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.2rem;
}

.no-shares {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    margin: 2rem 0;
}

/* 업로드 진행 상태 스타일 */
.upload-progress {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.progress-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

#upload-filename {
    font-weight: bold;
    color: #333;
    word-break: break-word;
}

#upload-status {
    color: #007bff;
    font-weight: 500;
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    flex: 1;
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-percent {
    font-weight: bold;
    color: #333;
    min-width: 40px;
    text-align: right;
    font-size: 14px;
}

.progress-size {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

/* 업로드 중 폼 비활성화 스타일 */
.upload-disabled {
    opacity: 0.6;
    pointer-events: none;
}

.upload-disabled input,
.upload-disabled button {
    cursor: not-allowed;
}

/* 반응형 디자인 */
@media (max-width: 600px) {
    .share-modal-content {
        margin: 2% auto;
        width: 95%;
    }

    .share-item {
        flex-direction: column;
        align-items: stretch;
    }

    .share-actions {
        margin-left: 0;
        margin-top: 1rem;
        flex-direction: row;
        justify-content: flex-end;
    }

    .link-container {
        flex-direction: column;
    }

    .progress-text {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .progress-bar-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .progress-percent {
        text-align: left;
        min-width: auto;
    }
}

/* 드래그앤드롭 스타일 */
.drag-drop-area {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 123, 255, 0.1);
    border: 3px dashed #007bff;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drag-drop-content {
    text-align: center;
    color: #007bff;
    font-size: 24px;
    font-weight: bold;
}

.drag-drop-content i {
    font-size: 64px;
    margin-bottom: 20px;
    display: block;
}

.drag-drop-content p {
    margin: 0;
    font-size: 20px;
}

/* 드래그 오버 상태 */
.drag-over {
    background-color: rgba(40, 167, 69, 0.1) !important;
    border-color: #28a745 !important;
}

.drag-over .drag-drop-content {
    color: #28a745;
}

/* 파일 정보 스타일 */
#drop-file-info {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.file-info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background-color: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.file-info-item:last-child {
    margin-bottom: 0;
}

.file-info-name {
    font-weight: bold;
    color: #333;
    word-break: break-word;
    flex: 1;
    margin-right: 1rem;
}

.file-info-size {
    color: #666;
    font-size: 0.9rem;
    white-space: nowrap;
}