/* Match Details Page Styles */

:root {
    --primary-green: #007105;
    --light-green: #0cae13;
    --dark-green: #005a04;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --yellow: #ffc107;
    --red: #dc3545;
    --blue: #0d6efd;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --card-shadow: 0 5px 15px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

.match-container {
    max-width: 1000px;
    margin: 5px auto;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    font-size: 0.95rem;
    background: linear-gradient(to bottom, #ffffff 0%, #eaffea 100%);
    width: 100%;
    box-sizing: border-box;
}

.match-header {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--light-green) 100%);
    color: var(--white);
    padding: 15px;
    text-align: center;
    position: relative;
}

.match-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    padding: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.match-league {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    gap: 8px;
}

.match-league img {
    height: 20px;
    width: auto;
}
.match-status.ft { background-color: #adadad; }
.match-status.post { background-color: #dc3545; }
.match-status.live{ background-color: #28a745; }
.match.awaitingresult { background-color: #2d3aad; }
.match-status.live{ background-color: #28a745; animation: live-pulse 2s ease-in-out infinite; box-shadow: 0 0 10px rgba(40, 167, 69, 0.6); }
.match-status.upcoming { background-color: #ffc107; color: #212529; }

@keyframes live-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(40, 167, 69, 0.6); }
    50% { box-shadow: 0 0 20px rgba(40, 167, 69, 0.9), 0 0 30px rgba(40, 167, 69, 0.6); }
}


.match-league span {
    font-size: 0.9rem;
    font-weight: 500;
}

.match-league a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.match-league a:hover {
    color: #ffeb3b;
    text-decoration: underline;
    transform: scale(1.05);
}

.match-scoreboard {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: var(--light-gray);
    position: relative;
    overflow: hidden;
}

.team-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 40%;
    box-sizing: border-box;
    min-width: 0;
}

.team-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: var(--transition);
}

/* Header scoreboard team logos - larger size */
.match-scoreboard .team-logo,
.team-container .team-logo {
    width: 110px;
    height: 110px;
}

.team-logo:hover {
    transform: scale(1.05);
}

.team-name {
    font-size: 1.0rem;
    font-weight: 500;
    text-align: center;
    color: black;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
}

.team-code {
    font-size: 0.8rem;
    color: #666;
    margin-top: 3px;
}

.score-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20%;
}

.match-score {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 4px 0;
}

.score-divider {
    margin: 0 12px;
    color: #999;
}

.match-time {
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 8px;
    width: 100%;
    text-align: center;
    white-space: nowrap;
}

.match-status {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 4px 16px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 8px;
    white-space: nowrap;
    min-width: 100px;
    text-align: center;
}

.match-info {
    display: flex;
    justify-content: space-around;
    padding: 12px;
    background-color: #f0f0f0;
    border-top: 1px solid rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.info-label {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 3px;
}

.info-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.match-tabs {
    display: flex;
    background-color: var(--primary-green);
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.tab-button {
    padding: 12px 20px;
    background-color: transparent;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    outline: none;
}

.tab-button.active {
    color: var(--white);
    background-color: rgba(255,255,255,0.1);
}

.tab-button:hover {
    background-color: rgba(255,255,255,0.1);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--light-green);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.half-header {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 8px 12px;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 15px 0 12px 0;
    border-radius: 6px;
}

.events-container {
    position: relative;
    padding: 0 5px;
}


.event-item {
    display: flex;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
    width: 100%;
}

.event-time {
    width: 40px;
    height: 25px;
    background-color: var(--light-gray);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--dark-gray);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.event-content {
    background-color: var(--white);
    border-radius: 6px;
    padding: 8px 12px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.event-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.home-event {
    flex-direction: row;
}

.home-event .event-time {
    margin-right: 12px;
}

.home-event .event-content {
    margin-right: auto;
}

.away-event {
    flex-direction: row-reverse;
}

.away-event .event-time {
    margin-left: 12px;
}

.away-event .event-content {
    margin-left: auto;
}

.event-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 8px;
}

.goal-icon {
    background-color: #e3f2fd;
    color: var(--blue);
background-image: url('/assets/images/goal.png');
    background-size: contain; /* or cover */
    background-repeat: no-repeat;
    background-position: center;
}

.yellow-card-icon {
    background-color: #fff3cd;
    color: var(--yellow);
    background-image: url('/assets/images/yellowcard.png');
    background-size: contain; /* or cover */
    background-repeat: no-repeat;
    background-position: center;
}

.red-card-icon {
    background-color: #f8d7da;
    color: var(--red);

    background-image: url('/assets/images/redcard.png');
    background-size: contain; /* or cover */
    background-repeat: no-repeat;
    background-position: center;
}

.substitution-icon {
    background-color: #d1e7dd;
    color: var(--primary-green);
    background-image: url('/assets/images/sub.png');
    background-size: contain; /* or cover */
    background-repeat: no-repeat;
    background-position: center;
}

.penalty-icon {
    background-color: #e3f2fd;
    color: var(--blue);
    background-image: url('/assets/images/pen.png');
    background-size: contain; /* or cover */
    background-repeat: no-repeat;
    background-position: center;
}

.missed-penalty-icon {
    background-color: #fff3e0;
    color: #ff9800;
    background-image: url('/assets/images/missedpen.png');
    background-size: contain; /* or cover */
    background-repeat: no-repeat;
    background-position: center;
}

.own-goal-icon {
    background-color: #ffe5e5;
    color: #ff6b6b;
    background-image: url('/assets/images/owngoal.png');
    background-size: contain; /* or cover */
    background-repeat: no-repeat;
    background-position: center;
}

.event-details {
    display: flex;
    flex-direction: column;
}

.event-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--dark-gray);
}

.event-subtitle {
    font-size: 0.75rem;
    color: #666;
    margin-top: 2px;
}


.prediction-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    padding: 5px;
}

.prediction-card {
    background-color: #fff;
    border-radius: 6px;
    padding: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: var(--transition);
    border-top: 2px solid var(--primary-green);
}

.prediction-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.prediction-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 6px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.prediction-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 3px;
}

.prediction-label {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 8px;
}

.prediction-chart {
    display: flex;
    height: 25px;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 10px;
}

.chart-home {
    background-color: var(--primary-green);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

.chart-draw {
    background-color: #6c757d;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

.chart-away {
    background-color: var(--light-green);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

.penalty-shootout {
    margin-top: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.penalty-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 12px;
    text-align: center;
}

.penalty-score {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 8px 0 15px;
}

.match-info-seo {
    padding: 15px;
    background-color: var(--light-gray);
    border-top: 1px solid #ddd;
    margin-top: 20px;
}

/* Head-to-Head styles */
.h2h-summary {
    display: flex;
    justify-content: center;
    align-items: stretch;
    background: linear-gradient(135deg, #1a2a3a 0%, #2c3e50 50%, #1a2a3a 100%);
    border-radius: 10px;
    margin: 10px 0 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    padding: 0;
}

.h2h-summary-item {
    text-align: center;
    flex: 1;
    padding: 16px 12px;
    position: relative;
    transition: all 0.3s ease;
}

.h2h-summary-item.h2h-draws {
    border-left: 1px solid rgba(255,255,255,0.15);
    border-right: 1px solid rgba(255,255,255,0.15);
    background: rgba(0,0,0,0.1);
    flex: 0.7;
}

.h2h-summary-item.h2h-winner {
    background: rgba(255, 255, 255, 0.12);
}

.h2h-summary-item.h2h-winner .h2h-wins {
    font-size: 2.2rem;
    color: var(--yellow);
}

.h2h-summary-item.h2h-winner .h2h-team-name,
.h2h-summary-item.h2h-winner .h2h-label {
    font-weight: 700;
}

.h2h-team-name {
    color: rgba(255,255,255,0.9);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.h2h-label {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.h2h-wins {
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.h2h-matches-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.h2h-match-card {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
    gap: 10px;
}

.h2h-match-card:last-child {
    border-bottom: none;
}

.h2h-match-card:hover {
    background-color: #f0faf0;
}

.h2h-match-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 180px;
    flex-shrink: 0;
}

.h2h-league-info {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.h2h-league-logo {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.h2h-league-name {
    font-size: 0.7rem;
    color: #888;
    font-weight: 500;
}

.h2h-match-date {
    font-size: 0.65rem;
    color: #aaa;
    padding-left: 18px;
}

.h2h-match-body {
    flex: 1;
    padding: 0;
}

.h2h-teams {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.h2h-team {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.h2h-team:first-child {
    justify-content: flex-end;
}

.h2h-team:last-child {
    justify-content: flex-start;
}

.h2h-team-logo {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex-shrink: 0;
}

.h2h-team-name-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--dark-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.h2h-team:first-child .h2h-team-name-text {
    text-align: right;
}

.h2h-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--white);
    background: #2c3e50;
    border-radius: 6px;
    padding: 4px 10px;
    min-width: 50px;
    flex-shrink: 0;
}

.h2h-score-divider {
    color: rgba(255,255,255,0.5);
    font-weight: 400;
}

.h2h-match-footer {
    display: none;
}

.h2h-match-status {
    font-size: 0.75rem;
    color: var(--primary-green);
    font-weight: 600;
}

.team-name a { color:black; }
.team-name a:hover { color: var(--primary-green); }

.event-item a { color:black; }
.event-item a:hover { color: var(--primary-green); }


.match-header a { color:white; text-decoration: none;
        display: inline-block; }
.match-header a:hover {
        text-decoration: underline !important;
        transform: scale(1.1);
        transition: transform 0.3s ease, color 0.3s ease;
}

.match-info-seo h2 {
    color: var(--primary-green);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.match-info-seo p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--dark-gray);
    margin-bottom: 10px;
}

.half-time-score, .extra-time-score, .penalty-score {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    margin: 4px 0;
    color: var(--dark-gray);
}

.score-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-green);
    margin-right: 6px;
    background-color: rgba(0, 113, 5, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Lineup styles */
.lineup-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.lineup-team {
    background-color: var(--light-gray);
    border-radius: 8px;
    padding: 15px;
    box-shadow: var(--shadow);
}

/* League Table styles */
.league-table-wrapper {
    padding: 15px;
    background-color: var(--white);
    overflow-x: auto;
}

.league-standings-table {
    width: 100%;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.league-standings-table thead {
    background-color: var(--primary-green);
    color: var(--white);
}

.league-standings-table thead th {
    border: none;
    padding: 10px 8px;
    font-weight: 600;
    font-size: 0.85rem;
}

.league-standings-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.league-standings-table tbody tr:hover {
    background-color: var(--light-gray);
}

.league-standings-table td {
    padding: 8px;
    vertical-align: middle;
}

.position-col {
    width: 40px;
    font-weight: 600;
    color: var(--dark-gray);
}

.team-col {
    min-width: 150px;
}

.team-logo-sm {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin-right: 8px;
    vertical-align: middle;
}

.points-col {
    font-weight: 700;
    color: var(--primary-green);
}

.promotion-zone {
    background-color: rgba(0, 113, 5, 0.05);
    border-left: 3px solid var(--primary-green);
}

.relegation-zone {
    background-color: rgba(220, 53, 69, 0.05);
    border-left: 3px solid #dc3545;
}

/* Stats Tab Styles */
.stats-container {
    padding: 5px 8px;
    margin: 0 auto;
}

.stat-section-header {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-green);
    margin: 8px 0 4px 0;
    border-bottom: 2px solid var(--primary-green);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f5f5f5;
    margin: 0 20px; /* top/bottom = 0, left/right = 20px */
}

.stat-value {
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 38px;
    text-align: center;
    margin: 0 20px; /* top/bottom = 0, left/right = 20px */
}

.stat-value.home {
    color: #1a2b5f;
}

.stat-value.away {
    color: #d32f2f;
}

.stat-label {
    flex: 1;
    text-align: center;
    font-size: 0.7rem;
    color: #666;
    font-weight: 400;
}

.stat-bar-container {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    margin-bottom: 1px;
    margin: 0 20px; /* top/bottom = 0, left/right = 20px */
}

.stat-bar-value {
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 38px;
    text-align: center;
    color: #333;
}

.stat-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-bar-label {
    text-align: center;
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
}

.stat-bar {
    height: 14px;
    background-color: #f0f0f0;
    border-radius: 7px;
    overflow: hidden;
    display: flex;
}

.stat-bar-fill {
    height: 100%;
    transition: width 0.5s ease;
}

.stat-bar-fill.home {
    background: linear-gradient(90deg, #1a2b5f 0%, #2d4a9e 100%);
}

.stat-bar-fill.away {
    background: linear-gradient(90deg, #d32f2f 0%, #f44336 100%);
    margin-left: auto;
}

.lineup-team-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.lineup-team-logo {
    width: 40px;
    height: 40px;
    margin-right: 12px;
}

.lineup-team-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.lineup-formation {
    font-size: 0.85rem;
    color: #666;
    margin-left: auto;
    background-color: rgba(0, 113, 5, 0.1);
    padding: 4px 10px;
    border-radius: 15px;
}

.lineup-section {
    margin-bottom: 15px;
}

.lineup-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 10px;
    padding-left: 5px;
    border-left: 3px solid var(--primary-green);
}

.lineup-players {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.player-card {
    display: flex;
    align-items: flex-start;
    background-color: white;
    border-radius: 6px;
    padding: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.player-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.player-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    background-color: #f0f0f0;
    flex-shrink: 0;
}

.player-info {
    flex: 1;
    min-width: 0;
}

.player-name {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.player-name a {
    text-decoration: none;
}

.player-name a:hover {
    color: var(--primary-green);
    text-decoration: underline;
}

.player-position {
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 0;
    display: inline-block;
}

.player-jersey {
    background-color: var(--primary-green);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
    flex-shrink: 0;
}

.player-captain {
    background-color: #ffc107;
    color: #212529;
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: 600;
    flex-shrink: 0;
}

.player-rating {
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

/* Rating gradient colors */
.player-rating.rating-exceptional {
    background: linear-gradient(135deg, #155724 0%, #28a745 100%);
    box-shadow: 0 2px 4px rgba(21, 87, 36, 0.3);
}

.player-rating.rating-excellent {
    background: linear-gradient(135deg, #0f6e2d 0%, #1e9545 100%);
    box-shadow: 0 2px 4px rgba(15, 110, 45, 0.3);
}

.player-rating.rating-good {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.player-rating.rating-average {
    background: linear-gradient(135deg, #e67e00 0%, #ffc107 100%);
    box-shadow: 0 2px 4px rgba(230, 126, 0, 0.3);
}

.player-rating.rating-below {
    background: linear-gradient(135deg, #e67e00 0%, #fd7e14 100%);
    box-shadow: 0 2px 4px rgba(230, 126, 0, 0.3);
}

.player-rating.rating-poor {
    background: linear-gradient(135deg, #bd2130 0%, #dc3545 100%);
    box-shadow: 0 2px 4px rgba(189, 33, 48, 0.3);
}

.player-stats {
    display: inline-flex;
    gap: 6px;
    margin-top: 0;
    flex-wrap: wrap;
    align-items: center;
}

.player-stat {
    display: flex;
    align-items: center;
    font-size: 0.7rem;
    color: #666;
}

.stat-icon {
    width: 14px;
    height: 14px;
    margin-right: 2px;
    margin-bottom: 0;
    opacity: 0.8;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.lineup-tabs {
    display: flex;
    background-color: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 15px;
}

.lineup-tab {
    flex: 1;
    padding: 8px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: #666;
}

.lineup-tab.active {
    background-color: var(--primary-green);
    color: white;
}

.lineup-tab:hover:not(.active) {
    background-color: #e0e0e0;
}

.lineup-content {
    display: none;
}

.lineup-content.active {
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .match-header {
        padding: 12px 8px;
    }

    .extra-time-score, .penalty-score {
        font-size: 0.9rem;
    }

    .half-time-score {
        font-size: 0.75rem;
        margin: 1px 0;
    }

    .match-scoreboard {
        padding: 15px 10px;
    }

    .team-container {
        width: 38%;
    }

    .match-scoreboard .team-logo,
    .team-container .team-logo {
        width: 85px;
        height: 85px;
    }

    .team-name {
        font-size: 0.9rem;
    }

    .score-container {
        width: 24%;
    }

    .match-score {
        font-size: 2rem;
    }

    .match-info {
        flex-wrap: wrap;
    }

    .info-item {
        width: 50%;
        margin-bottom: 8px;
    }

    .tab-button {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .event-time {
        width: 35px;
        height: 22px;
        font-size: 0.75rem;
        margin: 0 8px;
    }

    .event-content {
        padding: 6px 10px;
        max-width: 75%;
    }

    .event-icon {
        width: 18px;
        height: 18px;
        margin: 0 6px;
    }

    .event-title {
        font-size: 0.8rem;
    }

    .event-subtitle {
        font-size: 0.7rem;
    }

    .prediction-container {
        grid-template-columns: 1fr;
    }

    .lineup-container {
        grid-template-columns: 1fr;
    }

    .h2h-summary {
        margin: 8px 0 12px;
    }

    .h2h-summary-item {
        padding: 10px 6px;
    }

    .h2h-team-name {
        font-size: 0.65rem;
        margin-bottom: 3px;
    }

    .h2h-label {
        font-size: 0.6rem;
        margin-bottom: 3px;
    }

    .h2h-wins {
        font-size: 1.4rem;
    }

    .h2h-summary-item.h2h-winner .h2h-wins {
        font-size: 1.6rem;
    }

    .h2h-match-card {
        padding: 8px 10px;
        flex-wrap: wrap;
    }

    .h2h-match-header {
        min-width: unset;
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 4px;
    }

    .h2h-match-date {
        padding-left: 0;
    }

    .h2h-team-logo {
        width: 22px;
        height: 22px;
    }

    .h2h-team-name-text {
        font-size: 0.7rem;
    }

    .h2h-score {
        font-size: 0.85rem;
        padding: 3px 8px;
        min-width: 44px;
    }

    .h2h-league-name {
        font-size: 0.65rem;
    }

    .stats-container {
        padding: 4px 6px;
    }

    .stat-section-header {
        font-size: 0.8rem;
        margin: 6px 0 3px 0;
        padding-bottom: 2px;
    }

    .stat-row {
        padding: 1px 0;
    }

    .stat-value {
        font-size: 0.7rem;
        min-width: 32px;
    }

    .stat-label {
        font-size: 0.65rem;
    }

    .stat-bar-container {
        gap: 4px;
        padding: 2px 0;
    }

    .stat-bar-value {
        font-size: 0.7rem;
        min-width: 32px;
    }

    .stat-bar-label {
        font-size: 0.65rem;
    }

    .stat-bar {
        height: 12px;
    }

    .player-photo {
        width: 35px;
        height: 35px;
    }

    .player-jersey {
        width: 20px;
        height: 20px;
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .match-header {
        padding: 10px 6px;
    }

    .extra-time-score, .penalty-score {
        font-size: 0.8rem;
    }

    .half-time-score {
        font-size: 0.7rem;
        margin: 1px 0;
    }

    .score-label {
        font-size: 0.7rem;
        padding: 1px 4px;
    }
    .match-status {
        padding: 3px 6px;
        font-size: 0.65rem;
        min-width: auto;
    }

    .match-header h1 {
        font-size: 0.95rem;
        line-height: 1.3;
        padding: 0 3px;
    }

    .match-league span {
        font-size: 0.8rem;
    }

    .match-scoreboard {
        padding: 8px 4px;
    }

    .team-container {
        width: 38%;
    }

    .match-scoreboard .team-logo,
    .team-container .team-logo {
        width: 65px;
        height: 65px;
    }

    .team-name {
        font-size: 0.75rem;
        line-height: 1.1;
    }

    .score-container {
        width: 24%;
    }

    .match-score {
        font-size: 1.5rem;
    }

    .info-item {
        width: 100%;
    }

    .tab-button {
        padding: 8px;
        font-size: 0.75rem;
        margin: 0 2px;
    }

    .player-card {
        padding: 6px;
    }

    .player-photo {
        width: 30px;
        height: 30px;
    }

    .player-name {
        font-size: 0.8rem;
    }

    .player-position {
        font-size: 0.7rem;
        padding-left: 4px;
    }

    .stats-container {
        padding: 3px 5px;
    }

    .stat-section-header {
        font-size: 0.75rem;
        margin: 5px 0 2px 0;
        padding-bottom: 2px;
    }

    .stat-row {
        padding: 1px 0;
    }

    .stat-value {
        font-size: 0.65rem;
        min-width: 30px;
    }

    .stat-label {
        font-size: 0.6rem;
    }

    .stat-bar-container {
        gap: 3px;
        padding: 2px 0;
    }

    .stat-bar-value {
        font-size: 0.65rem;
        min-width: 30px;
    }

    .stat-bar-label {
        font-size: 0.6rem;
    }

    .stat-bar {
        height: 10px;
    }
}

/* Twitter Feed Section Styles */
.twitter-feed-section {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    margin-top: 20px;
    transition: var(--transition);
}

.twitter-feed-section:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.twitter-feed-header {
    background: linear-gradient(135deg, #1DA1F2 0%, #0d8bd9 100%);
    color: var(--white);
    padding: 20px;
    text-align: center;
}

.twitter-feed-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.twitter-icon {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.twitter-feed-subtitle {
    font-size: 0.9rem;
    margin: 8px 0 0 0;
    opacity: 0.95;
    font-weight: 400;
}

.twitter-timeline-container {
    padding: 40px 20px;
    background-color: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
}

.twitter-cta {
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.twitter-cta-text {
    font-size: 1.1rem;
    color: #495057;
    margin-bottom: 20px;
    font-weight: 500;
}

.twitter-view-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #1DA1F2 0%, #0d8bd9 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(29, 161, 242, 0.3);
}

.twitter-view-button:hover {
    background: linear-gradient(135deg, #0d8bd9 0%, #0a72b5 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(29, 161, 242, 0.4);
    color: white;
}

.twitter-view-button svg {
    width: 20px;
    height: 20px;
}

.twitter-search-info {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 15px;
    font-style: italic;
}

/* Responsive adjustments for Twitter feed */
@media (max-width: 768px) {
    .twitter-feed-header {
        padding: 15px;
    }

    .twitter-feed-title {
        font-size: 1.1rem;
    }

    .twitter-icon {
        width: 24px;
        height: 24px;
    }

    .twitter-feed-subtitle {
        font-size: 0.85rem;
    }

    .twitter-timeline-container {
        padding: 30px 15px;
        min-height: 250px;
    }

    .twitter-cta-text {
        font-size: 1rem;
    }

    .twitter-view-button {
        padding: 12px 24px;
        font-size: 0.95rem;
    }

    .twitter-search-info {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .twitter-feed-title {
        font-size: 1rem;
        flex-direction: column;
        gap: 5px;
    }

    .twitter-icon {
        width: 20px;
        height: 20px;
    }

    .twitter-feed-subtitle {
        font-size: 0.8rem;
    }

    .twitter-timeline-container {
        padding: 25px 10px;
        min-height: 200px;
    }

    .twitter-cta-text {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }

    .twitter-view-button {
        padding: 10px 20px;
        font-size: 0.9rem;
        gap: 8px;
    }

    .twitter-view-button svg {
        width: 18px;
        height: 18px;
    }

    .twitter-search-info {
        font-size: 0.75rem;
        margin-top: 12px;
    }
}

/* AI Content Styles */
.ai-content-wrapper {
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #fff 100%);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ai-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.ai-content {
    background: white !important;
    padding: 24px !important;
    border-radius: 8px !important;
    line-height: 1.8 !important;
    font-size: 1rem !important;
    color: #2c3e50 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

/* Override any global link styles within AI content */
.ai-content a {
    text-decoration: none !important;
    display: inline !important;
}

.ai-content a:hover {
    text-decoration: underline !important;
}

.ai-content p {
    margin-bottom: 16px !important;
    text-align: justify !important;
    line-height: 1.8 !important;
    font-size: 1rem !important;
}

.ai-content p:last-child {
    margin-bottom: 0 !important;
}

.ai-content h1 {
    color: #1a202c !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    padding-bottom: 12px !important;
    border-bottom: 3px solid var(--primary-green) !important;
    line-height: 1.4 !important;
}

.ai-content h2,
.ai-content h3 {
    color: #1a202c !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    margin-top: 24px !important;
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

.ai-content h1:first-child,
.ai-content h2:first-child,
.ai-content h3:first-child {
    margin-top: 0 !important;
}

.ai-content strong {
    color: #2d3748 !important;
    font-weight: 600 !important;
}

.ai-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    text-align: right;
}

.ai-footer small {
    color: #718096;
    font-size: 0.8rem;
    font-style: italic;
}

.ai-error {
    padding: 20px;
    background: #fff5f5;
    border-left: 4px solid #fc8181;
    border-radius: 4px;
    color: #c53030;
    font-size: 0.95rem;
}

/* Responsive AI Content */
@media (max-width: 768px) {
    .ai-content-wrapper {
        padding: 16px !important;
    }

    .ai-content {
        padding: 20px !important;
        font-size: 0.95rem !important;
    }

    .ai-content h1 {
        font-size: 1.3rem !important;
    }

    .ai-content h2 {
        font-size: 1.2rem !important;
    }

    .ai-content h3 {
        font-size: 1.2rem !important;
    }

    .ai-badge {
        font-size: 0.8rem !important;
        padding: 6px 12px !important;
    }
}

@media (max-width: 480px) {
    .ai-content-wrapper {
        padding: 12px !important;
    }

    .ai-content {
        padding: 16px !important;
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
    }

    .ai-content h1 {
        font-size: 1.15rem !important;
    }

    .ai-content h2 {
        font-size: 1.1rem !important;
    }

    .ai-content h3 {
        font-size: 1.1rem !important;
    }

    .ai-content p {
        text-align: left !important;
    }
}

/* Team Links in AI Content - NEW dedicated classes */
.ai-team-link {
    color: var(--primary-green) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline !important;
    transition: all 0.3s ease;
    position: relative;
}

.ai-team-link:hover {
    color: var(--light-green) !important;
    text-decoration: underline !important;
}

.ai-home-team-link {
    color: #1a2b5f !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline !important;
    transition: all 0.3s ease;
    position: relative;
}

.ai-home-team-link:hover {
    color: #2d4a9e !important;
    text-decoration: underline !important;
}

.ai-away-team-link {
    color: #d32f2f !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline !important;
    transition: all 0.3s ease;
    position: relative;
}

.ai-away-team-link:hover {
    color: #f44336 !important;
    text-decoration: underline !important;
}

/* Override for team links inside headings */
.ai-content h1 .ai-team-link,
.ai-content h2 .ai-team-link,
.ai-content h3 .ai-team-link,
.ai-content h1 .ai-home-team-link,
.ai-content h2 .ai-home-team-link,
.ai-content h3 .ai-home-team-link,
.ai-content h1 .ai-away-team-link,
.ai-content h2 .ai-away-team-link,
.ai-content h3 .ai-away-team-link {
    display: inline !important;
    font-weight: inherit !important;
}

/* Player Links in AI Content - NEW dedicated class */
.ai-player-link {
    color: var(--primary-green) !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    display: inline !important;
    transition: all 0.3s ease;
    position: relative;
}

.ai-player-link:hover {
    color: var(--light-green) !important;
    text-decoration: underline !important;
}

/* AI Section Headings */
.ai-content .ai-section-heading {
    color: var(--primary-green) !important;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    margin-top: 28px !important;
    margin-bottom: 16px !important;
    padding-bottom: 10px !important;
    border-bottom: 3px solid var(--primary-green) !important;
    line-height: 1.4 !important;
    letter-spacing: -0.02em !important;
}

.ai-content .ai-section-heading:first-child {
    margin-top: 0 !important;
}

.ai-content .ai-subsection-heading {
    color: #2d3748 !important;
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    margin-top: 20px !important;
    margin-bottom: 12px !important;
    padding-left: 12px !important;
    border-left: 4px solid var(--light-green) !important;
    line-height: 1.4 !important;
}

.ai-content .ai-subsection-heading:first-child {
    margin-top: 0 !important;
}

/* AI Paragraphs */
.ai-content .ai-paragraph {
    margin-bottom: 18px !important;
    line-height: 1.8 !important;
    font-size: 1rem !important;
    color: #2c3e50 !important;
}

.ai-content .ai-paragraph:last-child {
    margin-bottom: 0 !important;
}

/* Add spacing between sections */
.ai-content .ai-section-heading + .ai-paragraph {
    margin-top: 0;
}

.ai-content .ai-subsection-heading + .ai-paragraph {
    margin-top: 0;
}

/* Improve readability with better text formatting */
.ai-content br {
    display: block;
    margin: 8px 0;
    content: "";
}

/* Responsive adjustments for new styles */
@media (max-width: 768px) {
    .ai-content h1 {
        font-size: 1.3rem !important;
    }

    .ai-content .ai-section-heading {
        font-size: 1.25rem !important;
        margin-top: 24px !important;
        margin-bottom: 14px !important;
    }

    .ai-content .ai-subsection-heading {
        font-size: 1.1rem !important;
        margin-top: 18px !important;
        margin-bottom: 10px !important;
    }

    .ai-content .ai-paragraph {
        font-size: 0.95rem !important;
        line-height: 1.7 !important;
    }

    .ai-content p {
        font-size: 0.95rem !important;
        line-height: 1.7 !important;
    }

    .ai-content h2,
    .ai-content h3 {
        font-size: 1.2rem !important;
    }
}

@media (max-width: 480px) {
    .ai-content h1 {
        font-size: 1.15rem !important;
    }

    .ai-content .ai-section-heading {
        font-size: 1.15rem !important;
        margin-top: 20px !important;
        margin-bottom: 12px !important;
        padding-bottom: 8px !important;
    }

    .ai-content .ai-subsection-heading {
        font-size: 1.05rem !important;
        margin-top: 16px !important;
        margin-bottom: 10px !important;
        padding-left: 10px !important;
    }

    .ai-content .ai-paragraph {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
        margin-bottom: 16px !important;
    }

    .ai-content p {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
        text-align: left !important;
    }

    .ai-content h2,
    .ai-content h3 {
        font-size: 1.1rem !important;
    }
}

/* ==========================================
   Fantasy Stats Section
   ========================================== */
.fantasy-stats-section {
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.fantasy-stats-section .stats-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-green);
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.fantasy-stats-section .stats-title i {
    font-size: 1.1rem;
}

.fantasy-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.fantasy-stat-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fantasy-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.fantasy-stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 500;
}

.fantasy-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-green);
}

.fantasy-stat-value.fantasy-points {
    color: #007105;
}

.fantasy-stat-value.form-high {
    color: #28a745;
}

.fantasy-stat-value.form-medium {
    color: #ffc107;
}

.fantasy-stat-value.form-low {
    color: #dc3545;
}

.fantasy-note {
    margin-top: 15px;
    text-align: center;
    font-size: 0.85rem;
    color: #6c757d;
}

.fantasy-note a {
    color: var(--primary-green);
    font-weight: 600;
    text-decoration: none;
}

.fantasy-note a:hover {
    text-decoration: underline;
}

/* Responsive for Fantasy Stats */
@media (max-width: 576px) {
    .fantasy-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .fantasy-stat-card {
        padding: 12px 8px;
    }

    .fantasy-stat-value {
        font-size: 1.3rem;
    }

    .fantasy-stat-label {
        font-size: 0.75rem;
    }
}
