body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    padding: 0.5rem;
}

.view {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
}

.view.active {
    display: flex;
}

.header-bar {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.2rem 0.4rem;
    display: none;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    height: 32px;
}

.header-bar.visible {
    display: flex;
}

.header-bar button {
    margin: 0;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    height: auto;
    width: auto;
    align-self: flex-end;
}

/* Status bar styles */
.status-bar {
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--primary);
    padding: 0.2rem 0.4rem;
    display: none;
    align-items: center;
    font-size: 0.8rem;
    min-height: 32px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.status-bar.visible {
    display: flex;
}

.status-bar-title {
    font-weight: bold;
    margin-right: 0.5rem;
}

.status-bar-jobs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 1;
}

.status-bar-empty {
    font-style: italic;
    color: rgba(0, 0, 0, 0.5);
}

.status-bar-job {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: var(--border-radius);
    padding: 0.2rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 300px;
}

.status-bar-job .job-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.status-bar-job .job-status {
    font-size: 0.7rem;
    padding: 0.1rem 0.3rem;
    border-radius: var(--border-radius);
    background-color: var(--primary);
    color: white;
}

.status-bar-job .job-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

.button-container {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.button-container button {
    flex: 1;
}

.filter-options {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.filter-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    cursor: pointer;
}

.filter-options input[type="checkbox"] {
    margin: 0;
}

.filter-options button {
    margin: 0;
    margin-left: auto;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    height: auto;
}

.queue-container {
    flex: 1;
    overflow-y: auto;
    min-height: 0; /* Important for Firefox */
}


table {
    width: 100%;
}

table th, table td {
    text-align: left;
    padding: 0.5rem;
}

table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

/* Spinner and message styles */
.spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.message-container {
    text-align: center;
    padding: 2rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
}

.message-container.success {
    background-color: rgba(0, 200, 0, 0.1);
    border: 1px solid rgba(0, 200, 0, 0.3);
}

.message-container.error {
    background-color: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
}

#countdown {
    font-weight: bold;
}

.total-display {
    text-align: end;
}
