body {
    font-family: 'Arial', sans-serif;
    background-color: #1a1a1a;
    color: #f0f0f0;
    margin: 0;
    padding: 0;
}

.leaderboard-header {
    text-align: center;
    font-size: 2.5em;
    font-weight: bold;
    color: #ffc700;
    margin-top: 20px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.leaderboard-subtitle {
    font-size: 1.2em;
    color: #b0b0b0;
    text-align: center;
    margin-bottom: 20px;
}

.event-data {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px 20px 20px;
    background-color: #222;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    text-align: center;
    border: 2px solid #ffc700;
}

.search-box {
    text-align: center;
    margin-bottom: 20px;
}

#search-input {
    width: 330px;
    padding: 10px;
    font-size: 16px;
    background-color: #333;
    color: #f0f0f0;
    border: 1px solid #ffc700;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

#search-input:focus {
    outline: none;
    box-shadow: 0 4px 12px rgba(255, 199, 0, 0.6);
    border-color: #ffdd00;
}

.event-data h2 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.5em;
    text-align: center;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.event-data p {
    color: #ccc;
    font-size: 1.1em;
    margin: 5px 0;
}

.leaderboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}
.subtitle {
    text-align: center;
    color: #ccc;
    font-size: 1.2rem;
    margin-bottom: 30px;
}
.player-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #2b2b2b;
    
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
    border-left: 8px solid #ffc700;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 5px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.player-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.7);
}
.avatar-name-container {
    display: flex;
    align-items: center;
    flex: 1;
}

.player-avatar-container {
    flex: 0 0 80px; 
    display: flex;
    justify-content: center;
    margin-right: 15px; 
}

.player-avatar {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.player-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #ffc700;
    text-transform: uppercase;
    margin-right: 15px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.player-info {
    flex: 2;
    font-size: 1em;
    color: #ccc;
    text-align: left;
    padding-left: 20px;
    margin-right: 10px;
    min-width: 280px;
    max-width: 530px;
    line-height: 1.6;
}
.player-info .player-details strong {
    color: #ffc700;
    font-weight: bold;
}
.player-info .player-details b {
    color: #fff!important;
    font-weight: bold;
}

.player-score {
    flex: 0 120px 120px;
    text-align: right;
    font-size: 1.3em;
    font-weight: bold;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.sparkline, .sparkline-placeholder {
    margin-bottom: 5px;
    width: 150px;
    height: 40px;
}




.vip-badge {
    display: inline-block;
    margin-left: 10px;
    padding: 5px 10px;
    background-color: #ffc700;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: bold;
    color: #2b2b2b;
    text-transform: uppercase;
}

.multiplier-badge {
    display: inline-block;
    padding: 5px 10px;
    background-color: #ff5722;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
}

.leaderboard-footer {
    text-align: center;
    margin-top: 50px;
    font-size: 0.9em;
    color: #777;
}

ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

ul li {
    font-size: 1em;
    color: #f0f0f0;
    background-color: #2b2b2b;
    padding: 10px;
    margin: 10px 0;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

a {
    text-align: center;
    margin-top: 30px;
    font-size: 1em;
    color: #ffc700!important;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #ffdd00!important;
}

.pagination {
    text-align: center;
    margin-top: 20px;
    font-size: 0.6em;
}

.pagination a {
    display: inline-block;
    margin: 0 8px;
    padding: 10px 10px;
    background-color: #333;
    color: #ffc700;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 900!important;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.pagination a:hover {
    background-color: #ffc700;
    color: #333!important;
}
.pagination a.active {
    background-color: #ffc700;
    color: #333!important;
    font-weight: 900!important;
}

.info-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background-color: #222;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border: 2px solid #ffc700;
    color: #f0f0f0;
}

.info-section h2 {
    font-size: 2em;
    color: #ffc700;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.info-section p {
    font-size: 1em;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: justify;
}

.info-section a {
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.info-section a:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.4);
}

.events-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-evenly; 
}
.event-link {
    flex: 1 1 calc(50% - 20px);
    max-width: calc(50% - 20px);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-details {
    background-color: #3b3b3b;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    text-align: center;

    transition: transform 0.2s ease, box-shadow 0.2s ease;

}

.event-details:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.4);
}

.event-details h2 {
    color: #ffc700;
    margin-bottom: 10px;
}

.event-details p {
    color: #f0f0f0;
    margin: 10px 0;
    font-size: 1rem;
}

.event-details a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    text-decoration: none;
    color: inherit; 
}
.event-details p strong {
    color: #ffc700;
    font-weight: bold;
}

.search-filter-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; 
    gap: 20px; 
}
.search-filter-container select,
.search-filter-container input {
    height: 40px;
    padding: 10px;
    font-size: 1em;
    box-sizing: border-box;
    border-radius: 5px;
    border: 1px solid #ffc700;
    background-color: #333;
    color: #f0f0f0;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.search-filter-container select:hover,
.search-filter-container input:hover {
    box-shadow: 0 0 8px rgba(255, 199, 0, 0.7);
    border-color: #ffdd00;
}


#sort-select, #day-select, #event-select {
    padding: 8px;
    font-size: 16px;
    background-color: #333;
    color: #f0f0f0;
    border: 1px solid #ffc700;
    border-radius: 5px;
}

.multiplier-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
    margin-top: 20px;
}

.multiplier-box {
    flex: 1 1 calc(50% - 20px);
    max-width: calc(50% - 20px);
    background-color: #3b3b3b;
    padding: 1px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    text-align: center;
    color: #f0f0f0;
    border: 2px solid #ffc700;
}

.multiplier-box h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #ffc700;
}

.multiplier-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.multiplier-box ul li {
    margin: 5px 0;
    font-size: 1rem;
    padding: 5px;
    background-color: #2b2b2b;
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}
.multiplier-box ul li:hover {
    background-color: #3b3b3b;
    transform: scale(1.02);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.feedback-section {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #222;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border: 2px solid #ffc700;
    color: #f0f0f0;
    text-align: center;
}

.feedback-section h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #ffc700;
}

.feedback-section label {
    display: block;
    margin-bottom: 8px;
    font-size: 1em;
    color: #ccc;
}

.feedback-section input,
.feedback-section textarea {
    width: 90%;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 1em;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: #2b2b2b;
    color: #f0f0f0;
}

.feedback-section textarea {
    height: 100px;
    resize: none;
}

.feedback-section button {
    background-color: #ffc700;
    color: #222;
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.feedback-section button:hover {
    background-color: #ffdd00;
}

#feedback-response {
    font-size: 1em;
    color: #ffc700;
}

.guild-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background-color: #222;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border: 2px solid #ffc700;
    color: #f0f0f0;
}

.guild-section h2 {
    text-align: center;
    color: #ffc700;
    font-size: 2rem;
    margin-bottom: 20px;
}

.guild-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    padding: 20px;
}

.guild-box {
    position: relative;
    color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    overflow: hidden;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-image: var(--background-image); 
}

.guild-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); 
    z-index: 0; 
    pointer-events: none;
    transition: background-color 0.2s ease;
}

.guild-content {
    position: relative;
    z-index: 1; 
}

.guild-box h3,
.guild-box p {
    margin: 5px 0;
}

.guild-box:hover {
    transform: scale(1.03); 
    transition: transform 0.2s ease;
}
.guild-box:hover::before {
    background-color: rgba(0, 0, 0, 0.2); 
}

.guild-header {
    display: flex;
    align-items: center; 
    justify-content: center;
    margin: 20px auto; 
    padding: 20px;
    background-color: #222;
    max-width: 600px; 
    text-align: left;
}

.guild-logo-container {
    flex: 0 0 auto; 
    margin-right: 20px; 
}

.guild-logo {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    border: 3px solid #ffc700;
}

.guild-info h1 {
    font-size: 1.8rem;
    margin: 0 0 5px;
    color: #ffc700;
    text-transform: uppercase;
}

.guild-info p {
    margin: 0;
    font-size: 1rem;
    color: #ccc;
}




@keyframes flash {
    0%, 100% { color: #ffecbb; } 
    50% { color: #ff0000; } 
}

.flashing-event span {
    display: inline-block; 
    animation: flash 1.5s ease-in-out 2;
}

.flashing-event span:nth-child(1) { animation-delay: 0s; }
.flashing-event span:nth-child(2) { animation-delay: 0.1s; }
.flashing-event span:nth-child(3) { animation-delay: 0.2s; }
.flashing-event span:nth-child(4) { animation-delay: 0.3s; }
.flashing-event span:nth-child(5) { animation-delay: 0.4s; }
.flashing-event span:nth-child(6) { animation-delay: 0.5s; }

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Don't let the modal overflow the screen */
}

.modal.show {
    display: flex;
}

.upgrade-box {
    background-color: #222;
    color: #f0f0f0;
    padding: 15px;
    border: 2px solid #ffc700;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
    width: 90%;
    max-width: 600px;
    max-height: 90vh; /* Critical to cap height on small screens */
    overflow-y: auto; /* Allow internal scrolling if content overflows */
    box-sizing: border-box;
    position: relative;
    text-align: left;
}

.upgrade-box h2 {
    color: #ffc700;
    margin-top: 0;
    margin: 15px;
    font-size: 1.5em;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.form-group input {
    width: 75%;
    padding: 8px;
    background-color: #333;
    color: #f0f0f0;
    border: 1px solid #ffc700;
    border-radius: 5px;
}

.event-data button {
    background-color: #ffc700;
    color: #333;
    border: 1px solid #333;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
}

button::before {
    font-size: 1.2em;
}

button:hover {
    background-color: #ffdd00;
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 22px;
    font-weight: bold;
    color: red;
    cursor: pointer;
}

#result table {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
}

#result th, #result td {
    padding: 8px;
    border: 1px solid #ffc700;
    text-align: center;
}

#result th {
    background-color: #333;
    color: #ffc700;
    font-weight: bold;
}

#result p {
    margin-top: 10px;
    font-size: 1.2em;
    font-weight: bold;
    color: #ffc700;
    text-align: center;
}
@media (max-width: 400px) {
    .upgrade-box {
        max-width: 480px;
        width: 95%;
        padding: 10px;
    }

    .form-group label {
        font-size: 0.9em;
    }

    .form-group input {
        font-size: 1em;
    }

    button {
        font-size: 1em;
        padding: 8px 15px;
    }
}


@media screen and (max-width: 768px) {
    .player-card {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 10px;
        border: 1px solid #444;
        border-radius: 8px;
        background-color: #2c2c2c;
    }
    .leaderboard-header {
        font-size: 1.2em;
        font-weight: bold;
    }
    .player-header {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
    }
    .guild-box {
        flex: 1 1 calc(90% - 10px); 
        max-width: calc(90% - 10px);
    }
    .avatar-name-container {
        display: flex;
        flex-direction: row;
        align-items: center;
        width: 100%;
    }

    .player-avatar {
        width: 60px;
        height: 60px;
        margin-right: 10px;
    }

    .player-name {
        font-size: 1.1em;
        font-weight: bold;
        margin: 0;
    }

    .player-info .player-details {
        font-size: 0.7em;
        margin-top: 10px;
        padding-left: 5px;
    }

    .player-score {
        font-size: 1em;
        width: 100%;
        padding-top: 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .sparkline {
        width: 100%;
        height: 50px;
        margin-top: 10px;
        
    }

    #search-input {
        width: 100%;
        margin-bottom: 20px;
    }

    a {
        font-size: 1em;
        margin-top: 20px;
    }

    .player-card .player-name a {
        color: #ffc700;
        text-decoration: none;
    }

    .player-card .player-name a:hover {
        color: #ffdd00;
    }
    .event-data h2 {
        font-size:1em;
        color: #fff;
    }
    .total-score {
        display:none;
    }
    .search-filter-container {
        flex-direction: column; 
        align-items: stretch; 
    }

    .search-filter-container select,
    .search-filter-container input {
        width: 100%; 
    }
    .guild-header {
        flex-direction: column; 
        align-items: center; 
        text-align: center; 
    }

    .guild-logo-container {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .guild-info h1 {
        font-size: 1.5rem;
    }

    .guild-info p {
        font-size: 0.9rem;
    }
}
