@font-face {  
	font-family: LT Energy; src: url("https://wallrunners.uk/wp-content/uploads/2025/04/LTEnergy-NarrowBoldSemi-Italic.otf");  
	font-style: italic;  
	font-weight: Regular 400;  
}

body {
  background-color: #000f29;
  height: auto;
}

.main-hiscores {
	font-family: LT Energy;
	/*margin: auto;*/
	width: 100%;
	/*height: 100%;*/
	/*border: 3px solid #FFFFFF;*/
	padding: 0px;
}

#main-title {
	text-align: center;
	color: #e5e8c4;
}

/* Style for leaderboard table */
table {
    width: 100%;
    margin: auto;
    border-collapse: collapse;
    background: #222;
    color: #fff;
    font-family: Arial !important;
    text-align: center;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

th, td {
    padding: 12px;
    border-bottom: 1px solid #444;
}

th {
	font-family: LT Energy;
    background: #0c1d3a;
    font-size: 18px;
    text-transform: uppercase;
}

/* Main Tabs (Servers) */
.tabs {
    text-align: center;
    margin-bottom: 10px;
}

.server-button, .leaderboard-button, .other-button, .back-button  {
	font-family: LT Energy;
    background: #333;
    color: #f9fbd2;
    padding: 10px 20px;
    margin: 5px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    transition: background 0.3s;
}

.server-button.active, .server-button:hover,
.other-button.active, .other-button:hover,
.back-button.active, .back-button:hover,
.leaderboard-button.active, .leaderboard-button:hover {
    background: #57cdc9;
}

/* Tooltip styles */
.server-button[data-tooltip], .leaderboard-button[data-tooltip], .other-button[data-tooltip], .back-button[data-tooltip] {
    position: relative; /* Allow positioning of the tooltip */
}

.server-button[data-tooltip]:hover::after, .leaderboard-button[data-tooltip]:hover::after, .other-button[data-tooltip]:hover::after, .back-button[data-tooltip]:hover::after {
    content: attr(data-tooltip); /* The text for the tooltip */
    position: absolute;
    bottom: 100%; /* Position above the button */
    left: 50%;
    transform: translateX(-50%);
    padding: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 5px;
    font-size: 12px;
    white-space: pre-wrap;
    z-index: 10; /* Ensure it's on top */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.server-button[data-tooltip]:hover::after, .leaderboard-button[data-tooltip]:hover::after, .other-button[data-tooltip]:hover::after, .back-button[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s; /* Tooltip appears immediately */
}

/* Style for section titles above tabs */
.tabs-section {
    margin-bottom: 20px;
}

.tabs-section h3 {
    color: #f9fbd2;
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
}

/* Sub Tabs (Leaderboards) */
#leaderboard-tabs {
    margin-bottom: 20px;
}

/* Wrapper: Perfectly centers the leaderboard and aligns the legend */
.leaderboard-wrapper {
    display: grid;
    grid-template-columns: 1fr minmax(500px, 800px) 1fr; /* Ensures proper centering */
    align-items: flex-start;
    justify-items: center;
}

/* Centering the leaderboard properly */
#leaderboard-container {
    width: 100%; /* Allows it to take the space naturally */
    max-width: 800px; /* Prevents it from getting too wide */
    text-align: center;
    grid-column: 2; /* Ensures it's always centered */
}

#leaderboard-container tr:nth-child(even) {
    background: #333;
}

#leaderboard-container tr:hover {
    background: #555;
}

#leaderboard-container td:first-child {
    font-weight: bold;
    color: #f9fbd2;
}

#leaderboard-container td:nth-of-type(2) {
    font-weight: bold;
    color: #f9fbd2;
}

/* Styling for the legend table wrapper */
#legend-table-wrapper {
    width: 250px; /* Set the width */
    background-color: #0c1d3a; /* Background color */
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Box shadow */
    text-align: left; /* Align text to the left */
    font-family: LT Energy;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align content to the top */
    grid-column: 3; /* Ensures it's placed to the right */
    padding: 0px; /* Padding inside the wrapper */
    box-sizing: border-box; /* Ensures padding is inside the width */
    overflow: visible;
	margin: 0 auto; /* Centers it */
}

/* Style for the legend table */
#legend-table {
    width: 100%; /* Ensures the table fills its parent container */
    border-collapse: collapse;
    background: #222;
    color: #fff;
    font-family: Arial !important;
    text-align: center;
    border-radius: 10px;
    overflow: hidden;
}

/* Style for the search container */
#search-container {
    display: flex;
	max-width: 350px;
	justify-content: center;  /* Horizontally center content */
	grid-column: 2; /* Ensures it's always centered */
	margin: auto;
	margin-bottom:7px;
}

/* Style for the search input */
#searchInput {
    padding: 8px 12px;
    font-size: 16px;
    border: 2px solid #444;
    border-radius: 5px;
    background-color: #222;
    color: #fff;
    transition: all 0.3s ease-in-out;
}

/* Style for the dropdown */
#limitDropdown {
    padding: 8px 12px;
    font-size: 16px;
    border: 2px solid #444;
    border-radius: 5px;
    background-color: #222;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

/* Hover effect */
#limitDropdown:hover, #searchInput:hover {
    border-color: #ff8800;
	background-color: #222;
}

/* When input is focused */
#searchInput:focus, #limitDropdown:focus {
    outline: none;
    border-color: #ff8800;
}

/* Style for the dropdown arrow */
#limitDropdown::-ms-expand {
    display: none;
}

#limitDropdown {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23ffffff" viewBox="0 0 20 10" xmlns="http://www.w3.org/2000/svg"><path d="M0,0 L10,10 L20,0" /></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 30px; /* Space for arrow */
}

/* Style for the legend table header and rows */
#legend-table th, #legend-table td {
    padding: 5px 0px;
    border-bottom: 1px solid #444;
}

#legend-table td:first-child {
    font-weight: bold;
    color: #f9fbd2;
}

#legend-table th {
    background: #0c1d3a;
    font-size: 12px;
    text-transform: uppercase;
}

/* Styling for the legend header */
#legend-table-wrapper h4 {
    color: #f9fbd2;
    text-align: center;
    margin-bottom: 10px;
}

@media (max-width: 900px) {
    .leaderboard-wrapper {
        grid-template-columns: 1fr; /* Single column layout */
        justify-items: center;
    }

    #server-table-wrapper {
        width: 90wv; /* Make it full width */
        grid-column: 1;
    }

    #leaderboard-container {
        width: 90wv;
        grid-column: 1;
    }

    #legend-table-wrapper {
        width: 90wv; /* Make it full width */
        grid-column: 1;
        text-align: center; /* Center align it */
    }
	
	th, td {
		padding: 5px 5px;
	}
}

/* Score and title styling */
.legend-score {
    color: #ff5722;
}

#back-button-container #server-table {
	background-color: #0c1d3a; /* Background color */
}

#back-button-container{
    width: 250px; /* Set the width */
    background-color: #0c1d3a; /* Background color */
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Box shadow */
    text-align: left; /* Align text to the left */
    font-family: LT Energy; /* Font style */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align content to the top */
    grid-column: 1; /* Ensures it's placed to the right */
    padding: 0px; /* Padding inside the wrapper */
    box-sizing: border-box; /* Ensures padding is inside the width */
    overflow: hidden; /* Prevents any content from overflowing */
	margin: 0 auto; /* Centers it */
}

#server-table-wrapper {
    width: 250px; /* Set the width */
    background-color: #0c1d3a; /* Background color */
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Box shadow */
    text-align: left; /* Align text to the left */
    font-family: LT Energy; /* Font style */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align content to the top */
    grid-column: 1; /* Ensures it's placed to the right */
    padding: 0px; /* Padding inside the wrapper */
    box-sizing: border-box; /* Ensures padding is inside the width */
    overflow: hidden; /* Prevents any content from overflowing */
	margin: 0 auto; /* Centers it */
}

/* Styling for the server header */
#server-table-wrapper h4 {
    color: #f9fbd2;
    text-align: center;
    margin-bottom: 10px;
}

/* Style for the server table */
#server-table {
    width: 100%; /* Ensures the table fills its parent container */
    border-collapse: collapse;
    background: #222;
    color: #fff;
    font-family: Arial !important;
    text-align: center;
    border-radius: 10px;
    overflow: hidden;
}

/* Background colors for top 3 ranks */
table .gold-background {
    background-color: gold !important;
}

table .silver-background {
    background-color: silver !important;
}

table .bronze-background {
    background-color: #cd7f32 !important; /* Bronze color */
}

.rank-container {
    text-align: center; /* Align the content in the center */
    display: inline-block; /* Allow both rank and medal to be stacked */
}

.medal-icon {
    display: block; /* Display the medal on its own line */
    margin-top: 5px; /* Add space between the rank number and the medal */
    width: 24px; /* Adjust the size of the medal icon */
    height: 24px; /* Adjust the size of the medal icon */
	box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

.driver-icon {
    display: block; /* Display the medal on its own line */
    margin-top: 5px; /* Add space between the rank number and the medal */
    width: 24px; /* Adjust the size of the medal icon */
    height: 24px; /* Adjust the size of the medal icon */
	box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

#total-drivers-container h4 {
    color: #f9fbd2;
    font-size: 15px;
    margin-bottom: 10px;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
}

.main-hiscores {
    opacity: 0;
    animation: fadeIn 0.8s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.server-button:hover, .leaderboard-button:hover, .other-button:hover, .back-button:hover {
    transform: translateY(-3px);
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease-in-out;
}

#compare-container {
    background: #0c1d3a;
    padding: 0px;
    border-radius: 8px;
	grid-column: 2; /* Ensure it's in the middle column */
    text-align: center;
}

#compare-container h2, p {
    color: #f9fbd2;
	margin-block-start: 0em;
    margin-block-end: 0em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
}

.compare-inputs {
    display: flex;
    flex-direction: column;
    align-items: center; /* Ensures everything stays centered */
    gap: 10px;
    width: 270px; /* Keeps it from resizing */
    margin: 0 auto; /* Centers within its parent */
    position: relative; /* Prevents shifting */
}

.compare-inputs input {
    padding: 8px 12px;
    width: 100%; /* Match the container width */
    max-width: 250px; /* Prevent excessive growth */
    font-size: 16px;
    border: 2px solid #444;
    border-radius: 5px;
    color: #fff;
    transition: all 0.3s ease-in-out;
    text-align: center;
	background-color: #222;
}

/* Style for the button */
.compare-inputs button {
	width: 100%; /* Match the container width */
    max-width: 250px; /* Prevent excessive growth */
    padding: 10px;
    background: #333; /* Match the leaderboard button */
    color: #f9fbd2;
    border: none;
    cursor: pointer;
    font-size: 16px;
	font-family: LT Energy;
    border-radius: 5px;
    transition: background 0.3s ease-in-out, transform 0.2s;
}

.compare-inputs button:hover {
    background: #57cdc9; /* Match hover effect */
    transform: translateY(-3px);
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}

/* Hover and Focus Effects */
.compare-inputs input:hover,
.compare-inputs input:focus {
    border-color: #ff8800;
    outline: none;
	background-color: #222;
}

#speedcams-container h2, p {
    color: #f9fbd2;
	margin-block-start: 0em;
    margin-block-end: 0em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
	text-align: center;
}