.table-responsive .table {
    table-layout: fixed;
}
.table-responsive .table th,
.table-responsive .table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.team-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
    background-color: white;
    padding: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.team-logo-placeholder {
    width: 60px;
    height: 60px;
    background-color: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.vs-badge {
    font-size: 1.2rem;
    font-weight: 500;
    color: #6c757d;
    background-color: transparent;
    padding: 0.5rem;
    border-radius: 0;
    box-shadow: none;
    opacity: 0.7;
}
.score-display {
    font-size: 3rem;
    font-weight: bold;
    color: #212529;
    padding: 0 1rem;
}
.team-short-name {
    font-size: 1.2rem;
    color: #6c757d;
    margin-top: 0.5rem;
}
.team-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.team-logo-small {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 50%;
    background-color: white;
    padding: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    vertical-align: middle;
}
.team-logo-small-placeholder {
    width: 24px;
    height: 24px;
    background-color: #f8f9fa;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.8rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    vertical-align: middle;
}
@media (max-width: 768px) {
    .tab-label {
        display: none !important;
    }
    .score-display {
        font-size: 2.5rem;
        padding: 0 0.5rem;
    }
    .team-short-name {
        font-size: 1rem;
        margin-top: 0.25rem;
    }
    .team-logo {
        width: 50px;
        height: 50px;
    }
    .team-logo-placeholder {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}
.nav-tabs {
    justify-content: center !important;
    display: flex;
}

/* Boxscore table styles */
#boxscore .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#boxscore .table {
    min-width: 600px; /* Ensure minimum width for proper display */
}

#boxscore .table th,
#boxscore .table td {
    white-space: nowrap;
}

#boxscore .table th:nth-child(2),
#boxscore .table td:nth-child(2) {
    min-width: 200px; /* Fixed width for player name column */
    white-space: normal; /* Allow text wrapping in player name */
}

/* Player name column styling for better mobile display */
.table th:nth-child(2),
.table td:nth-child(2) {
    min-width: 120px;
    max-width: 200px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Mobile-specific table improvements */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        min-width: 600px;
    }
    
    .table th:nth-child(2),
    .table td:nth-child(2) {
        min-width: 100px;
        max-width: 150px;
        font-size: 0.9rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.85rem;
    }
}

#boxscore .table th:not(:nth-child(2)),
#boxscore .table td:not(:nth-child(2)) {
    width: auto;
    text-align: center;
}

@media (max-width: 768px) {
    #boxscore .table-responsive {
        margin: 0 -15px; /* Negative margin to allow full-width scrolling */
        padding: 0 15px; /* Add padding to maintain alignment */
    }
}

/* Team tabs styling */
#teamTabs .nav-link {
    color: #6c757d;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

#teamTabs .nav-link:hover {
    color: #495057;
    background-color: #e9ecef;
}

#teamTabs .nav-link.active {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.nav-tabs {
    border-bottom: none;
}

.nav-tabs .nav-link {
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    background-color: transparent;
}

.nav-tabs .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
}

.nav-tabs .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    font-weight: bold;
}

.card-header {
    padding: 0.5rem 1rem;
}

.game-details {
    font-size: 0.9rem;
}

.game-details div {
    margin-bottom: 0.25rem;
}

/* Quarters table styles */
.quarters-table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 0;
    border: 1px solid #dee2e6;
}

.quarters-table th,
.quarters-table td {
    border: 1px solid #dee2e6;
    padding: 0.5rem;
    text-align: center;
}

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

.quarters-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Ensure the last cell in each row has a right border */
.quarters-table td:last-child,
.quarters-table th:last-child {
    border-right: 1px solid #dee2e6;
}

/* Actions table styles */
#actions-table {
    border-collapse: collapse;
    width: 100%;
    table-layout: auto !important; /* Override fixed layout */
    min-width: auto !important; /* Remove minimum width constraint */
}

#actions-table th,
#actions-table td {
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid #dee2e6;
    padding: 0.5rem;
    white-space: normal !important; /* Allow text wrapping */
    overflow: visible !important; /* Allow content to overflow */
    text-overflow: initial !important; /* Remove ellipsis */
}

#actions-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

#actions-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Make actions table responsive */
#actions .table-responsive {
    overflow-x: visible !important; /* Remove horizontal scroll */
    -webkit-overflow-scrolling: auto;
}

#actions .table {
    min-width: auto !important; /* Remove minimum width */
    width: 100% !important; /* Use full width of container */
}

/* Ensure actions table content fits the wrapper */
#actions .table-responsive .table {
    table-layout: auto !important;
}

#actions .table-responsive .table th,
#actions .table-responsive .table td {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: initial !important;
}

/* Mobile-specific styles for actions table */
@media (max-width: 768px) {
    #actions .table-responsive {
        overflow-x: visible !important;
    }
    
    #actions .table {
        min-width: auto !important;
        width: 100% !important;
    }
    
    #actions .table th,
    #actions .table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.85rem;
        white-space: normal !important;
    }
}

.score-box {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 10px;
    margin: 10px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.vs-badge {
    font-size: 1.2rem;
    font-weight: 500;
    color: #6c757d;
    background-color: transparent;
    padding: 0.5rem;
    border-radius: 0;
    box-shadow: none;
    opacity: 0.7;
}
.game-info {
    font-size: 0.9rem;
}
.team-stats {
    margin-top: 10px;
}
.btn-group {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* Game status styles */
.game-status {
    margin: 15px 0;
}
.game-status .badge {
    font-size: 1.2rem;
    padding: 8px 15px;
    border-radius: 6px;
}
/* Mobile-specific styles */
@media (max-width: 768px) {
    .game-status {
        margin: 10px 0;
    }
    .game-status .badge {
        font-size: 1rem;
        padding: 6px 12px;
    }
}

/* Make team stats table responsive */
#team-stats .table {
    table-layout: auto !important;
}
#team-stats .table th,
#team-stats .table td {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: initial !important;
}
@media (max-width: 768px) {
    #team-stats .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    #team-stats .table {
        min-width: 400px;
    }
}
@media (max-width: 576px) {
    #team-stats .table th,
    #team-stats .table td {
        padding: 0.3rem 0.2rem;
        font-size: 0.85rem;
        word-break: break-word;
        max-width: 90px;
    }
    #team-stats .table th:nth-child(2),
    #team-stats .table td:nth-child(2) {
        min-width: 60px;
        max-width: 80px;
        white-space: normal;
    }
}
