:root {
    --background-color: #000;
    --text-color: rgb(102, 25, 208);
    --highlight-color: #6600cc;
    --table-border-color: rgb(102, 25, 208);
    --table-header-bg-color: rgb(102, 25, 208);
    --table-header-text-color: #fff;
    --box-bg-color: rgb(102, 25, 208);
}

body {
    background-color: var(--background-color);
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text-color);
}

h1 {
    color: var(--text-color);
    font-size: 35px;
    margin-top: 20px;
}

.container {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

#leaderboard {
    width: 80%;
    margin: 30px auto;
    border-collapse: collapse;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    font-size: 20px;
    color: var(--text-color);
}

#leaderboard th, #leaderboard td {
    border: 1px solid var(--table-border-color);
    padding: 8px;
    text-align: center;
}

#leaderboard th {
    background-color: var(--table-header-bg-color);
    color: var(--table-header-text-color);
    padding-top: 12px;
    padding-bottom: 12px;
}

#main-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

#box {
    background-color: var(--box-bg-color);
    border: 1px solid var(--table-border-color);
    width: 90%;
    max-width: 800px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.warning-msg {
    color: white;
    font-weight: bold;
    font-size: 5vw;
    font-family: 'VT323', monospace;
    letter-spacing: 0.5em;
    margin-top: 20px;
    z-index: 4;
}

.background-bars-wrapper {
    position: absolute;
    display: flex;
    width: 100%;
    height: 50%;
    z-index: 1;
}

#top-background-bars-wrapper {
    align-items: flex-start;
    top: 0;
}

#bottom-background-bars-wrapper {
    align-items: flex-end;
    bottom: 0;
}

.background-bar {
    width: 10%;
    height: 50%;
    margin: 0 1px;
    background-color: black;
    animation: bar 0.4s ease infinite alternate;
}

.bar1 { animation-delay: 0.1s; }
.bar2 { animation-delay: 0.2s; }
.bar3 { animation-delay: 0.3s; }
.bar4 { animation-delay: 0.4s; }
.bar5 { animation-delay: 0.5s; }
.bar6 { animation-delay: 0.5s; }
.bar7 { animation-delay: 0.4s; }
.bar8 { animation-delay: 0.3s; }
.bar9 { animation-delay: 0.2s; }
.bar10 { animation-delay: 0.1s; }

@keyframes bar {
    from { height: 50%; }
    to { height: 90%; }
}

.toggle-wrapper {
    position: absolute;
    top: 20px;
    right: 10%;
    /* Align with leaderboard */
}

.toggle-checkbox {
    display: none;
}

.toggle-label {
    display: block;
    width: 60px;
    height: 30px;
    background-color: var(--highlight-color);
    border-radius: 15px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s;
}

.toggle-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 0 5px;
    font-size: 14px;
    color: var(--table-header-text-color);
}

.icon {
    position: relative;
    width: 16px;
    height: 16px;
}

.sun-icon {
    color: #ffcc00;
}

.moon-icon {
    color: #ccc;
}

.toggle-switch {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 26px;
    height: 26px;
    background-color: var(--table-header-text-color);
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-checkbox:checked + .toggle-label {
    background-color: #ccc;
}

.toggle-checkbox:checked + .toggle-label .toggle-switch {
    transform: translateX(30px);
}

.toggle-checkbox:checked + .toggle-label .sun-icon {
    color: #333;
}

.toggle-checkbox:checked + .toggle-label .moon-icon {
    color: #ffcc00;
}
