body {
    font-family: sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

* {
    box-sizing: border-box;
}

header {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ccc;
    background-color: #f0f0f0;
}

#search-container {
    display: flex;
    align-items: center;
    flex-grow: 1;
    margin-left: 10px;
    gap: 10px;
}

#search-container select,
#search-container input,
#search-container button {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

#search-input {
    flex-grow: 1;
    width: 80px;
    min-width: 80px;
}

#search-container button {
    cursor: pointer;
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

#search-matches {
    display: flex;
    align-items: center;
}

#search-container label:not(.highlight-container label) {
    white-space: nowrap;
}



.highlight-container {
    display: none !important;
}

.container {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
}

#file-list-container {
    width: fit-content;
    border-right: 1px solid #ccc;
    padding: 10px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

body:not(.sidebar-open) #file-list-container {
    display: none;
}

#main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

#iframe-container {
    flex-grow: 1;
    display: flex;
    position: relative;
}

#loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

#loading-overlay.hidden {
    display: none;
}

.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

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

iframe {
    flex-grow: 1;
    border: none;
}

#file-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    overflow-x: hidden;
}

#file-list li {
    padding: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
}

    #file-list li label {
        cursor: pointer;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex-grow: 1;
    }

    #file-list li input[type="checkbox"] {
        cursor: pointer;
        margin-left: 5px;
    }

#file-list li.active {
    background-color: #e0e0e0;
    font-weight: bold;
}
#load-button {
    margin-top: 10px;
    padding: 10px;
    width: 100%;
}

#menu-button {
    background: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    cursor: pointer;
}

@media (max-width: 768px) {
    #search-container {
        flex-wrap: wrap;
    }

    #file-list-container {
        position: absolute;
        z-index: 10;
        background-color: #f0f0f0;
        border-right: 1px solid #ccc;
    }
}
