/* Basketball Management System Styles */

/* Font Family Definitions - Use Theme Fonts */
.basketball-standings,
.basketball-player-stats,
.basketball-players-list,
.basketball-teams-list,
.player-card-item,
.team-card-item,
.players-filters,
.upcoming-matches,
.team-statistics-wrapper,
.past-matches,
.teams-grid {
    font-family: 'Roboto', sans-serif;
}

.basketball-standings h1,
.basketball-standings h2,
.basketball-standings h3,
.basketball-standings h4,
.basketball-player-stats h1,
.basketball-player-stats h2,
.basketball-player-stats h3,
.basketball-player-stats h4,
.player-card-content .player-name,
.team-card-content .team-name {
    font-family: 'Oswald', sans-serif;
}

/* General Basketball Styles */
.basketball-standings,
.basketball-player-stats,
.upcoming-matches,
.team-statistics-wrapper,
.past-matches,
.teams-grid {
    margin: 20px 0;
}

/* Team Standings Table - FIBA Style */
.basketball-standings {
    overflow-x: auto;
    margin: 30px 0;
}

.standings-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    border: 1px solid #e0e0e0;
}

.standings-table th,
.standings-table td {
    padding: 18px 12px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    font-family: 'Roboto', sans-serif;
}

.standings-table th {
    background: #f5f5f5;
    font-weight: 700;
    color: #1a1a1a;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
}

.standings-table tbody tr {
    transition: background-color 0.2s ease;
}

.standings-table tbody tr:hover {
    background: #fafafa;
}

.standings-table tbody tr:last-child td {
    border-bottom: none;
}

/* Rank column styling */
.standings-table td:first-child {
    font-weight: 700;
    font-size: 16px;
    color: #1a1a1a;
    background: #f9f9f9;
    width: 60px;
}

.standings-table .team-info {
    text-align: left;
    display: flex;
    align-items: center;
    min-width: 200px;
    padding-left: 20px;
}

.standings-table .team-info img {
    width: 32px;
    height: 32px;
    margin-right: 12px;
    border-radius: 4px;
    object-fit: contain;
}

.standings-table .team-info a {
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s ease;
}

.standings-table .team-info a:hover {
    color: #ed1c24;
}

/* Highlight top teams */
.standings-table tbody tr:nth-child(1) td:first-child,
.standings-table tbody tr:nth-child(2) td:first-child,
.standings-table tbody tr:nth-child(3) td:first-child {
    background: #ed1c24;
    color: #fff;
}

/* Statistics columns */
.standings-table td {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.standings-table .positive {
    color: #28a745;
    font-weight: 700;
}

.standings-table .negative {
    color: #dc3545;
    font-weight: 700;
}

/* Wins/Losses emphasis */
.standings-table td:nth-child(3),
.standings-table td:nth-child(4) {
    font-weight: 600;
}

/* BIH League Table - FIBA Style (for /tabela/ page) */
.bih-league-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    border: 1px solid #e0e0e0;
    font-family: 'Roboto', sans-serif;
}

.bih-league-table th,
.bih-league-table td {
    padding: 18px 12px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    font-family: 'Roboto', sans-serif;
}

.bih-league-table th {
    background: #f5f5f5;
    font-weight: 700;
    color: #1a1a1a;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
}

.bih-league-table tbody tr {
    transition: background-color 0.2s ease;
}

.bih-league-table tbody tr:hover {
    background: #fafafa;
}

.bih-league-table tbody tr:last-child td {
    border-bottom: none;
}

/* Rank column styling */
.bih-league-table td:first-child {
    font-weight: 700;
    font-size: 16px;
    color: #1a1a1a;
    background: #f9f9f9;
    width: 60px;
}

/* Highlight top 3 teams */
.bih-league-table tbody tr:nth-child(1) td:first-child,
.bih-league-table tbody tr:nth-child(2) td:first-child,
.bih-league-table tbody tr:nth-child(3) td:first-child {
    background: #ed1c24;
    color: #fff;
}

/* Team name column */
.bih-league-table td:nth-child(2) {
    text-align: left;
    min-width: 200px;
    padding-left: 20px;
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
}

.bih-league-table td:nth-child(2) img {
    width: 28px;
    height: 28px;
    margin-right: 12px;
    vertical-align: middle;
    border-radius: 4px;
    object-fit: contain;
}

/* Statistics columns */
.bih-league-table td {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Wins/Losses columns emphasis */
.bih-league-table td:nth-child(4),
.bih-league-table td:nth-child(5) {
    font-weight: 600;
}

/* Remove old alternating background */
.bih-league-table tbody tr:nth-child(even) {
    background: transparent;
}

/* Player Statistics Table - FIBA Style */
.basketball-player-stats {
    overflow-x: auto;
    margin: 30px 0;
}

.stats-filters {
    margin-bottom: 30px;
    text-align: center;
}

.filter-btn {
    background: #fff;
    border: 2px solid #e0e0e0;
    padding: 10px 20px;
    margin: 0 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
    transition: all 0.2s ease;
    color: #333;
}

.filter-btn:hover {
    border-color: #ed1c24;
    color: #ed1c24;
}

.filter-btn.active {
    background: #ed1c24;
    color: white;
    border-color: #ed1c24;
}

.player-stats-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    border: 1px solid #e0e0e0;
}

.player-stats-table th,
.player-stats-table td {
    padding: 16px 12px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
}

.player-stats-table th {
    background: #f5f5f5;
    font-weight: 700;
    color: #1a1a1a;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
}

.player-stats-table tbody tr {
    transition: background-color 0.2s ease;
}

.player-stats-table tbody tr:hover {
    background: #fafafa;
}

.player-stats-table tbody tr:last-child td {
    border-bottom: none;
}

/* Rank column */
.player-stats-table td:first-child {
    font-weight: 700;
    font-size: 16px;
    color: #1a1a1a;
    background: #f9f9f9;
    width: 60px;
}

/* Highlight top 3 players */
.player-stats-table tbody tr:nth-child(1) td:first-child,
.player-stats-table tbody tr:nth-child(2) td:first-child,
.player-stats-table tbody tr:nth-child(3) td:first-child {
    background: #ed1c24;
    color: #fff;
}

.player-stats-table .player-name {
    text-align: left;
    min-width: 180px;
    padding-left: 20px;
}

.player-stats-table .player-name a {
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s ease;
}

.player-stats-table .player-name a:hover {
    color: #ed1c24;
}

.player-stats-table .player-name small {
    color: #666;
    font-size: 12px;
    display: block;
    margin-top: 4px;
    font-weight: 400;
}

.player-stats-table td {
    font-weight: 500;
    color: #333;
}

/* Matches Styles */
.upcoming-matches,
.team-statistics-wrapper,
.past-matches {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.upcoming-matches h3,
.team-statistics-wrapper h3,
.past-matches h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #ed1c24;
    padding-bottom: 10px;
}

.match-preview,
.match-result {
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    background: #fafafa;
}

.match-date {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-bottom: 10px;
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.home-team,
.away-team {
    display: flex;
    align-items: center;
    flex: 1;
}

.home-team {
    justify-content: flex-start;
}

.away-team {
    justify-content: flex-end;
}

.home-team img,
.away-team img {
    width: 30px;
    height: 30px;
    margin-right: 8px;
    border-radius: 50%;
}

.away-team img {
    margin-left: 8px;
    margin-right: 0;
}

.vs {
    font-weight: bold;
    color: #666;
    padding: 0 15px;
}

.score {
    font-weight: bold;
    font-size: 18px;
    color: #ed1c24;
    padding: 0 15px;
}

.match-venue {
    font-size: 12px;
    color: #666;
    text-align: center;
    font-style: italic;
}

/* Top Players Widget */
.top-players {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.top-player-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.top-player-item:last-child {
    border-bottom: none;
}

.top-player-item .rank {
    font-weight: bold;
    color: #ed1c24;
    margin-right: 10px;
    min-width: 20px;
}

.top-player-item .player-name {
    font-weight: 500;
    flex: 1;
}

.top-player-item .team-name {
    color: #666;
    font-size: 12px;
    margin-left: 5px;
}

.top-player-item .stat-value {
    font-weight: bold;
    color: #28a745;
}

/* Teams Grid */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.team-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.team-card a {
    text-decoration: none;
    color: inherit;
}

.team-logo {
    margin-bottom: 15px;
}

.team-logo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.team-card h3 {
    margin: 10px 0;
    color: #333;
    font-size: 18px;
}

.team-city {
    color: #666;
    font-size: 14px;
    margin: 5px 0 0 0;
}

/* Admin Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #ed1c24;
}

.stat-card h3 {
    font-size: 32px;
    color: #ed1c24;
    margin: 0 0 10px 0;
}

.stat-card p {
    color: #666;
    margin: 0;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .standings-table,
    .player-stats-table {
        font-size: 12px;
    }

    .standings-table th,
    .standings-table td,
    .player-stats-table th,
    .player-stats-table td {
        padding: 6px 4px;
    }

    .match-teams {
        flex-direction: column;
        gap: 10px;
    }

    .home-team,
    .away-team {
        justify-content: center;
    }

    .vs,
    .score {
        padding: 5px 0;
    }

    .teams-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .stats-filters {
        overflow-x: auto;
        white-space: nowrap;
    }

    .filter-btn {
        display: inline-block;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .teams-grid {
        grid-template-columns: 1fr;
    }

    .standings-table,
    .player-stats-table {
        font-size: 11px;
    }

    .team-logo img {
        width: 60px;
        height: 60px;
    }
}

/* Print Styles */
@media print {
    .stats-filters,
    .filter-btn {
        display: none;
    }

    .standings-table,
    .player-stats-table {
        box-shadow: none;
        border: 1px solid #000;
    }

    .match-preview,
    .match-result {
        break-inside: avoid;
    }
}

/* SHORTCODE STYLES */
/* =============== */

/* Player Photo Shortcode */
.basketball-player-photo {
    text-align: center;
    margin-bottom: 20px;
}

.basketball-player-photo img {
    max-width: 300px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.no-photo-placeholder {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
}

/* Player Info Shortcode */
.basketball-player-info {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.basketball-player-info h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.5em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ed1c24;
}

.basketball-player-info .info-item {
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.basketball-player-info .info-item:last-child {
    border-bottom: none;
}

/* Team Logo Shortcode */
.basketball-team-logo {
    text-align: center;
    margin-bottom: 20px;
}

.basketball-team-logo img {
    max-width: 200px;
    height: auto;
    border-radius: 10px;
}

.no-logo-placeholder {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
}

/* Team Info Shortcode */
.basketball-team-info {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.basketball-team-info h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.5em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ed1c24;
}

.basketball-team-info .info-item {
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

/* Team Roster Shortcode */
.basketball-team-roster {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.basketball-team-roster h4 {
    margin-top: 0;
    color: #333;
    font-size: 1.3em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ed1c24;
}

.roster-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    width: 100% !important;
}

.roster-grid .player-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

.roster-grid .player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.roster-grid .player-photo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.roster-grid .no-photo {
    width: 80px;
    height: 80px;
    background: #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 30px;
    color: #999;
}

.roster-grid .player-details h5 {
    margin: 0 0 8px 0;
    font-size: 1em;
    color: #333;
}

.roster-grid .jersey {
    background: #ed1c24;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-right: 8px;
}

.roster-grid .position {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.roster-table {
    width: 100%;
    border-collapse: collapse;
}

.roster-table th,
.roster-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.roster-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

/* Season Stats Shortcode */
.basketball-player-season-stats {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.basketball-player-season-stats h4 {
    margin-top: 0;
    color: #333;
    font-size: 1.3em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ed1c24;
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-box {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #ed1c24, #c01620);
    color: white;
    border-radius: 8px;
}

.stat-box .number {
    display: block;
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-box .label {
    font-size: 0.9em;
    opacity: 0.9;
}

.stats-totals {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.stats-totals h5 {
    margin-top: 0;
    color: #333;
}

/* Matches Shortcodes */
.basketball-recent-matches,
.team-matches-wrapper,
.team-statistics-wrapper,
.basketball-upcoming-matches {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.basketball-recent-matches h4,
.team-statistics-wrapper h4,
.basketball-upcoming-matches h4 {
    margin-top: 0;
    color: #333;
    font-size: 1.3em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ed1c24;
}

.matches-list .match-item {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.matches-list .match-item:last-child {
    border-bottom: none;
}

.matches-list .match-date {
    font-weight: bold;
    color: #ed1c24;
}

.matches-list .match-time {
    color: #666;
    font-size: 0.9em;
}

.matches-list .match-teams {
    font-weight: 600;
    color: #333;
    flex: 1;
    text-align: center;
}

.matches-list .match-score {
    font-weight: bold;
    color: #28a745;
    font-size: 1.1em;
}

.matches-list .match-venue {
    color: #666;
    font-size: 0.9em;
}

/* Top Players Shortcode */
.basketball-top-players {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.basketball-top-players h4 {
    margin-top: 0;
    color: #333;
    font-size: 1.3em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ed1c24;
}

.top-players-table {
    width: 100%;
    border-collapse: collapse;
}

.top-players-table th,
.top-players-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.top-players-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.top-players-table .player-photo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Shortcode Mobile Responsive */
@media (max-width: 768px) {
    .roster-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }

    .stats-summary {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 15px;
    }

    .stat-box {
        padding: 15px;
    }

    .stat-box .number {
        font-size: 1.5em;
    }

    .matches-list .match-item {
        flex-direction: column;
        text-align: center;
    }

    .matches-list .match-teams {
        text-align: center;
    }
}

/* TEAMS AND PLAYERS LIST SHORTCODES */
/* ================================= */

/* Teams Cards Layout */
.basketball-teams-list.layout-cards .teams-cards-container {
    display: grid !important;
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
}

.basketball-teams-list.layout-cards .teams-cards-container.columns-1 {
    grid-template-columns: 1fr !important;
}

.basketball-teams-list.layout-cards .teams-cards-container.columns-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.basketball-teams-list.layout-cards .teams-cards-container.columns-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

.team-card-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.team-logo-container {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-logo-container img {
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
    border-radius: 8px;
}

.team-logo-container .no-logo-placeholder {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #ccc;
}

.team-card-content {
    flex: 1;
    min-width: 0;
}

.team-card-content .team-name {
    margin: 0 0 8px 0;
    font-size: 1.4em;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.team-card-content .team-city {
    color: #666;
    font-size: 1em;
    margin-bottom: 4px;
    font-weight: 500;
}

.team-card-content .team-arena {
    color: #888;
    font-size: 0.9em;
    margin-bottom: 4px;
}

.team-card-content .team-coach {
    color: #ed1c24;
    font-size: 0.9em;
    font-weight: 500;
}

/* Players Cards Layout */
.basketball-players-list.layout-cards .players-cards-container {
    display: grid !important;
    grid-gap: 20px !important;
    margin-bottom: 30px;
    width: 100% !important;
    box-sizing: border-box !important;
    align-content: flex-start;
    height: -webkit-fill-available;
}

.basketball-players-list.layout-cards .players-cards-container.columns-1 {
    grid-template-columns: 1fr !important;
}

.basketball-players-list.layout-cards .players-cards-container.columns-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.basketball-players-list.layout-cards .players-cards-container.columns-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

.basketball-players-list.layout-cards .players-cards-container.columns-4 {
    grid-template-columns: repeat(4, 1fr) !important;
}

.player-card-item {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch;
    gap: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    overflow: hidden;
}

.player-card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.player-photo-container {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.player-photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.player-photo-container .no-photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #ccc;
    position: absolute;
    top: 0;
    left: 0;
}

.player-card-content {
    padding: 20px;
    text-align: center;
}

.player-card-content .player-name {
    margin: 0 0 12px 0;
    font-size: 1.3em;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.player-card-content .player-jersey {
    display: inline-block;
    background: #ed1c24;
    color: white;
    font-size: 0.85em;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 15px;
    margin: 0 5px 8px 0;
}

.player-card-content .player-position {
    display: inline-block;
    background: #28a745;
    color: white;
    font-size: 0.85em;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 15px;
    margin: 0 5px 8px 0;
}

.player-card-content .player-team {
    color: #666;
    font-size: 0.9em;
    font-weight: 500;
    margin-top: 8px;
    display: block;
}

/* Additional Grid Override for Theme Conflicts */
.basketball-players-list.layout-cards .players-cards-container,
.basketball-players-list.layout-cards .players-cards-container > *,
.basketball-players-list .players-cards-container {
    display: grid !important;
    grid-gap: 20px !important;
}

.basketball-players-list.layout-cards .players-cards-container.columns-4,
.basketball-players-list .players-cards-container.columns-4 {
    grid-template-columns: repeat(4, 1fr) !important;
    display: grid !important;
}

/* Force override any conflicting flex/display styles */
.basketball-players-list * {
    box-sizing: border-box !important;
}

/* Mobile Responsive for Lists */
@media (max-width: 768px) {
    .basketball-teams-list.layout-cards .teams-cards-container.columns-2,
    .basketball-teams-list.layout-cards .teams-cards-container.columns-3 {
        grid-template-columns: 1fr;
    }

    .basketball-players-list.layout-cards .players-cards-container.columns-2,
    .basketball-players-list.layout-cards .players-cards-container.columns-3,
    .basketball-players-list.layout-cards .players-cards-container.columns-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .team-card-item,
    .player-card-item {
        padding: 0px;
        gap: 15px;
    }

    .team-logo-container {
        width: 60px;
        height: 60px;
    }

    .team-logo-container img {
        max-width: 60px;
        max-height: 60px;
    }

    .team-logo-container .no-logo-placeholder {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}

/* UX Builder and Theme Conflict Overrides */
/* ======================================= */

/* UX Builder Specific Overrides */
.ux-text .basketball-players-list.layout-cards .players-cards-container.columns-4,
.text-box .basketball-players-list.layout-cards .players-cards-container.columns-4,
.flatsome-builder .basketball-players-list.layout-cards .players-cards-container.columns-4 {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    width: 100% !important;
    max-width: none !important;
    grid-gap: 20px !important;
}

/* Ensure UX HTML containers don't interfere */
.ux-html .basketball-players-list,
.text-box .basketball-players-list {
    width: 100% !important;
    max-width: none !important;
}

.ux-html .basketball-players-list .players-cards-container,
.text-box .basketball-players-list .players-cards-container {
    display: grid !important;
    width: 100% !important;
    max-width: none !important;
}

/* Override common theme conflicts */
.container .basketball-players-list.layout-cards .players-cards-container.columns-4,
.row .basketball-players-list.layout-cards .players-cards-container.columns-4,
.col .basketball-players-list.layout-cards .players-cards-container.columns-4 {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
}

/* Force override any wrapper containers */
div .basketball-players-list.layout-cards .players-cards-container.columns-4 {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
}

/* NUCLEAR OPTION: Force 4-column layout no matter what */
/* =================================================== */
*[class*="basketball-players-list"][class*="layout-cards"] *[class*="players-cards-container"][class*="columns-4"],
*[class*="basketball-players-list"] *[class*="players-cards-container"][class*="columns-4"],
.basketball-players-list .players-cards-container.columns-4,
div .basketball-players-list .players-cards-container.columns-4,
body .basketball-players-list .players-cards-container.columns-4 {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    grid-template-columns: 1fr 1fr 1fr 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    grid-gap: 20px !important;
    gap: 20px !important;
    box-sizing: border-box !important;
    flex-direction: unset !important;
    flex-wrap: unset !important;
    align-items: start !important;
}

/* Ensure player cards behave properly in grid */
*[class*="basketball-players-list"] *[class*="player-card-item"],
.basketball-players-list .player-card-item,
div .basketball-players-list .player-card-item,
body .basketball-players-list .player-card-item {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    grid-column: auto !important;
    flex: none !important;
}

/* Remove debug borders for production */
.basketball-players-list {
    border: none !important;
}

.basketball-players-list .players-cards-container {
    border: none !important;
}

.basketball-players-list .player-card-item {
    border: none !important;
    margin: 0 !important;
}

/* Production: Clean design without debug borders */
.basketball-players-list {
    border: none !important;
    background: transparent !important;
}

.basketball-players-list .players-cards-container.columns-4 {
    border: none !important;
    background: transparent !important;
}

/* PLAYER FILTERS STYLING */
/* ====================== */

.players-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #333;
    border-radius: 8px;
    align-items: center;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.player-search-input,
.team-filter-select,
.position-filter-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    /*border-radius: 6px;*/
    font-size: 14px;
    background: white;
    transition: border-color 0.3s ease;
    height: auto;
    line-height: 1.5;
}

.player-search-input:focus,
.team-filter-select:focus,
.position-filter-select:focus {
    outline: none;
    border-color: #ed1c24;
}

.player-search-input::placeholder {
    color: #6c757d;
}

/* LOADING AND INFINITE SCROLL */
/* ============================ */

.players-loading {
    text-align: center;
    padding: 20px;
    margin: 20px 0;
}

.loading-spinner {
    color: #ed1c24;
    font-size: 16px;
    font-weight: 500;
}

.loading-spinner::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #007cba;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.players-load-trigger {
    height: 50px;
    visibility: hidden;
}

/* PLAYER CARD ANIMATIONS FOR FILTERING */
/* ===================================== */

.player-card-item {
    transition: all 0.3s ease;
}

.player-card-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

/* RESPONSIVE FILTERS */
/* ================== */

@media (max-width: 768px) {
    .players-filters {
        flex-direction: column;
        gap: 15px;
    }

    .filter-group {
        min-width: 100%;
    }

    .player-search-input,
    .team-filter-select,
    .position-filter-select {
        padding: 10px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* CLICKABLE CARD LINKS */
/* ==================== */

.player-card-link,
.team-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
}

.player-card-link:hover,
.team-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Ensure links cover entire card */
.player-card-item > a,
.team-card-item > a {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    text-decoration: none !important;
    color: inherit !important;
}

.team-card-item > a {
    flex-direction: row !important;
    align-items: center !important;
    gap: 20px !important;
}

/* MOBILE OVERRIDE: Force 2 columns on mobile (MUST be at end of file) */
/* =================================================================== */
@media (max-width: 768px) {
    /* Override ALL desktop 4-column rules with mobile 2-column */
    *[class*="basketball-players-list"][class*="layout-cards"] *[class*="players-cards-container"][class*="columns-4"],
    *[class*="basketball-players-list"] *[class*="players-cards-container"][class*="columns-4"],
    .basketball-players-list .players-cards-container.columns-4,
    div .basketball-players-list .players-cards-container.columns-4,
    body .basketball-players-list .players-cards-container.columns-4,
    .ux-text .basketball-players-list.layout-cards .players-cards-container.columns-4,
    .text-box .basketball-players-list.layout-cards .players-cards-container.columns-4,
    .flatsome-builder .basketball-players-list.layout-cards .players-cards-container.columns-4,
    .container .basketball-players-list.layout-cards .players-cards-container.columns-4,
    .row .basketball-players-list.layout-cards .players-cards-container.columns-4,
    .col .basketball-players-list.layout-cards .players-cards-container.columns-4,
    .basketball-players-list.layout-cards .players-cards-container.columns-4,
    .basketball-players-list .players-cards-container.columns-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-columns: 1fr 1fr !important;
    }

    /* Reduce photo height on mobile */
    .player-photo-container {
        height: 200px !important;
    }
}

/* TEAM STATISTICS SHORTCODE */
/* ========================== */
.basketball-team-statistics {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.basketball-team-statistics h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #ed1c24;
    padding-bottom: 10px;
}

.basketball-team-statistics .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.basketball-team-statistics .stat-box {
    text-align: center;
    padding: 25px 20px;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.basketball-team-statistics .stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.basketball-team-statistics .stat-value {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ed1c24;
}

.basketball-team-statistics .stat-label {
    font-family: 'Roboto', sans-serif;
    font-size: 0.9em;
    opacity: 0.9;
    font-weight: 400;
}

@media (max-width: 768px) {
    .basketball-team-statistics .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .basketball-team-statistics .stat-box {
        padding: 20px 15px;
    }

    .basketball-team-statistics .stat-value {
        font-size: 2em;
    }

    .basketball-team-statistics .stat-label {
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .basketball-team-statistics .stats-grid {
        grid-template-columns: 1fr;
    }
}