body {
    margin: 0;
    padding: 0;
    background-color: #333;
    color: #fff;
    width: 100%;
    overflow-x: hidden;
}

.container {
    width: 80%;
    max-width: 80%;
    padding: 0;
    margin: 20px auto 0;
    border-radius: 10px;
}

.navbar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 50px;
    margin: 0;
    box-sizing: border-box;
}

.header-image {
    width: 60px;
    height: auto;
}

.heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.heading h1 {
    margin: 0;
    padding: 0;
}

.heading span {
    font-size: 14px;
    color: #ccc;
    font-style: italic;
}

.spect {
    display: flex;
    align-items: center;
    gap: 4px;
    box-sizing: border-box;
    border: 2px dotted #666;
    height: auto;
    padding: 5px 15px;
}

.spect-avi {
    width: 50px;
    height: auto;
    object-fit: cover;
}

.spect-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 5px 15px;
}

.spect-name {
    font-size: 22px;
    font-weight: bold;
    margin: 0;
}

.spect-rank {
    font-size: 10px;
    color: #999;
    text-align: right;
}

.search-container {
    position: relative;
    width: fit-content;
    /* Make the container only as wide as its content (up to max-width) */
    max-width: 600px;
}

.search-input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: #ffffff;
    font-size: 12px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-input:focus {
    border-color: #c9201b;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.search-input:focus+.search-icon {
    color: #ac2520;
}

/* Responsive design */
@media (max-width: 640px) {
    .search-input {
        padding: 14px 16px 14px 45px;
        font-size: 16px;
    }

    .search-icon {
        left: 15px;
        width: 16px;
        height: 16px;
    }
}

.top-header th:first-child {
    width: 10%;
    /* Small percentage for position */
}

.top-header th:nth-child(2) {
    width: 40%;
    /* Largest for player name */
}

.top-header th:nth-child(3),
.top-header th:nth-child(4),
.top-header th:nth-child(5) {
    width: 16.66%;
    /* Equal smaller percentages for stats */
}

#stats-table {
    width: 100%;
    table-layout: fixed;
}

th,
td {
    padding: 8px 6px;
    text-align: left;
    word-wrap: break-word;
}

th tr {
    padding: 10px;
}

tr:nth-child(even) {
    background-color: #5a544a86;
}

.pagination {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background-color: rgb(58, 56, 56);
    cursor: pointer;
    border-radius: 4px;
    color: #f1f1f1
}

.pagination button:hover:not(:disabled) {
    background-color: #4e4c4c;
}

.pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.page-info {
    margin: 0 15px;
    font-weight: bold;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

#top-1 {
    color: gold;
    font-weight: bold;
}

#top-2 {
    color: silver;
    font-weight: bold;
}

#top-3 {
    color: rgb(175, 81, 4);
    font-weight: bold;
}

#ranks {
    width: 20px;
    /* Adjust based on your image size */
    height: 20px;
    /* Keep proportional to width */
    vertical-align: middle;
    /* Aligns image with text baseline */
    display: inline-block;
    /* Allows proper spacing and alignment */
    margin-right: 8px;
    /* Space between image and text */
    object-fit: contain;
    /* Ensures image fits without distortion */
}

#top-1 #ranks {
    width: 24px;
    height: 24px;
}

#top-2 #ranks {
    width: 22px;
    height: 22px;
}

#top-3 #ranks {
    width: 20px;
    height: 20px;
}