:root {
    --bg-color: #080224;
    --text-main: #ffffff;
    --text-dim: #a0a0a0;
    --accent: #B815FF;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
}

header {
    width: 100%;
    background-color: #FF8C00;
    display: flex;
    flex-direction: row;
    justify-content: left;
    align-items: center;
    height: 50px;
}

.title {
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: #FF4315;
    height: 100%;
}

.the_finals_logo {
    margin-top: 0rem;
    margin-bottom: 0rem;
    margin-left: 10px
}

h1 {
    font-size: 1.4rem;
    margin-left: 15px;
    margin-right: 15px;
}

main {
    width: 95%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
}

.chart-wrapper {
    position: relative;
    height: 88vh;
    width: 100%;
}

.chart-wrapper canvas {
    transition: opacity 0.15s ease;
}

.loading-indicator {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-dim);
    font-size: 0.95rem;
    z-index: 10;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #1a4875;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.controls {
    margin-top: 20px;
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.controls select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
    background: #B815FF;
    color: white;
    border: none;
    padding: 12px 10px;
    font-weight: bold;
    cursor: pointer;
    height: 40px;
    width: 200px;
}

.view-buttons {
    display: flex;
    margin-bottom: 10px;
    gap: 0px;
    height: 40px;
}

.view-buttons button {
    background: #45007e;
    border: none;
    color: #a49aac;
    padding: 12px 12px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    width: 100px;
}

.controls button.active {
    background: #B815FF;
    color: white;
}

.controls button:hover:not(.active) {
    background: #9b11d6;
    color: white;
}

footer {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    background-color: #130554;
    width: 100%;
    height: 50px;
    color: #ffffff;
    font-weight: bold;
    margin-top: 80px;
    font-size: 0.9rem;
}

footer a {
    color: #ffffff;
    text-decoration: none;
}

@media (max-width: 600px) {
    .chart-wrapper {
        position: relative;
        height: 69vh;
        width: 100%;
    }

    .controls {
        flex-direction: column;
        gap: 0px;
    }
}