body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    color: #333;
}

#search,
.container {
    max-width: 800px;
    margin: 10px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.footer {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background-color: #7d7d7d;
    color: white;
    border-radius: 5px;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: #555;
}
#search {
    margin-bottom: 20px;
    right: 0;
    left: 0;
    max-width: 800px;  
    position: relative; 
}
#search-clear-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translate(-100%, -50%);
    cursor: pointer;
}
#search-input {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
    background-color: #dfdfdf;
}

#search-input:focus {
    outline: none;
    border-color: #666;
}

.file-tree {
    list-style-type: none;
    margin: 0;
    padding: 0;
    position: relative;
    padding-left: 20px;
    cursor: pointer;
}

.file-tree ul {
    list-style-type: none;
    padding-left: 20px;
    margin-left: 10px;
    border-left: 1px solid #ccc;
}

.file,
.directory {
    margin: 5px 0;
    cursor: pointer;
    position: relative;
    padding-left: 20px;
}

.file::before,
.directory::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 12px;
    width: 10px;
    height: 1px;
    background-color: #ccc;
}

.file::after,
.directory::after {
    content: '';
    position: absolute;
    left: -12px;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #ccc;
}

.modal {
    display: none; /* Изначально скрыто */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}


.modal-content {
    position: relative; /* Ensure positioning context for child elements */
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-height: 80%;
    max-width: max-content;
    overflow-y: auto;
    font-family: monospace;
    white-space: pre-wrap;
    color: #555;
    border-radius: 8px;
    overflow-x: hidden;	/* Отключает горизонтальную прокрутку, если контент не помещается в меню */
}

#open-file-button {
    position: absolute; /* Position relative to .modal-content */
    top: 10px; /* Distance from the top */
    right: 10px; /* Distance from the right */
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-family: Arial, sans-serif;
    font-weight: bold;
    text-align: center;
}

#open-file-button:hover {
    background-color: #45a049;
}

.sub-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.sub-menu-item {
    background-color: white;
    color: black;
    border: solid 1px transparent;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    flex-grow: 1;
    text-align: center;
    min-width: 120px;
}

.sub-menu-item:hover {
    border: solid 1px #68a5db;
}

.sub-menu-item.active {
    background-color: #68a5db;
    color: white;
    font-weight: bold;
}
.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.5s;
}
.compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.info-card {
    background-color: #f9f9f9;
    border-left: 4px solid #68a5db;
    padding: 15px;
    border-radius: 0 5px 5px 0;
}
.lonely{
    grid-template-columns: 1fr;
}

.info-card h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}
@media (max-width: 768px) {
    .sub-menu {
        flex-direction: column;
    }
}
