/* Общие стили */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #e9ecef;
    color: #495057;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    transition: background 0.3s ease;
}

.dashboard {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    background-color: #007bff;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-image: radial-gradient( circle 710px at 5.2% 7.2%,  rgba(37,89,222,1) 0%, rgba(37,89,222,1) 7.5%, rgba(4,4,29,1) 44.7% );
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

header h1 {
    margin: 0;
    font-size: 28px;
}



button {background-image: linear-gradient(to right, #F00000 0%, #DC281E  51%, #F00000  100%)}
button {
    background-color: #dc3545;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-transform: uppercase;
    transition: 0.5s transform;
    background-size: 200% auto;
    color: white;
    box-shadow: 0 0 20px #eee;
    border-radius: 10px;
    display: block;
}

button:hover {
    background-position: right center;
    color: #fff;
    text-decoration: none;
    transform: scale(1.1);
}

main {
    display: flex;
    flex: 1;
    padding: 20px;
    justify-content: space-between;
}

.file-tree {
    flex: 1;
    max-width: 300px;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.file-tree ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.file-tree li {
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.file-tree li.show {
    opacity: 1;
    transform: translateY(0);
}

.file-viewer {
    flex: 3;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-left: 20px;
}

.file-viewer h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.upload-area {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: nowrap;
    
}

.upload-btn {background-image: linear-gradient(to right, #003973 0%, #E5E5BE  51%, #003973  100%)}
.upload-btn {
    margin: 10px;
    padding: 10px 15px;
    text-align: center;
    text-transform: uppercase;
    transition: 0.5s;
    background-size: 200% auto;
    color: white;
    box-shadow: 0 0 20px #eee;
    border-radius: 10px;
    display: block;
    flex-shrink: 0;
}

.upload-btn:hover {
    background-position: right center;
    color: #fff;
    text-decoration: none;
    transform: scale(1.1);
}

input[type="file"] {
    display: none;
}

.file-status {
    margin-left: 10px;
    font-weight: bold;
    margin-right: 20px;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#file-list {
    margin-top: 20px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f1f1f1;
    margin: 10px 0;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.file-item.show {
    opacity: 1;
    transform: translateY(0);
}

.file-item.fade-out {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.file-item:hover {
    background-color: #e2e2e2;
}

.file-actions {
    display: flex;
    gap: 10px;
}

.file-actions button {background-image: linear-gradient(to right, #52c234 0%, #061700  51%, #52c234  100%)}
.file-actions button {
    text-align: center;
    text-transform: uppercase;
    transition: 0.5s;
    background-size: 200% auto;
    color: white;
    box-shadow: 0 0 20px #eee;
    border-radius: 10px;
    display: block;
}

.file-actions button:hover {
    background-position: right center;
    color: #fff;
    text-decoration: none;
    transform: scale(1.1);
}

#sort-options {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    background-color: #ffffff;
    cursor: pointer;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

#sort-options:hover {
    border-color: #007bff;
    transform: scale(1.05);
}

#search-input {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    width: 90%;
    transition: border-color 0.3s ease;
}

#search-input:focus {
    border-color: #007bff;
}

/* Стили для кнопки Logout */
#logout-btn {background-image: linear-gradient(to right, #e52d27 0%, #b31217  51%, #e52d27  100%)}
#logout-btn {
    margin: 10px;
    padding: 15px 45px;
    text-align: center;
    text-transform: uppercase;
    transition: 0.5s;
    background-size: 200% auto;
    color: white;
    box-shadow: 0 0 20px #eee;
    border-radius: 10px;
    display: block;

}

#logout-btn:hover {
    background-position: right center;
    color: #fff;
    text-decoration: none;
    transform: scale(1.1);

}

.file-tree {
    flex: 1;
    max-width: 200px;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.folder-item {
    padding: 10px;
    margin: 5px 0;
    background-color: #f1f1f1;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.folder-item:hover {
    background-color: #e2e2e2;
}

.folder-item button {
    margin-left: 5px;
    padding: 2px 5px;
    font-size: 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.folder-item button:hover {
    background-color: #ddd;
}

#home-btn {
    margin-top: 10px;
    padding: 5px 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#home-btn:hover {
    background-color: #0056b3;
}

#drop-area {
    border: 2px dashed #ccc;
    padding: 20px;
    transition: background-color 0.3s ease;
}

/* Мобильные стили */
@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }

    main {
        flex-direction: column;
    }

    .file-tree {
        margin-bottom: 20px;
        max-width: 400px;
    }

    .file-status {
    max-width: 85px;
    overflow: hidden;
    text-overflow: ellipsis;
    
}

    .file-item.show {
    overflow: hidden;
    text-overflow: ellipsis;
    }

    .file-viewer {
        margin-left: 0;
        width: 100%;
        padding: 0px;

    }

    .file-actions {
        flex-direction: column;
    }

}

/* Индикатор текущей папки */
.current-folder-indicator {
    display: block;
    margin: 10px 0;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: #2575fc;
    font-size: 14px;
    text-align: center;
}

/* Стили для папок */
.folder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    margin: 5px 0;
    background-color: #f1f1f1;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.folder-item:hover {
    background-color: #e2e2e2;
}

/* Контейнер для кнопок */
.folder-actions {
    display: flex;
    gap: 5px;
}

/* Стили для кнопок Rename и Delete */
.folder-action-btn {
    padding: 5px 10px;
    background: linear-gradient(to right, #6a11cb, #2575fc);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.folder-action-btn:hover {
    transform: scale(1.05);
    background: linear-gradient(to right, #2575fc, #6a11cb);
}