/* Panel positioning and size adjustments */
.panel {
    position: fixed;
    top: 345px;
    left: 50%;
	bottom: 80px;
    transform: translateX(-50%);
    width: 80%;
    max-width: 800px;
    overflow-y: auto;
    padding: 20px;
    background: rgba(0, 48, 73, 0.8);
    color: rgba(253, 240, 213, 1);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease, display 0s 0.3s;
    scrollbar-color: rgba(102, 155, 188, 0.8) rgba(102, 155, 188, 0.3);
	font-size: 18px;
	text-color: rgba(253, 240, 213, 1);
}

.panel.active {
    display: block;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Custom scrollbar for WebKit browsers (Chrome, Safari) */
.panel::-webkit-scrollbar {
    width: 12px;
}

.panel::-webkit-scrollbar-track {
    background: rgba(102, 155, 188, 0.3);
    border-radius: 10px;
}

.panel::-webkit-scrollbar-thumb {
    background: rgba(102, 155, 188, 0.8);
    border-radius: 10px;
    border: 2px solid rgba(83, 121, 183, 0.3);
}

.panel::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 155, 188, 0.8);
}

/* Panel close button styling - hidden */
.panel a.close {
    display: none;
}

/* Search Controls */
.search-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
	font-weight: bold;
	text-shadow: 
        1px 1px 0 rgba(0, 0, 0, 0.7),
        -1px -1px 0 rgba(0, 0, 0, 0.7),
        1px -1px 0 rgba(0, 0, 0, 0.7),
        -1px 1px 0 rgba(0, 0, 0, 0.7);
}

/* Search Input */
.search-input {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
}

/* Search Button */
.search-button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background: rgba(102, 155, 188, 1.0);
    color: rgba(253, 240, 213, 1);
    border: 2px solid rgba(253, 240, 213, 1);
    border-radius: 5px;
    transition: background 0.3s ease, border 0.3s ease;
	text-shadow: 
        1px 1px 0 rgba(0, 0, 0, 0.7),
        -1px -1px 0 rgba(0, 0, 0, 0.7),
        1px -1px 0 rgba(0, 0, 0, 0.7),
        -1px 1px 0 rgba(0, 0, 0, 0.7);
}

.search-button:hover {
    background: rgba(193, 18, 31, 1.0);
}

/* Odium Combobox */
.odium-combobox {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
	font-weight: bold;
}

/* Highscore Buttons Container */
.highscore-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
	font-weight: bold;
}

/* Highscore Buttons Styling */
.highscore-button {
    width: 120px;
    height: 40px;
    cursor: pointer;
    background: rgba(102, 155, 188, 1.0);
    color: rgba(253, 240, 213, 1);
    border: 2px solid rgba(253, 240, 213, 1);
    border-radius: 5px;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: bold;
    transition: background 0.3s ease, color 0.3s ease, border 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-decoration: none;
	text-shadow: 
        1px 1px 0 rgba(0, 0, 0, 0.7),
        -1px -1px 0 rgba(0, 0, 0, 0.7),
        1px -1px 0 rgba(0, 0, 0, 0.7),
        -1px 1px 0 rgba(0, 0, 0, 0.7);
}

.highscore-button:hover {
    background: rgba(193, 18, 31, 1.0);
}

.highscore-button:focus {
    outline: none;
}

/* Highscore Table */
.highscore-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
	font-weight: bold;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.highscore-table th,
.highscore-table td {
	background: rgba(77, 170, 208, 0.6);
    border: 1px solid rgba(253, 240, 213, 0.3);
    padding: 12px;
    text-align: center;
}

.highscore-table th {
    background: rgba(0, 48, 73, 1.0);
    color: rgba(253, 240, 213, 1);
    font-size: 16px;
    letter-spacing: 0.5px;
}

.highscore-table thead tr:first-child th:first-child {
    border-top-left-radius: 10px;
}

.highscore-table thead tr:first-child th:last-child {
    border-top-right-radius: 10px;
}

.highscore-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
}

.highscore-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}

.highscore-table tbody tr:nth-child(even) {
    background: rgba(0, 48, 73, 0.9);
}

/* Rank medal colors */
.rank-gold {
    color: #FFD700 !important;
    font-weight: bold;
    text-shadow:
        1px 1px 2px rgba(0, 0, 0, 0.9),
        0 0 5px rgba(255, 215, 0, 0.5);
}

.rank-silver {
    color: #C0C0C0 !important;
    font-weight: bold;
    text-shadow:
        1px 1px 2px rgba(0, 0, 0, 0.9),
        0 0 5px rgba(192, 192, 192, 0.5);
}

.rank-bronze {
    color: #CD7F32 !important;
    font-weight: bold;
    text-shadow:
        1px 1px 2px rgba(0, 0, 0, 0.9),
        0 0 5px rgba(205, 127, 50, 0.5);
}

/* Classes Panel Styling */
.classes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 60px;
}

.class-item {
    background: rgba(77, 170, 208, 0.6);
    border: 2px solid rgba(253, 240, 213, 0.5);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.class-item:hover {
    background: rgba(102, 155, 188, 0.8);
    border-color: rgba(253, 240, 213, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.class-name {
    color: rgba(253, 240, 213, 1);
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    text-shadow:
        1px 1px 2px rgba(0, 0, 0, 0.8),
        -1px -1px 2px rgba(0, 0, 0, 0.8);
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    /* Panel adjustments - absolute positioning for scrolling */
    .panel {
        position: absolute;
        top: 260px;
        bottom: auto;
        min-height: 300px;
        width: 90%;
        padding: 15px;
        font-size: 16px;
    }

    /* Highscore buttons */
    .highscore-buttons {
        flex-wrap: wrap;
        gap: 8px;
    }

    .highscore-button {
        width: 100px;
        height: 35px;
        font-size: 13px;
    }

    /* Search controls */
    .search-controls {
        flex-direction: column;
        gap: 8px;
    }

    .odium-combobox,
    .search-input {
        width: 100%;
        font-size: 14px;
    }

    /* Table adjustments */
    .highscore-table {
        font-size: 12px;
    }

    .highscore-table th,
    .highscore-table td {
        padding: 8px;
        font-size: 12px;
    }

    /* Classes grid */
    .classes-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
        margin-top: 40px;
    }

    .class-item {
        padding: 12px;
    }

    .class-name {
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    /* Panel adjustments for very small screens - absolute positioning for scrolling */
    .panel {
        position: absolute;
        top: 250px;
        bottom: auto;
        min-height: 300px;
        width: 95%;
        padding: 10px;
        font-size: 14px;
    }

    .panel h2 {
        font-size: 18px;
    }

    /* Buttons */
    .highscore-button {
        width: 85px;
        height: 32px;
        font-size: 11px;
    }

    /* Table */
    .highscore-table {
        font-size: 10px;
    }

    .highscore-table th,
    .highscore-table td {
        padding: 5px;
        font-size: 10px;
    }

    /* Classes */
    .classes-list {
        grid-template-columns: 1fr;
        margin-top: 30px;
    }

    .class-name {
        font-size: 14px;
    }
}