body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #0b1724;
    color: #f4f7fb;
}

header, main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

main {
    padding-top: 0;
}

h1 {
    color: #7dd3fc;
}

.card {
    background: #12263a;
    border: 1px solid #1f3b57;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

#license-input {
    min-width: 300px;
}

#auth, #dashboard {
    margin-top: 1rem;
}

label {
    display: flex;
    flex-direction: column;
    font-weight: bold;
}

input, select, button {
    padding: 0.65rem;
    border-radius: 8px;
    border: 1px solid #1f3b57;
    background: #0f1f32;
    color: #e2e8f0;
}

button {
    cursor: pointer;
    background: linear-gradient(135deg, #38bdf8, #3b82f6);
    border: none;
    font-weight: bold;
}

button:disabled {
    background: #1f3b57;
    cursor: not-allowed;
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 1rem;
}

canvas {
    background: #0f1f32;
    border-radius: 10px;
    padding: 0.75rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 0.6rem;
    text-align: left;
    border-bottom: 1px solid #1f3b57;
}

th {
    color: #7dd3fc;
}

tr:hover {
    background: #0f1f32;
}

.hidden {
    display: none;
}

.status {
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.status.ok {
    color: #4ade80;
}

.status.err {
    color: #f87171;
}

.range-header {
    margin: 0.75rem 0 1rem 0;
    padding: 0.75rem 1rem;
    border: 1px solid #1f3b57;
    border-radius: 10px;
    background: #0f1f32;
}

.range-title {
    color: #7dd3fc;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.range-text {
    color: #e2e8f0;
}

/* Podium rows */
tr.podium-1 td { background: rgba(255, 215, 0, 0.16); }   /* gold */
tr.podium-2 td { background: rgba(192, 192, 192, 0.16); } /* silver */
tr.podium-3 td { background: rgba(205, 127, 50, 0.16); }  /* bronze */

/* Smurf (error theme) */
tr.smurf td {
    background: rgba(248, 113, 113, 0.16) !important;
    border-bottom-color: rgba(248, 113, 113, 0.35);
}
tr.smurf:hover td {
    background: rgba(248, 113, 113, 0.22) !important;
}

/* Tooltip (uses title attribute) */
tr.smurf { cursor: help; }

.driver {
    display: flex;
    align-items: center;
}

.flag {
    margin-right: 0.5rem;
}

th.sortable {
    cursor: pointer;
    user-select: none;
}

th.sortable::after {
    content: ' ⇅';
    opacity: 0.4;
    font-size: 0.85em;
}

th.sortable.asc::after { content: ' ↑'; }
th.sortable.desc::after { content: ' ↓'; }

.tabs {
    margin-bottom: 1rem;
    button {
        transition: 0.2s ease-in-out;
    }

    button:not(.active) {
        opacity: 0.25;
        &:hover {
            opacity: 0.9;
            cursor: pointer;
        }
    }
}

.countdown {
    display: grid;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin: 0 0 1rem;
    border-radius: 10px;
    border: 1px solid #1f3b57;
    background: #0f1f32;
}

.countdown-caption {
    font-size: 0.85rem;
    color: #94a3b8;
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.75rem;
}

.countdown-segment {
    display: grid;
    gap: 0.2rem;
    text-align: center;
}

.countdown-value {
    font-size: 1.6rem;
    font-weight: bold;
    color: #7dd3fc;
    animation: countdown-pulse 2.8s ease-in-out infinite;
}

.countdown-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.65rem;
    color: #94a3b8;
}

@keyframes countdown-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.02);
    }
}
