/* Football Data Dashboard CSS */
/* Version: 2.1.0 */

/* ===== Base Styles ===== */
.fdd-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
}

.fdd-error,
.fdd-no-data {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    margin: 15px 0;
}

.fdd-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.fdd-loading:before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #d00000;
    border-radius: 50%;
    animation: fdd-spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes fdd-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== League Header ===== */
.fdd-league-header {
    display: flex;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
    border-radius: 8px;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.fdd-league-logo {
    margin-right: 20px;
}

.fdd-league-emblem {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.fdd-league-info {
    flex: 1;
}

.fdd-league-name {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
    color: white;
}

.fdd-league-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #ccc;
}

.fdd-league-meta .dashicons {
    margin-right: 5px;
    color: #d00000;
}

/* ===== Section Titles ===== */
.fdd-section-title {
    font-size: 20px;
    font-weight: 600;
    margin: 30px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #eaeaea;
    color: #1e1e1e;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fdd-section-title .dashicons {
    color: #d00000;
}

/* ===== Tables ===== */
.fdd-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fdd-table thead {
    background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
    color: white;
}

.fdd-table th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fdd-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.fdd-table tbody tr:hover {
    background-color: #f9f9f9;
}

.fdd-table tbody tr:last-child {
    border-bottom: none;
}

.fdd-table td {
    padding: 14px 12px;
    vertical-align: middle;
}

/* ===== Matches Table ===== */
.fdd-matches-table .fdd-date-col {
    width: 180px;
}

.fdd-matches-table .fdd-match-col {
    width: 45%;
}

.fdd-matches-table .fdd-result-col {
    width: 100px;
    text-align: center;
}

.fdd-matches-table .fdd-status-col {
    width: 120px;
}

.fdd-match-teams {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fdd-team {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.fdd-home-team {
    justify-content: flex-end;
    text-align: right;
}

.fdd-away-team {
    justify-content: flex-start;
    text-align: left;
}

.fdd-vs {
    color: #999;
    font-size: 12px;
    font-weight: 500;
    padding: 0 5px;
}

.fdd-team-crest {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.fdd-team-name {
    font-weight: 500;
}

.fdd-match-score {
    font-size: 18px;
    font-weight: 700;
    color: #1e1e1e;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.fdd-score-separator {
    color: #999;
}

.fdd-upcoming-score {
    color: #999;
    font-style: italic;
    text-align: center;
}

.fdd-live-score {
    font-weight: 700;
    color: #d00000;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.fdd-live-indicator {
    background: #d00000;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    animation: fdd-pulse 2s infinite;
}

@keyframes fdd-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.fdd-match-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fdd-status-finished {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.fdd-status-scheduled {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.fdd-status-live,
.fdd-status-in_play {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    animation: fdd-pulse 2s infinite;
}

.fdd-match-date {
    font-size: 13px;
    color: #666;
}

/* ===== Standings Table ===== */
.fdd-standings-table-wrapper {
    margin-bottom: 30px;
}

.fdd-standings-table .fdd-pos-col {
    width: 50px;
    text-align: center;
}

.fdd-standings-table .fdd-team-col {
    width: 35%;
}

.fdd-standings-table .fdd-played-col,
.fdd-standings-table .fdd-won-col,
.fdd-standings-table .fdd-drawn-col,
.fdd-standings-table .fdd-lost-col {
    width: 60px;
    text-align: center;
}

.fdd-standings-table .fdd-goals-col {
    width: 90px;
    text-align: center;
}

.fdd-standings-table .fdd-gd-col {
    width: 70px;
    text-align: center;
}

.fdd-standings-table .fdd-points-col {
    width: 70px;
    text-align: center;
}

.fdd-standings-table .fdd-form-col {
    width: 120px;
}

.fdd-position-cell {
    text-align: center;
    font-weight: 600;
    color: #666;
}

.fdd-team-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fdd-team-info .fdd-team-crest {
    width: 20px;
    height: 20px;
}

.fdd-team-name {
    font-weight: 500;
}

.fdd-goals-cell {
    font-size: 13px;
    color: #666;
}

.fdd-goals-separator {
    margin: 0 2px;
}

.fdd-goal-difference {
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
}

.fdd-goal-difference.fdd-positive {
    background: #d4edda;
    color: #155724;
}

.fdd-goal-difference.fdd-negative {
    background: #f8d7da;
    color: #721c24;
}

.fdd-points-cell {
    font-weight: 700;
    color: #1e1e1e;
}

.fdd-form-icons {
    display: flex;
    gap: 3px;
    justify-content: center;
}

.fdd-form-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    border-radius: 2px;
    color: white;
}

.fdd-form-win {
    background: #28a745;
}

.fdd-form-draw {
    background: #6c757d;
}

.fdd-form-loss {
    background: #dc3545;
}

/* Color coding for positions */
.fdd-standing-row.fdd-position-1 {
    background: linear-gradient(90deg, rgba(255,215,0,0.1) 0%, rgba(255,215,0,0.05) 100%);
}

.fdd-standing-row.fdd-position-2,
.fdd-standing-row.fdd-position-3,
.fdd-standing-row.fdd-position-4 {
    background: linear-gradient(90deg, rgba(0,123,255,0.1) 0%, rgba(0,123,255,0.05) 100%);
}

.fdd-standing-row.fdd-position-5,
.fdd-standing-row.fdd-position-6 {
    background: linear-gradient(90deg, rgba(108,117,125,0.1) 0%, rgba(108,117,125,0.05) 100%);
}

.fdd-standing-row.fdd-relegation {
    background: linear-gradient(90deg, rgba(220,53,69,0.1) 0%, rgba(220,53,69,0.05) 100%);
}

/* Standings Legend */
.fdd-standings-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 13px;
}

.fdd-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fdd-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

.fdd-legend-color.fdd-european {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.fdd-legend-color.fdd-europa {
    background: linear-gradient(135deg, #007bff 0%, #17a2b8 100%);
}

.fdd-legend-color.fdd-relegation {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
}

/* ===== Scorers Table ===== */
.fdd-scorers-table .fdd-rank-col {
    width: 50px;
    text-align: center;
}

.fdd-scorers-table .fdd-player-col {
    width: 35%;
}

.fdd-scorers-table .fdd-team-col {
    width: 25%;
}

.fdd-scorers-table .fdd-goals-col {
    width: 70px;
    text-align: center;
}

.fdd-scorers-table .fdd-penalties-col,
.fdd-scorers-table .fdd-assists-col,
.fdd-scorers-table .fdd-appearances-col {
    width: 60px;
    text-align: center;
}

.fdd-rank {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background: #f0f0f0;
    border-radius: 50%;
    font-weight: 600;
}

.fdd-scorer-row.fdd-rank-1 .fdd-rank {
    background: #ffd700;
    color: #856404;
}

.fdd-scorer-row.fdd-rank-2 .fdd-rank {
    background: #c0c0c0;
    color: #495057;
}

.fdd-scorer-row.fdd-rank-3 .fdd-rank {
    background: #cd7f32;
    color: white;
}

.fdd-player-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fdd-player-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f0;
}

.fdd-player-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fdd-player-name {
    font-weight: 600;
}

.fdd-player-nationality {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #666;
}

.fdd-nationality-flag {
    width: 16px;
    height: 12px;
    border-radius: 1px;
}

.fdd-scorer-team {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fdd-team-crest-small {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.fdd-goals-count {
    font-size: 18px;
    font-weight: 700;
    color: #d00000;
}

/* ===== Tabs System ===== */
.fdd-tabs-container {
    margin-bottom: 30px;
}

.fdd-tabs {
    display: flex;
    border-bottom: 2px solid #eaeaea;
    margin-bottom: 20px;
}

.fdd-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.fdd-tab:hover {
    color: #1e1e1e;
    background: #f8f9fa;
}

.fdd-tab.active {
    color: #d00000;
    font-weight: 600;
}

.fdd-tab.active:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #d00000;
}

.fdd-tab-content {
    display: none;
}

.fdd-tab-content.active {
    display: block;
    animation: fdd-fade-in 0.3s ease;
}

@keyframes fdd-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== View More ===== */
.fdd-view-more {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eaeaea;
}

.fdd-view-more-link {
    display: inline-block;
    padding: 8px 20px;
    background: #1e1e1e;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.fdd-view-more-link:hover {
    background: #d00000;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .fdd-league-header {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .fdd-league-logo {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .fdd-league-name {
        font-size: 22px;
    }
    
    .fdd-league-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .fdd-table {
        display: block;
        overflow-x: auto;
    }
    
    .fdd-match-teams {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .fdd-home-team,
    .fdd-away-team {
        justify-content: center;
        text-align: center;
    }
    
    .fdd-tabs {
        flex-wrap: wrap;
    }
    
    .fdd-tab {
        flex: 1;
        min-width: 100px;
        text-align: center;
    }
    
    .fdd-standings-legend {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .fdd-section-title {
        font-size: 18px;
    }
    
    .fdd-table th,
    .fdd-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    .fdd-team-crest {
        width: 20px;
        height: 20px;
    }
    
    .fdd-player-photo {
        width: 30px;
        height: 30px;
    }
    
    .fdd-form-icons {
        flex-wrap: wrap;
    }
}







/* تنسيق سلسلة النتائج */
.fdd-form-sequence {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.fdd-form-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    color: white;
    cursor: pointer;
}

.fdd-form-badge.win {
    background: #2ecc71;
}

.fdd-form-badge.draw {
    background: #f39c12;
}

.fdd-form-badge.loss {
    background: #e74c3c;
}

.fdd-form-with-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.fdd-form-date {
    font-size: 10px;
    color: #7f8c8d;
}

/* تنسيق المخطط الشهري */
.fdd-monthly-chart-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.fdd-chart-months {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 200px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.fdd-chart-month {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    height: 100%;
}

.fdd-chart-bar-container {
    height: 100%;
    display: flex;
    align-items: flex-end;
    width: 100%;
    max-width: 40px;
}

.fdd-chart-bar {
    width: 100%;
    background: linear-gradient(to top, #3498db, #2ecc71);
    border-radius: 5px 5px 0 0;
    position: relative;
    transition: height 0.5s ease;
    min-height: 5px;
}

.fdd-chart-value {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    white-space: nowrap;
}

.fdd-month-label {
    margin-top: 8px;
    font-size: 12px;
    color: #7f8c8d;
    text-align: center;
}

.fdd-chart-summary {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.fdd-chart-label {
    color: #7f8c8d;
    font-size: 14px;
}

.fdd-chart-total-value {
    font-weight: bold;
    color: #2c3e50;
    margin-left: 5px;
}

.fdd-chart-avg-value {
    font-weight: bold;
    color: #3498db;
    margin-left: 5px;
}