/* Default styles (light theme fallback) */
:root{
    --max-height: 420px;
    --table-min-width: 800px;
    --header-bg: #0b5cff;
    --header-color: #fff;
    --row-alt: #f8f9ff;
    --cell-padding: 0.6rem;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

p {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.5); 
    padding: 50px; 
    border-radius: 10px;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/background.png') !important;
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.masthead {
    background-color: transparent;
}

.table-card {
    margin-top: 125px;
    overflow: hidden;
}

.table-container {
    max-height: var(--max-height, 85vh);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    opacity: 85%;
    border-collapse: collapse;
    width: 100%;
    min-width: var(--table-min-width);
}

thead th {
    position: sticky;
    top: 0;
    background: var(--header-bg);
    color: var(--header-color);
    text-align: left;
    padding: var(--cell-padding);
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 2;
    border-bottom: 2px solid rgba(255,255,255,0.12);
}

tbody td {
    padding: var(--cell-padding);
    border-bottom: 1px solid #eef1f8;
    font-size: 0.92rem;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

tbody tr:nth-child(even) {
    background: var(--row-alt);
}

@media (max-width: 640px) {
    thead th, tbody td { padding: 0.45rem; font-size: 0.85rem; }
    :root { --max-height: 340px; --table-min-width: 680px; }
}

tbody tr:focus-within, tbody tr:hover {
    outline: 3px solid rgba(11,92,255,0.12);
    outline-offset: -3px;
}

/* Dark theme styles using prefers-color-scheme */
@media (prefers-color-scheme: dark) {
    .background {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('../img/background-night.png') !important;
        background-size: cover;
        background-position: center;
        z-index: -1;
    }
}