<style>
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #faf9f7;
    color: #3d3d3d;
    min-height: 100vh;
    margin: 0;
}

#app {
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    margin-bottom: 30px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
    border: 1px solid #f0efed;
}

.header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #1a1a1a;
    font-weight: 600;
}

.header-tip {
    font-size: 0.85rem;
    color: #999;
    margin-top: 8px;
    margin-bottom: 0;
}

.btn-logout {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    background: #faf9f7;
    border: 1px solid #e5e5e5;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-logout:hover {
    background: #f0efed;
    border-color: #5c7080;
    color: #5c7080;
}

.breadcrumb {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

.path-item {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.path-item:hover {
    background: #f0efed;
    color: #5c7080;
}

.path-item:not(:last-child)::after {
    content: '›';
    margin-left: 10px;
    color: #ccc;
}

.toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

#upButton {
    margin-right: 10px;
    padding: 10px 20px;
}

.sort-controls {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-controls label {
    color: #666;
    font-size: 0.9rem;
}

.sort-controls select {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    color: #3d3d3d;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.sort-controls select:hover {
    border-color: #5c7080;
}

.sort-controls select:focus {
    outline: none;
    border-color: #5c7080;
    box-shadow: 0 0 0 3px rgba(92, 112, 128, 0.1);
}

/* Bulk actions styles */
.bulk-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f4f6f8;
    border-radius: 8px;
    margin-bottom: 20px;
    margin-top: 20px;
    gap: 20px;
    border: 1px solid #e1e6ea;
}

.bulk-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bulk-info #selectedCount {
    font-weight: 500;
    color: #5c7080;
}

.btn-link {
    background: none;
    border: none;
    color: #5c7080;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
    padding: 0;
}

.btn-link:hover {
    color: #4a5c6a;
}

.bulk-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
}

.btn-primary {
    background: #5c7080;
    color: white;
}

.btn-primary:hover {
    background: #4a5c6a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(92, 112, 128, 0.2);
}

.btn-secondary {
    background: #ffffff;
    color: #666;
    border: 1px solid #e5e5e5;
}

.btn-secondary:hover {
    background: #faf9f7;
    border-color: #5c7080;
    color: #5c7080;
    transform: translateY(-1px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.icon {
    font-size: 1.1rem;
}

/* Drop overlay styles */
.drop-overlay,
#dropOverlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(92, 112, 128, 0.95) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0s 0.15s;
    pointer-events: none;
}

.drop-overlay.active,
#dropOverlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
    transition: opacity 0.15s ease, visibility 0s;
}

.drop-overlay-content {
    font-size: 2rem;
    color: white;
    font-weight: 500;
    text-align: center;
    padding: 40px 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 2px dashed rgba(255, 255, 255, 0.4);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.file-list {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0efed;
}

.file-list-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0efed;
    background: #faf9f7;
    font-weight: 500;
    color: #666;
}

.header-left {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.select-all-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #5c7080;
}

.header-name {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-info {
    display: flex;
    gap: 20px;
}

.header-size,
.header-date {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 100px;
}

.header-name:hover,
.header-size:hover,
.header-date:hover {
    color: #5c7080;
}

.sort-indicator {
    font-size: 0.8rem;
    opacity: 0.6;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.2s;
    cursor: default;
    position: relative;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item.selected {
    background: #f4f6f8;
}

.file-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #5c7080;
}

.file-item[onclick] .file-icon,
.file-item[onclick] .file-name {
    cursor: pointer;
}

.file-item:hover {
    background: #faf9f7;
}

.file-item.selected:hover {
    background: #e8ecf0;
}

.file-icon {
    font-size: 1.3rem;
    margin-right: 12px;
}

.file-name {
    flex: 1;
    font-weight: 400;
    color: #3d3d3d;
}

.file-info {
    display: flex;
    gap: 20px;
    color: #999;
    font-size: 0.9rem;
}

.file-info span:first-child {
    min-width: 100px;
    text-align: right;
}

.file-info span:last-child {
    min-width: 100px;
}

.file-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.file-item:hover .file-actions {
    opacity: 1;
}

.action-btn {
    background: none;
    border: 1px solid #e5e5e5;
    color: #666;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.action-btn:hover {
    border-color: #5c7080;
    color: #5c7080;
    background: #f4f6f8;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.empty {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.empty-icon {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 20px;
}

.empty-text {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #666;
}

.empty-hint {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 30px;
}

.empty .btn {
    margin: 0 auto;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 500px;
    pointer-events: all;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-message {
    flex: 1;
    color: #3d3d3d;
}

.toast-success {
    border-left: 4px solid #4caf50;
}

.toast-error {
    border-left: 4px solid #f44336;
}

.toast-warning {
    border-left: 4px solid #ff9800;
}

.toast-info {
    border-left: 4px solid #2196f3;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 400px;
    max-width: 600px;
    width: 90%;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #1a1a1a;
    font-size: 1.4rem;
    font-weight: 600;
}

.modal-body input {
    width: 100%;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    color: #3d3d3d;
    font-size: 1rem;
    margin-bottom: 20px;
}

.modal-body p {
    color: #666;
    margin-bottom: 15px;
}

.modal-body input:focus {
    outline: none;
    border-color: #5c7080;
    box-shadow: 0 0 0 3px rgba(92, 112, 128, 0.1);
}

.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: -10px;
    margin-bottom: 15px;
    display: none;
}

.error-message.show {
    display: block;
}

.error {
    color: #dc3545;
    text-align: center;
    padding: 20px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.upload-progress {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 300px;
}

.upload-progress-text {
    color: #3d3d3d;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.upload-progress-bar {
    height: 4px;
    background: #f0efed;
    border-radius: 2px;
    overflow: hidden;
}

.upload-progress-fill {
    height: 100%;
    background: #5c7080;
    width: 0;
    transition: width 0.3s ease;
}

.file-item[onclick]:hover .file-icon {
    transform: scale(1.1);
}

.file-item[onclick]:hover .file-name {
    color: #5c7080;
}

/* Folder Tree Styles for Move Dialog */
.folder-tree {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background: #faf9f7;
    padding: 10px;
}

.folder-tree-item-wrapper {
    position: relative;
}

.folder-tree-item {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 2px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.folder-tree-item:hover {
    background: #f0efed;
}

.folder-tree-item.selected {
    background: #f4f6f8;
    border: 1px solid #5c7080;
}

.folder-expand-icon {
    font-size: 0.8rem;
    cursor: pointer;
    padding: 2px;
    user-select: none;
    color: #999;
    transition: transform 0.2s;
    min-width: 16px;
    text-align: center;
}

.folder-expand-icon:hover {
    color: #666;
}

.folder-expand-icon.expanded {
    transform: rotate(0deg);
}

.folder-expand-placeholder {
    display: inline-block;
    width: 20px;
}

.folder-tree-icon {
    font-size: 1.2rem;
}

.folder-tree-name {
    flex: 1;
    color: #3d3d3d;
}

.subfolder-container {
    margin-left: 0;
}

.subfolder-container .loading {
    color: #999;
    font-size: 0.9rem;
}

#confirmMoveBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#confirmMoveBtn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.close-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.close-btn:hover {
    color: #666;
    background: #f0efed;
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .toolbar {
        gap: 10px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .bulk-actions {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .bulk-buttons {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #app {
        padding: 10px;
    }
    
    .header {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.4rem;
        margin-bottom: 8px;
    }
    
    .header-tip {
        font-size: 0.75rem;
        margin-right: 60px; /* Make room for logout button */
    }
    
    .btn-logout {
        padding: 6px 12px;
        font-size: 0.8rem;
        top: 12px;
        right: 12px;
    }
    
    .toolbar {
        justify-content: center;
        gap: 8px;
    }
    
    .btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .btn .icon {
        font-size: 1rem;
    }
    
    .sort-controls {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
    
    .file-list-header {
        display: none;
    }
    
    .file-checkbox {
        width: 16px;
        height: 16px;
        margin-right: 10px;
    }
    
    .file-info span:first-child {
        min-width: auto;
    }
    
    .file-actions {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .action-btn {
        font-size: 0.8rem;
        padding: 3px 8px;
    }
    
    .folder-tree {
        max-height: 300px;
    }
    
    .modal-content {
        width: 95%;
        min-width: auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .bulk-actions {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .bulk-info {
        gap: 10px;
    }
    
    .bulk-buttons .btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .drop-overlay-content {
        font-size: 1.5rem;
        padding: 30px 40px;
    }
}
</style>