.fx-body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #1a1a1a;
    color: white;
    margin: 0;
    padding: 10px;
    font-size: 14px;
}

.fx-modal {
    background: #1f1f1f;
    border-radius: 12px;
    max-width: 980px;
    margin: 40px auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
    overflow: hidden;
    position: relative;
}

.fx-modal-header {
    background: #1a1a1a;
    padding: 15px 20px;
    position: relative;
    border-bottom: 1px solid #333;
}

.fx-modal-close {
    position: absolute;
    top: 12px;
    right: 20px;
    font-size: 32px;
    cursor: pointer;
    color: #aaa;
    line-height: 1;
}

.fx-modal-close:hover {
    color: #fff;
}

.fx-modal-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.fx-modal-team {
    text-align: center;
    flex: 1;
}

.fx-modal-team img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #333;
    object-fit: contain;
}

.fx-modal-vs {
    font-size: 32px;
    font-weight: bold;
    color: #0a9396;
    padding: 0 20px;
}

.fx-modal-info {
    font-size: 13px;
    color: #aaa;
    text-align: center;
    line-height: 1.5;
}

.fx-modal-tabs {
    display: flex;
    background: #222;
    border-bottom: 1px solid #444;
    overflow-x: auto;
    flex-wrap: nowrap;
}

.fx-modal-tab {
    padding: 14px 24px;
    cursor: pointer;
    color: #aaa;
    font-size: 14px;
    white-space: nowrap;
}

.fx-modal-tab.fx-active {
    color: white;
    border-bottom: 3px solid #0a9396;
    font-weight: bold;
}

.fx-modal-content {
    padding: 20px;
    background: #1a1a1a;
    min-height: 400px;
    overflow-x: auto;
}

.fx-content {
    display: none;
}

.fx-content.fx-active {
    display: block;
}

.fx-event-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #252525;
    border-radius: 6px;
    margin: 4px 0;
    font-size: 13px;
}

.fx-event-minute {
    font-weight: bold;
    min-width: 45px;
    color: #0a9396;
    text-align: center;
    font-size: 12px;
}

.fx-event-logo {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: contain;
    background: #333;
    flex-shrink: 0;
}

.fx-event-icon {
    font-size: 16px;
    margin-right: 4px;
}

.fx-event-desc {
    flex: 1;
    font-size: 12px;
    line-height: 1.3;
}

.fx-stat-row {
    display: flex;
    align-items: center;
    margin: 18px 0;
    font-size: 14px;
}

.fx-stat-name {
    width: 160px;
    flex-shrink: 0;
    color: #ccc;
}

.fx-bar-group {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.fx-bar-container {
    flex: 1;
    height: 10px;
    background: #333;
    border-radius: 999px;
    position: relative;
    overflow: hidden;
}

.fx-bar {
    height: 100%;
    position: absolute;
    top: 0;
}

.fx-bar-home {
    left: 0;
    background: linear-gradient(90deg, #0a9396, #4fd1c5);
}

.fx-bar-away {
    right: 0;
    background: linear-gradient(90deg, #FF9800, #ffc107);
}

.fx-stat-value-home {
    min-width: 45px;
    text-align: right;
    color: #0a9396;
    font-weight: 500;
}

.fx-stat-value-away {
    min-width: 45px;
    text-align: left;
    color: #FF9800;
    font-weight: 500;
}

.fx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    display: table;
    overflow-x: auto;
}

.fx-table th,
.fx-table td {
    padding: 4px 3px;
    text-align: center;
    border-bottom: 1px solid #333;
    white-space: nowrap;
}

.fx-table th {
    background: #222;
    color: #0a9396;
    font-weight: 600;
}

.fx-player-name-cell {
    display: flex;
    align-items: center;
    gap: 4px;
    text-align: left !important;
    min-width: 140px;
    white-space: nowrap;
}

.fx-player-name-cell img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #333;
    object-fit: cover;
    flex-shrink: 0;
}

.fx-pitch {
    background: linear-gradient(145deg, #1e5a1e, #0a3a0a);
    height: 520px;
    position: relative;
    border-radius: 16px;
    margin: 20px auto;
    max-width: 460px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.fx-pitch-line {
    position: absolute;
    border: 1px dashed rgba(255, 255, 255, 0.45);
}

.fx-center-line {
    width: 100%;
    height: 0;
    top: 50%;
    left: 0;
}

.fx-center-circle {
    width: 22%;
    height: 22%;
    top: 36%;
    left: 39%;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.45);
}

.fx-goal-line {
    width: 30%;
    height: 8%;
    left: 35%;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.fx-player {
    position: absolute;
    text-align: center;
    width: 80px;
    transform: translateX(-50%);
    pointer-events: none;
}

.fx-player img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #111;
    background: #333;
    object-fit: cover;
}

.fx-player-name {
    margin-top: 2px;
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.fx-player-number {
    position: absolute;
    top: 26px;
    right: 3px;
    background: #333;
    color: white;
    font-weight: bold;
    font-size: 10px;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    border: 2px solid white;
    z-index: 5;
}

.fx-rating-box {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: bold;
    color: white;
    min-width: 28px;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.fx-rating-high {
    background: #10b981;
}

.fx-rating-med {
    background: #f59e0b;
}

.fx-rating-low {
    background: #ef4444;
}

.fx-loading {
    text-align: center;
    padding: 50px 20px;
    color: #0a9396;
    font-size: 15px;
}

.fx-error {
    color: #ff6b6b;
    padding: 20px;
    background: #330000;
    border-radius: 8px;
    text-align: center;
}

@media (max-width: 768px) {
    .fx-table {
        font-size: 10px;
    }
    .fx-table th,
    .fx-table td {
        padding: 4px 2px;
        font-size: 9px;
    }
    .fx-table th {
        font-size: 9px;
    }
    .fx-player-name-cell {
        min-width: 120px;
        gap: 4px;
    }
    .fx-player-name-cell img {
        width: 20px;
        height: 20px;
    }
    .fx-player-name-cell span {
        font-size: 9px;
        max-width: 60px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .fx-modal-content>div>div[style*="flex: 1"] {
        min-width: 280px;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .fx-table th,
    .fx-table td {
        padding: 3px 1px;
        font-size: 8px;
    }
    .fx-table th {
        font-size: 8px;
    }
    .fx-player-name-cell {
        min-width: 100px;
    }
    .fx-player-name-cell span {
        max-width: 50px;
        font-size: 8px;
    }
}

#fx-match-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    overflow-y: auto;
    padding: 20px 10px;
    overflow-x: auto;
}

#fx-match-modal .fx-modal {
    max-width: 1380px;
    margin: 20px auto;
    border-radius: 12px;
    min-height: auto;
}

.fx-h2h-summary {
    margin-bottom: 20px;
}

.fx-form-section {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.fx-form-team {
    flex: 1;
    text-align: center;
    background: #1f1f1f;
    padding: 12px;
    border-radius: 8px;
    min-width: 250px;
}

.fx-form-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.fx-form-header-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: contain;
}

.fx-form-header-name {
    font-weight: bold;
    font-size: 14px;
}

.fx-recent-form {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 8px 0;
    flex-wrap: wrap;
}

.fx-form-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.fx-form-win {
    background: #10b981;
    color: white;
}

.fx-form-draw {
    background: #fbbf24;
    color: black;
}

.fx-form-loss {
    background: #ef4444;
    color: white;
}

.fx-form-matches {
    margin-top: 10px;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
}

.fx-form-match-item {
    background: #2d2d2d;
    padding: 6px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin: 4px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.fx-form-match-date {
    min-width: 45px;
    font-size: 10px;
    color: #888;
}

.fx-form-match-opponent {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    text-align: left;
}

.fx-form-match-opponent img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: contain;
}

.fx-form-match-opponent span {
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.fx-form-match-score {
    font-weight: bold;
    font-size: 12px;
}

.fx-form-match-score-home {
    color: #0a9396;
}

.fx-form-match-score-away {
    color: #FF9800;
}

.fx-form-match-dash {
    color: #888;
    margin: 0 2px;
}

.fx-h2h-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 20px;
}

.fx-h2h-table th,
.fx-h2h-table td {
    padding: 4px 2px;
    border-bottom: 1px solid #444;
    text-align: center;
}

.fx-h2h-table th {
    background: #222;
    color: #0a9396;
    font-weight: 600;
    border-bottom: 2px solid #0a9396;
}

.fx-h2h-team-cell {
    align-items: center;
    gap: 8px;
}

.fx-h2h-team-cell:first-child {
    justify-content: flex-end;
}

.fx-h2h-team-cell:last-child {
    justify-content: flex-start;
}

.fx-h2h-team-logo {
    width: 19px;
    height: 19px;
    object-fit: contain;
    flex-shrink: 0;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.fx-section-title {
    font-size: 14px;
    font-weight: bold;
    margin: 16px 0 12px 0;
    color: #0a9396;
    border-left: 3px solid #0a9396;
    padding-left: 10px;
}

.fx-h2h-table td {
    vertical-align: middle;
}

.fx-event-item.fx-goal-event-home {
    background: linear-gradient(90deg, rgba(10, 147, 150, 0.25), rgba(10, 147, 150, 0.05));
    border-left: 3px solid #0a9396;
}

.fx-event-item.fx-goal-event-away {
    background: linear-gradient(90deg, rgba(255, 152, 0, 0.25), rgba(255, 152, 0, 0.05));
    border-left: 3px solid #FF9800;
}

.fx-standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 600px;
}

.fx-standings-table th {
    background: #222;
    padding: 10px 6px;
    color: #aaa;
    text-align: center;
    border-bottom: 2px solid #333;
}

.fx-standings-table td {
    padding: 4px 4px;
    text-align: center;
    border-bottom: 1px solid #333;
    color: #ddd;
}

.fx-standings-team-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    min-width: 160px;
}

.fx-standings-team-logo {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: contain;
    background: #444;
}

.fx-standings-points {
    font-weight: bold;
    color: #0a9396;
}

.fx-standings-highlight {
    background: linear-gradient(90deg, rgba(10, 147, 150, 0.25) 0%, transparent 15%);
    border-left: 3px solid #0a9396;
}

.fx-standings-relegation {
    background: rgba(239, 68, 68, 0.25);
    border-left: 3px solid #ef4444;
}

.fx-standings-home {
    background: linear-gradient(90deg, rgba(10, 147, 150, 0.25) 0%, transparent 15%);
    border-left: 3px solid #0a9396;
}

.fx-standings-away {
    background: linear-gradient(90deg, rgba(255, 152, 0, 0.25) 0%, transparent 15%);
    border-left: 3px solid #FF9800;
}

.fx-standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 600px;
}

.fx-standings-table th {
    background: #222;
    padding: 10px 6px;
    color: #aaa;
    text-align: center;
    border-bottom: 2px solid #333;
}

.fx-standings-table td {
    padding: 4px 4px;
    text-align: center;
    border-bottom: 1px solid #333;
    color: #ddd;
}

.fx-standings-team-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    min-width: 160px;
}

.fx-standings-team-logo {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: contain;
    background: #444;
}

.fx-standings-points {
    font-weight: bold;
    color: #0a9396;
}

.fx-standings-highlight {
    background: linear-gradient(90deg, rgba(10, 147, 150, 0.25) 0%, transparent 15%);
    border-left: 3px solid #0a9396;
}

.fx-form-badges {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.fx-form-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

.fx-form-win {
    background: #10b981;
    color: white;
}

.fx-form-draw {
    background: #fbbf24;
    color: black;
}

.fx-form-loss {
    background: #ef4444;
    color: white;
}