/* ----- Background (Dark Mode) ----- */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    overflow-x: hidden;
    position: relative;
    color: #e0e0e0;
    background: #121212; /* fallback solid background */
}

/* Subtle animated gradient (dark blues & purples) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #0f2027, #203a43, #2c5364, #1a1a2e);
    background-size: 300% 300%;
    animation: gradientBG 25s ease infinite;
    z-index: -2;
    will-change: background-position;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

canvas#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    pointer-events: none;
}

/* ----- Layout ----- */
.container {
    margin: 20px auto;
    max-width: 1200px;
    padding: 0 20px;
}

h1, h2 {
    text-align: center;
    color: #ffffff;
    font-weight: 600;
}

/* ----- Table Styling ----- */
table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.7);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(30,30,30,0.95);
    backdrop-filter: blur(8px);
    color: #e0e0e0;
}

th, td {
    padding: 12px 15px;
    text-align: center;
}

th {
    background: rgba(40,40,40,0.95);
    cursor: pointer;
    position: sticky;
    top: 0;
    z-index: 1;
    font-weight: 600;
    color: #f5f5f5;
}

tr {
    transition: background 0.3s;
}

tr:nth-child(even) td:not(.itm):not(.otm) {
    background: rgba(255,255,255,0.03);
}

tr:hover td:not(.itm):not(.otm) {
    background: rgba(255,255,255,0.08);
}

/* Highlight states */
.itm { background-color: rgba(220,53,69,0.35); }   /* muted red */
.otm { background-color: rgba(40,167,69,0.35); }  /* muted green */

tfoot tr {
    font-weight: bold;
    background: rgba(255,255,255,0.08);
}

/* ----- Mobile Fallback ----- */
@media (max-width: 768px) {
    body::before {
        background-size: 200% 200%; 
        animation: gradientBG 50s ease infinite; 
    }

    table {
        background: rgba(20,20,20,0.95); 
        backdrop-filter: none; 
    }
}
