#legend {
    margin-left: auto;
    margin-right: auto;
    alignment: center;
    text-align: center;
}

#schedule tr:nth-child(4n+3) {
    background-color: #0DB14B;
    border-top: 2px solid #545454;
}

.fit-cell {
    max-width: 100%; /* Ensures the input does not exceed the cell width */
    box-sizing: border-box; /* Includes padding and border in the element's total width and height */
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield; /* Firefox */
}

#schedule tr:nth-child(4n+4) {
    background-color: #0DB14B;
}

#schedule tr:nth-child(4n+5) {
    border-top: 2px solid #545454;
}

#schedule {
    text-align: center;
    width: auto;
    border: 1px solid #444444;
    background-color: #97A2A2;
    border-collapse: collapse;
    margin-left: auto;
    margin-right: auto;
}

#schedule tr {
    color: #FFFFFF;
}

#schedule td, table th {
    border: 1px solid #AAAAAA;
}

#schedule td.name {
    padding-left: 3px;
    padding-right: 8px;
}

#schedule td.team {
    padding-left: 3px;
    padding-right: 8px;
    border-right: 2px solid #545454;
    text-align: center;
}

#schedule tbody td {
    font-size: 13px;
}

#schedule thead {
    background: #18453B;
    border-bottom: 2px solid #444444;
    text-align: center;
}

#schedule thead th {
    font-size: 15px;
    font-weight: bold;
    color: #FFFFFF;
}

#schedule thead th:first-child {
    border-left: none;
}

#weekscores td.score {
    text-align: center;
}

#weekscores td.gross {
    text-align: center;
    border-left: 2px solid #545454;
}

#weekscores td.net {
    text-align: center;
}

#weekscores {
    alignment: center;
    width: auto;
    border: 1px solid #444444;
    color: #FFFFFF;
    background-color: #97A2A2;
    border-collapse: collapse;
    margin-left: auto;
    margin-right: auto;
}

#weekscores td, table th {
    border: 1px solid #AAAAAA;
}

#weekscores td.name {
    padding-left: 3px;
    padding-right: 8px;
    border-right: 2px solid #545454;
}

#weekscores tbody td {
    font-size: 13px;
}

#weekscores tr:nth-child(even) {
    background: #0DB14B;
}

#weekscores thead {
    background: #18453B;
    border-bottom: 2px solid #444444;
    text-align: center;
}

#weekscores thead th {
    font-size: 15px;
    font-weight: bold;
    color: #FFFFFF;
}

#weekscores thead th:first-child {
    border-left: none;
}


#standings tr:nth-child(4n+3) {
    background-color: #0DB14B;
    border-top: 2px solid #545454;
}

#standings tr:nth-child(4n+4) {
    background-color: #0DB14B;
}

#standings tr:nth-child(4n+5) {
    border-top: 2px solid #545454;
}


#standings {
    alignment: center;
    width: auto;
    border: 1px solid #444444;
    color: #FFFFFF;
    background-color: #97A2A2;
    border-collapse: collapse;
    margin-left: auto;
    margin-right: auto;
}

#standings td.score {
    text-align: center;
}

#standings td.hcp {
    text-align: center;
    font-size: 10px;
    border-right: 2px solid #545454;
}

#standings td, table th {
    border: 1px solid #AAAAAA;
}

#standings td.name {
    padding-left: 3px;
    padding-right: 8px;
    border-right: 2px solid #545454;
}

#standings td.place {
    padding-left: 3px;
    padding-right: 8px;
    border-right: 2px solid #545454;
    text-align: center;
}

#standings tbody td {
    font-size: 13px;
}

#standings thead {
    background: #18453B;
    border-bottom: 2px solid #444444;
    text-align: center;
    padding: 0 10px 0 10px;
}

#standings thead th {
    font-size: 15px;
    font-weight: bold;
    color: #FFFFFF;
}

#standings thead th:first-child {
    border-left: none;
}

/* Modern Standings Styles */
.modern-standings {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.modern-standings thead {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.modern-standings thead th {
    border: none;
    padding: 12px 8px;
    vertical-align: middle;
}

.modern-standings tbody tr {
    transition: all 0.2s ease-in-out;
    border-bottom: 1px solid #e9ecef;
}

.modern-standings tbody tr:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.modern-standings td {
    padding: 12px 8px;
    vertical-align: middle;
    border: none;
}

.modern-standings .table-light {
    background-color: #f8f9fa;
}

.modern-standings .table-white {
    background-color: #ffffff;
}

/* Card Styles */
.card {
    border-radius: 12px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-header h5 {
    font-size: 1.1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modern-standings {
        font-size: 0.9rem;
    }
    
    .modern-standings thead th,
    .modern-standings td {
        padding: 8px 4px;
    }
    
    .card-header h5 {
        font-size: 1rem;
    }
}

/* Animation for rank numbers */
.modern-standings .fw-bold {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Top 3 highlighting */
.modern-standings tbody tr:nth-child(1) {
    background: linear-gradient(135deg, #ffd700 0%, #fff8dc 100%) !important;
    border-left: 4px solid #ffd700;
}

.modern-standings tbody tr:nth-child(2) {
    background: linear-gradient(135deg, #c0c0c0 0%, #f5f5f5 100%) !important;
    border-left: 4px solid #c0c0c0;
}

.modern-standings tbody tr:nth-child(3) {
    background: linear-gradient(135deg, #cd7f32 0%, #f4e4bc 100%) !important;
    border-left: 4px solid #cd7f32;
}

/* Modern Schedule Styles */
.modern-schedule {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.modern-schedule thead {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.modern-schedule thead th {
    border: none;
    padding: 12px 8px;
    vertical-align: middle;
}

.modern-schedule tbody tr {
    transition: all 0.2s ease-in-out;
    border-bottom: 1px solid #e9ecef;
}

.modern-schedule tbody tr:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.modern-schedule tbody tr:last-child {
    border-bottom: none;
}

.modern-schedule td {
    padding: 12px 8px;
    vertical-align: middle;
    border: none;
}

/* List group improvements */
.list-group-item {
    transition: all 0.2s ease-in-out;
}

.list-group-item:hover {
    background-color: #f8f9fa;
    transform: translateX(2px);
}

/* Badge improvements */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
}

/* Card improvements */
.card-body {
    padding: 1.5rem;
}

.card-body .list-group-flush .list-group-item:first-child {
    border-top: none;
}

.card-body .list-group-flush .list-group-item:last-child {
    border-bottom: none;
}

/* Stats Page Styles */
.bg-gradient-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.stats-card {
    transition: all 0.3s ease;
    border-radius: 12px;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 1.5rem;
}

.stats-icon-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.scoring-item {
    transition: all 0.2s ease-in-out;
}

.scoring-item:hover {
    transform: translateX(5px);
}

.scoring-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
}

.scoring-color.eagle {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
}

.scoring-color.birdie {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.scoring-color.par {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.scoring-color.bogey {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
}

.scoring-color.double {
    background: linear-gradient(135deg, #fd7e14 0%, #e55a00 100%);
}

.scoring-color.worse {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.modern-stats-table {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.modern-stats-table thead {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.modern-stats-table thead th {
    border: none;
    padding: 12px 8px;
    vertical-align: middle;
}

.modern-stats-table tbody tr {
    transition: all 0.2s ease-in-out;
    border-bottom: 1px solid #e9ecef;
}

.modern-stats-table tbody tr:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.modern-stats-table td {
    padding: 12px 8px;
    vertical-align: middle;
    border: none;
}

.modern-stats-table .table-light {
    background-color: #f8f9fa;
}

.modern-stats-table .table-white {
    background-color: #ffffff;
}



/* Responsive adjustments for stats page */
@media (max-width: 768px) {
    .stats-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .stats-icon-sm {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .modern-stats-table {
        font-size: 0.9rem;
    }
    
    .modern-stats-table thead th,
    .modern-stats-table td {
        padding: 8px 4px;
    }
}

/* Chart responsiveness */
#hole-by-hole-chart,
#scoring-breakdown-chart,
#handicap-chart,
#points-chart,
#scores-chart,
#performance-chart {
    width: 100% !important;
    height: auto !important;
    min-height: 300px;
}

@media (max-width: 768px) {
    #hole-by-hole-chart,
    #scoring-breakdown-chart,
    #handicap-chart,
    #points-chart,
    #scores-chart,
    #performance-chart {
        min-height: 250px;
    }
}

#eagle {
    background-color: lightgreen;
    color: white;
}

#birdie {
    background-color: red;
    color: white;
}

#par {
    background-color: #97A2A2;
    color: white;
}

#bogey {
    background-color: darkblue;
    color: white;
}

#worst {
    background-color: black;
    color: white;
}

#getting-stroke_eagle {
    width: 100px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 0 0 2px yellow inset;
    background-color: lightgreen;
}

#getting-stroke_birdie {
    width: 100px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 0 0 2px yellow inset;
    background-color: red;
}

#getting-stroke_par {
    width: 100px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 0 0 2px yellow inset;
    background-color: #97A2A2;
}

#getting-stroke_bogey {
    width: 100px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 0 0 2px yellow inset;
    background-color: darkblue;
}

#getting-stroke_worst {
    width: 100px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 0 0 2px yellow inset;
    background-color: black;
}

#getting2-stroke_eagle {
    width: 100px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 0 0 2px yellow inset, 0 0 0 4px red inset;
    background-color: lightgreen;
}

#getting2-stroke_birdie {
    width: 100px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 0 0 2px yellow inset, 0 0 0 4px red inset;
    background-color: red;
}

#getting2-stroke_par {
    width: 100px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 0 0 2px yellow inset, 0 0 0 4px red inset;
    background-color: #97A2A2;
}

#getting2-stroke_bogey {
    width: 100px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 0 0 2px yellow inset, 0 0 0 4px red inset;
    background-color: darkblue;
}

#getting2-stroke_worst {
    width: 100px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 0 0 2px yellow inset, 0 0 0 4px red inset;
    background-color: black;
}

.scorecard {
    alignment: center;
    border-spacing: 0;
    border-collapse: collapse;
    margin-left: auto;
    margin-right: auto;
}

.scorecard td {
    font-family: Arial, sans-serif;
    font-size: 14px;
    padding: 3px 5px;
    border-style: solid;
    border-width: 1px;
    overflow: hidden;
    word-break: normal;
    border-color: black;
}

.scorecard .scores {
    color: #FFFFFF;
}

.scorecard .data {
    color: #FFFFFF;
    background-color: #272727;
}

.scorecard .points {
    border-color: inherit;
    background-color: white;
    text-align: center;
    vertical-align: top
}

.scorecard th {
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: normal;
    padding: 3px 3px;
    border-style: solid;
    border-width: 1px;
    overflow: hidden;
    word-break: normal;
    border-color: black;
}

.left-align {
    text-align: left;
}

.center-align {
    text-align: center;
}

.scorecard .score {
    border-color: inherit;
    text-align: center;
    vertical-align: top
}

.scorecard .descriptor {
    font-weight: bold;
    border-color: inherit;
    text-align: left;
    vertical-align: top;
    color: #FFFFFF;
    background-color: #272727;
}

.scorecard .hole-data {
    font-weight: bold;
    font-style: italic;
    border-color: inherit;
    vertical-align: top
}

.scorecard .total {
    border-left: 2px solid;
    border-color: inherit;
    text-align: center;
    vertical-align: top
}

.scorecard .hcp {
    text-align: center;
    font-weight: bold;
    font-size: 10px;
    border-color: inherit;
    vertical-align: center;
    color: #FFFFFF;
    background-color: #272727;
}

/* Styling for sub and virtual team indicators */
.sub-info {
    font-size: 0.8em;
    color: #007bff;
    font-style: italic;
    margin-left: 5px;
}

.virtual-info {
    font-size: 0.8em;
    color: #ff6b35;
    font-style: italic;
    font-weight: bold;
    margin-left: 5px;
}