.top-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        padding: 15px 20px;
        background: white;
        border-radius: 12px;
    }

    .top-logo {
        font-size: 24px;
        font-weight: bold;
        color: #2455a4;
    }

    #globalSearch {
        flex: 1;
        min-width: 0;
        max-width: 500px;
    }
    @media (max-width: 600px) {
        .top-bar {
            flex-direction: column;
            align-items: stretch;
            padding: 12px;
        }

        .top-logo {
            font-size: 20px;
            text-align: center;
        }

        #globalSearch {
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
        }
    }
    body {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
        background: linear-gradient(135deg, #f8fbff, #e8f0ff);
        text-align: center;
        padding: 1.6px;
    }

    h1 {
        color: #1565c0;
        font-size: 36px;
        margin-bottom: 24px;
    }

    h2 {
        color: #333;
        font-size: 22px;
        margin-bottom: 15px;
        font-weight: 700;
    }

    p {
        color: #475569;
    }
    button {
        background-color: #1565c0;
        color: white;
        padding: 12px 20px;
        border: none;
        border-radius: 12px;
        cursor: pointer;
        transition: background-color 0.3s ease, transform 0.2s ease;
    }
    button:hover {
        background-color: #0d47a1;
        transform: translateY(-2px);
    }
    .match-card {
        background-color: #ffffff;
        border: 1px solid #ddd;
        border-radius: 16px;
        padding: 24px;
        font-size: 16px;
        margin: 10px auto 15px;
        max-width: 300px;
        width: 100%;
        box-sizing: border-box;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
        border-left: 4px solid #64748b;
        transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    }

    .match-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 20px #bbb;
        border-color: #1565c0;
    }
    .ranking-card {
        border-left: 4px solid #1565c0;
        background-color: #f0f7ff;
        transition: background-color 0.3s ease, transform 0.2s ease;
        align-self: start;
        cursor: pointer;
    }
    .ranking-card:hover {
        background-color: #e3f2fd;
        transform: translateY(-4px);
    }

    #stats {
        display: flex;
        flex-wrap: wrap;
        min-height: 0;
        justify-content: center;
        gap: 20px;
        margin: 20px auto;
        padding: 20px;
        background: #f0f4ff;
        border-radius: 12px;
        max-width: 900px;
        box-sizing: border-box;
        font-size: 20px;
        font-weight: bold;
        color: #2455a4;
    }
    #stats div {
        min-width: 0;
        box-sizing: border-box;
        text-align: center;
        font-size: 18px !important;
        background: white;
        padding: 15px 20px;
        border-radius: 10px;
        border: 1px solid #dbeafe;
        box-shadow: 0 2px 6px #ddd;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        flex: 1 1 180px;
    }
    #stats div:hover {
        transform: translateY(-4px);
        box-shadow: 0 5px 15px #ccc;
        border-color: #2563eb;
    }
    input[type="text"] {
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 10px;
        font-size: 16px;
        width: 90%;
        max-width: 400px;
    }
    @media (max-width: 600px) {
        body {
            padding: 15px;
        }

        h1 {
            font-size: 30px;
        }
        #stats {
            gap: 10px;
            padding: 10px;
        }

        #stats div {
            font-size: 16px;
            padding: 12px;
            min-width: 100px;
        }
        .match-card {
            font-size: 16px;
            padding: 12px;
            width: 100%;
            box-sizing: border-box;
        }
    }
    nav {
        display: flex;
        justify-content: center;
        gap: 12px;
        margin: 20px 0;
        flex-wrap: wrap;
        width: 100%;
    }
    nav a {
        text-decoration: none;
        color: white;
        background-color: #2455a4;
        padding: 12px 20px;
        border-radius: 12px;
        font-weight: bold;
        transition: all 0.3s ease;
        font-size: 16px;
    }
    nav a:hover {
        background-color: #163b75;
        transform: translateY(-3px);
    }
    nav a.active {
        background-color: #163b75;
        box-shadow: 0 4px 12px #bbb;
    }
    
    @media (max-width: 800px) {
        nav {
            flex-wrap: wrap;
            gap: 10px;
        }
        
        nav a {
            padding: 10px 12px;
            font-size: 14px;
        }
    }
       
    html {
        scroll-behavior: smooth;
    }

    header {
        text-align: center;
        padding: 5px 20px;
        background-color: #f0f8ff;
        border-radius: 15px;
        margin-bottom: 5px;
        border-bottom: 3px solid #2563eb;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    header h1 {
        font-size: 24px;
        font-weight: bold;
        margin-bottom: 10px;
    }
    
    header h2 {
        margin-top: 5px;
        margin-bottom: 10px;
    }
    
    header p {
        font-size: 16px;
        color: #555;
        margin-bottom: 10px;
    }

    @media (max-width: 600px) {
        #stats div {
            width: 100%;
            box-sizing: border-box;
        }
    }
    #matchDialog {
        border: none;
        border-radius: 16px;
        padding: 15px;
        width: 85%;
        box-sizing: border-box;
        max-width: 400px;
        text-align: center;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        overflow-x: auto;
        max-height: 80vh;
        overflow-y: auto;
    }

    @media (max-width: 600px) {
        #matchDialog table {
            font-size: 14px;
            width: 100%;
        }

        #matchDialog th,
        #matchDialog td {
            white-space: normal;
            word-break: normal;
            padding: 5px !important;
            overflow-wrap: normal;
        }
    }
    #matchDialog th:first-child {
        white-space: nowrap;
        width: 40px;
    }
    
    @media (max-width: 600px) {
        .match-card {
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
            margin-bottom: 12px;
            padding: 14px;
        }
    }
    @media (max-width: 600px) {
        h1 {
            font-size: 18px;
            white-space: nowrap;
        }
    }
    @media (max-width: 600px) {
        header nav {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
        }
        header nav a {
            width: 80%;
            box-sizing: border-box;
            text-align: center;
        }
    }

    @media (max-width: 600px) {
        header nav a {
            display: block;
            width: 100%;
            max-width: 220px;
            box-sizing: border-box;
            padding: 12px 8px;
            font-size: 14px;
            white-space: nowrap;
            border-radius: 12px;
            font-weight: 600;
        }
    }
    #stats {
        background-color: #f0f5ff;
        border-radius: 16px;
        padding: 12px;
        margin-bottom: 25px;
        box-shadow:  0 4px rgba(0, 0, 0, 0.08);
    }
 
    #stats > * {
        margin-bottom: 12px;
        width: 100%;
        box-sizing: border-box;
        overflow-wrap: anywhere;
    }
    #stats > div {
        white-space: nowrap;
        font-size: 14px;
    }
    @media (max-width: 600px) {
        #tournamentsSearch {
            width: 100%;
            box-sizing: border-box;
            font-size: 14px;
            padding: 12px;
        }
    }
    @media (max-width: 600px) {
        #matchSearch {
            width: 100%;
            box-sizing: border-box;
            font-size: 14px;
            padding: 12px;
            border-radius: 12px;
            
        }
    }
    @media (max-width: 600px) {
        #playerSearch {
            width: 100%;
            box-sizing: border-box;
            font-size: 14px;
            padding: 12px;
            border-radius: 12px;
            margin-bottom: 20px;
        }
    }
    @media (min-width: 601px) {
        #stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
        }
    }

    @media (min-width: 601px) {
        #matches {
            display: grid;
            grid-template-columns: repeat(2, 280px);
            gap: 20px;
            justify-content: center;
        }
    }
    #matchFilters button.active {
        background: #172033;
        color: #ffffff;
        outline: 3px solid #93c5fd;
        outline-offset: 2px;
    }
    .match-stats {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        max-width: 900px;
        margin: 20px auto;
    }

    .match-stats p {
        background: #f3f6ff;
        padding: 12px 6px;
        font-size: 16px;
        border-radius: 14px;
        text-align:  center;
        font-weight: bold;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
        cursor: pointer;
        transition: transform 0.2s;
    }
    .match-stats p:hover {
        transform: translateY(-5px);
    }
    .match-stats p.active {
        background-color: #dbeafe !important;
        border: 2px solid #2563eb !important;
    }
    
    @media (max-width: 600px) {
        .match-stats {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }
    #rankings {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
        max-width: 900px;
        margin: 20px auto;
        align-items: start;
        direction: ltr;
        justify-items: stretch;
        grid-auto-flow: row;
    }
    #rankings > * {
        width: 100%;
        max-width: none;
        min-width: 0;
        margin: 0;
        box-sizing: border-box;
    }

    @media (max-width: 600px) {
        #rankings {
            grid-template-columns: 1fr;
        }
    }
    @media (max-width: 600px) {
        #stats div {
            font-size: 18px !important;
            overflow-wrap: anywhere;
            min-width: 0;
            flex: 0 1 100%;
        }
    }
    .sidebar {
        width: 220px;
        background: #172033;
        color: white;
        padding: 20px;
        border-radius: 12px;
        margin: 20px 0;
    }

    .sidebar h3 {
        margin-top: 0;
    }

    .sidebar nav {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .sidebar a {
        color: white;
        text-decoration: none;
        padding: 10px;
        border-radius: 8px;
    }

    .sidebar a:hover {
        background: #2563eb;
    }
    .sidebar a.active {
        background: #2563eb;
        color: white;
    }
    
    @media (min-width: 700px) {
        body {
            display: grid;
            grid-template-columns:  260px minmax(0, 1fr);
            gap: 20px;
        }

        header {
            grid-column: 1 / -1;
        }

        .main-content {
            grid-column: 2;
            grid-row: 2;
            min-width: 0;
        }

        .sidebar {
            grid-column: 1;
            grid-row: 2;
            float: none;
            align-self: start;
        }
    }
    @media (max-width: 699px) {
        .sidebar {
            width: auto;
            margin: 12px 0;
            padding: 12px;
        }

        .sidebar h3 {
            font-size: 18px;
        }

        .sidebar nav {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px;
        }
        .sidebar a {
            padding: 8px;
            font-size: 14px;
        }
    }
    .sidebar a {
        transition: background-color 0.2s ease,
        transform 0.2s ease;
    }

    .sidebar a:hover {
        background-color: #2563eb;
        transform: translateX(3px);
    }
    .sidebar a:focus-visible {
        outline: 3px solid #93c5fd;
        outline-offset: 3px;
    }
    #matches {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
        max-width: 900px;
        margin: 20px auto;
    }

    #matches > * {
        width: 100%;
        max-width: none;
        min-width: 0;
        margin: 0;
        box-sizing: border-box;
        padding: 24px 18px;
        border: 1px solid #dbe3ef;
        border-left: 4px solid #2563eb;
        border-radius: 16px;
        background: #ffffff;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    }

    @media (max-width: 900px) {
        #matches {
            grid-template-columns: 1fr;
        }
    }
    #tournaments {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
        max-width: 900px;
        margin: 20px auto;
        align-items: start;
    }

    #tournaments > * {
        width: 100%;
        max-width: none;
        min-width: 0;
        margin: 0;
        box-sizing: border-box;
        border-radius: 16px;
        box-shadow: 0 4px rgba(15, 23, 42, 0.08);
    }

    @media (max-width: 900px) {
        #tournaments {
            grid-template-columns: 1fr;
        }
    }
    #matchFilters {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        margin: 16px 24px;
    }

    #matchFilters button {
        margin: 0;
    }
    #matchSearch,
    #tournamentsSearch,
    #playerSearch {
        display: block;
        width: 100%;
        max-width: 500px;
        margin: 16px auto;
        padding: 12px 16px;
        box-sizing: border-box;
        border: 1px solid #cbd5e1;
        border-radius: 12px;
        font-size: 16px;
    }
    #matches > :only-child,
    #rankings > :only-child,
    #tournaments > :only-child {
        grid-column: 1 / -1;
        max-width: 500px;
        justify-self: center;
    }
    #matchDialog::backdrop {
        background: rgba(15, 23, 42, 0.45);
    }
    #matches > .empty-state {
        grid-column: 1 / -1;
        width: 100%;
        max-width: none;
        padding: 24px;
        text-align: center;
        color: #475569;
        background: #f1f5f9;
        border: 1px dashed #cbd5e1;
        border-radius: 12px;
        box-shadow: none;
    }
    #rankings > .empty-state {
        grid-column: 1 / -1;
        width: 100%;
        max-width: none;
        padding: 24px;
        box-sizing: border-box;
        text-align: center;
        color: #475569;
        background: #f1f5f9;
        border: 1px dashed #cbd5e1;
        border-radius: 12px;
        box-shadow: none;
    }
    #tournaments > .empty-state {
        grid-column: 1 / -1;
        width: 100%;
        max-width: none;
        padding: 24px;
        box-sizing: border-box;
        text-align: center;
        color: #475569;
        background: #f1f5f9;
        border: 1px dashed #cbd5e1;
        border-radius: 12px;
        box-shadow: none;
    }
    #refreshResultsBtn:disabled {
        opacity: 0.6;
        cursor: wait;
    }
    #stats div strong {
        display: block;
        font-size: 32px;
        line-height: 1.2;
        margin-bottom: 8px;
        color: #2455a4;
    }

    #stats div span {
        display: block;
        font-size: 15px;
        font-weight: 500;
        color: #475569;
    }
    @media (max-width: 600px) {
        .sidebar {
            display: none;
        }
    }
    .match-page {
        width: 100%;
        max-width: 800px;
        margin: 24px auto;
        padding: 20px;
        box-sizing: border-box;
    }
    .match-page #matchSummary {
        background: white;
        padding: 28px 16px;
        border-radius: 16px;
        font-size: 24px;
        font-weight: bold;
        color: #2455a4;
        overflow-wrap: anywhere;
    }
    .match-page #setsSection {
        margin-top: 24px;
        padding: 20px;
        background: white;
        border-radius: 16px;
    }
    .match-page #setsResults p {
        margin: 10px 0;
        padding: 12px;
        background: #f0f4ff;
        border-radius: 8px;
    }
    @media (max-width: 600px) {
        .match-page {
            padding: 12px;
        }
        
        .match-page #matchSummary {
            font-size: 20px;
        }
    }
    .match-page #matchSummary {
        white-space: pre-line;
        line-height: 1.8;
    }
    .match-page #setsResults {
        overflow-x: auto;
    }
    
    .match-page .sets-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 16px;
    }
    
    .match-page .sets-table th,
    .match-page .sets-table td {
        padding: 12px 8px;
        text-align: center;
        border-bottom: 1px solid #dbeafe;
    }
    
    .match-page .sets-table th {
        background: #e8f0ff;
        color: #2455a4;
    }
    
    .match-page .sets-table tbody tr:nth-child(even) {
        background: #f8fafc;
    }
    .match-page {
        grid-column: 1 / -1;
        min-width: 0;
    }

    .tournament-page {
        grid-column: 1 / -1;
        width: 100%;
        max-width: 900px;
        min-width: 0;
        margin: 24px auto;
        padding: 20px;
        box-sizing: border-box;
    }
    
    .tournament-page #tournamentSummary {
        padding: 24px 16px;
        background: white;
        border-radius: 16px;
        color: #2455a4;
        font-size: 24px;
        font-weight: bold;
        overflow-wrap: anywhere;
    }

    .tournament-page #tournamentMatches {
        display: grid;
        gap: 16px;
        margin-top: 20px;
    }
    
    .tournament-page .tournament-match-link {
        display: block;
        padding: 20px 16px;
        background: white;
        border: 1px solid #dbeafe;
        border-radius: 12px;
        color: #2455a4;
        text-decoration: none;
        font-weight: bold;
        line-height: 1.8;
        overflow-wrap: anywhere;
    }
    
    .tournament-page .tournament-match-link:hover {
        background: #e8f0ff;
    }

    .player-page {
        grid-column: 1 / -1;
        width: 100%;
        max-width: 900px;
        min-width: 0;
        margin: 24px auto;
        padding: 20px;
        box-sizing: border-box;
    }
    .player-page #playerSummary {
        padding: 24px 16px;
        background: white;
        border-radius: 16px;
        color: #2455a4;
        font-size: 24px;
        font-weight: bold;
        overflow-wrap: anywhere;
    }

    .player-page #playerMatches a {
        display: block;
        padding: 20px 16px;
        background: white;
        border: 1px solid #dbeafe;
        border-radius: 12px;
        color: #2455a4;
        text-decoration: none;
        font-weight: bold;
        line-height: 1.8;
        overflow-wrap: anywhere;
    }
    
    .player-page #playerMatches a:hover {
        background: #e8f0ff;
    }

    .player-page #playerStatsSection {
        margin-top: 24px;
        padding: 20px;
        background: white;
        border-radius: 16px;
    }
    
    .player-page #playerStats {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    
    .player-page #playerStats p {
        margin: 0;
        padding: 16px;
        background: #e8f0ff;
        border-radius: 10px;
        color: #2455a4;
        font-weight: bold;
    }
    .match-page #matchSummary a {
        color: inherit;
        text-decoration: none;
    }
    
    .match-page #matchSummary a:hover {
        text-decoration: underline;
    }
    
    .match-page #matchSummary a:focus-visible {
        outline: 2px solid #2455a4;
        outline-offset: 4px;
        border-radius: 4px;
    }
    .rankings-page {
        grid-column: 1 / -1;
        width: 100%;
        max-width: 1000px;
        min-width: 0;
        margin: 24px auto;
        padding: 20px;
        box-sizing: border-box;
    }
    .rankings-page #playerSearch {
        display: block;
        width: 100%;
        max-width: 600px;
        margin: 12px auto 24px;
        padding: 14px;
        border: 1px solid #cbd5e1;
        border-radius: 10px;
        box-sizing: border-box;
        font: inherit;
    }
    .tournament-page #tournamentSearch {
        display: block;
        width: 100%;
        max-width: 600px;
        margin: 12px auto 24px;
        padding: 14px;
        border: 1px solid #cbd5e1;
        border-radius: 10px;
        box-sizing: border-box;
        font: inherit;
    }
    
    .rankings-page #rankings {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
    
    .rankings-page .ranking-card {
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 24px;
        box-sizing: border-box;
    }
    
    .rankings-page .ranking-card h2 {
        margin: 0 0 16px;
        color: #2455a4;
    }
    
    .rankings-page .ranking-card p {
        line-height: 1.8;
        overflow-wrap: anywhere;
    }
    
    .rankings-page .ranking-card a {
        display: inline-block;
        margin-top: 12px;
        padding: 10px 18px;
        background: #2455a4;
        color: white;
        border-radius: 10px;
        text-decoration: none;
        font-weight: bold;
    }
    
    .rankings-page .ranking-card a:hover {
        background: #193e78;
    }
    
    @media (max-width: 600px) {
        .rankings-page #rankings {
            grid-template-columns: 1fr;
        }
    }

    .tournament-page #tournaments {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
    
    .tournament-page #tournaments .match-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 24px;
        box-sizing: border-box;
    }
    
    .tournament-page #tournaments h2 {
        margin: 0 0 16px;
        color: #2455a4;
        overflow-wrap: anywhere;
    }
    
    .tournament-page #tournaments p {
        margin: 8px 0;
        line-height: 1.6;
    }
    
    .tournament-page #tournaments a {
        display: inline-block;
        margin-top: auto;
        padding: 10px 18px;
        background: #2455a4;
        color: white;
        border-radius: 10px;
        text-decoration: none;
        font-weight: bold;
    }
    
    .tournament-page #tournaments a:hover {
        background: #193e78;
    }
    
    @media (max-width: 600px) {
        .tournament-page #tournaments {
            grid-template-columns: 1fr;
        }
    }

    .player-page #playerStats {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }
    
    .player-page #playerStats p {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        margin: 0;
        padding: 16px 10px;
        line-height: 1.6;
        overflow-wrap: anywhere;
    }
    
    .player-page #playerMatchesSection {
        margin-top: 24px;
    }
    
    .player-page #playerMatches a {
        border-left: 4px solid #2455a4;
    }
    
    @media (max-width: 600px) {
        .player-page #playerStats {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    .tournament-page #tournamentMatchesSection {
        margin-top: 24px;
        padding: 24px;
        background: white;
        border-radius: 16px;
    }
    
    .tournament-page #tournamentMatchesSection h2 {
        margin: 0;
        color: #2455a4;
    }
    
    .tournament-page .tournament-match-link {
        background: #f8fafc;
        border-left: 4px solid #2455a4;
        padding: 20px;
        box-sizing: border-box;
    }
    
    .tournament-page .tournament-match-link:hover {
        background: #e8f0ff;
    }
    
    .tournament-page .tournament-match-link:focus-visible {
        outline: 2px solid #2455a4;
        outline-offset: 4px;
    }
    
    @media (max-width: 600px) {
        .tournament-page #tournamentMatchesSection {
            padding: 16px;
        }
    }

    .match-page .tournament-link {
        display: inline-block;
        padding: 10px 18px;
        background: #2455a4;
        color: white;
        border-radius: 10px;
        text-decoration: none;
        font-weight: bold;
    }
    
    .match-page .tournament-link:hover {
        background: #193e78;
    }
    
    .match-page #matchSummary {
        border-left: 4px solid #2455a4;
    }
    
    .match-page #setsSection h2 {
        margin: 0 0 20px;
        color: #2455a4;
    }
    
    .match-page .sets-table th,
    .match-page .sets-table td {
        padding: 14px 10px;
        line-height: 1.6;
    }

    .main-content #matches {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
    
    .main-content #matches .match-card {
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 24px;
        box-sizing: border-box;
        line-height: 1.7;
        overflow-wrap: anywhere;
    }
    
    .main-content #matches .match-card button {
        margin-top: 16px;
        padding: 10px 18px;
        border-radius: 10px;
        font: inherit;
        font-weight: bold;
    }
    
    .main-content #matchFilters {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        margin: 16px 0 24px;
    }
    
    @media (max-width: 600px) {
        .main-content #matches {
            grid-template-columns: 1fr;
        }
    }
    
    .top-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .top-bar a.top-logo {
        color: #2455a4;
        text-decoration: none;
        font-weight: 800;
    }
    
    .top-bar a.top-logo:focus-visible {
        outline: 2px solid #2455a4;
        outline-offset: 4px;
        border-radius: 4px;
    }
    
    .top-bar #globalSearch {
        flex: 1 1 280px;
        width: 100%;
        max-width: 520px;
        min-width: 0;
        box-sizing: border-box;
    }

    @media (max-width: 600px) {
        .top-bar #globalSearch {
            flex: 0 1 auto;
            width: 100%;
            max-width: 100%;
            height: 48px;
            padding: 12px 14px;
            box-sizing: border-box;
        }
    }

    .rankings-page .ranking-stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 16px;
    }
    
    .rankings-page .ranking-stats p {
        margin: 0;
        padding: 12px 8px;
        background: #e8f0ff;
        border-radius: 10px;
        color: #2455a4;
        font-size: 14px;
        line-height: 1.5;
    }

    #matchDialog #closeDialog {
        display: block;
        margin: 16px auto 12px;
    }
    
    #matchDialog > a {
        display: block;
        margin: 0 auto 8px;
        line-height: 1.5;
    }