.cgcrk-box {
    font-family: 'Vazirmatn', Tahoma, 'Segoe UI', Arial, sans-serif;
    direction: ltr;
    background: linear-gradient(180deg, #0d1120 0%, #070a16 100%);
    border: 1px solid #232c4a;
    border-radius: 8px;
    padding: 18px;
    color: #eaf0ff;
    max-width: 100%;
    box-sizing: border-box;
    box-shadow: 0 25px 60px rgba(0,0,0,0.35), 0 0 40px rgba(0,229,255,0.05);
}

.cgcrk-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.cgcrk-title {
    margin: 0 !important;
    color: #00e5ff !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
    border: none !important;
    font-family: 'Vazirmatn', Tahoma, 'Segoe UI', Arial, sans-serif !important;
}

.cgcrk-selector-wrap { display: flex; }

.cgcrk-selector {
    background: #131a30;
    border: 1px solid #232c4a;
    color: #eaf0ff;
    border-radius: 8px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 13px;
    min-width: 180px;
}

.cgcrk-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #1b2340;
}

.cgcrk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 420px;
}

.cgcrk-table thead th {
    background: #10152a;
    color: #8a94b8;
    text-align: left;
    padding: 10px 12px;
    font-weight: 700;
    border-bottom: 1px solid #232c4a;
    white-space: nowrap;
}

.cgcrk-table tbody td {
    padding: 9px 12px;
    border-bottom: 1px solid #161d38;
    white-space: nowrap;
}

.cgcrk-table tbody tr:last-child td { border-bottom: none; }
.cgcrk-table tbody tr:hover { background: #10152a; }

/* Some themes automatically add the table-responsive / table-card-mobile class
   to every <table> and display cells as vertical blocks (cards), which turns
   each record into multiple lines. These higher-priority rules always keep
   our ranking table as a real single-line table. */
.cgcrk-table-wrap table.cgcrk-table,
.cgcrk-table-wrap table.cgcrk-table.table-card-mobile {
    display: table !important;
}
.cgcrk-table-wrap table.cgcrk-table thead,
.cgcrk-table-wrap table.cgcrk-table tbody {
    display: table-row-group !important;
}
.cgcrk-table-wrap table.cgcrk-table thead tr,
.cgcrk-table-wrap table.cgcrk-table tbody tr {
    display: table-row !important;
}
.cgcrk-table-wrap table.cgcrk-table th,
.cgcrk-table-wrap table.cgcrk-table td,
.cgcrk-table-wrap table.cgcrk-table td:first-child,
.cgcrk-table-wrap table.cgcrk-table th:first-child {
    display: table-cell !important;
    width: auto !important;
    font-weight: inherit !important;
    text-align: left !important;
}

.cgcrk-rank { color: #8a94b8; width: 42px; }
.cgcrk-score { color: #33ff9c; font-weight: 700; }
.cgcrk-index { color: #00e5ff; font-weight: 700; }
.cgcrk-lowdata { color: #8a94b8; font-size: 11px; font-weight: 400; }

.cgcrk-status {
    margin-top: 10px;
    font-size: 12px;
    color: #8a94b8;
    text-align: center;
    min-height: 16px;
}

.cgcrk-status.cgcrk-error { color: #ff4d6d; }

.cgcrk-footer {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.cgcrk-loadmore {
    background: linear-gradient(135deg, #00e5ff, #0091ff);
    color: #041018;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.cgcrk-loadmore:disabled { opacity: 0.6; cursor: default; }
.cgcrk-loadmore:hover:not(:disabled) { filter: brightness(1.08); }

@media (max-width: 480px) {
    .cgcrk-box { padding: 14px; }
    .cgcrk-table { font-size: 12px; }
    .cgcrk-table td:nth-child(2) { max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
}

/* Player name link to public profile */
.cgcrk-player-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed rgba(0,229,255,0.4);
}
.cgcrk-player-link:hover {
    color: #00e5ff;
    border-bottom-color: #00e5ff;
}

/* Flat rectangular flag (flagcdn) instead of the wavy flag emoji, for a consistent look.
   !important because many WordPress themes have a generic "img { display: block }"
   rule that, without this override, would push the flag below the country name
   (making the row height too tall). */
.cgc-flag-flat {
    display: inline-block !important;
    width: 18px;
    height: auto;
    border-radius: 2px;
    vertical-align: middle;
    margin-right: 4px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}
