body, html {
    user-select: none; /* Non-standard */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    margin: 0;
    padding: 0;
    height: auto; /* Allow height to be determined by content */
    font-family: Verdana, Geneva, Tahoma, sans-serif, sans-serif;
    color: #e0e0e0; /* Light text color */
    text-align: center;
    position: relative;
    overflow: auto; /* Allow scrolling if content exceeds viewport */
    overflow-x: hidden; /* Remove horizontal scrollbar */
}

.hidden {
    display: none;
}

.ranking {
    margin: 8px 16px;
}

.ranking table {
    width: 345px;
}

.bronze {
    filter: sepia(1) brightness(0.8) saturate(1.5) contrast(1.2);
}

.silver {
    filter: grayscale(1) brightness(1.1) saturate(1.5) contrast(1.3);
}

.gold {
    filter: sepia(0.8) brightness(1.2) saturate(1.5) contrast(1.4);
}

.platinum {
    filter: brightness(1.2) saturate(1.2) contrast(1.2);
}

.onyx {
    filter: brightness(0.2) contrast(1.4);
}

details label {
    font-size: small;
}

/* 10 per row */
.badge img {
    width: 70px;
    height: 70px;
}

/* 8 per row */
img.small {
    width: 90px;
    height: 90px;
}

tr img.small {
    margin-right: 8px; /* Space between icon and text */
}

/* 6 per row */
img.large {
    width: 121px;
    height: 121px;
}

/* 5 per row */
img.larger {
    width: 147px;
    height: 147px;
}

/* 4 per row */
img.largest {
    width: 185px;
    height: 185px;
}

summary>h2, summary>h3, details>h4 {
    margin: 8px 0;
}

summary>h2, summary>h3, .ranking, .badge, .character {
    display: inline-block;
} 

.center {
    display: flex;             /* Use flexbox for layout */
    align-items: center;       /* Center items vertically */
}

table, th, td, .graph {
    text-align: center;
    border: 1px solid gray;
    border-collapse: collapse;
    padding: 5px;
    margin: auto;
    background-color: rgba(0, 0, 0, 0.4);
    vertical-align: middle; /* Center content vertically */
}

td ul {
    margin: 16px;
    padding-inline-start: 0px;
}

/* Spinner styles */
#loading {
    display: block; /* Block by default */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000; /* Ensure it appears above other content */
}

.spinner {
    border: 8px solid #f3f3f3; /* Light grey */
    border-top: 8px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.video-background {
    position: fixed; /* Fixes the video in place */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Places the video behind other content */
    overflow: hidden;
}

video {
    width: 100%; /* Make the video cover the width */
    height: 100%; /* Make the video cover the height */
    object-fit: cover; /* Ensures the video covers the entire area */
}

h1, h2, b {
    color: #ffcc00; /* Gold color for headings */
}

li {
    display: flex; /* Use Flexbox */
    align-items: center; /* Center vertically */
    margin: 10px 0; /* Add some margin for spacing */
}

.container {
    will-change: opacity; 
    max-width: 760px;
    margin: 64px auto 42px;
    background-color: rgba(30, 30, 30, 0.9); /* Dark background with transparency */
    padding: 20px;
    border-radius: 10px;
    position: relative; /* Position relative for z-index */
    z-index: 10; /* Higher than the video */
    transition: none; /* Disable transitions on opacity */
    transform: translateZ(0); /* Forces hardware acceleration */
}

.input-box {
    display: flex; /* Use Flexbox for input and button layout */
    align-items: center; /* Center items vertically */
}

.username-input {
    padding: 8px; /* Padding for the input */
    border: 1px solid #ffcc00; /* Gold border */
    border-radius: 5px; /* Rounded corners */
    margin-right: 10px; /* Space between input and button */
    font-size: 14px; /* Font size */
    background-color: #333; /* Dark input background */
    color: #fff; /* Light input text */
    width: 100px;
}

button {
    padding: 8px 10px;
    background-color: #ffcc00; /* Gold button background */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    color: #121212; /* Dark text for button */
}

button:hover {
    background-color: #e6b800; /* Darker gold on hover */
}

.section {
    text-align: left;
    margin-top: 20px;
}

.large-icon {
    width: 48px;
    height: 48px;
    object-fit: cover; /* Maintain aspect ratio and cover the area */
    margin-right: 8px; /* Space between icon and text */
    vertical-align: middle; /* Align image vertically */
}

.small-icon {
    width: 32px;
    height: 32px;
    object-fit: cover; /* Maintain aspect ratio and cover the area */
    margin-right: 5px; /* Space between icon and text */
    vertical-align: middle; /* Align image vertically */
}

.stars {
    height: 20px;
}

.tiny {
    height: 16px;
}

.tiny-icon {
    height: 16px;
    margin-right: 5px; /* Space between icon and text */
    vertical-align: middle; /* Align image vertically */
}

.version {
    margin: 0;
    color:#575757;
}

.footer {
    background-color: #333; /* Dark background for the menu */
    display: flex; /* Use Flexbox for layout */
    justify-content: space-around; /* Space items evenly */
    padding: 5px; /* Padding for links */
    align-items: center; /* Center items vertically */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); /* Subtle shadow for depth */
    position: fixed; /* Makes the navbar sticky */
    bottom: 0; /* Sticks the navbar at the bottom */
    z-index: 20; /* Bring navbar to the front */
    width: 100%;
    color: #fff; /* Keep text white on hover */
    text-decoration: none; /* Remove underline */
    font-size: 12px; /* Font size */
}

.footer a {
    color: #fff; /* Keep text white on hover */
    text-decoration: none; /* Remove underline */
    font-size: 12px; /* Font size */
}

.footer a:hover {
    color: #fff; /* White text color */
}

.navbar {
    background-color: #333; /* Dark background for the menu */
    display: flex; /* Use Flexbox for layout */
    justify-content: space-around; /* Space items evenly */
    padding: 5px; /* Padding for links */
    align-items: center; /* Center items vertically */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); /* Subtle shadow for depth */
    position: fixed; /* Makes the navbar sticky */
    top: 0; /* Sticks the navbar at the top */
    z-index: 20; /* Bring navbar to the front */
    width: 100%;
}

.navbar a {
    color: white; /* White text color */
    text-align: center; /* Center text */
    padding: 8px 12px; /* Padding for top and bottom */
    margin: 0px 5px; /* Padding for top and bottom */
    text-decoration: none; /* Remove underline */
    font-size: 16px; /* Font size */
    transition: background-color 0.3s, color 0.3s; /* Smooth transition */
    border-radius: 5px; /* Rounded corners */
}

.navbar a:hover {
    background-color: #575757; /* Darker background on hover */
    color: #fff; /* Keep text white on hover */
}

.active {
    background-color: #575757; /* Highlight active link */
    color: #fff; /* White text for active link */
    pointer-events: none; /* Disable click events */
    cursor: default; /* Default cursor for disabled state */
}

#animated-text {
    display: inline-block; /* Ensures that the text is treated as a block */
    border-right: 2px solid; /* Cursor effect */
    animation: blink 0.75s step-end infinite; /* Cursor blink animation */
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

#play-pause-btn {
    position: fixed;
    bottom: 42px;
    right: 12px;
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10; /* Bring button to the front */
    transition: background-color 0.3s;
}

#play-pause-btn:hover {
    background-color: rgba(255, 255, 255, 1);
}

.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 100; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0, 0, 0); /* Fallback color */
    background-color: rgba(0, 0, 0, 0.5); /* Black w/ opacity */
    animation: fadeIn 0.5s; /* Fade-in effect */
}

.modal-window {
    z-index: 200; /* Sit on top */
    background-color: rgba(0, 0, 0, 0.7); /* Black w/ opacity */
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    text-decoration: none;
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Todo: preload images, 10 icons = 300 kB */
/* $('#quizz-content img').css('filter', 'blur(0px)'); // Déflouter l'image */
img.easy {
    transition: filter 5s ease;
    filter: blur(20px);
}

img.hard {
    transition: filter 10s ease;
    filter: blur(20px);
}

.global-container {
    width: 624px;
    max-width: 624px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-container {
    width: 200px;
    max-width: 600px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 20px;
    width: 0;
    background-color: #58007a;
    text-align: center;
    line-height: 20px;
    color: white;
    font-size: 10px;
}

#clear-notifications {
    position: absolute;
    top: -45px;
    right: 20px;
}

#notifications {
    top: 10px;
    right: 10px;
    max-width: 760px;
    z-index: 1000;
}

.notification {
    background: rgba(30, 30, 30, 0.5);
    padding: 5px;
    margin: 5px 0;
    border-radius: 5px;
    max-width: 760px;
    animation: fadeIn 0.5s;
    color: #ffffff; /* Light text color for notifications */
    font-size: 14px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.close-btn {
    padding: 1px 4px;
    margin-right: 5px;
    float: right;
    background: none; 
    border: none;
    color: white;
    cursor: pointer;
}

.twitch-link {
    background-color: #9146FF;
    color: white;
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 6px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: background-color 0.3s;
    position: absolute;
    top: -45px;
    right: 200px;
    font-weight: bold;
}

.twitch-link:hover {
    background-color: #7a3dbd; /* Darker purple on hover */
}

.twitch-logo {
    width: 16px;
    height: auto;
    margin-right: 8px;
}

.twitch-profile {
    width: 50px;
    position: absolute;
    right: 18px;
    top: 18px;
    border-radius: 10px;
    border: black solid;
}

#status_data {
    display: flex;
    flex-wrap: wrap;
}

.status {
    font-size: 14px;
    font-family: monospace;
    text-align: left;
}

.status.wide {
    flex: 1 1 calc(65%); /* Wider column */
}

.status.right {
    flex: 1 1 calc(35%); /* Narrower column */
    text-align: end;
    right: 65px;
    position: relative;
}

#status_data .active {
    color: green;
    background-color: unset;
}

#status_data .inactive {
    color: red;
}

.statusLink {
    display: inline-block;
    color: gray;
    text-decoration: none;
    cursor: pointer;
}

.statusLink:hover {
    background-color: #0056b3; /* Background color on hover */
    color: white; /* Change text color on hover */
}

h1#admin-page-title {
    margin-top: -50px;
    /* padding-top: 0px; */
    top: 0px;
    position: fixed;
    color: lavender;
}

/* Discrete and slower glow/saturation loop for .glitter class */
.glitter {
  position: relative;
  overflow: hidden;
  animation: glitter-glow 2.5s infinite linear;
}
@keyframes glitter-glow {
  0% { filter: brightness(1.05) saturate(1.1) drop-shadow(0 0 4px #ffe066); }
  25% { filter: brightness(1.10) saturate(1.2) drop-shadow(0 0 8px #fff7b2); }
  50% { filter: brightness(1.15) saturate(1.3) drop-shadow(0 0 12px #ffe066); }
  75% { filter: brightness(1.10) saturate(1.2) drop-shadow(0 0 8px #fff7b2); }
  100% { filter: brightness(1.05) saturate(1.1) drop-shadow(0 0 4px #ffe066); }
}

/* Leaderboard and user page box link styles */
.ranking a, a.box-link {
  color: #fff;
  text-decoration: underline dashed #fff;
  text-underline-offset: 2px;
}
.ranking a:visited, a.box-link:visited {
  color: #fff;
}
.ranking a:hover, a.box-link:hover {
  color: #ffe066;
  text-decoration: underline dashed #ffe066;
}