/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fdf6e3; /* Warm beige background */
    color: #333; /* Dark text for readability */
}

a {
    color: #b35900; /* Warm orange for links */
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

a:hover {
    color: #804000; /* Darker orange on hover */
}

h1, h2, h3 {
    font-family: 'Arial', sans-serif;
    color: #333; /* Dark text for better contrast */
    text-align: center;
}

h1 {
    font-size: 2.5em;
    font-weight: bold;
}

h2 {
    font-size: 2em;
    margin-bottom: 10px;
}

h3 {
    font-size: 1.5em;
    margin-bottom: 5px;
}

/* Global Statistics Section */
.global-stats-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff8e1; /* Light warm yellow */
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.stats-grid div {
    background-color: #fff3d1; /* Slightly darker warm yellow */
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    color: #333;
}

/* Hall of Fame Section */
.hall-of-fame-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff8e1; /* Light warm yellow */
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

.hall-of-fame-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Compact Table Styles */
.compact-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background-color: #ffffff; /* White background for better contrast */
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

.compact-table th, .compact-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.compact-table th {
    background-color: #b35900; /* Warm orange for headers */
    color: white;
    font-weight: bold;
}

.compact-table tr:nth-child(even) {
    background-color: #fff3d1; /* Light warm yellow for alternating rows */
}

.compact-table tr:hover {
    background-color: #ffe6cc; /* Light orange hover effect */
}

/* Pagination */
.pagination {
    text-align: center;
    margin-top: 10px;
}

.pagination a {
    color: #b35900;
    text-decoration: none;
    margin: 0 5px;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    transition: background-color 0.3s ease-in-out;
}

.pagination a:hover {
    background-color: #b35900;
    color: white;
}

.pagination span {
    font-weight: bold;
    color: #333;
}

/* Normal Overview Section */
.overview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.allies-section, .players-section {
    flex: 1 1 48%; /* Split into two equal columns */
    background-color: #fff8e1; /* Light warm yellow */
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

.allies-section h2, .players-section h2 {
    font-size: 1.8em;
    margin-bottom: 10px;
    color: #b35900; /* Warm orange for section titles */
}

/* List Styles (New Section) */
ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Added gap for better spacing */
}

ul li {
    background: #fff8e1; /* Light warm yellow */
    margin: 5px;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    width: calc(12.5% - 20px); /* Adjusted width for better alignment */
    text-align: center;
    font-weight: bold;
    color: #333; /* Dark text for readability */
}

ul li:hover {
    background-color: #ffe6cc; /* Light orange hover effect */
}

ul li a {
    text-decoration: none;
    color: #b35900; /* Warm orange for links */
    font-weight: bold;
    transition: color 0.3s ease-in-out;
}

ul li a:hover {
    color: #804000; /* Darker orange on hover */
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .overview-container {
        flex-direction: column;
    }

    .allies-section, .players-section {
        flex: 1 1 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .hall-of-fame-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    ul li {
        width: calc(33.33% - 20px); /* Adjusted for smaller screens */
    }
}

/* Commented Out Unnecessary Styles */
/*
.compact-table tr:nth-child(odd) {
    background-color: #f9f9f9; 
}
*/

.compact-table td, .compact-table th {
    word-wrap: break-word; /* Break long words */
    overflow-wrap: break-word; /* Ensure compatibility */
    white-space: normal; /* Allow text to wrap */
}

.compact-table td {
    max-width: 200px; /* Adjust as needed */
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.compact-table td {
    max-width: 200px; /* Adjust as needed */
    white-space: nowrap; /* Prevent wrapping */
    overflow: hidden; /* Hide overflow */
    text-overflow: ellipsis; /* Add ellipsis for overflow */
}

.compact-table {
    table-layout: fixed; /* Enforce fixed layout */
    width: 100%; /* Ensure the table takes up the full width */
}

/* Compact Table Column Widths for Server Overview */
.server-overview-table th:nth-child(1), /* Rank column */
.server-overview-table td:nth-child(1) {
    width: 5%; /* Minimal width for the Rank column */
    text-align: center; /* Center-align the Rank column */
}

.server-overview-table th:nth-child(2), /* Name column */
.server-overview-table td:nth-child(2) {
    width: 35%; /* Allocate more space for the Name column */
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.server-overview-table th:nth-child(3), /* Ally Name column */
.server-overview-table td:nth-child(3) {
    width: 35%; /* Allocate more space for the Ally Name column */
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.server-overview-table th:nth-child(4), /* Kills or Points column */
.server-overview-table td:nth-child(4) {
    width: 25%; /* Allocate remaining space for the last column */
    text-align: right; /* Right-align numeric values */
}


.chart {
    width: 100%;
    max-width: 400px;
    height: 300px;
    margin: 20px auto;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Dark grey background */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.fullscreen-modal.show {
    display: flex; /* Make the modal visible */
}

.fullscreen-modal canvas {
    max-width: 90%;
    max-height: 90%;
    background-color: white; /* Ensure the canvas has a visible background */
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff5722;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 5px;
}


/* Container for Hall of Fame and Shame */
.hall-of-fame-shame-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

/* Hall of Fame and Hall of Shame sections */
.hall-of-fame,
.hall-of-shame {
    flex: 1;
    min-width: 300px; /* Ensure it works on smaller screens */
}

/* Headings for Hall of Fame and Shame */
.hall-of-fame h3,
.hall-of-shame h3 {
    text-align: center;
    margin-bottom: 10px;
}

/* Compact table styling 
.compact-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.compact-table th,
.compact-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.compact-table th {
    background-color: #f4f4f4;
    font-weight: bold;
}
*/
/* Responsive adjustments */
@media (max-width: 768px) {
    .hall-of-fame-shame-container {
        flex-direction: column;
    }
}


.copy-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.copy-container input {
    flex: 1;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.copy-container button {
    padding: 8px 12px;
    font-size: 14px;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.copy-container button:hover {
    background-color: #0056b3;
}

/* Centered text styling */
.centered-text {
    text-align: center;
    font-size: 16px;
    margin-bottom: 20px;
    color: #333;
}

/* Form container styling */
.form-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

/* Styled select dropdown */
.styled-select {
    width: 300px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    color: #333;
}

/* Styled input field */
.styled-input {
    width: 300px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Styled button */
.styled-button {
    padding: 10px 20px;
    font-size: 16px;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.styled-button:hover {
    background-color: #0056b3;
}

select {
    width: 300px;
    padding:10px;
    font-size: 16px;
    border:1px solid #ccc;
    border-radius:5px;
    background-color: #f9f9f9;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    max-width: 300px;
}

