html, body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
    height: 100dvh;
    width: 100dvw;
    overflow: hidden;
    background-color: #333;
}
.content {
    display: flex;
    flex-direction: row;
    height: 100%;
    width: 100%;
    overflow: hidden;
}
.control-panel {
    margin: 0.5em 0 0.5em 0.5em;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-shrink: 0;
    border: 2px solid #ccc;
    background-color: #022a86;
    border-radius: 0.5em;
    padding: 0.5em;
}
.control-panel-buttons {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 0.5em;
    row-gap: 0.5em;
    box-sizing: border-box;
    padding: 1em;
}
.control-panel a.active {
    font-weight: bold;
    border-left: 4px solid #05f99f;
    padding-left: 0.5em;
}
.mic-btn {
    position: fixed;
    bottom: 1em;
    left: 1em;
    padding: 0.5em 1em;
    border-radius: 50em;
    border: none;
    outline: none;
    font-size: 1em;
    cursor: pointer;
    background-color: #f9051d !important;
    color: white;
    transition: scale 0.1s ease, background-color 0.1s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.mic-btn.active {
    background-color: #28a745 !important;
    color: white;
}
.mic-btn:hover {
    scale: 0.95;
}
.control-panel button {
    padding: 0.5em 1em;
    border-radius: 50em;
    border: none;
    outline: none;
    font-size: 1em;
    cursor: pointer;
    background-color: #ffffff;
    transition: scale 0.1s ease, background-color 0.1s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #ccc;
}
.control-panel button:hover {
    scale: 0.95;
}
.control-panel button:active {
    background-color: #c0c0c0;
}

.player {
    margin: 0.5em;
    background-color: rgb(1, 86, 86);
    padding: 1em;
    box-sizing: border-box;
    flex-grow: 1;
    border: 2px solid #ccc;
    color: white;
    border-radius: 0.5em;
    transition: border-color 0.2s ease;
}
.player.active {
    border-color: #f9051d;
}
#interim-span {
    position: fixed;
    bottom: 15%; /* Positions it near the bottom */
    left: 50%;
    transform: translateX(-50%); /* Centers it horizontally */
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-family: sans-serif;
    font-size: 1.2rem;
    pointer-events: none; /* Allows clicks to pass through it */
    opacity: 0; /* Hidden by default */
    transition: opacity 0.2s ease;
    z-index: 9999;
    white-space: nowrap;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
}

#interim-span.visible {
    opacity: 1;
}
.transcript {
    margin-top: 1em;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 0.5em;
    background-color: #f9f9f9;
    color: #333;
    border-radius: 0.5em;
}

@media (max-width: 600px) {
    .control-panel {
        font-size: 0.8em;
        max-height: 40vh;
        overflow-y: auto;
        margin: 0.5em;
    }
    .control-panel button {
        padding: 0.4em 0.8em;
        font-size: 0.8em;
    }
    button svg {
        height: 16px;
        width: 16px;
    }
    .control-panel-buttons {
        gap: 0.4em;
        row-gap: 0.4em;
        padding: 0.8em;
        grid-template-columns: 1fr;
    }
    .player {
        font-size: 0.9em;
    }
    .content {
        flex-direction: column;
    }
}
.temp-div {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 100px;
    background-color: rgba(0, 0, 0, 0.573);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    z-index: 10000;
    padding: 1em;
    text-align: center;
    flex-direction: column;
}
.audio-player {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5em;
    padding-bottom: 1em;
    border-bottom: 1px solid #ccc;
}
.audio-player .current-track {
    font-weight: bold;
    font-size: 1.1em;
}
.file-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
}
.file-list li {
    margin: 0.2em 0;
}
.file-list li a {
    text-decoration: none;
    color: #00e1ff;
}
.file-list li a:hover {
    text-decoration: underline;
}
.help-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2em;
    border-radius: 1em;
    z-index: 10000;
    max-width: 90%;
    max-height: 80%;
    overflow-y: auto;
}
.help-modal.hidden {
    display: none;
}
.help-modal h2 {
    margin-top: 0;
}
.help-modal ul {
    padding-left: 1.5em;
    list-style-type: none;
}
.help-modal li:first-child {
    border-radius: 0.5em 0.5em 0 0;
    border-top: 1px solid #555;
}
.help-modal li:last-child {
    border-radius: 0 0 0.5em 0.5em;
}
.help-modal li {
    margin: 0;
    border-bottom: 1px solid #555;
    border-left: 1px solid #555;
    border-right: 1px solid #555;
    padding: 0.5em;
    
}
.help-modal .close-btn {
    margin-top: 1em;
    padding: 0.5em 1em;
    border-radius: 50em;
    border: none;
    outline: none;
    font-size: 1em;
    cursor: pointer;
    background: none;
    border: 1px solid white;
    color: white;
    transition: scale 0.1s ease, background-color 0.1s ease;
    position: absolute;
    top: 1em;
    right: 1em;
}
.help-modal button:hover {
    scale: 0.95;
}