.cf-agg-error,
.cf-agg-1x2-error,
.cf-agg-ou-error,
.cf-agg-btts-error,
.cf-league-error,
.cf-global-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

[class*="-grid-container"] {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 20px 0;
}

[class*="-grid-item"] {
    background: #0a1c2f;
    border: 1px solid #1e4a76;
    border-radius: 5px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

[class*="-market-title"] {
    font-size: 1.2rem;
    font-weight: 600;
    color: #FFB74D;
    margin-bottom: 12px;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 1px solid #FFB74D;
}

[class*="-stats-top"] {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

[class*="-stats-bottom"] {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

[class*="-stat-item"] {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 6px 4px;
    text-align: center;
}

[class*="-stat-label"] {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #aaa;
    letter-spacing: 0.3px;
}

[class*="-stat-value"] {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-top: 2px;
}

[class*="-chart-container"] {
    background: transparent;
    padding: 4px 0;
    margin: 8px 0;
}

[class*="-chart-canvas"] {
    width: 100% !important;
    height: auto !important;
    max-height: 180px;
}

[class*="-stats-actions"] {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid #FFB74D;
    margin-top: 4px;
}

[class*="-action-button"] {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
    background: #1976d2;
    color: #fff;
    border: none;
    cursor: pointer;
}

[class*="-action-button"]:hover {
    background: #1565c0;
    color: #fff;
    text-decoration: none;
}

[class*="-action-button"].today-button {
    background: #f57c00;
    color: #fff;
}

[class*="-action-button"].today-button:hover {
    background: #e65100;
    color: #fff;
}

[class*="-action-button"].disabled {
    background: #555;
    color: #999;
    cursor: not-allowed;
    pointer-events: none;
}

[class*="-league-header"] {
    display: block;
    padding: 10px 10px !important;
    border-bottom: none !important;
    border-radius: 5px 5px 0 0;
}

.cf-common-header {
    padding: 5px 5px !important;
    border-bottom: none !important;
    border-radius: 5px 5px 0 0;
}

[class*="-title-wrap"] {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px !important;
    padding-left: 5px !important;
}

[class*="-header-flag"] {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 2px;
    border: 2px solid #999;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

[class*="-title-text"] {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

[class*="-title-text"] h1 {
    margin: 0 0 6px 0;
    font-size: 1.2rem !important;
    font-weight: 700;
    color: #FFB74D;
    line-height: 1.2;
}

[class*="-stats-description"] {
    font-size: 1.0rem;
    color: #d1d1d1;
    margin: 0;
    display: block;
    line-height: 1.4;
}

.cf-agg-1x2-league-header {
    padding: 18px 16px !important;
    border: 1px solid #1e4a76;
    border-bottom: none !important;
    border-radius: 5px 5px 0 0;
}
.cf-agg-1x2-title-text h1 {
    color: #FFB74D;
    font-size: 1.5rem !important;
}

.cf-agg-ou-league-header {
    background: #0a2a2a;
    border-color: #2a7a7a;
}
.cf-agg-ou-title-text h1 {
    color: #FFB74D;
    font-size: 1.5rem !important;
}

.cf-agg-btts-league-header {
    background: #2a0a2a;
    border-color: #7a2a7a;
}
.cf-agg-btts-title-text h1 {
    color: #FFB74D;
    font-size: 1.5rem !important;
}

.cf-league-title-text h1 {
    margin: 0;
    display: block;
    font-size: 1.5rem !important;
    font-weight: 700;
    color: #F5C542;
    background: transparent;
    line-height: 1.1;
    letter-spacing: -0.3px;
}

.cf-global-league-header {
    background: #1a1a2e;
    border-color: #3a3a5e;
}
.cf-global-title-text h1 {
    color: #FF6F00;
}

[class*="-leagues-table"] {
    width: calc(100% - 30px);
    border-collapse: separate;
    border-spacing: 0 8px;
    background: transparent;
    margin-top: 20px;
    margin-right: 25px;
    font-size: 0.85rem;
    table-layout: fixed;
    box-sizing: border-box;
}

[class*="-leagues-table"] thead tr {
    background: transparent;
}

[class*="-leagues-table"] th {
    background: #0f2a44;
    color: #fff;
	font-size: 0.9rem !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 6px;
    border: none;
    text-align: center;
}

[class*="-leagues-table"] tbody tr {
    background: #0f2a44;
    border-radius: 5px;
    box-shadow: 0 0 0 1px #1e4a76;
}



[class*="-leagues-table"] td {
    padding: 10px 10px;
    background: #0f2a44;
    color: #ccc;
    text-align: center !important;
    border: none;
	font-size: 0.9rem !important;
}

[class*="-leagues-table"] tbody tr td:first-child {
    border-radius: 5px 0 0 5px;
    padding-left: 20px !important;
}
[class*="-leagues-table"] tbody tr td:last-child {
    border-radius: 0 5px 5px 0;
}
[class*="-leagues-table"] tbody tr:hover td:first-child {
    border-radius: 5px 0 0 5px;
}
[class*="-leagues-table"] tbody tr:hover td:last-child {
    border-radius: 0 5px 5px 0;
}

[class*="-league-cell"] {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
}

.league-info-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

[class*="-flag-icon"] {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    flex-shrink: 0;
    border: 1px solid #999;
}

[class*="-league-name"] {
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    font-size: 1rem !important;
}

[class*="-progress-bar"] {
    width: 100% !important;
    max-width: 100% !important;
    background: #153859;
    border-radius: 2px;
    overflow: hidden;
    height: 26px;
    position: relative;
    margin: 0 auto;
    border: 1px solid #1e4a76;
}

[class*="-progress-fill"] {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.4s ease;
    border-radius: 2px;
    min-width: 30px;
}

[class*="-progress-text"] {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 4px rgba(0,0,0,0.5);
    white-space: nowrap;
}

[class*="-details-btn"] {
    padding: 3px 12px;
    border-radius: 20px;
    background: #1976d2;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}
[class*="-details-btn"]:hover {
    background: #1565c0;
    color: #fff;
    text-decoration: none;
}
[class*="-details-btn"].disabled {
    background: #444;
    color: #888;
    cursor: default;
    pointer-events: none;
}


[class*="-leagues-table"] td:first-child .medal-emoji {
    font-size: 1.5rem !important;  
    line-height: 1.2;
}

[class*="-leagues-table"] td:first-child .medal-number {
    font-size: 1rem !important;  
    line-height: 1.2;
    font-weight: 700;
    color: #ccc;
}

/* Mobile: ξεχωριστά μεγέθη για το .mobile-medal */
.league-info-container .mobile-medal .medal-emoji {
    font-size: 1.8rem !important;
    line-height: 1.2;
}

.league-info-container .mobile-medal .medal-number {
    font-size: 0.9rem !important;
    line-height: 1.2;
    font-weight: 700;
    color: #ccc;
}

.cf-common-header .cf-agg-title-wrap,
[class*="-title-wrap"] {
    display: flex !important;
    flex-wrap: nowrap !important;
	padding-right: 20px !important;
    align-items: center;
    gap: 2px !important;
}

[class*="-header-flag"] {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
}

[class*="-title-text"] {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

[class*="-leagues-table"] {
    table-layout: fixed;
    width: calc(100% - 30px);
    margin-right: 25px;
    box-sizing: border-box;
}

.futuristic-btn {
    background: linear-gradient(135deg, #16283A, #1e3a5f);
    color: #FFB74D;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 6px 12px;
    border-radius: 2px;
    font-weight: 500;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(22,40,58,0.4);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 0;
    cursor: pointer;
}
.futuristic-btn:hover {
    background: linear-gradient(135deg, #1e3a5f, #16283A);
    box-shadow: 0 6px 20px rgba(22,40,58,0.6);
}
.futuristic-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(22,40,58,0.4);
}

.action-buttons {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.tab-icon {
    display: inline-block;
    font-size: 1.2rem;
    line-height: 1;
    vertical-align: middle;
    margin-bottom: 3px;
    margin-right: 4px;
}

.history-buttons {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.history-btn {
    padding: 4px 10px !important;
    font-size: 0.7rem !important;
    min-width: 40px;
    text-align: center;
}

.hist-1x2 {
    background: linear-gradient(135deg, #0d47a1, #1976d2) !important;
    border-color: #1976d2 !important;
}
.hist-1x2:hover {
    background: linear-gradient(135deg, #0a3a8a, #1565c0) !important;
}

.hist-ou {
    background: linear-gradient(135deg, #e65100, #f57c00) !important;
    border-color: #f57c00 !important;
}
.hist-ou:hover {
    background: linear-gradient(135deg, #bf360c, #e65100) !important;
}

.hist-btts {
    background: linear-gradient(135deg, #6a1b9a, #9c27b0) !important;
    border-color: #9c27b0 !important;
}
.hist-btts:hover {
    background: linear-gradient(135deg, #4a148c, #7b1fa2) !important;
}

.history-btn.disabled {
    background: #444 !important;
    color: #888 !important;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.6;
}

.history-btn.futuristic-btn {
    margin: 0;
}

[class*="-leagues-table"] td:last-child {
    text-align: center;
    vertical-align: middle;
    padding: 6px 4px;
}

.agg-table-header {
    background: #9E9E9E;
    border-radius: 5px;
}
.agg-table-header th {
    border-left: 1px solid #5a6a7a;
    border-right: 1px solid #5a6a7a;
    padding: 2px 6px;
    background: #9E9E9E;
}
.agg-table-header th:first-child {
    border-left: 1px solid #5a6a7a;
}
.agg-table-header th:last-child {
    border-right: 1px solid #5a6a7a;
}

th.header-wins {
    background-color: #4ade80 !important;
    color: #ffffff !important;
}
th.header-losses {
    background-color: #f87171 !important;
    color: #ffffff !important;
}
th.header-wins,
th.header-losses {
    padding: 10px 6px;
    border: none;
}

.cf-agg-error,
.cf-agg-1x2-error,
.cf-agg-ou-error,
.cf-agg-btts-error,
.cf-league-error,
.cf-global-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

.cf-agg-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 20px 30px 20px 0;
}

.cf-agg-grid-item {
    background: #0E243B;
    border: 1px solid #1e4a76;
    border-radius: 5px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cf-agg-market-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #d1d1d1;
    margin-bottom: 12px;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 1px solid #d1d1d1;
}

.cf-agg-stats-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.cf-agg-stats-bottom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.cf-agg-stat-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 6px 4px;
    text-align: center;
}

.cf-agg-stat-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #aaa;
    letter-spacing: 0.3px;
}

.cf-agg-stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-top: 2px;
}

.cf-agg-chart-container {
    background: transparent;
    padding: 4px 0;
    margin: 8px 0;
}

.cf-agg-chart-canvas {
    width: 100% !important;
    height: auto !important;
    max-height: 180px;
}

.cf-agg-stats-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid #d1d1d1;
    margin-top: 4px;
}

.cf-agg-action-button {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
    background: #1976d2;
    color: #fff;
    border: none;
    cursor: pointer;
}
.cf-agg-action-button:hover {
    background: #1565c0;
    color: #fff;
    text-decoration: none;
}
.cf-agg-action-button.today-button {
    background: #f57c00;
    color: #fff;
}
.cf-agg-action-button.today-button:hover {
    background: #e65100;
    color: #fff;
}
.cf-agg-action-button.disabled {
    background: #555;
    color: #999;
    cursor: not-allowed;
    pointer-events: none;
}


.cf-agg-title-wrap,
.cf-title-wrap {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start;
    gap: 16px;
}

.cf-agg-header-flag,
.cf-header-flag {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 2px;
    border: 2px solid #999;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.cf-agg-title-text,
.cf-title-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.cf-agg-title-text h1,
.cf-title-text h1 {
    margin: 0;
    display: block;
    font-size: 1.5rem !important;
    font-weight: 700;
    color: #F5C542;
    background: transparent;
    line-height: 1.1;
    letter-spacing: -0.3px;
}

.cf-agg-stats-description,
.cf-stats-description {
    font-size: 1.0rem !important;
    color: #d1d1d1;
    line-height: 1.2;
    margin-bottom: 0;
    padding: 0;
}

.cf-agg-leagues-table,
.cf-leagues-table {
    width: calc(100% - 30px);
    border-collapse: separate;
    border-spacing: 0 8px;
    background: transparent;
    margin-top: 20px;
    margin-right: 25px;
    font-size: 0.85rem;
    table-layout: fixed;
    box-sizing: border-box;
}

.cf-agg-leagues-table thead tr,
.cf-leagues-table thead tr {
    background: transparent;
}

.cf-agg-leagues-table th,
.cf-leagues-table th {
    background: #0f2a44;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 10px 6px;
    border: none;
    text-align: left;
}

.cf-agg-leagues-table tbody tr,
.cf-leagues-table tbody tr {
    background: #0f2a44;
    border-radius: 5px;
}

.cf-agg-leagues-table td,
.cf-leagues-table td {
    padding: 10px 10px;
    background: #0f2a44;
    color: #ccc;
    text-align: left;
    border: none;
}

.cf-agg-leagues-table tbody tr td:first-child,
.cf-leagues-table tbody tr td:first-child {
    border-radius: 5px 0 0 5px;
    padding-left: 20px !important;
}
.cf-agg-leagues-table tbody tr td:last-child,
.cf-leagues-table tbody tr td:last-child {
    border-radius: 0 5px 5px 0;
}

.cf-agg-leagues-table th:first-child,
.cf-leagues-table th:first-child {
    padding-left: 60px !important;
}

.cf-agg-league-cell,
.cf-league-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
}

.league-info-container {
    display: flex;
    align-items: center;
    gap: 2px;
}

.cf-agg-flag-icon,
.cf-flag-icon {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    flex-shrink: 0;
    border: 1px solid #999;
}

.cf-agg-league-name,
.cf-league-name {
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    font-size: 1rem !important;
}

.cf-agg-progress-bar,
.cf-progress-bar {
        height: 30px !important;
        min-width: 40px;
        border-width: 1px;
        width: 100% !important;
    }

.cf-agg-progress-fill,
.cf-progress-fill {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.4s ease;
    border-radius: 2px;
    min-width: 30px;
}

.cf-agg-progress-text,
.cf-progress-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
}

.cf-agg-action-btn,
.cf-action-btn {
    padding: 3px 12px;
    border-radius: 20px;
    background: #1976d2;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}
.cf-agg-action-btn:hover,
.cf-action-btn:hover {
    background: #1565c0;
    color: #fff;
    text-decoration: none;
}
.cf-agg-action-btn.disabled,
.cf-action-btn.disabled {
    background: #444;
    color: #888;
    cursor: default;
    pointer-events: none;
}

.agg-table-header th.header-wins {
    background-color: #4ade80 !important;
    color: #ffffff !important;
}
.agg-table-header th.header-losses {
    background-color: #f87171 !important;
    color: #ffffff !important;
}

[class*="-leagues-table"] td:nth-child(2) .league-text-container {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.2;
}

[class*="-leagues-table"] td:nth-child(2) .league-country {
    font-weight: 500;
    color: #FFB74D;
    font-size: 1rem !important;
    white-space: nowrap;
}

[class*="-leagues-table"] td:nth-child(2) .cf-agg-league-name,
[class*="-leagues-table"] td:nth-child(2) .cf-league-name,
[class*="-leagues-table"] td:nth-child(2) [class*="-league-name"] {
    font-weight: 400;
    color: #cccccc;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: inline-block;
}

[class*="-leagues-table"] thead.agg-table-header th {
    background: #9E9E9E !important;
    color: #000000 !important;
    border-left: 1px solid #5a6a7a !important;
    border-right: 1px solid #5a6a7a !important;
    padding: 14px 6px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-align: center;
}

[class*="-leagues-table"] thead.agg-table-header th.header-wins {
    background-color: #4ade80 !important;
    color: #ffffff !important;
}
[class*="-leagues-table"] thead.agg-table-header th.header-losses {
    background-color: #f87171 !important;
    color: #ffffff !important;
}

[class*="-leagues-table"] thead.agg-table-header th:first-child {
    border-left: 1px solid #5a6a7a !important;
}
[class*="-leagues-table"] thead.agg-table-header th:last-child {
    border-right: 1px solid #5a6a7a !important;
}

.wins-positive { color: #4ade80 !important; font-weight: 700; }
.losses-negative { color: #f87171 !important; font-weight: 700; }
.winrate-positive { color: #4ade80 !important; font-weight: 700; }
.winrate-negative { color: #f87171 !important; font-weight: 700; }
.profit-positive { color: #4ade80 !important; font-weight: 700; }
.profit-negative { color: #f87171 !important; font-weight: 700; }
.roi-text-positive { color: #4ade80 !important; font-weight: 700; }
.roi-text-negative { color: #f87171 !important; font-weight: 700; }
.roi-text-neutral { color: #cccccc !important; }

.futuristic-btn {
    background: linear-gradient(135deg, #16283A, #1e3a5f);
    color: #FFB74D;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 6px 12px;
    border-radius: 2px;
    font-weight: 500;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(22,40,58,0.4);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 0;
    cursor: pointer;
}
.futuristic-btn:hover {
    background: linear-gradient(135deg, #1e3a5f, #16283A);
    box-shadow: 0 6px 20px rgba(22,40,58,0.6);
}
.futuristic-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(22,40,58,0.4);
}

.cf-agg-tab-btn {
    padding: 8px 18px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #16283A, #1e3a5f);
    color: #aaa;
    cursor: pointer;
}
.cf-agg-tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    color: #fff;
}
.cf-agg-tab-btn.active {
    color: #fff;
    cursor: default;
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.cf-agg-1x2-tab-btn.active,
.cf-agg-1x2-tab-btn:hover {
    background: linear-gradient(135deg, #003366, #0066cc);
    border-color: #3399ff;
    color: #ffffff;
}
.cf-agg-ou-tab-btn.active,
.cf-agg-ou-tab-btn:hover {
    background: linear-gradient(135deg, #663300, #cc6600);
    border-color: #ff9933;
    color: #ffffff;
}
.cf-agg-btts-tab-btn.active,
.cf-agg-btts-tab-btn:hover {
    background: linear-gradient(135deg, #330066, #6600cc);
    border-color: #9933ff;
    color: #ffffff;
}

.cf-agg-toggle-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #ccc;
    padding: 8px 18px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    margin-left: 10px;
}
.cf-agg-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.cf-agg-toggle-btn.active {
    background: #FFB74D;
    color: #1B3A62;
    border-color: #FFB74D;
    cursor: default;
}
.cf-agg-toggle-btn.active:hover {
    background: #FFB74D;
    color: #1B3A62;
}

[class*="-title-wrap"] {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

[class*="-title-text"] {
    flex: 1 1 auto;
    min-width: 200px;
}

[class*="-header-buttons"] {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: 20px;
}

[class*="-tab-btn"] {
    padding: 8px 18px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #16283A, #1e3a5f);
    color: #aaa;
    cursor: pointer;
}
[class*="-tab-btn"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    color: #fff;
}
[class*="-tab-btn"].active {
    color: #fff;
    cursor: default;
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.cf-agg-1x2-tab-btn.active,
.cf-agg-1x2-tab-btn:hover {
    background: linear-gradient(135deg, #003366, #0066cc);
    border-color: #3399ff;
    color: #ffffff;
}
.cf-agg-ou-tab-btn.active,
.cf-agg-ou-tab-btn:hover {
    background: linear-gradient(135deg, #663300, #cc6600);
    border-color: #ff9933;
    color: #ffffff;
}
.cf-agg-btts-tab-btn.active,
.cf-agg-btts-tab-btn:hover {
    background: linear-gradient(135deg, #330066, #6600cc);
    border-color: #9933ff;
    color: #ffffff;
}

.cf-agg-header-buttons {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 10px;
    align-items: center;
    margin-left: auto;
    white-space: nowrap;
}

.cf-agg-header-buttons .cf-agg-toggle-btn {
    white-space: nowrap;
    flex-shrink: 0;
}

.history-buttons {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 5px;
    justify-content: center;
    align-items: center;
}

.history-buttons .history-btn {
    white-space: nowrap;
    flex-shrink: 0;
}

.current-league {
    outline: 1px solid #FFB74D !important;
    outline-offset: -1px;
    border-radius: 5px !important;
}

.current-league td {
    background: inherit !important;
    color: inherit !important;
    border: none !important;
}
.current-league td .league-country {
    color: #FFB74D !important;
}
.current-league td .cf-agg-league-name,
.current-league td .cf-league-name,
.current-league td [class*="-league-name"] {
    color: inherit !important;
}
.current-league td .wins-positive,
.current-league td .losses-negative,
.current-league td .profit-positive,
.current-league td .profit-negative,
.current-league td .roi-text-positive,
.current-league td .roi-text-negative {
    color: inherit !important;
}

.trend-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 1.1rem;
    background-color: #14232F;
    transition: all 0.2s ease;
}

.trend-up {
    color: #4ade80;
}

.trend-down {
    color: #f87171;
}

.trend-stable {
    color: #fb923c;
}

.trend-cell {
    text-align: center;
    vertical-align: middle;
}
.league-info-container img.desktop-flag {
    border-radius: 50% !important;
    border: 1px solid #999 !important;
    object-fit: cover !important;
	margin-right: 8px !important;
}

.league-info-container img:not(.desktop-flag) {
    border-radius: 0 !important;
    object-fit: contain !important;
}

.league-info-container img {
    border-radius: 0 !important;
    object-fit: contain !important;
}

[class*="-leagues-table"] td.arrow-cell,
[class*="-leagues-table"] th.arrow-header {
    display: none !important;
}

.league-info-container .mobile-medal {
    display: none;
    margin-right: 2px !important;
    min-width: 1.8rem !important;
    text-align: center;
}

.league-info-container .mobile-medal .medal-emoji {
    font-size: 1.5rem !important;
    line-height: 1.2;
}

.league-info-container .mobile-medal .medal-number {
    font-size: 1.2rem !important;
    line-height: 1.2;
}


[class*="-leagues-table"] tbody tr.clickable-row {
    cursor: pointer;
}

[class*="-leagues-table"] tbody tr.clickable-row:hover {
    background: #e53935 !important;
    box-shadow: 0 0 0 1px #1e4a76, 0 4px 20px rgba(0, 0, 0, 0.5) !important;
}

[class*="-leagues-table"] tbody tr.clickable-row:hover td {
    color: #000000 !important;
    background: transparent !important;
    font-weight: bold !important;
}

[class*="-leagues-table"] tbody tr.clickable-row:hover .league-country {
    color: #000000 !important;
    font-weight: bold !important;
}

[class*="-leagues-table"] tbody tr.clickable-row:hover .wins-positive,
[class*="-leagues-table"] tbody tr.clickable-row:hover .profit-positive {
    color: #000000 !important;
    font-weight: bold !important;
}

[class*="-leagues-table"] tbody tr.clickable-row:hover .losses-negative,
[class*="-leagues-table"] tbody tr.clickable-row:hover .profit-negative {
    color: #000000 !important;
    font-weight: bold !important;
}

[class*="-leagues-table"] tbody tr.clickable-row:hover .cf-agg-league-name,
[class*="-leagues-table"] tbody tr.clickable-row:hover .cf-league-name,
[class*="-leagues-table"] tbody tr.clickable-row:hover [class*="-league-name"] {
    color: #000000 !important;
    font-weight: bold !important;
}

[class*="-leagues-table"] tbody tr.clickable-row:hover .roi-text-positive,
[class*="-leagues-table"] tbody tr.clickable-row:hover .roi-text-negative {
    color: #000000 !important;
    font-weight: bold !important;
}

[class*="-leagues-table"] tbody tr.clickable-row:hover .medal-emoji,
[class*="-leagues-table"] tbody tr.clickable-row:hover .medal-number {
    color: #000000 !important;
    font-weight: bold !important;
}

[class*="-leagues-table"] tbody tr.clickable-row:hover .arrow-icon {
    color: #000000 !important;
    font-weight: bold !important;
}

[class*="-leagues-table"] tbody tr.clickable-row:hover [class*="-progress-bar"] {
    background: #14232F !important;
}
@media (max-width: 768px) {
    [class*="-leagues-table"] thead,
    [class*="-leagues-table"] thead * {
        display: none !important;
    }

    [class*="-leagues-table"] {
        border-spacing: 0 !important;
        margin-top: 10px;
        width: 100%;
        display: block;
    }

    [class*="-leagues-table"] tbody,
    [class*="-leagues-table"] tr,
    [class*="-leagues-table"] td {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    [class*="-leagues-table"] tr {
        background: #0f2a44 !important;
        border-radius: 3px !important;
        padding: 6px 8px !important;
        padding-right: 40px !important;
        margin-bottom: 8px !important;
        border: 1px solid #1e4a76 !important;
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 2px 4px !important;
        position: relative !important;
    }

    [class*="-leagues-table"] tr.current-league {
        outline: 1px solid #FFB74D !important;
        outline-offset: -1px;
        border: none !important;
        border-radius: 2px !important;
    }

    [class*="-leagues-table"] td {
        background: transparent !important;
        padding: 1px 1px !important;
        border: none !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 2px !important;
        font-size: 0.8rem;
        line-height: 1.3;
        flex: 0 0 auto !important;
    }

    [class*="-leagues-table"] td:nth-child(1) {
        display: none !important;
    }

    [class*="-leagues-table"] td:nth-child(2) {
        order: 1;
        flex: 0 1 45% !important;
        max-width: 45% !important;
        min-width: 0;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        padding-right: 0 !important;
    }
    [class*="-leagues-table"] td:nth-child(2) .league-link {
        display: block;
        width: 100%;
        color: inherit;
        text-decoration: none;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    [class*="-leagues-table"] td:nth-child(2) .league-link .league-info-container {
        display: flex;
        align-items: center;
        gap: 2px !important;
        width: 100%;
        overflow: hidden;
    }
    [class*="-leagues-table"] td:nth-child(2) .league-country {
        font-size: 0.9rem !important;
        color: #FFB74D;
        white-space: nowrap;
    }
    [class*="-leagues-table"] td:nth-child(2) .cf-agg-league-name,
    [class*="-leagues-table"] td:nth-child(2) .cf-league-name {
        font-size: 0.75rem !important;
        color: #fff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    [class*="-leagues-table"] td:nth-child(2) .league-text-container {
        gap: 0px !important;
    }

    [class*="-leagues-table"] td:nth-child(2) .league-info-container img {
        width: 25px !important;
        height: 25px !important;
        flex-shrink: 0;
        margin: 0 !important;
    }

    [class*="-leagues-table"] td:nth-child(6) {
        order: 2;
        flex: 1 1 42% !important;
        min-width: 30% !important;
        margin-left: 2px;
        margin-right: 16px !important;
    }
    [class*="-leagues-table"] td:nth-child(6) .cf-agg-progress-bar,
    [class*="-leagues-table"] td:nth-child(6) .cf-progress-bar {
        height: 18px !important;
        min-width: 40px;
        border-width: 1px;
        width: 100% !important;
    }
    [class*="-leagues-table"] td:nth-child(6) .cf-agg-progress-text,
    [class*="-leagues-table"] td:nth-child(6) .cf-progress-text {
        font-size: 0.7rem !important;
    }

    [class*="-leagues-table"] td:nth-child(3),
    [class*="-leagues-table"] td:nth-child(4),
    [class*="-leagues-table"] td:nth-child(5),
    [class*="-leagues-table"] td:nth-child(7),
    [class*="-leagues-table"] td:nth-child(8),
    [class*="-leagues-table"] td:nth-child(9) {
        order: 3;
        flex: 0 0 auto !important;
        font-size: 0.6rem !important;
        padding: 1px 2px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        margin-top: 3px;
        width: auto !important;
        display: inline-flex !important;
        align-items: center;
        gap: 2px;
        background: rgba(255,255,255,0.02);
        border-radius: 2px;
        margin-right: 1px;
    }

    [class*="-leagues-table"] td:nth-child(10) {
        order: 4;
        flex: 0 0 auto !important;
        border-top: none;
        margin-top: 0;
        background: transparent;
        margin-left: auto;
        padding-right: 4px !important;
    }
    [class*="-leagues-table"] td:nth-child(10) .history-buttons {
        flex-wrap: nowrap !important;
        gap: 2px;
        justify-content: flex-end;
    }
    [class*="-leagues-table"] td:nth-child(10) .history-btn {
        font-size: 0.6rem !important;
        padding: 2px 5px !important;
        min-width: 20px;
        border-radius: 3px;
    }
    [class*="-leagues-table"] td:nth-child(10) .history-btn.futuristic-btn {
        padding: 2px 5px !important;
        font-size: 0.6rem !important;
    }

    [class*="-leagues-table"] td:nth-child(10) {
        display: none !important;
    }

    [class*="-leagues-table"] td.arrow-cell {
        position: absolute !important;
        right: 3px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 30px !important;
        height: 60px !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        margin: 0 !important;
        flex: 0 0 auto !important;
        order: 0 !important;
        z-index: 2;
    }
    [class*="-leagues-table"] td.arrow-cell .arrow-link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        color: #FFB74D;
        text-decoration: none;
        font-size: 2rem;
        line-height: 1;
        font-weight: 300;
        transition: background 0.2s, transform 0.1s;
        border-radius: 50%;
    }
    [class*="-leagues-table"] td.arrow-cell .arrow-link:active {
        background: rgba(255, 255, 255, 0.1);
        transform: scale(0.9);
    }
    [class*="-leagues-table"] td.arrow-cell .arrow-icon {
        display: block;
        transform: translateY(-2px);
    }

    [class*="-leagues-table"] td.arrow-cell::before {
        content: '';
        position: absolute;
        left: -2px !important;
        top: 20%;
        height: 60%;
        width: 1.5px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 0;
        display: block !important;
    }

    [class*="-leagues-table"] td.arrow-cell {
        border-left: none !important;
    }

    [class*="-leagues-table"] td:nth-child(3)::before { content: "MA"; }
    [class*="-leagues-table"] td:nth-child(4)::before { content: "W"; color: #4ade80; }
    [class*="-leagues-table"] td:nth-child(5)::before { content: "L"; color: #f87171; }
    [class*="-leagues-table"] td:nth-child(7)::before { content: "Profit"; }
    [class*="-leagues-table"] td:nth-child(8)::before { content: "ROI"; }
    [class*="-leagues-table"] td:nth-child(9)::before { content: "Avg"; }
    [class*="-leagues-table"] td:nth-child(10)::before { content: ""; }

    [class*="-leagues-table"] td::before {
        font-weight: 600;
        color: #FFB74D;
        font-size: 0.6rem !important;
        text-transform: uppercase;
        letter-spacing: 0.2px;
        margin-right: 1px;
        flex-shrink: 0;
    }

    [class*="-leagues-table"] td:nth-child(2)::before,
    [class*="-leagues-table"] td:nth-child(6)::before {
        display: none !important;
    }

    [class*="-leagues-table"] td:nth-child(4) { color: #4ade80; font-weight: 600; }
    [class*="-leagues-table"] td:nth-child(5) { color: #f87171; font-weight: 600; }
    [class*="-leagues-table"] td:nth-child(7).profit-positive { color: #4ade80; font-weight: 600; }
    [class*="-leagues-table"] td:nth-child(7).profit-negative { color: #f87171; font-weight: 600; }
    [class*="-leagues-table"] td:nth-child(8).roi-text-positive { color: #4ade80; font-weight: 600; }
    [class*="-leagues-table"] td:nth-child(8).roi-text-negative { color: #f87171; font-weight: 600; }

    .cf-agg-league-header,
    .cf-common-header {
        display: none !important;
    }

    .cf-agg-grid-container,
    [class*="-grid-container"] {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .cf-agg-header-buttons,
    .cf-header-buttons {
        flex-wrap: wrap !important;
        margin-left: 0 !important;
        justify-content: center;
    }
    .cf-agg-title-wrap,
    .cf-title-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    [class*="-grid-item"] {
        background: #0f2a44 !important;
        border: 1px solid #1e4a76 !important;
        border-radius: 5px !important;
        padding: 10px 12px !important;
        margin: 0 !important;
        display: block !important;
    }

    [class*="-market-title"] {
        font-size: 1rem !important;
        font-weight: 600;
        color: #FFB74D;
        text-align: center;
        border-bottom: 1px solid #FFB74D;
        padding-bottom: 6px;
        margin-bottom: 10px;
    }

    [class*="-stats-top"],
    [class*="-stats-bottom"] {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 4px 8px !important;
        justify-content: flex-start !important;
        margin-bottom: 6px !important;
        background: transparent !important;
        padding: 0 !important;
        grid-template-columns: unset !important;
    }

    [class*="-stat-item"] {
        display: inline-flex !important;
        align-items: center !important;
        gap: 3px !important;
        background: rgba(255, 255, 255, 0.05) !important;
        padding: 2px 6px !important;
        border-radius: 2px !important;
        font-size: 0.7rem !important;
        border: none !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
    }

    [class*="-stat-label"] {
        display: none !important;
    }

    [class*="-stat-value"] {
        font-size: 0.7rem !important;
        font-weight: 600;
        display: inline !important;
        margin: 0 !important;
    }

    [class*="-stat-item"]:nth-child(1)::before { content: "MATCHES"; font-weight: 600; color: #FFB74D; margin-right: 1px; }
    [class*="-stat-item"]:nth-child(2)::before { content: "WINS"; font-weight: 600; color: #4ade80; margin-right: 1px; }
    [class*="-stat-item"]:nth-child(3)::before { content: "LOSSES"; font-weight: 600; color: #f87171; margin-right: 1px; }
    [class*="-stat-item"]:nth-child(4)::before { content: "WIN RATE"; font-weight: 600; color: #FFB74D; margin-right: 1px; }
    [class*="-stat-item"]:nth-child(5)::before { content: "Profit"; font-weight: 600; color: #FFB74D; margin-right: 1px; }
    [class*="-stat-item"]:nth-child(6)::before { content: "ROI"; font-weight: 600; color: #FFB74D; margin-right: 1px; }
    [class*="-stat-item"]:nth-child(7)::before { content: "Avg"; font-weight: 600; color: #FFB74D; margin-right: 1px; }

    [class*="-chart-container"] {
        padding: 10px 0 !important;
        margin: 6px 0 !important;
        background: transparent !important;
        width: 100% !important;
    }
    [class*="-chart-canvas"] {
        width: 100% !important;
        height: auto !important;
        max-height: 180px !important;
        display: block !important;
    }

    [class*="-stats-actions"] {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        justify-content: center !important;
        padding-top: 10px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        margin-top: 4px !important;
    }
    [class*="-action-button"] {
        font-size: 0.7rem !important;
        padding: 4px 10px !important;
        flex: 0 1 auto !important;
        text-align: center !important;
        white-space: nowrap;
    }

    [class*="-league-header"],
    .cf-common-header {
        display: none !important;
    }

    [class*="-wrapper"] {
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
    }

    .league-info-container .desktop-flag {
        display: none !important;
    }
    .league-info-container .mobile-medal {
        display: inline-block !important;
    }
}