    .team-leagues-dropdown {
      position: relative;
      display: inline-block;
      margin: 10px 0;
    }
    .textoverview54 a{
        color: #4CAF50;
    }
    .dropdown-label {
      font-weight: 600;
      margin-right: 6px;
    }
    
    .dropdown-toggle {
      background: #f8f9fb;
      border: 1px solid #ccc;
      border-radius: 6px;
      padding: 6px 10px;
      cursor: pointer;
      font-weight: 500;
    }
    
    .dropdown-menu {
      display: none;
      position: absolute;
      background: #fff;
      border: 1px solid #ddd;
      border-radius: 6px;
      list-style: none;
      margin: 5px 0 0;
      right: unset;
      padding: 0;
      min-width: 200px;
      z-index: 20;
      box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }
    
    .dropdown-menu li a {
      display: block;
      padding: 8px 12px;
      color: #333;
      text-decoration: none;
    }
    
    .dropdown-menu li a:hover {
      background: #f1f1f1;
      color: #4CAF50;
    }
    
    .dropdown:hover .dropdown-menu {
      display: block;
    }

    .table-row{
        gap: unset;
    }
    .stats-table-flex{
        padding: unset;
    }
    .md45d{
        border-bottom: 1px solid gainsboro;
    }
    /* CARD STYLING */
    .stat-card {
        background-color: #ffffff;
        padding: .5rem;
        transition: transform 0.2s;
    }
    .stat-card:hover {
        transform: translateY(-2px);
    }

    /* HEADER SECTION */
    .header-section {
        display: flex;
        flex-direction: column; /* Stack on mobile */
        justify-content: space-between;
        align-items: flex-start;
        border-bottom: 1px solid #e5e7eb;
        padding-bottom: 1rem;
        margin-bottom: 1.5rem;
    }
    .main-title {
        font-size: 1.875rem; 
        font-weight: 800;
        color: #1f2937;
        display: flex;
        align-items: center;
    }
    .main-title span {
        font-size: 2.5rem;
        margin-right: 0.75rem;
    }
    .league-selector-container {
        width: 100%; /* Full width on mobile */
        margin-top: 1rem;
    }
    #league-select {
        padding: 0.5rem;
        border: 1px solid #d1d5db;
        border-radius: 0.5rem;
        font-size: 1.125rem;
        font-weight: 600;
        color: #4b5563;
        width: 100%;
    }

    /* OVERVIEW STATS GRID (Mobile: 2 columns) */
    .overview-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        text-align: center;
    }
    .overview-item {
        /*padding: 0.75rem;*/
        border-radius: 0.75rem;
    }
    .overview-item p:first-child {
        /*font-size: 1.875rem;*/
        font-weight: 700;
    }
    .overview-item p:last-child {
        font-size: 0.875rem;
        color: #4b5563;
    }
    /* Overview Colors */
    .overview-item:nth-child(1) { background-color: #eff6ff; } /* Blue-50 */
    .overview-item:nth-child(1) p:first-child { color: #1d4ed8; } /* Blue-700 */
    .overview-item:nth-child(2) { background-color: #f0fdf4; } /* Green-50 */
    .overview-item:nth-child(2) p:first-child { color: #15803d; } /* Green-700 */
    .overview-item:nth-child(3) { background-color: #eef2ff; } /* Indigo-50 */
    .overview-item:nth-child(3) p:first-child { color: #4338ca; } /* Indigo-700 */
    .overview-item:nth-child(4) { background-color: #f5f3ff; } /* Purple-50 */
    .overview-item:nth-child(4) p:first-child { color: #7c3aed; } /* Purple-700 */

    /* MAIN STATS GRID (Mobile: 1 column) */
    .main-stats-grid {
        display: grid;
        grid-template-columns: 1fr;
        /*gap: 1.5rem;*/
    }
    .card-header {
        font-size: 1.25rem;
        font-weight: 700;
        color: #1f2937;
        border-bottom: 1px solid #e5e7eb;
        padding-bottom: 0.75rem;
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
    }
    .card-header span {
        font-size: 1.5rem;
        margin-right: 0.5rem;
    }
    
    /* Stat Lists */
    .stat-list {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem;
        border-radius: 0.5rem;
    }
    .stat-item:nth-child(odd) { background-color: #f9fafb; } /* Alternating background */
    .stat-item dt {
        font-weight: 500;
        color: #4b5563;
    }
    .stat-item dd {
        font-size: 1.25rem;
        font-weight: 800;
    }

    /* Analysis Box */
    .analysis-box {
        background-color: #eef2ff;
        border-left: 4px solid #4f46e5;
        border-radius: 0.75rem;
        padding: 1rem;
        margin-top: 1rem;
    }
    .analysis-box h3 {
        font-weight: 700;
        color: #3730a3;
        margin-bottom: 0.25rem;
    }
    .analysis-box p {
        /*font-size: 0.875rem;*/
        color: #4b5563;
    }

    /* Form Squares */
    .form-bar-container {
        padding-bottom: 0.75rem;
        border-bottom: 1px solid #f3f4f6;
        margin-bottom: 1rem;
    }
    .form-bar-label {
        font-weight: 500;
        color: #4b5563;
        margin-bottom: 0.5rem;
    }
    .form-bar {
        display: flex;
        gap: 0.5rem;
    }
    .form-square {
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 0.5rem;
        font-weight: bold;
        color: white;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    .win { background-color: #10b981; }
    .draw { background-color: #f59e0b; }
    .loss { background-color: #dc2626; }
    .form-square + p {
        font-size: 0.875rem;
        color: #6b7280;
        margin-top: 0.5rem;
    }

    /* Table Styling */
    .table-container {
        overflow-x: auto; /* Required for mobile responsiveness */
    }
    .stats-table {
        width: 100%;
        border-collapse: collapse;
    }
    .stats-table thead tr {
        background-color: #f9fafb;
    }
    .stats-table th, .stats-table td {
        padding: 0.75rem 1rem;
        text-align: left;
        font-size: 0.75rem;
        text-transform: uppercase;
    }
    .stats-table th {
        font-weight: 600;
        color: #4b5563;
        letter-spacing: 0.05em;
    }
    .stats-table td {
        font-size: 0.875rem;
        white-space: nowrap;
        color: #111827;
    }
    .stats-table tbody tr {
        border-top: 1px solid #e5e7eb;
    }
    .stats-table tbody tr:hover {
        background-color: #eff6ff;
    }
    .text-center { text-align: center; }
    .font-bold { font-weight: 700; }
    .font-medium { font-weight: 500; }
    
    /* Utility Colors for Stats */
    .color-green-600 { color: #059669; }
    .color-blue-600 { color: #2563eb; }
    .color-indigo-600 { color: #4f46e5; }
    .color-yellow-600 { color: #d97706; }
    .color-red-600 { color: #dc2626; }
    .color-red-700 { color: #b91c1c; }
    .color-blue-700 { color: #1d4ed8; }
    .color-gray-800 { color: #1f2937; }
    .color-gray-700 { color: #4b5563; }
    .color-gray-900 { color: #111827; }

    /* FOOTER */
    .footer {
        text-align: center;
        font-size: 0.875rem;
        color: #6b7280;
        padding-top: 1rem;
    }

    /* --- MEDIA QUERIES --- */
    
    /* Small Screens (sm: 640px) */
    @media (min-width: 640px) {
        .header-section {
            flex-direction: row;
            align-items: center;
        }
        .league-selector-container {
            width: auto;
            margin-top: 0;
        }
        
    }
    
    @media (max-width: 640px){
        .league-position, .table-cell:first-child{
            font-size: 12px;
        }
    }

    @media (max-width: 450px){
        .league-position, .table-cell:first-child{
            font-size: 10px;
        }
    }
    /* Medium Screens (md: 768px) */
    @media (min-width: 768px) {
        .overview-grid {
            grid-template-columns: repeat(4, 1fr);
        }
    }

    /* Large Screens (lg: 1024px) */
    @media (min-width: 1024px) {
        .main-stats-grid {
            grid-template-columns: repeat(3, 1fr);
        }
    }