/* General Styles */
body {
    background-color: #2b2b2b;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    color: #fff;
}

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

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    color: #0056b3;
}

.site-content {
    max-width: 1600px;
    margin: 0 auto; /* Center the entire content horizontally */
    padding-top: 24px;
}

.site-content #primary {
    max-width: 1650px; 
    border: 3px solid #282a2d;
    background-color: #25272a;
    float: inline-start;
    /* margin-right: 30px; */
    width: 100%;
    color: #fff;
}

#main {
    text-align: -webkit-center;
}

/* Layout */
#live-stats-layout {
    max-width: 1550px;    
    margin: 0px auto;
    padding: 20px;
    position: relative;
}

#live-stats-panel img {
    height: auto;
    max-width: 27%;
    position: relative;
    margin-top: -19px;
}

/* Live Game Stats Panel */
#live-stats-panel {
    padding: 2px;
    border-radius: 15px;
    box-shadow: 0px 0px 4px 6px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    margin-left: -20px;
    padding-bottom: 10px;
    background: linear-gradient(to bottom, rgb(43 43 43 / 0%) 19%, /* Fully opaque background color at the top */ rgb(24 24 24) 30% /* Fully transparent halfway down */), url(https://thpsx.com/wp-content/themes/thpsx/background_2.png);
    background-repeat: no-repeat;
    background-size: 376%, 100%;
    background-position-x: 0px, 0px;
    background-position-y: 0px, 0px;
    height: 100%;
    min-height: 1035px;
}

#stats-summary {    
    margin-bottom: 10px;
    background-color: #25272a;
    border-radius: 5px;
    padding: 4px 38px;
    width: max-content; 
    border: 2px solid green;
    width: 94%; 
    /* left: -2px; */
    top: -52px;
    position: relative;
    font-size: 20px;
}

.game-selector {
    display: block;
    /* flex-direction: column; */
    position: relative;
    /* left: 70px; */
    top: -50px;
    /* transform: translateY(-50%); */
    z-index: 10;
    width: 100%;
}

.game-button {
    /*writing-mode: vertical-rl; */
    /* transform: rotate(180deg); */
    text-align: center;
    height: 25px;
    width: 94px;
    padding: 2px 3px;
    background-color: #1e1e1e;
    color: #fff;
    border: 1px solid #007bff;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin-left: 7px;
}

.game-button:hover {
    background-color: #007bff;
    color: white;
}

.game-button.active {
    background-color: #007bff;
    color: white;
    border: 1px solid #0056b3;
    cursor: default;
}

/* Live Stats Cards */
.live-stats-cards {
    display: grid; /* Use grid layout */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Flexible columns */
    gap: 15px; /* Space between cards */
    align-items: stretch; /* Stretch cards to match height */
    justify-items: center; /* Center cards horizontally */
    width: 94%; /* Adjust width */
    margin: 0 auto; /* Center the grid on the page */
    position: relative; /* Keep positioning if needed */
    top: -40px; /* Adjust position if necessary */
}

.live-stats-card {
    background: linear-gradient(145deg, #252525, #1a1a1a);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.05);
    padding: 20px;
    color: #f0f0f0;
    text-align: center;
    font-family: 'Arial', sans-serif;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    width: 100%; 
    max-width: 420px;
    /* left: 23px;*/
}

.live-stats-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.7), inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

.live-stats-card h3 {
    font-size: 1.4em;
    margin-top: 5px;
    margin-bottom: 15px;
    color: #ffffff;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 5px;
}

.live-stats-card p {
    margin: 5px 0;
    font-size: 1.1em;
    line-height: 1.6;
    color: #cccccc;
}

.live-stats-card p:first-of-type {
    margin-top: 10px;
    font-size: 1.3em;
    color: #007bff;
    font-weight: bold;
}

.live-stats-card .icon-game,
.live-stats-card .icon-level,
.live-stats-card .icon-players {
    margin-right: 5px;
    vertical-align: middle;
}

.live-stats-card:hover h3 {
    color: #007bff;
}

/* Add background effect to cards */
.live-stats-card::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(19, 24, 31, 0.2), transparent);
    transform: rotate(45deg);
    z-index: 0;
    transition: opacity 0.3s ease;
}

.live-stats-card:hover::before {
    opacity: 0.6;
}

/* Ensure content is above background effects */
.live-stats-card * {
    position: relative;
    z-index: 1;
}

/* Player names styling */
.player-names {
    margin-top: 15px;
    font-size: 0.9em;
    color: #f0f0f0;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 10px;
    border-radius: 8px;
    display: inline-block;
}
.players-section {
    margin-top: -5px;
    font-size: 14px;
}

.players-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns of equal width */    
    padding: 0;
    margin: 0;
    list-style: none; /* Remove bullets */
}

.players-list li {
    font-size: 1.2em;
    color: #cccccc;
    padding: 0px;
    text-align: center; /* Center the text */
}

.live-stats-card.full-room {
    border-left: 5px solid red;
}

.live-stats-card.active-room {
    border-left: 5px solid green;
}

[data-tooltip] {
    position: relative;
    cursor: pointer;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
    top: 100%; /* Aligns below the element */
    left: 50%;
    transform: translateX(-50%);
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#live-streams-panel {
    background-color: #2b2b2b;
    padding: 0px;
    margin-bottom: 20px;
}


/* General Mobile Styling */
@media (max-width: 768px) {
    /* Adjust the main layout container for smaller screens */
    #live-stats-layout {
        max-width: 100%; /* Allow the layout to take full width */
        padding: 10px; /* Reduce padding for smaller screens */
        margin: 0 auto;
    }

    /* Adjust images inside the stats panel */
    #live-stats-panel img {
        max-width: 80%; /* Allow images to shrink on smaller screens */
        margin-top: 0; /* Remove negative margin */
        margin-bottom: 10px; /* Add some spacing below the images */
        display: block; /* Ensure images stack properly */
        margin-left: auto;
        margin-right: auto;
    }

    /* Live Stats Panel Adjustments */
    #live-stats-panel {
        margin-left: 0; /* Remove negative margin on mobile */
        border-radius: 10px; /* Slightly reduce border radius */
        padding: 10px; /* Reduce padding */
        box-shadow: 0px 0px 2px 4px rgba(0, 0, 0, 0.4); /* Adjust shadow for mobile */
        background: linear-gradient(to bottom, rgb(43 43 43 / 0%) 3%, /* Fully opaque background color at the top */ rgb(24 24 24) 23% /* Fully transparent halfway down */), url(https://thpsx.com/wp-content/themes/thpsx/background_2.png);
        background-size: 125%;
        min-height: auto; /* Allow the height to adjust dynamically */
        height: auto; /* Adapt height based on content */
        overflow-y: auto; /* Keep vertical scrolling if needed */
    }

    /* Grid Cards Adjustments */
    .live-stats-cards {
        grid-template-columns: 1fr; /* Display one card per row on mobile */
        gap: 10px; /* Reduce the gap between cards */
        padding: 5px; /* Add a little padding for spacing */
    }

    .live-stats-card {
        width: 100%; /* Ensure cards take full width */
        max-width: 100%; /* Prevent overflow */
        margin: 0 auto; /* Center the cards */
    }

    /* Fonts and Text Adjustments */
    h2 {
        font-size: 1.5rem; /* Reduce the font size for headings */
        text-align: center; /* Center-align text */
    }

    p {
        font-size: 0.9rem; /* Reduce paragraph text size */
        line-height: 1.4; /* Improve readability */
    }
}
