/* ============================================
   Team Comparison Page Styles
   ============================================ */

.compare-page {
    padding: 1rem 0 3rem;
}

/* Hero Section */
.compare-hero {
    text-align: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #013466 0%, #025aa5 100%);
    color: #fff;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.compare-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 0.25rem;
    color: #fff;
}

.compare-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 2rem;
}

.compare-teams-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
}

.compare-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.compare-team-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.compare-team-link:hover {
    transform: scale(1.05);
}

.compare-team-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.compare-team-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.compare-team-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}

.compare-team-form {
    margin-top: 0.25rem;
}

.compare-vs {
    display: flex;
    align-items: center;
    justify-content: center;
}

.compare-vs-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: rgba(255,255,255,0.6);
}

/* Upcoming Match Section */
.compare-upcoming {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.compare-upcoming .section-title {
    margin-bottom: 1rem;
}

.upcoming-match-details {
    text-align: center;
}

.upcoming-date {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
}

.upcoming-time {
    display: inline-block;
    background: #013466;
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.upcoming-venue {
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

/* H2H Section */
.compare-h2h {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e0e0e0;
}

.subsection-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 1.5rem 0 1rem;
}

/* H2H Summary Stats */
.h2h-summary {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.h2h-stat-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.h2h-stat {
    text-align: center;
}

.h2h-stat-left {
    text-align: right;
}

.h2h-stat-right {
    text-align: left;
}

.h2h-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #333;
}

.h2h-stat.is-better .h2h-value {
    color: #22c55e;
}

.h2h-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    min-width: 120px;
    text-align: center;
}

/* H2H Matches List */
.h2h-matches-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}

.h2h-match-card {
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e6e9ef;
}

.h2h-match-date {
    font-size: 0.75rem;
    color: #666;
    text-align: center;
    padding: 0.5rem;
    background: #fff;
    border-bottom: 1px solid #e6e9ef;
    font-variant-numeric: tabular-nums;
}

.h2h-match-content {
    display: flex;
    flex-direction: column;
}

.h2h-team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.75rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.h2h-team-home {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.h2h-team-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 0.5rem;
}

.h2h-team-score {
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 24px;
    text-align: center;
}

/* Win/Draw/Loss colors */
.h2h-team.is-winner {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.2) 100%);
    color: #16a34a;
}

.h2h-team.is-winner .h2h-team-score {
    color: #16a34a;
}

.h2h-team.is-draw {
    background: linear-gradient(90deg, rgba(234, 179, 8, 0.1) 0%, rgba(234, 179, 8, 0.15) 100%);
    color: #a16207;
}

.h2h-team.is-draw .h2h-team-score {
    color: #a16207;
}

.h2h-team.is-loser {
    background: #fff;
    color: #666;
}

.h2h-team.is-loser .h2h-team-score {
    color: #999;
}

/* Legacy support */
.h2h-match-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.h2h-match-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.75rem;
    align-items: center;
}

.h2h-home {
    text-align: right;
    font-weight: 500;
    color: #333;
}

.h2h-away {
    text-align: left;
    font-weight: 500;
    color: #333;
}

.h2h-home.is-winner,
.h2h-away.is-winner {
    font-weight: 700;
    color: #1a1a1a;
}

.h2h-score {
    font-weight: 800;
    color: #013466;
    background: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-variant-numeric: tabular-nums;
}

/* Stats Comparison Section */
.compare-stats {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.stats-comparison-table {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.stats-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #013466;
    color: #fff;
    border-radius: 8px 8px 0 0;
    font-weight: 700;
    font-size: 0.9rem;
}

.stats-team-col {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stats-team-col:first-child {
    text-align: right;
    justify-content: flex-end;
}

.stats-team-col:last-child {
    text-align: left;
    justify-content: flex-start;
}

.stats-team-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.stats-team-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stats-label-col {
    text-align: center;
    min-width: 120px;
}

.stats-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    padding: 0.75rem 1rem;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
}

.stats-row:nth-child(odd) {
    background: #f8f9fa;
}

.stats-row:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

/* Form badges in stats row */
.stats-row-form {
    padding: 0.85rem 1rem;
}

.stats-form-badges {
    display: flex;
    justify-content: center;
}

.stats-form-badges .form-badges {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.stats-form-badges .form-badge {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-value-left.stats-form-badges {
    justify-content: flex-end;
}

.stats-value-right.stats-form-badges {
    justify-content: flex-start;
}

.stats-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    font-variant-numeric: tabular-nums;
}

.stats-value-left {
    text-align: right;
}

.stats-value-right {
    text-align: left;
}

.stats-value.is-better {
    color: #22c55e;
}

.stats-label {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    min-width: 120px;
}

.form-mini {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Sidebar Widgets */
.quick-compare {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quick-compare-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.qc-label {
    font-size: 0.85rem;
    color: #666;
}

.qc-team1,
.qc-team2 {
    font-weight: 700;
    color: #1a1a1a;
}

.qc-vs {
    color: #999;
    font-size: 0.75rem;
}

.team-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.team-link-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 600;
    transition: background 0.2s;
}

.team-link-btn:hover {
    background: #e9ecef;
}

.team-link-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Error State */
.compare-error {
    text-align: center;
    padding: 3rem 2rem;
}

.compare-error h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.compare-error p {
    color: #666;
    margin-bottom: 1.5rem;
}

.no-data {
    text-align: center;
    color: #666;
    padding: 0.5rem;
    margin: 0;
}

.no-data-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.no-data-hint {
    font-size: 0.85rem;
    color: #999;
    margin: 0.5rem 0 0;
}

/* Responsive */
@media (max-width: 768px) {
    .compare-hero {
        padding: 1.5rem 1rem;
    }
    
    .compare-title {
        font-size: 1.35rem;
    }
    
    .compare-teams-header {
        gap: 1rem;
    }
    
    .compare-team-logo {
        width: 60px;
        height: 60px;
    }
    
    .compare-team-name {
        font-size: 0.95rem;
    }
    
    .h2h-stat-row {
        padding: 0.6rem;
    }
    
    .h2h-value {
        font-size: 1.25rem;
    }
    
    .h2h-label {
        font-size: 0.75rem;
        min-width: 90px;
    }
    
    .h2h-matches-list {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .h2h-team {
        padding: 0.5rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .h2h-team-score {
        font-size: 1rem;
    }
    
    .h2h-match-date {
        font-size: 0.7rem;
        padding: 0.4rem;
    }
    
    /* Form row: label on top, badges side by side below */
    .stats-row-form {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 0.4rem 0;
        padding: 0.75rem 0 !important; /* No horizontal padding for badges to be at edges */
    }
    
    .stats-row-form .stats-label {
        grid-column: 1 / -1;
        grid-row: 1;
        text-align: center;
        width: 100%;
        font-size: 0.75rem;
        padding: 0 0.75rem; /* Add padding to label only */
    }
    
    .stats-row-form .stats-value-left.stats-form-badges {
        grid-column: 1;
        grid-row: 2;
        justify-content: flex-start !important;
        text-align: left;
        display: flex !important;
        padding-left: 0 !important;
    }
    
    .stats-row-form .stats-value-left.stats-form-badges .form-badges,
    .stats-row-form .stats-value-left.stats-form-badges > .form-badges,
    .stats-row-form .stats-value-left.stats-form-badges span.form-badges {
        justify-content: flex-start !important;
        margin-left: -5px !important; /* Extend outside table for more breathing room */
        margin-right: 0 !important;
    }
    
    .stats-row-form .stats-value-right.stats-form-badges {
        grid-column: 2;
        grid-row: 2;
        justify-content: flex-end !important;
        text-align: right;
        display: flex !important;
        padding-right: 0 !important;
    }
    
    .stats-row-form .stats-value-right.stats-form-badges .form-badges,
    .stats-row-form .stats-value-right.stats-form-badges > .form-badges,
    .stats-row-form .stats-value-right.stats-form-badges span.form-badges {
        justify-content: flex-end !important;
        margin-left: 0 !important;
        margin-right: -5px !important; /* Extend outside table for more breathing room */
    }
    
    /* Form badges smaller on mobile */
    .stats-form-badges .form-badge {
        width: 22px;
        height: 22px;
        font-size: 0.65rem;
    }
    
    .stats-header,
    .stats-row {
        padding: 0.6rem 0.75rem;
    }
    
    .stats-label {
        min-width: 80px;
        font-size: 0.75rem;
    }
    
    .stats-value {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .compare-teams-header {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
    
    .compare-team-left {
        order: 1;
    }
    
    .compare-vs {
        order: 2;
    }
    
    .compare-team-right {
        order: 3;
    }
    
    .compare-vs-text {
        font-size: 1rem;
    }
    
    .h2h-matches-list {
        grid-template-columns: 1fr;
    }
    
    .h2h-match-card {
        max-width: 100%;
    }
    
    .stats-header {
        font-size: 0.8rem;
    }
    
    .stats-team-col {
        justify-content: center !important;
    }
    
    /* Hide team names on mobile, show only logos */
    .stats-team-name {
        display: none;
    }
    
    .stats-team-logo {
        width: 28px;
        height: 28px;
    }
    
    /* Goals comparison - stack on mobile */
    .goals-comparison {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .goals-vs {
        display: none;
    }
    
    .goals-team {
        padding: 1rem;
    }
    
    .goals-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }
    
    .goals-stat-value {
        font-size: 1.25rem;
    }
}

/* ==========================================
   COMPARISON DIRECTORY PAGE STYLES
   ========================================== */

.compare-selector {
    margin-top: 1.5rem;
}

.compare-selector-form {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.compare-selector-team {
    flex: 1;
    min-width: 180px;
    max-width: 250px;
}

.compare-selector-team label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.compare-team-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
}

.compare-team-select:focus {
    outline: none;
    border-color: var(--tp-primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.compare-selector-vs {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e3a5f;
    padding-bottom: 0.75rem;
}

.compare-selector-btn {
    padding: 0.75rem 2rem;
    background: var(--tp-primary, #2563eb);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.compare-selector-btn:hover:not(:disabled) {
    background: var(--tp-primary-dark, #1d4ed8);
}

.compare-selector-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Comparison Cards Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.comparison-card {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: white;
    border: 1px solid #e6e9ef;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.comparison-card:hover {
    border-color: var(--tp-primary, #2563eb);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.comparison-card-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.comparison-card-team {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.comparison-card-team:last-child {
    justify-content: flex-end;
    text-align: right;
}

.comparison-card-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.comparison-card-name {
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comparison-card-vs {
    font-weight: 600;
    color: #1e3a5f;
    font-size: 0.9rem;
}

.comparison-card-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
    font-size: 0.8rem;
    color: #666;
}

/* Country Teams Section */
.country-teams-section {
    margin-bottom: 2rem;
}

.country-teams-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e3a5f;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e6e9ef;
}

.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

.team-select-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: white;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
}

.team-select-btn:hover {
    border-color: var(--tp-primary, #2563eb);
    background: #f8fafc;
}

.team-select-btn.selected {
    border-color: var(--tp-primary, #2563eb);
    background: rgba(37, 99, 235, 0.1);
}

.team-select-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.team-select-name {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.directory-section-desc {
    color: #666;
    margin: -0.5rem 0 1.5rem;
    font-size: 0.95rem;
}

/* ==========================================
   CHARTS & VISUAL COMPARISON STYLES
   ========================================== */

.compare-charts {
    margin-top: 1.5rem;
}

.chart-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e6e9ef;
}

.chart-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.chart-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e3a5f;
    margin: 0 0 1.25rem;
}

/* Bar Chart Comparison */
.bar-chart-comparison {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bar-chart-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bar-chart-label {
    width: 100px;
    font-size: 0.85rem;
    color: #666;
    text-align: right;
    flex-shrink: 0;
}

.bar-chart-bars {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 32px;
}

.bar-chart-team1,
.bar-chart-team2 {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.bar-chart-team1 {
    flex-direction: row-reverse;
}

.bar-chart-team1 .bar-fill {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 4px 0 0 4px;
}

.bar-chart-team2 .bar-fill {
    background: linear-gradient(90deg, #f97316, #fb923c);
    border-radius: 0 4px 4px 0;
}

.bar-fill {
    height: 100%;
    min-width: 4px;
    transition: width 0.5s ease;
}

.bar-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    padding: 0 8px;
    min-width: 35px;
}

.bar-chart-team1 .bar-value {
    text-align: right;
}

.bar-chart-team2 .bar-value {
    text-align: left;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

.legend-item img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.legend-team1::before {
    content: '';
    width: 12px;
    height: 12px;
    background: #3b82f6;
    border-radius: 2px;
}

.legend-team2::before {
    content: '';
    width: 12px;
    height: 12px;
    background: #f97316;
    border-radius: 2px;
}

/* Results Stacked Bars */
.results-comparison {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.results-team {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.results-team-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e3a5f;
}

.results-team-name img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.results-bars {
    display: flex;
    height: 36px;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f0f0;
}

.results-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    transition: width 0.5s ease;
    min-width: 0;
}

.results-win {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.results-draw {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.results-loss {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.results-detail {
    font-size: 0.8rem;
    color: #666;
}

.results-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.legend-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 4px;
}

.legend-win {
    background: #22c55e;
}

.legend-draw {
    background: #f59e0b;
}

.legend-loss {
    background: #ef4444;
}

/* Goals Comparison */
.goals-comparison {
    display: flex;
    align-items: stretch;
    gap: 1rem;
}

.goals-team {
    flex: 1;
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.25rem;
}

.goals-team-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #1e3a5f;
}

.goals-team-header img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.goals-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.goals-stat {
    text-align: center;
}

.goals-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.goals-stat-value.goals-for {
    color: #22c55e;
}

.goals-stat-value.goals-against {
    color: #ef4444;
}

.goals-stat-value.goals-diff.positive {
    color: #22c55e;
}

.goals-stat-value.goals-diff.negative {
    color: #ef4444;
}

.goals-stat-label {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
}

.goals-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: #cbd5e1;
    padding: 0 0.5rem;
}

@media (max-width: 640px) {
    .compare-selector-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .compare-selector-team {
        max-width: none;
    }
    
    .compare-selector-vs {
        text-align: center;
        padding: 0.5rem 0;
    }
    
    .compare-selector-btn {
        width: 100%;
    }
    
    .comparison-card-name {
        font-size: 0.85rem;
    }
    
    .comparison-card-logo {
        width: 32px;
        height: 32px;
    }
    
    .teams-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   SIDEBAR ENHANCEMENTS
   ========================================== */

/* Upcoming match sidebar widget */
.upcoming-sidebar {
    text-align: center;
}

.upcoming-date-small {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.upcoming-time {
    font-weight: 600;
    color: #1e3a5f;
    margin-left: 0.5rem;
}

.upcoming-teams-small {
    font-weight: 600;
    color: #1e3a5f;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.vs-small {
    color: #94a3b8;
    margin: 0 0.5rem;
}

.upcoming-venue-small {
    font-size: 0.8rem;
    color: #64748b;
}

/* Sportsbooks list */
.sportsbooks-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sportsbook-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
}

.sportsbook-rank {
    width: 24px;
    height: 24px;
    background: #1e3a5f;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.sportsbook-main {
    display: flex;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.sportsbook-logo-circle {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.sportsbook-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.sportsbook-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.sportsbook-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    margin-bottom: 0.25rem;
}

.sportsbook-name-link {
    font-weight: 600;
    color: #1e3a5f;
    text-decoration: none;
    font-size: 0.9rem;
}

.sportsbook-name-link:hover {
    color: #2563eb;
}

.sportsbook-rating {
    font-size: 0.8rem;
    color: #f59e0b;
    font-weight: 600;
    white-space: nowrap;
}

.sportsbook-offer {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sportsbook-cta {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: #2563eb;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s;
}

.sportsbook-cta:hover {
    background: #1d4ed8;
}

/* Responsible gambling banner */
.responsible-gambling-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fbbf24;
    padding: 1rem !important;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.rg-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.rg-content {
    flex: 1;
}

.rg-content strong {
    display: block;
    color: #92400e;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.rg-content p {
    margin: 0;
    font-size: 0.8rem;
    color: #78350f;
    line-height: 1.4;
}

.rg-content a {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ============================================
   Top Scorers Section
   ============================================ */

.top-scorers-section {
    margin-top: 1.5rem;
}

.top-scorers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.team-scorers {
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
}

.team-scorers-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #013466 0%, #025aa5 100%);
    color: #fff;
}

.team-scorers-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
    background: white;
    padding: 2px;
}

.team-scorers-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.scorers-list {
    padding: 0.5rem;
}

.scorer-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: transform 0.15s, box-shadow 0.15s;
}

.scorer-item:last-child {
    margin-bottom: 0;
}

.scorer-item:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.scorer-rank {
    width: 24px;
    height: 24px;
    background: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: #475569;
    flex-shrink: 0;
}

.scorer-item:first-child .scorer-rank {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
}

.scorer-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #e2e8f0;
}

.scorer-photo-placeholder {
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.scorer-photo-placeholder svg {
    width: 20px;
    height: 20px;
}

.scorer-info {
    flex: 1;
    min-width: 0;
}

.scorer-name {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scorer-position {
    display: block;
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 1px;
}

.scorer-goals {
    font-weight: 700;
    font-size: 0.9rem;
    color: #16a34a;
    flex-shrink: 0;
    white-space: nowrap;
}

.no-data-text {
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
    padding: 1.5rem;
    margin: 0;
}

/* Mobile responsive for top scorers */
@media (max-width: 640px) {
    .top-scorers-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .scorer-item {
        padding: 0.4rem 0.6rem;
        gap: 0.5rem;
    }
    
    .scorer-photo {
        width: 32px;
        height: 32px;
    }
    
    .scorer-name {
        font-size: 0.8rem;
    }
    
    .scorer-goals {
        font-size: 0.85rem;
    }
}

/* ============================================
   Standings Tracker (Position History Chart)
   ============================================ */
.standings-tracker-section {
    background: #fff;
}

.standings-tracker-section .section-title {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tracker-league-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
}

/* Chart container */
.standings-tracker-chart {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 0;
    margin: 1rem 0;
}

/* Y-axis */
.tracker-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    padding: 10px 0;
    min-width: 30px;
    font-size: 0.7rem;
    color: #94a3b8;
}

/* Chart area */
.tracker-chart-area {
    flex: 1;
    position: relative;
    min-height: 200px;
    background: linear-gradient(to bottom, 
        rgba(34, 197, 94, 0.08) 0%, 
        rgba(255, 255, 255, 0) 30%,
        rgba(255, 255, 255, 0) 70%,
        rgba(239, 68, 68, 0.05) 100%
    );
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.tracker-svg {
    width: 100%;
    height: 200px;
    display: block;
}

.tracker-line {
    transition: stroke-width 0.2s ease;
}

.tracker-line:hover {
    stroke-width: 4;
}

.tracker-line-team1 {
    stroke: #3b82f6;
}

.tracker-line-team2 {
    stroke: #ef4444;
}

/* X-axis */
.tracker-x-axis {
    position: relative;
    height: 24px;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
}

.tracker-x-axis .x-label {
    position: absolute;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: #94a3b8;
    padding-top: 4px;
    white-space: nowrap;
}

.tracker-x-axis-label {
    text-align: center;
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 500;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Current positions summary */
.tracker-current-positions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.tracker-position {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: #f8fafc;
}

.tracker-position-team1 {
    border-left: 4px solid #3b82f6;
}

.tracker-position-team2 {
    border-left: 4px solid #ef4444;
}

.tracker-position img {
    flex-shrink: 0;
}

.tracker-team-name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tracker-pos-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e293b;
    min-width: 36px;
    text-align: right;
}

.tracker-pos-points {
    font-size: 0.75rem;
    color: #64748b;
    min-width: 50px;
    text-align: right;
}

.tracker-note {
    text-align: center;
    color: #94a3b8;
    margin: 1rem 0 0;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .standings-tracker-section .section-title {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .tracker-league-name {
        font-size: 0.8rem;
    }
    
    .standings-tracker-chart {
        flex-direction: column;
        gap: 0;
    }
    
    .tracker-y-axis {
        flex-direction: row;
        justify-content: space-between;
        padding: 0 10px;
        min-width: unset;
        order: 2;
        font-size: 0.6rem;
    }
    
    .tracker-chart-area {
        order: 1;
        min-height: 160px;
    }
    
    .tracker-svg {
        height: 160px;
    }
    
    .tracker-current-positions {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .tracker-position {
        padding: 0.5rem 0.75rem;
    }
    
    .tracker-team-name {
        font-size: 0.8rem;
    }
    
    .tracker-pos-value {
        font-size: 1rem;
    }
}

