body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    background-color: #1f1f23;
    font-family: sans-serif;
    padding: 20px;
}

.h1c {
    color: orange;
    text-align: left;
    width: 90%;
    max-width: 800px;
    margin-bottom: 0px;
}

#search-filter-container {
    width: 90%;
    max-width: 800px;
    margin-bottom: 20px;
}


#search-input {
    width: 50%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    background-color: #44475a;
    color: #dedee3;
}

#filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    color: #dedee3;
    flex-wrap: wrap;
    width: 90%;
    max-width: 800px;

}

.filter-group {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 5px;
    flex-wrap: wrap;
    width: 100%;
}

.filter-group label {
    font-weight: bold;
    min-width: 100px;
    text-align: left;
    margin-top: 5px;
}

.filter-button {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #44475a;
    cursor: pointer;
    font-size: 14px;
    margin-right: 5px;
    margin-bottom: 5px;
    white-space: nowrap;
    color: #84e287;
}

.filter-button.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

#audio-list {
    width: 90%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

.audio-item {
    padding: 5px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.audio-item>audio {
    width: 43.33%;
    margin-top: 5px;
    margin-bottom: 5px;
    background: #dedee3;
}

.clickable {
    cursor: pointer;
    text-decoration: none;
    position: relative;
    font-size: 1.2em;
    color: orange;
}

.clickable:hover::after {
    content: "Click to copy";
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 8px;
    font-size: 12px;
    border-radius: 5px;
    white-space: nowrap;
}

audio {
    width: 100%;
    border-radius: 20px;
    height: 35px;
}

.tags {
    font-size: 0.9em;
    color: #adadb8;
    margin-top: 5px;
}

h2 {
    color: #dedee3;
    text-align: left;
    width: 90%;
    max-width: 800px;
    margin-top: 30px;
    margin-bottom: 5px;
}

.instructions,
.support {
    color: #99a3ba;
    display: block;
    text-align: left;
    width: 90%;
    max-width: 800px;
    margin-bottom: 10px;
}

.spacer {
    height: 20px;
    width: 100%;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #2c303a;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    color: #dedee3;
    border-radius: 10px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: white;
    text-decoration: none;
    cursor: pointer;
}

#all-voices-list {
    white-space: pre-line;
    word-break: break-all;
    line-height: 1.5;
}

.modal-content ul {
    list-style-type: none;
    padding: 0;
    margin: 10px 0;
}

.modal-content ul li {
    padding: 5px 0;
    color: #dedee3;
}

.modal-content code {
    background-color: #44475a;
    color: #ffb86c;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
    flex: 1;
}

a {
    color: #FFB366;
    text-decoration: none;
}

a:hover,
a:focus,
a:active {
    color: #FFC966;
    text-decoration: underline;
}

a:visited {
    color: #FFB366;
}

.unstyled-link {
    color: #FFB366;
    text-decoration: none;
}

.unstyled-link:hover,
.unstyled-link:focus,
.unstyled-link:active,
.unstyled-link:visited {
    color: #FFC966;
    text-decoration: none;
}

#category-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    position: relative;
}

.loader {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #3ae8ff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    position: absolute;
}

#category-loading-indicator {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;

}

#audio-loading-indicator {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);

}

#pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.pagination-button {
    padding: 8px 16px;
    margin: 0 4px;
    border: none;
    border-radius: 20px;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

.pagination-button:hover {
    background-color: #388E3C;
}

.pagination-button:disabled {
    background-color: #808080;
    cursor: not-allowed;
}

.page-info {
    margin: 0 10px;
    color: #dedee3;
    font-size: 16px;
    padding-top: 5px;
}

.page-number-button {
    padding: 8px 16px;
    margin: 0 4px;
    border: none;
    border-radius: 20px;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    body {
        padding: 5px;
    }

    .instructions,
    .support {
        font-size: 0.9rem;
    }

    .h1c {
        margin-bottom: 2.5px;
        font-size: 1.6rem;
    }

    .h2c {
        font-size: 1.3rem;
    }

    #search-filter-container {
        display: none !important;
    }

    #filters {
        margin-bottom: 5px;
        width: 90%;
    }

    .filter-group {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 2.5px;
    }

    .filter-group label {
        min-width: auto;
        margin-bottom: 2.5px;
        display: block;
    }

    .simple-filters {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }

    .filter-button {
        padding: 4px 6px;
        font-size: 10px;
    }

    .audio-item>audio {
        width: 75%;
    }

    .audio-item {
        padding: 5px;
        border-radius: 10px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        margin-bottom: 5px;
    }

    .tags {
        font-size: 0.7em;
        color: #adadb8;
        margin-top: 5px;
        width: 70%;
    }
    .clickable {
        cursor: pointer;
        text-decoration: none;
        position: relative;
        font-size: 0.8rem;
        color: orange;
        word-break: break-word;
    }

    #audio-list {
        width: 95%;
        gap: 0px;
    }

    #pagination-container {
        margin-top: 5px;
    }

    .pagination-button,
    .page-number-button {
        padding: 5px 10px;
        font-size: 0.8em;
    }

    .page-info {
        font-size: 0.9em;
    }

    h2 {
        margin-top: 15px;
        margin-bottom: 2.5px;
    }

    .instructions,
    .support {
        margin-bottom: 5px;
    }

    .spacer {
        height: 10px;
    }
}