:root {
    /* Theme Variables */
    --font-family-base: 'Segoe UI', sans-serif;

    /* Grayscale & Common */
    --color-text: #777;
    --color-muted: #666;
    --color-light-bg: #f9f9f9;
    --color-white: #fff;
    --color-dark: #222;
    --color-border: #ccc;
    --color-shadow: rgba(0, 0, 0, 0.1);

    /* Primary & Accent */
    --color-primary: #c3002f;
    --color-header-bg: #003366;
    --color-hover-bg: #f0f8ff;

    /* Status Colors */
    --color-live: #d9534f;
    --color-finished: #5cb85c;
    --color-upcoming: #f0ad4e;

    /* Team Colors */
    --color-blue-team: #337ab7;
    --color-red-team: #d9534f;
}

/* --- Base Styling --- */
.betsapi-widget {
    color: var(--color-text) !important;
}

.betsapi-widget a {
    color: var(--color-primary);
    text-decoration: none;
}

.betsapi-widget a:hover {
    text-decoration: underline;
}

.league-container {
    max-width: 100%;
    margin: 20px auto;
    padding: 0;
    /*15px*/
    /* background: var(--color-light-bg); */
    border-radius: 8px;
    font-family: var(--font-family-base);
    box-shadow: 0 2px 8px var(--color-shadow);
}

.layout-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 15px;
    width: 1200px;
}

.block {
    /* background: var(--color-light-bg); */
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--color-shadow);
    overflow: hidden;
    margin-bottom: 20px;
}

.league-title {
    text-align: center;
    font-size: 1.5rem;
    color: var(--color-white);
    background: var(--color-primary);
    padding: 10px;
    border-radius: 6px 6px 0 0;
    margin: 0;
}

.match {
    padding: 20px;
    background: var(--color-white);
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    transition: background 0.3s;
}

.match:hover {
    background: var(--color-hover-bg);
}

.teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.team {
    flex: 1 1 25%;
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
    color: #333;
}

.score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--color-dark);
    flex: 1 1 40%;
    min-width: 100px;
}

.score img {
    width: 2rem;p
    height: 2rem;
    object-fit: contain;
    border-radius: 50%;
    background: var(--color-white);
    border: 1px solid var(--color-border);
}

.status {
    margin-top: 5px;
    font-size: 0.9rem;
    text-align: center;
    color: var(--color-muted);
}

.status-date {
    color: var(--color-dark)
}

.status.live {
    color: var(--color-live);
    font-weight: bold;
}

.status.finished {
    color: var(--color-finished);
}

.status.upcoming {
    color: var(--color-upcoming);
}

.half-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.half-block {
    flex: 0 0 48%;
    background: var(--color-light-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--color-shadow);
}

.half-header {
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 1.2rem;
    padding: 10px;
    text-align: center;
    border-radius: 6px 6px 0 0;
}

.half-content {
    display: flex;
    flex-direction: column;
}

.half-row {
    padding: 12px 15px;
    border-bottom: 1px solid var(--color-border);
}

.half-row:last-child {
    border-bottom: none;
}

.half-row.three-cols {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.half-row.three-cols>div {
    flex: 1;
    text-align: center;
}

.match-row {
    display: grid;
    grid-template-columns: 2fr 1fr 3fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--color-border);
}

.match-row:last-child {
    border-bottom: none;
}

.colz {
    font-size: 0.95rem;
    color: #333;
}

.result-badge {
    font-weight: bold;
    color: var(--color-white);
    text-align: center;
    border-radius: 4px;
    padding: 4px 8px;
    min-width: 24px;
    display: inline-block;
}

.result-badge.win {
    background-color: var(--color-finished);
}

.result-badge.loss {
    background-color: var(--color-live);
}

.result-badge.draw {
    background-color: var(--color-upcoming);
}

.team.blue {
    color: var(--color-blue-team);
}

.team.red {
    color: var(--color-red-team);
}

/* ðŸ“Œ League Table Styles */
.league-table-container {
    background: var(--color-light-bg);
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: 0 2px 8px var(--color-shadow);
    margin-bottom: 20px;
    padding: 0;
    /*20px*/
}

.league-table-title {
    text-align: center;
    font-size: 1.5rem;
    color: var(--color-white);
    background: var(--color-primary);
    padding: 10px;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
}

.league-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
    background: var(--color-white);
}

.league-table thead {
    background-color: var(--color-header-bg);
    color: var(--color-white);
}

.league-table th,
.league-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-border);
    text-align: center;
    font-size: 0.95rem;
}

.team-cell .league-table td.team-name {
    text-align: left;
    font-weight: 600;
    color: #333;
}

.league-table tbody tr:nth-child(even) {
    background-color: #f5f5f5;
}

.league-table tbody tr:hover {
    background-color: var(--color-hover-bg);
}

/* ðŸ“± Responsive */
@media (max-width: 768px) {
    .half-block {
        flex: 0 0 100%;
    }

    .match-row {
        grid-template-columns: 1fr;
        grid-template-areas:
            "fixture"
            "league"
            "date"
            "result"
            "score";
        text-align: center;
    }

    .col.league {
        grid-area: league;
    }

    .col.date {
        grid-area: date;
    }

    .col.fixture {
        grid-area: fixture;
    }

    .col.result-badge {
        grid-area: result;
    }

    .col.score {
        grid-area: score;
    }

    .col {
        margin-bottom: 6px;
    }

    .teams {
        flex-direction: column;
        align-items: center;
    }

    .team,
    .score {
        flex: 1 1 100%;
        margin-bottom: 8px;
    }

    .score {
        font-size: 1.1rem;
    }

    .score img {
        width: 28px;
        height: 28px;
    }

    .half-row.three-cols {
        flex-direction: column;
        text-align: center;
    }

    .half-row.three-cols>div {
        margin-bottom: 6px;
    }

    .league-table {
        font-size: 0.85rem;
        min-width: 600px;
    }

    .league-table-container {
        overflow-x: auto;
    }
}

.bapi-tabs .tabs-wrapper {
    background: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
    margin-bottom: 30px;
    overflow: hidden;
}

.bapi-tabs .tab-buttons {
    display: flex;
    justify-content: center;
    background: #eee;
    padding: 8px;
    gap: 10px;
    flex-wrap: wrap;
}

.bapi-tabs .tab-buttons button {
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #333;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 0 1px #ccc;
}

.bapi-tabs .tab-buttons button:hover {
    background: #e8e8e8;
    border-color: #c3002f;
}

.bapi-tabs .tab-buttons button.active {
    background: #c3002f;
    color: #fff;
    border-color: #c3002f;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.bapi-tabs .tab-content {
    display: none;
    padding: 20px;
    background: #fff;
    border-top: 1px solid #ccc;
    border-radius: 0 0 12px 12px;
}

.bapi-tabs .tab-content.active {
    display: block;
}

/* ==== Refined Full-Width Player Profile Styles ==== */

.player-profile-widget {
    /* max-width: 900px;*/
    /* Limit width on large screens */
    margin: 20px auto;
    /* Center horizontally */
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    color: #222;
    display: flex;
    flex-direction: column;
}

.player-profile-title {
    background-color: #c3002f;
    color: #fff;
    font-weight: 700;
    font-size: 1.8rem;
    text-align: center;
    padding: 15px 0;
    border-radius: 10px 10px 0 0;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.player-header {
    display: flex;
    align-items: center;
    padding: 30px 40px;
    gap: 40px;
    /* More breathing space between image and text */
    border-bottom: 3px solid #c3002f;
    background: #fafafa;
    /* Lighter background for subtle contrast */
    flex-wrap: nowrap;
    /* No wrap on large screens */
}


.player-header img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #c3002f;
    object-fit: cover;
    box-shadow: 0 2px 10px rgba(195, 0, 47, 0.4);
    flex-shrink: 0;
}

.player-header h1 {
    font-size: 2rem;
    font-weight: 900;
    color: #111;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(195, 0, 47, 0.4);
    flex-grow: 1;
    max-width: 600px;
    /* Prevent heading stretching too wide */
}

.player-header-container {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    transition: filter 0.3s ease;
}

.player-header-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    /* dark base for contrast */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.player-header-container:hover .player-header-overlay {
    background: rgba(0, 0, 0, 0.2);
    /* lighten on hover */
}

.player-name {
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    margin: 0;
    z-index: 2;
    text-align: center;
}

/* Player Info Section */
.player-info {
    padding: 30px 40px;
    background: #fff;
    font-size: 1.1rem;
    line-height: 1.6;
    display: block;
}

.player-info p {
    background: #fdf6f8;
    /* Very light pinkish background */
    border-radius: 6px;
    padding: 12px 15px;
    margin: 0 0 8px 0;
    /* Consistent spacing between lines */
    font-weight: 500;
    color: #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: inset 0 0 6px rgba(195, 0, 47, 0.05);
}

.player-info p strong {
    color: #c3002f;
    min-width: 140px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.player-info p span {
    flex: 1;
    text-align: right;
    color: #333;
}

/* Shirt number styling */
.player-info .shirt-number {
    font-weight: 700;
    color: #555;
    margin-left: 5px;
}

/* Two-column layout for player info on larger screens */
@media (min-width: 720px) {
    .player-info {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px 40px;
    }

    .player-info p {
        justify-content: flex-start;
    }

    .player-info p strong {
        min-width: 100px;
    }

    .player-info p span {
        text-align: left;
    }
}

/* Responsive for smaller screens */
@media (max-width: 768px) {
    .player-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 20px;
        flex-wrap: wrap;
        /* Allow wrapping */
    }

    .player-header img {
        margin-bottom: 15px;
    }

    .player-header h2 {
        font-size: 1.6rem;
        max-width: 100%;
    }

    .player-info {
        padding: 20px;
        display: block;
    }

    .player-info p {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        box-shadow: none;
        background: transparent;
        padding: 6px 0;
        margin-bottom: 6px;
    }

    .player-info p strong {
        margin-bottom: 4px;
    }

    .player-info p span {
        text-align: left;
    }
}


/* Transfer Widget Wrapper */
.player-transfer-widget {
    /*max-width: 900px;*/
    margin: 20px auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #222;
}

/* Section Header */
.league-title {
    background-color: #c3002f;
    color: #fff;
    font-weight: 700;
    font-size: 1.8rem;
    padding: 15px 0;
    text-align: center;
    border-radius: 10px 10px 0 0;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

/* Table Wrapper */
.transfers-table-wrapper {
    padding: 0 20px 20px;
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
}

/* Transfer Table */
.transfers-table {
    width: 95%;
    border-collapse: collapse;
    font-size: 1rem;
    table-layout: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Table Header */
.transfers-table thead {
    background-color: var(--color-header-bg);
    color: #fff;
}

.transfers-table th,
.transfers-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.transfers-table th {
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Team Cell Content */
.team-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-left: 10px !important;
}

.team-logo {
    border-radius: 50%;
    border: 2px solid #c3002f;
    box-shadow: 0 0 6px rgba(195, 0, 47, 0.5);
    object-fit: cover;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.team-name {
    font-weight: 700;
    color: #c3002f;
    white-space: normal;
    word-break: break-word;
}

.country-flag {
    border-radius: 3px;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    width: 20px;
    height: 14px;
}

.date-cell {
    color: #555;
    white-space: nowrap;
}

.active-cell {
    font-weight: 700;
    color: #222;
    white-space: nowrap;
}

.type-cell {
    font-style: italic;
    color: #666;
    white-space: nowrap;
}

/* Highlight current club */
.active-transfer {
    background-color: #fff0f1;
    font-weight: 700;
    box-shadow: inset 5px 0 0 0 #c3002f;
}

/* Hover row effect */
.transfers-table tbody tr:hover {
    background-color: #f9e6ea;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 700px) {
    .transfers-table-wrapper {
        padding: 0 10px 20px;
        overflow-x: visible !important;
        max-width: 100%;
    }

    .transfers-table {
        width: 91%;
        display: block;
    }

    .transfers-table thead {
        background-color: var(--color-header-bg);
        display: none;
    }

    .transfers-table tbody,
    .transfers-table tr {
        display: block;
        width: 100%;
    }

    .transfers-table tr {
        margin-bottom: 20px;
        border-radius: 10px;
        background: #fff0f1;
        box-shadow: 0 0 10px rgba(195, 0, 47, 0.2);
        padding: 15px;
        font-weight: 600;
    }

    .transfers-table tr.active-transfer {
        background: #ffd7db;
        box-shadow: 0 0 15px rgba(195, 0, 47, 0.5);
    }

    .transfers-table td {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border: none;
        border-bottom: 1px solid #ddd;
        position: relative;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal !important;
    }

    .transfers-table td:last-child {
        border-bottom: none;
    }

    .transfers-table td::before {
        flex-shrink: 0;
        width: 100px;
        font-weight: 700;
        color: #c3002f;
        padding-right: 10px;
        white-space: normal;
    }

    .transfers-table td.team-cell::before {
        content: "Team";
    }

    .transfers-table td.date-cell:nth-of-type(2)::before {
        content: "Start Date";
    }

    .transfers-table td.date-cell:nth-of-type(3)::before {
        content: "End Date";
    }

    .transfers-table td.active-cell::before {
        content: "Active";
    }

    .transfers-table td.type-cell::before {
        content: "Role/Type";
    }

    .team-cell {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
        word-break: break-word;
        white-space: normal;
    }

    .team-name {
        font-size: 1.1rem;
        word-break: break-word;
        white-space: normal;
    }


    .team-logo {
        width: 40px !important;
        height: 40px !important;
        border-width: 3px;
    }

    .type-cell {
        display: none;
        /* hide less important column */
    }
}

/* Player Matches */
/* Player Match Table Entry Layout */
.player-matches-table .match-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
    min-width: 0;
}

/* Team logo wrapper */
.player-matches-table .team-img {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.player-matches-table .team-img img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--color-border);
}

/* Soccer ball icon */
.player-matches-table .team-img.with-icon {
    padding-left: 5px;
}

.player-matches-table .team-img .ball-icon {
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--color-primary);
    background: #fff;
    border-radius: 50%;
    padding: 2px;
}

/* Score styling */
.player-matches-table .score {
    font-size: 1rem;
    font-weight: bold;
    color: var(--color-dark);
    padding: 0;
    min-width: 0;
}

/* Make match column wider */
.player-matches-table td.match-col {
    min-width: 0;
}

/* Responsive - stack only on small screens */
@media (max-width: 768px) {
    .player-matches-table .match-entry {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }

    .player-matches-table .team-img img {
        width: 24px;
        height: 24px;
    }

    .player-matches-table .team-img .ball-icon {
        font-size: 0.65rem;
        left: -8px;
    }

    .player-matches-table td.match-col {
        min-width: 100%;
    }
}

/* ======================================
   ðŸ§© DYNAMIC CONTENT THEME (betsapi-widget)
   Applies to: $data / player-content-widget
====================================== */
/* Dynamic safe content inside player-content-widget */
.betsapi-widget .player-content-widget {
    background: #ffffff;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    padding: 24px;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    font-family: var(--font-family-base);
    color: var(--color-dark);
    overflow-wrap: break-word;
}

/* Headers */
.betsapi-widget .player-content-widget h1,
.betsapi-widget .player-content-widget h2,
.betsapi-widget .player-content-widget h3 {
    color: var(--color-primary);
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 6px;
}

.betsapi-widget .player-content-widget h1 {
    font-size: 1.6rem;
}

.betsapi-widget .player-content-widget h2 {
    font-size: 1.4rem;
}

.betsapi-widget .player-content-widget h3 {
    font-size: 1.2rem;
}

/* Paragraphs */
.betsapi-widget .player-content-widget p {
    margin-bottom: 14px;
    color: var(--color-dark);
    font-size: 1rem;
    line-height: 1.6;
}

/* Lists */
.betsapi-widget .player-content-widget ul,
.betsapi-widget .player-content-widget ol {
    margin: 12px 0 20px;
    padding-left: 20px;
}

.betsapi-widget .player-content-widget li {
    margin-bottom: 8px;
}

/* Tables */
.betsapi-widget .player-content-widget table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.betsapi-widget .player-content-widget table th,
.betsapi-widget .player-content-widget table td {
    border: 1px solid var(--color-border);
    padding: 10px 12px;
    text-align: left;
}

.betsapi-widget .player-content-widget table td {
    color: #333;
}

.betsapi-widget .player-content-widget table th {
    background: var(--color-header-bg);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.95rem;
}

/* Blockquotes */
.betsapi-widget .player-content-widget blockquote {
    border-left: 4px solid var(--color-primary);
    background: #fdf6f8;
    padding: 14px 18px;
    font-style: italic;
    color: var(--color-muted);
    margin: 20px 0;
    border-radius: 8px;
}

/* Inline styles */
.betsapi-widget .player-content-widget strong {
    font-weight: bold;
    color: #111;
}

.betsapi-widget .player-content-widget em {
    font-style: italic;
    color: var(--color-muted);
}

/* Responsive table fallback */
@media (max-width: 768px) {
    .betsapi-widget .player-content-widget table {
        display: block;
        overflow-x: auto;
        font-size: 0.95rem;
    }
}



/* Container for loading */
.loading-container {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: Arial, sans-serif;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
}

/* Soccer ball container */
.soccer-ball {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
    animation: roll 1.5s linear infinite;
}

/* Black pentagons on the ball */
.soccer-ball::before,
.soccer-ball::after {
    content: '';
    position: absolute;
    background: black;
    clip-path: polygon(50% 0%, 90% 35%, 75% 100%, 25% 100%, 10% 35%);
    /* pentagon shape */
}

/* Center pentagon */
.soccer-ball::before {
    width: 18px;
    height: 18px;
    top: 15px;
    left: 15px;
}

/* Bottom pentagon */
.soccer-ball::after {
    width: 12px;
    height: 12px;
    top: 30px;
    left: 18px;
    transform: rotate(36deg);
}

/* Additional small dots to simulate pattern */
.dot {
    position: absolute;
    background: black;
    border-radius: 50%;
}

.dot1 {
    width: 8px;
    height: 8px;
    top: 8px;
    left: 10px;
}

.dot2 {
    width: 8px;
    height: 8px;
    top: 8px;
    right: 10px;
}

.dot3 {
    width: 6px;
    height: 6px;
    top: 25px;
    right: 8px;
}

.dot4 {
    width: 6px;
    height: 6px;
    bottom: 10px;
    left: 14px;
}

.betsapi-page-ajax-widget {
    display: flex;
    justify-content: center;
    /* center horizontally */
    align-items: center;
    /* center vertically */
    min-height: 200px;
    /* ensure enough height for vertical centering */
    position: relative;
}



.loader {
    border: 8px solid #2d3748;
    /* Light grey */
    border-top: 8px solid #caab72;
    /* Gold accent */
    border-radius: 50%;
    width: 64px;
    height: 64px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Rolling animation */
@keyframes roll {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#temp_content {
    display: none;
}

.betsapi-ajax-widget {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    /* Optional: sets height so loader has space */
    position: relative;
}

.betsapi-ajax-widget .loader {
    width: 32px;
    height: 32px;
    border: 4px solid #ccc;
    border-top-color: #caab72;
    /* gold highlight */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.match {
    position: relative;
}

.full-card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.team-link {
    position: relative;
    z-index: 2;
}

/* Grid system */
.events-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* 1 column on mobile */
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns for tablet & up */
    }
}

/* Event Card */
.event-card {
    background: #fff;
    color: #000;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.event-card:hover {
    transform: scale(1.05);
}

/* Team images box */
.event-image {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: #f3f3f3;
    border-radius: 8px;
    height: 160px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.event-image img {
    height: 64px;
    width: auto;
    object-fit: contain;
}

.versus {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Title & Date */
.event-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.5rem 0;
    color: #000 !important;
}

h3.event-title a:hover {
    color: #c3002f !important;
    /* force override */
    text-decoration: none;
}

.event-date {
    font-size: 0.9rem;
    color: #000 !important;
}

/* League Badge */
.event-league {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: #dc2626;
    /* red-600 */
    color: #fff;
    border-radius: 9999px;
}

/* Fallback (no events) */
.no-events {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
    color: #000 !important;
    width: 100%;
}

.no-events p {
    margin: 0;
    font-weight: 500;
    color: #000 !important;
}

.player-header-container {
    width: 100%;
    height: 200px;
    background-size: contain;
    background-position: top;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    transition: filter 0.3s ease;
}

.player-header-container-hero {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    transition: filter 0.3s ease;
}

.player-header-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    /* dark base for contrast */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.player-header-container:hover .player-header-overlay {
    background: rgba(0, 0, 0, 0.2);
    /* lighten on hover */
}

.player-name {
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    margin: 0;
    z-index: 2;
    text-align: center;
}

.player-hero-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.player-header-container::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    pointer-events: none;
    /* so it doesn't interfere with clicks */
    background:
        linear-gradient(to right, rgba(0, 0, 0, 0.8), transparent 10%) left,
        linear-gradient(to left, rgba(0, 0, 0, 0.8), transparent 10%) right;
    background-repeat: no-repeat;
    background-size: 10% 100%;
    z-index: 1;
    /* behind text */
}

/* VS Header Wrapper */
.vs-header-wrapper {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 2rem;
    background: linear-gradient(135deg, #1a202c, #2d3748);
    color: #fff;
    padding: 2rem 1rem;
    border-radius: 16px;
    overflow: hidden;
}

/* Center VS header */
.vs-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

/* VS Top Section */
.vs-header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 1.5rem;
}

.team-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
}

.team-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    padding: 0.5rem;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* .team-name {
    font-size: 1.5rem;
    font-weight: 700;
} */

.team-score {
    font-size: 4rem;
    font-weight: 900;
    color: #caab72;
}

.vs-text {
    font-size: 2rem;
    font-weight: 800;
    color: #e2e8f0;
}

.vs-header-bottom {
    margin-top: 0.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: #e2e8f0;

    display: flex;
    flex-direction: column;
    /* stack elements vertically */
    align-items: center;
    /* center horizontally */
    gap: 1rem;
    /* spacing between badge and timer */
}


.league-badge {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    font-weight: 600;
    background: #dc2626;
    border-radius: 9999px;
    color: #fff;
    transition: background 0.5s ease;
}

.league-badge:hover a {
    color: #fff;
}

.league-badge:hover {
    background: #ef4444;
    /* brighter red */
    /* box-shadow: 0 0 15px rgba(239, 68, 68, 0.6); */
    /* transform: scale(1.05); */
    /* slight zoom for emphasis */
    color: #fff;
}

.live-badge {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    font-weight: 700;
    background: #ef4444;
    color: #fff;
    border-radius: 8px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Match-side panels */
.match-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 250px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1rem;
    justify-content: flex-start;
}

/* Side header */
.side-header {
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 1rem;
}

/* Stat card */
.stat-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    font-weight: 600;
    transition: transform 0.2s ease, background 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
}

.stat-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.stat-icon {
    width: 18px;
    height: 18px;
    background: #caab72;
    border-radius: 50%;
}

/* Responsive: collapse side panels */
@media (max-width: 1024px) {
    .vs-header-wrapper {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .match-side {
        /* display: none; */
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
    }
}

.article-card {
    display: flex;
    flex-direction: row;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    height: 252px;
    /* Fixed height */
    overflow: hidden;
    /* Hide any extra content */
}

.article-image {
    flex: 3;
    background-size: cover;
    background-position: center;
    height: 100%;
    /* Match card height */
}

.article-content {
    flex: 2;
    padding: 0px 20px;
    display: flex;
    flex-direction: column;
    justify-content: top;
    /* Vertically center text */
}

.article-content h3 {
    margin-top: 0;
    font-size: 1.5em;
    color: #c3002f;
}

.article-content p {
    font-size: 0.9em;
    color: #555;
    line-height: 1.4em;
    max-height: 3.6em;
    /* Limit paragraph to ~2 lines */
    /* overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        /* Number of lines to show */
    -webkit-box-orient: vertical;

}

.event-all-ended-widget {
    padding: 0;
    margin: 0;
    height: 521px;
    display: block;
    overflow: auto;
}

.elh-switch {
    flex: 0 0 auto;
    /* donâ€™t shrink */
    min-width: 80px;
    /* adjust size you want */
    text-align: center;
    background: none;
    border: 1px solid #ccc;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
}

/* Main wrapper */
.event-live-header .league-badge {
    display: block;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    max-width: 100%;
  width:250px;
  margin: 0 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.4rem 0.8rem;
    background: #dc2626;
    border-radius: 9999px;
    color: #fff;
    transition: background 0.5s 
ease;
}
.event-live-header .live-badge {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    font-weight: 700;
    background: #ef4444;
    color: #fff;
    border-radius: 8px;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}
.event-live-header .vs-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: nowrap;
    background: linear-gradient(135deg, #1a202c, #2d3748);
    color: #fff;
    padding: 2rem 1rem;
    border-radius: 16px;
}

/* Side panels */
.event-live-header .match-side {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-width: 160px;
}

.event-live-header .side-header {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

/* Stat cards */
.event-live-header .stat-card {
    background: rgba(255,255,255,0.08);
    padding: 0.6rem 1rem;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}

/* Center section */
.event-live-header .vs-header {
    text-align: center;
    flex: 1;
}

.event-live-header .vs-header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
}

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
}
.event-live-header .team-logo {
    max-width: 90px;
    height: auto;
}

.event-live-header .team-name {
    margin-top: 0.5rem;
    font-size: 1.1rem;
}

.event-live-header .team-score {
    font-size: 2.4rem;
    font-weight: bold;
}

/* ✅ Responsive breakpoints */

/* Tablet (stack stats below center, but side-by-side) */
@media (max-width: 780px) {
    .event-live-header .vs-header-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .event-live-header .match-side {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        width: 100%;
    }

    .event-live-header .stat-card {
        flex: 1 1 calc(50% - 1rem); /* 2-column grid */
        max-width: 200px;
    }
}

/* Mobile (stack everything vertically) */
@media (max-width: 768px) {
    .event-live-header .vs-header-wrapper {
        flex-direction: column;
        gap: 1rem;
    }

    .event-live-header .vs-header-top {
        flex-direction: column;
        gap: 0.8rem;
    }

    .event-live-header .match-side {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
    }

    .event-live-header .team-logo {
        max-width: 70px;
    }

    .event-live-header .team-name {
        font-size: 1rem;
    }

    .event-live-header .team-score {
        font-size: 2rem;
    }
}

/* Extra small phones */
@media (max-width: 480px) {
    .event-live-header .team-logo {
        max-width: 60px;
    }

    .event-live-header .team-score {
        font-size: 1.6rem;
    }
}
