body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f4f4f4;
    color: #333;
}

.navbar {
    background-color: #333;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: sticky;
    /* Make navbar sticky */
    top: 0;
    /* Stick to the top */
    z-index: 1000;
    /* Ensure it stays on top of other content */
}

.navbar-brand {
    font-size: 1.8em;
    font-weight: bold;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.nav-links li {
    margin-right: 25px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #ffd700;
    /* Gold color for hover */
}

.reset-button {
    background-color: #dc3545;
    /* Red */
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.reset-button:hover {
    background-color: #c82333;
}

.container {
    display: flex;
    padding: 20px;
    gap: 20px;
    /* Adjust container height to allow independent scrolling of sidebars on desktop */
    height: calc(100vh - 80px);
    /* Adjust 80px based on your navbar height */
}

.player-selection {
    flex: 3;
    /* Takes up more space */
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    /* Add vertical scrollbar */
}

.player-selection h2 {
    text-align: center;
    color: #0056b3;
    margin-bottom: 20px;
}

.player-group {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.player-group h3 {
    background: #000;
    /* color: #0056b3; */
    color: #fff;
    margin-bottom: 15px;
    border-left: 5px solid #ffd700;
    padding-left: 10px;
}

.player-subgroup {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    /* Consistent gap between player cards */
    margin-top: 10px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.player-subgroup h4 {
    width: 100%;
    margin-bottom: 10px;
    color: #555;
    font-size: 1.1em;
}

.player-card {
    background-color: #e9ecef;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    width: 180px;
    /* Default for larger desktop screens (4-5 players per row) */
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.player-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 3px solid #007bff;
}

.player-card h4 {
    margin: 5px 0;
    color: #333;
}

.player-card p {
    margin: 3px 0;
    font-size: 0.9em;
    color: #666;
}

.player-card .price {
    font-weight: bold;
    color: #28a745;
    /* Green for price */
    font-size: 1.1em;
}

.player-card.overseas {
    border: 2px solid #ffc107;
    /* Orange border for overseas players */
}

.auction-desk {
    flex: 2;
    /* Takes less space than player selection */
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba (0, 0, 0, 0.1);
    overflow-y: auto;
    /* Add vertical scrollbar */
}

.auction-desk h2 {
    text-align: center;
    color: #0056b3;
    margin-bottom: 20px;
}

.auction-table h3 {
    color: #0056b3;
    margin-top: 25px;
    margin-bottom: 15px;
    border-left: 5px solid #ffd700;
    padding-left: 10px;
}

.auction-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    /* Consistent gap between player cards */
    min-height: 80px;
    /* Ensure some height even if empty */
    border: 1px dashed #ccc;
    padding: 10px;
    border-radius: 5px;
    background-color: #fdfdfd;
}

.auction-group .player-card {
    background-color: #d1ecf1;
    /* Light blue for selected players */
    border: 1px solid #bee5eb;
}

/* Responsive adjustments */

/* Tablet & Larger Mobile Phones (up to 992px) */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
        /* Stack sidebars vertically */
        height: auto;
        /* Allow the entire page to scroll */
        padding: 15px;
    }

    .player-selection,
    .auction-desk {
        flex: auto;
        /* Allow elements to take natural height */
        overflow-y: visible;
        /* Disable independent scrollbars on stacked layout */
        max-height: none;
        padding: 15px;
        margin-bottom: 20px;
        /* Space between stacked sections */
    }

    .navbar {
        flex-direction: column;
        /* Stack nav items vertically on smaller screens */
        align-items: flex-start;
        position: static;
        /* Make navbar static to flow with page content on smaller screens */
        padding: 10px 15px;
    }

    .nav-links {
        margin-top: 10px;
        flex-wrap: wrap;
    }

    .nav-links li {
        margin-bottom: 10px;
        margin-right: 15px;
    }

    .reset-button {
        margin-top: 10px;
    }

    /* 3 players per row */
    .player-card {
        width: calc((100% - (2 * 15px)) / 3);
        /* (100% - 2 gaps) / 3 players */
    }

    .player-subgroup,
    .auction-group {
        gap: 15px;
        /* Maintain gap */
    }
}

/* Medium Mobile Phones (up to 768px) */
@media (max-width: 768px) {

    /* 2 players per row */
    .player-card {
        width: calc((100% - 15px) / 2);
        /* (100% - 1 gap) / 2 players */
    }

    .player-subgroup,
    .auction-group {
        justify-content: center;
        /* Center cards if there aren't enough for full rows */
    }

    .player-group h3,
    .auction-table h3 {
        font-size: 1.3em;
    }

    .navbar-brand {
        font-size: 1.5em;
    }
}

/* Small Mobile Phones (up to 480px) */
@media (max-width: 480px) {

    /* 1 player per row */
    .player-card {
        width: 100%;
    }

    .container {
        padding: 10px;
    }

    .player-selection,
    .auction-desk {
        padding: 10px;
    }

    .navbar-brand {
        font-size: 1.3em;
    }

    .nav-links li {
        margin-right: 10px;
    }
}