:root {
    --bg-primary: #0d0d0d;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    --border-color: #2a2a2a;
    --text-primary: #0B2640;
    --text-secondary: #a0a0a0;
    --text-muted: #ffffff;
    --accent-live: #e53e3e;
    --accent-new: #38a169;
    --accent-blue: #3182ce;
    --flag-active-ring: #ffffff;
    --radius-card: 10px;
    --radius-flag: 6px;
}

.events-on-tv-wrapper {
    color: var(--text-primary);
    padding: 0;
    min-height: 200px;
}

.events-container {
    max-width: 100%;
}

.country-filter-section {
    padding-bottom: 60px;
}

.country-filter-section .country-filter-label,
.events-today-date .events-today-date-label {
    margin: 0 0 24px 0;
}

.events-date-label {
    margin: 0 0 24px 0;
}

.country-flags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.flag-btn {
    background: transparent;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    border: none;
    outline: none;
    padding: 0;
    line-height: 0;
}

.flag-btn:hover {
    transform: translateY(-1px);
}

.flag-btn.active {
    border-color: var(--flag-active-ring);
    box-shadow: 0 0 0 1px var(--flag-active-ring), 0 4px 12px rgba(255, 255, 255, 0.2);
}

.flag-img {
    display: block;
    width: 36px;
    height: 24px;
    object-fit: cover;
    border-radius: 3px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 48px 24px;
    padding: 0;
}

.event-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
    transition: background 0.2s ease;
    position: relative;
}

/* Banner / Image */
.event-img-wrap {
    position: relative;
    width: 100%;
    height: 197px;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    border-radius: 12px;
}

.event-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.event-card:hover .event-banner {
    transform: scale(1.03);
}

.event-img-placeholder {
    position: relative;
    width: 100%;
    height: 197px;
    aspect-ratio: 16 / 7;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-sport-icon {
    font-size: 40px;
    opacity: 0.5;
}

/* Live Pill */
.live-pill {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent-live);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    padding: 3px 8px;
    border-radius: 3px;
    z-index: 2;
    animation: livePulse 1.5s infinite;
}

@keyframes livePulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Card Body */
.event-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.event-title {
    color: var(--text-primary);
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
}

.event-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.event-sport {
    font-family: var(--fb-global-fb_customtypo_e3ser--font-family);
    font-size: var(--fb-global-fb_customtypo_e3ser--font-size);
    font-weight: var(--fb-global-fb_customtypo_e3ser--font-weight);
    line-height: var(--fb-global-fb_customtypo_e3ser--font-line-height);
    color: #717680;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.meta-separator {
    width: 6px;
    height: 6px;
    background: #D5D7DA;
    border-radius: 50%;
}

.event-time {
    font-family: var(--fb-global-fb_customtypo_e3ser--font-family);
    font-size: var(--fb-global-fb_customtypo_e3ser--font-size);
    font-weight: var(--fb-global-fb_customtypo_e3ser--font-weight);
    line-height: var(--fb-global-fb_customtypo_e3ser--font-line-height);
    color: #717680;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

/* Channels */
.event-channels {
    margin-top: 4px;
}

.channels-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    display: block;
    margin-bottom: 6px;
}

.channel-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.channel-item {
    font-family: var(--fb-global-fb_customtypo_e3ser--font-family);
    font-size: var(--fb-global-fb_customtypo_e3ser--font-size);
    font-weight: var(--fb-global-fb_customtypo_e3ser--font-weight);
    line-height: var(--fb-global-fb_customtypo_e3ser--font-line-height);
    color: #717680;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.channel-flag {
    width: 16px;
    height: 11px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.channel-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
    line-height: 1;
}

.event-flag-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
}

.event-flag {
    display: flex;
    align-items: center;
    gap: 4px;
}

.event-flag-image {
    width: 20px;
    height: auto;
    border-radius: 2px;
}

.event-flag-name {
    font-family: var(--fb-global-fb_customtypo_e3ser--font-family);
    font-size: 14px;
    font-weight: var(--fb-global-fb_customtypo_e3ser--font-weight);
    line-height: 22px;
    color: #717680;
}

.no-events,
.events-error {
    grid-column: 1 / -1;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-primary);
    font-size: 15px;
}

.events-error {
    color: var(--accent-live);
}

.skeleton {
    background: #ddd;
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-filter {
    padding-bottom: 60px;
}

.skeleton-flag {
    width: 40px;
    height: 28px;
    border-radius: 4px;
}

.skeleton-card {
    background: #ddd;
    padding: 0;
    border-radius: 12px;
}

.skeleton-img {
    width: 100%;
    aspect-ratio: 16 / 7;
    border-radius: 12px;
}

.skeleton-title {
    height: 14px;
    width: 80%;
    margin: 14px 16px 0;
}

.skeleton-badge {
    height: 10px;
    width: 40%;
    margin: 8px 16px 14px;
}

@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .flag-img {
        width: 30px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .events-grid {
        grid-template-columns: 1fr;
    }
}

.channel-logo-img {
    height: 20px;
    width: auto;
    max-width: 60px;
    object-fit: contain;
    flex-shrink: 0;
    background: #000;
    padding: 2px;
    border-radius: 4px;
}