@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Lato:wght@400;700&display=swap');

* {
    font-family: "Lato", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.mobile-league-header,
.mobile-stats-grid {
    display: none;
}

.all-1x2-predictions-wrapper,
.all-ou-predictions-wrapper,
.all-btts-predictions-wrapper,
.cf-aggregated-stats-wrapper {
    background: #1B3A62 !important;
    border-radius: 5px !important;
    padding: 20px !important;
    margin: 20px 0 !important;
    border: 1px solid #1e4a76 !important;
    overflow-x: auto;
}

.all-predictions-table {
    width: 100%;
    border-collapse: collapse !important;
    background: #0F2A44;
    margin-bottom: 24px;
    border-radius: 5px !important;
    border: 1px solid #1e4a76;
    overflow: hidden;
}

.all-predictions-table th {
    background: #9E9E9E !important;
    color: #000 !important;
    padding: 12px 8px !important;
    font-size: 0.9em !important;
    font-weight: 600 !important;
    text-align: center;
    border-bottom: 1px solid #1e4a76;
    border-right: 1px solid #1e4a76;
}
.all-predictions-table th:last-child {
    border-right: none;
}

.all-predictions-table td {
    padding: 8px 6px !important;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid #1e4a76;
    border-right: 1px solid #1e4a76;
    background: #0F2A44;
    color: #ffffff;
    font-size: 14px;
}
.all-predictions-table td:last-child {
    border-right: none;
}

.score-header {
    background-color: #4ADE80 !important;
    color: #0F2A44 !important;
    font-weight: 700;
}

.cf-probability-bars {
    display: flex;
    height: 30px;
    border-radius: 6px;
    overflow: hidden;
    min-width: 150px;
    margin: 0 auto;
}
.cf-bar-home, .cf-bar-draw, .cf-bar-away {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 12px;
    flex: 1;
}
.cf-bar-home { background-color: #4CAF50; }
.cf-bar-draw { background-color: #FFC107; color: #000; }
.cf-bar-away { background-color: #F44336; }

.cf-two-bars {
    display: flex;
    flex-direction: row;
    height: 28px;
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto;
}
.cf-two-bars .cf-bar-first,
.cf-two-bars .cf-bar-second {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    padding: 0 4px;
    flex: 1;
}
.cf-two-bars .cf-bar-first { background-color: #2196F3; }
.cf-two-bars .cf-bar-second { background-color: #FF9800; color: #000; }

.prediction-badge {
    background: #FE7E07;
    color: #ffffff;
    font-weight: 800;
    font-family: "Orbitron", sans-serif;
    border-radius: 30px;
    padding: 6px 12px;
    font-size: 0.8rem;
    display: inline-block;
}

.match-time, .prediction-score {
    color: #FE7E07;
    font-weight: 500;
}

.match-cell-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}
.team-home {
    text-align: right;
    flex: 1;
    white-space: normal;
    word-break: break-word;
}
.match-vs {
    color: #FE7E07;
    font-weight: 700;
    flex-shrink: 0;
    text-align: center;
    min-width: 40px;
}
.team-away {
    text-align: left;
    flex: 1;
    white-space: normal;
    word-break: break-word;
}

.league-header-row td {
    background: #0a1c2f !important;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 12px 16px;
    border-bottom: 1px solid #FE7E07;
}
.league-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}
.league-country, .league-name {
    font-family: "Orbitron", sans-serif;
    font-weight: 600;
}
.league-name {
    color: #FE7E07;
}

.cf-history-stats-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 20px;
    margin-bottom: 5px;
    padding: 20px;
    border-radius: 16px;
}
.stat-card-square {
    background: #0a1c2f;
    border-radius: 5px;
    border: 1px solid #1e4a76;
    padding: 12px 6px;
    text-align: center;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    font-weight: 600;
    margin-bottom: 6px;
}
.stat-value {
    font-size: 0.9em;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}
.stat-positive { color: #4ade80 !important; }
.stat-negative { color: #f87171 !important; }

.all-predictions-table thead th.prediction-header {
    background-color: #FE7E07 !important;
}
.all-predictions-table tbody td.cell-prediction {
    background-color: #0E253C !important;
    color: #ffffff;
}

.cf-league-header {
    background: #0a1c2f;
    padding: 18px 16px !important;
    border: 1px solid #1e4a76;
    border-radius: 5px 5px 0 0;
    display: block;
}
.cf-league-title-wrap {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 5px;
}
.cf-league-title-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    flex: 1;
}
.cf-league-title-text h1 {
    margin: 0;
    font-size: 1.4rem !important;
    font-weight: 700;
    color: #FE7E07;
    background: transparent;
    line-height: 1.1;
    letter-spacing: -0.3px;
}
.cf-stats-description {
    font-size: 0.9rem !important;
    color: #cccccc;
    line-height: 1.2;
    margin-bottom: 0;
    padding: 0;
}
.cf-league-logo {
    height: 80px !important;
    width: auto;
    max-width: 100px !important;
    object-fit: contain;
    background: transparent;
    padding: 0;
    margin-right: 12px;
    vertical-align: middle;
    display: inline-block;
    border: 2px solid #999999;
    border-radius: 3px !important;
}

.country-flag-icon,
.flag-cell img,
.cf-league-title-wrap img[src*="s.w.org/images/core/emoji"],
.all-predictions-table td:first-child img,
.cf-aggregated-table img,
.cf-flag-circle {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: inline-block !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    vertical-align: middle !important;
}

.flag-cell {
    text-align: center;
    vertical-align: middle;
}
.flag-cell img {
    display: inline-block !important;
    margin: 0 auto !important;
}

.trophy-header {
    font-size: 1.3rem;
    line-height: 1;
}

.result-icon-win {
    color: #4ade80;
    font-size: 1.4rem;
}
.result-icon-loss {
    color: #f87171;
    font-size: 1.4rem;
}
.result-icon-pending {
    color: #cccccc;
    font-size: 1.2rem;
}

.cf-aggregated-table {
    width: 100%;
    border-collapse: collapse !important;
    background: #0F2A44;
    border: 1px solid #1e4a76 !important;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}
.cf-aggregated-table th,
.cf-aggregated-table td {
    padding: 8px 8px !important;
    text-align: center !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #1e4a76 !important;
    border-right: 1px solid #1e4a76 !important;
    color: #cccccc !important;
}
.cf-aggregated-table th:last-child,
.cf-aggregated-table td:last-child {
    border-right: 1px solid #1e4a76 !important;
}
.cf-aggregated-table th {
    background: #9E9E9E !important;
    color: #0F2A44 !important;
    padding: 12px 8px !important;
    font-size: 0.9em !important;
    font-weight: 600 !important;
}
.cf-aggregated-table .details-cell .cf-stats-button {
    background: #FE7E07;
    color: #cccccc;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: .9em;
    font-weight: 600;
    text-decoration: none;
}
.cf-aggregated-table .details-cell .cf-stats-button:hover {
    background: #999999;
    color: #000;
}

.cf-aggregated-table td.league-name-cell {
    white-space: normal;
    word-break: break-word;
    vertical-align: middle;
}
.cf-aggregated-table td.league-name-cell span {
    display: inline-block;
    vertical-align: middle;
}

.profit-positive { color: #4ade80; font-weight: bold; }
.profit-negative { color: #f87171; font-weight: bold; }
.profit-neutral { color: #cccccc; font-weight: normal; }
.roi-text-positive { color: #4ade80; }
.roi-text-negative { color: #f87171; }
.roi-text-neutral { color: #cccccc; }

.cf-header-flag {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #cccccc;
    background-color: transparent !important;
    background-size: auto 150% !important;
    background-position: 50% 50% !important;
    background-repeat: no-repeat !important;
    display: inline-block;
    flex-shrink: 0;
}
.cf-header-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.cf-flag-circle-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: transparent;
    margin: 0 auto;
    vertical-align: middle;
}
.cf-flag-circle-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .cf-flag-circle-container {
        width: 32px;
        height: 32px;
    }
    .cf-header-flag {
        width: 40px;
        height: 40px;
    }
}
.cf-league-title-wrap .cf-flag-circle-container {
    width: 44px;
    height: 44px;
    margin-right: 8px;
}

@media (max-width: 1200px) {
    .cf-history-stats-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
        padding: 15px;
    }
}
@media (max-width: 900px) {
    .cf-history-stats-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
    .cf-history-stats-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; }
    .stat-card-square { padding: 8px 4px; }
    .stat-value { font-size: 1rem; }
    .stat-label { font-size: 0.65rem; }
    .all-predictions-table th, .all-predictions-table td { font-size: 11px; padding: 5px 2px !important; }
    .match-vs { min-width: 25px; }
    .country-flag-icon, .flag-cell img { width: 32px !important; height: 32px !important; }
    .cf-league-logo { height: 50px !important; max-width: 60px !important; }
    .cf-league-title-text h1 { font-size: 1rem !important; }
    .cf-stats-description { font-size: 0.7rem; }
}
@media (max-width: 600px) {
    .cf-history-stats-grid { grid-template-columns: repeat(3, 1fr); }
}

body .all-1x2-predictions-wrapper .flag-cell img,
body .all-1x2-predictions-wrapper .country-flag-icon,
body .cf-league-title-wrap img {
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    object-fit: cover !important;
}