/**
 * ep-layout.css  — EaglePredict-inspired layout
 * Replaces the 3-column bm-layout-wrapper approach.
 * Colors stay as Soccer808 brand tokens from soccer808.css.
 *
 * Layout:
 *   ep-layout-wrapper
 *     └─ ep-navbar              (full-width sticky top bar)
 *     └─ ep-below-nav           (flex row)
 *           └─ ep-main-content  (flex: 1, left)
 *           └─ ep-right-panel   (280px, right, desktop only)
 */

/* ============================================================
   RESET / BASE
   ============================================================ */
.ep-layout *,
.ep-layout *::before,
.ep-layout *::after {
    box-sizing: border-box;
}

.ep-layout {
    background: var(--s8-bg-page, #0d0f13);
    color: var(--s8-text-primary, #f0f4f8);
    min-height: 100vh;
}

/* ============================================================
   LAYOUT WRAPPER
   ============================================================ */
.ep-layout-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Below-navbar: main + right panel */
.ep-below-nav {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 16px;
    gap: 24px;
}

/* Main content */
.ep-main-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ep-content-body {
    padding: 24px 0;
    flex: 1;
}

/* Right panel — leagues / countries sidebar */
.ep-right-panel {
    width: 280px;
    flex-shrink: 0;
    padding-top: 24px;
    position: sticky;
    top: 65px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.ep-right-panel::-webkit-scrollbar { width: 4px; }
.ep-right-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* Hide right panel on smaller screens */
@media (max-width: 1100px) {
    .ep-right-panel { display: none; }
    .ep-below-nav { padding: 0 12px; }
}

/* ============================================================
   TOP NAVBAR
   ============================================================ */
.ep-navbar {
    position: sticky;
    top: 0;
    z-index: 900;
    background: var(--s8-brand-primary, #092337);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    height: 64px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.4);
}

.ep-navbar-inner {
    display: flex;
    align-items: center;
    height: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 16px;
    gap: 16px;
}

/* --- Logo --- */
.ep-navbar-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none !important;
}
.ep-navbar-logo img {
    max-height: 36px;
    width: auto;
}

/* --- Center nav links --- */
.ep-nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: center;
}

.ep-nav-link {
    color: rgba(255,255,255,0.75);
    text-decoration: none !important;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
    position: relative;
}
.ep-nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}
.ep-nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.12);
}
.ep-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2px;
    background: var(--s8-brand-accent, #00C853);
    border-radius: 2px 2px 0 0;
}

/* Live link */
.ep-nav-live {
    color: var(--s8-live, #ef4444) !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ep-nav-live:hover { background: rgba(239,68,68,0.1) !important; }
.ep-nav-live.active { background: rgba(239,68,68,0.12) !important; }

/* Live dot */
.ep-live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--s8-live, #ef4444);
    animation: ep-pulse 1.5s infinite;
    flex-shrink: 0;
}
@keyframes ep-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(239,68,68,0.5); }
    70%  { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
    100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

/* --- Right: search + VIP --- */
.ep-navbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Search form */
.ep-search-form {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 24px;
    padding: 0 14px;
    gap: 8px;
    height: 36px;
    transition: border-color 0.2s, background 0.2s;
}
.ep-search-form:focus-within {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
}
.ep-search-form i {
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    flex-shrink: 0;
}
.ep-search-input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.82rem;
    width: 150px;
}
.ep-search-input::placeholder { color: rgba(255,255,255,0.45); }

/* VIP button */
.ep-vip-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #F5A623 0%, #e08c0a 100%);
    color: #000 !important;
    text-decoration: none !important;
    padding: 0 16px;
    height: 36px;
    border-radius: 24px;
    font-weight: 700;
    font-size: 0.82rem;
    transition: all 0.2s;
    box-shadow: 0 2px 12px rgba(245,166,35,0.35);
    flex-shrink: 0;
}
.ep-vip-btn:hover {
    background: linear-gradient(135deg, #ffc13a 0%, #f5a623 100%);
    box-shadow: 0 4px 18px rgba(245,166,35,0.55);
    transform: translateY(-1px);
}
.ep-vip-btn i { font-size: 0.9rem; }
.ep-vip-btn-label {
    display: flex;
    flex-direction: column;
    line-height: 1;
}
.ep-vip-btn-label strong { font-size: 0.82rem; }
.ep-vip-btn-label small  { font-size: 0.62rem; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.4px; }

/* Hamburger icon button */
.ep-icon-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.15s;
    flex-shrink: 0;
}
.ep-icon-btn:hover { background: rgba(255,255,255,0.1); }

/* Hamburger lines */
.ep-hamburger {
    display: none; /* hidden on desktop */
    flex-direction: column;
    gap: 5px;
    padding: 8px 6px;
}
.ep-hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

/* Show hamburger on mobile */
@media (max-width: 1023px) {
    .ep-hamburger { display: flex; }
    .ep-nav-links { display: none; }
    .ep-search-form { display: none; }
    .ep-vip-btn-label { display: none; }
    .ep-vip-btn { padding: 0 10px; gap: 0; }
}
@media (max-width: 480px) {
    .ep-vip-btn { display: none; }
}

/* ============================================================
   MOBILE DRAWER
   ============================================================ */
.ep-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: var(--s8-brand-primary, #092337);
    border-right: 1px solid rgba(255,255,255,0.08);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.ep-drawer.ep-drawer-open {
    transform: translateX(0);
}

/* Drawer header */
.ep-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 64px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.ep-drawer-logo img {
    max-height: 32px;
    width: auto;
}

/* Drawer body */
.ep-drawer-body {
    overflow-y: auto;
    flex: 1;
    padding: 8px 0 24px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.ep-drawer-body::-webkit-scrollbar { width: 3px; }
.ep-drawer-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }

/* Drawer section */
.ep-drawer-section {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ep-drawer-section:last-child { border-bottom: none; }
.ep-drawer-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.4);
    padding: 8px 20px 4px;
    margin: 0;
}

/* Drawer link */
.ep-drawer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: rgba(255,255,255,0.75);
    text-decoration: none !important;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    border-left: 3px solid transparent;
}
.ep-drawer-link i {
    width: 18px;
    text-align: center;
    font-size: 1rem;
    opacity: 0.7;
    flex-shrink: 0;
}
.ep-drawer-link:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}
.ep-drawer-link.active {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-left-color: var(--s8-brand-accent, #00C853);
}
.ep-drawer-link.active i { opacity: 1; }

/* Live link in drawer */
.ep-drawer-live {
    color: var(--s8-live, #ef4444) !important;
}
.ep-drawer-live:hover, .ep-drawer-live.active {
    background: rgba(239,68,68,0.08) !important;
    border-left-color: var(--s8-live, #ef4444) !important;
}

/* VIP link in drawer */
.ep-drawer-vip {
    color: #F5A623 !important;
    font-weight: 700;
}
.ep-drawer-vip i { color: #F5A623 !important; opacity: 1; }

/* Overlay */
.ep-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1050;
    backdrop-filter: blur(2px);
}
.ep-drawer-overlay.ep-overlay-show { display: block; }

/* ============================================================
   CATEGORY TABS (market filters) — EaglePredict style
   ============================================================ */
.ep-cat-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    margin-bottom: 20px;
}
.ep-cat-tabs::-webkit-scrollbar { display: none; }

.ep-cat-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none !important;
    color: rgba(255,255,255,0.65) !important;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.15s;
    cursor: pointer;
}
.ep-cat-tab:hover {
    background: rgba(255,255,255,0.1);
    color: #fff !important;
}
.ep-cat-tab.active {
    background: var(--s8-brand-secondary, #14588B);
    border-color: var(--s8-brand-secondary, #14588B);
    color: #fff !important;
    box-shadow: 0 2px 10px rgba(20,88,139,0.4);
}

/* ============================================================
   DATE NAVIGATOR — EaglePredict style (pill row)
   ============================================================ */
.ep-date-strip {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
    padding-bottom: 2px;
}
.ep-date-strip::-webkit-scrollbar { display: none; }

.ep-date-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 8px 10px;
    border-radius: 10px;
    text-decoration: none !important;
    color: rgba(255,255,255,0.5);
    transition: all 0.15s;
    flex-shrink: 0;
    background: transparent;
}
.ep-date-pill:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.8); }
.ep-date-pill.active {
    background: var(--s8-brand-secondary, #14588B);
    color: #fff !important;
    box-shadow: 0 2px 10px rgba(20,88,139,0.4);
}
.ep-date-day   { font-size: 1rem; font-weight: 700; line-height: 1; }
.ep-date-label { font-size: 0.62rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; margin-top: 2px; opacity: 0.7; }
.ep-date-pill.active .ep-date-label { opacity: 0.9; }

.ep-date-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    text-decoration: none !important;
    color: #fff !important;
    background: #c0392b;
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: background 0.15s;
    position: relative;
}
.ep-date-live-pill:hover { background: #e74c3c; }
.ep-date-live-pill.active { background: #e74c3c; box-shadow: 0 0 0 2px rgba(231,76,60,0.4); }
.ep-date-divider {
    width: 1px;
    height: 28px;
    background: rgba(255,255,255,0.1);
    margin: 0 6px;
    flex-shrink: 0;
}

/* ============================================================
   MATCH LIST — EaglePredict style
   ============================================================ */
.ep-match-list {
    background: var(--s8-bg-card, #161b22);
    border: 1px solid var(--s8-border, rgba(255,255,255,0.08));
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

/* Search/filter bar above match list */
.ep-list-toolbar {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--s8-border, rgba(255,255,255,0.08));
    gap: 10px;
}
.ep-list-search {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 5px 12px;
    gap: 8px;
    flex: 1;
    max-width: 280px;
}
.ep-list-search i { color: rgba(255,255,255,0.35); font-size: 0.8rem; }
.ep-list-search input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.82rem;
    width: 100%;
}
.ep-list-search input::placeholder { color: rgba(255,255,255,0.35); }
.ep-sort-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.65);
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
    white-space: nowrap;
}
.ep-sort-btn:hover { background: rgba(255,255,255,0.06); color: #fff; }
.ep-list-col-headers {
    display: flex;
    margin-left: auto;
    gap: 4px;
}
.ep-list-col-headers span {
    width: 68px;
    text-align: center;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.35);
}

/* League header row */
.ep-league-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--s8-border, rgba(255,255,255,0.08));
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
}
.ep-league-header img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    border-radius: 3px;
    background: rgba(255,255,255,0.06);
    padding: 1px;
    flex-shrink: 0;
}
.ep-league-header i.fa-star-o {
    color: rgba(255,255,255,0.25);
    font-size: 0.8rem;
    cursor: pointer;
}

/* ============================================================
   HERO STATS STRIP (above match list)
   ============================================================ */
.ep-hero-strip {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 24px;
}
.ep-hero-stat {
    flex: 1;
    background: var(--s8-bg-card, #161b22);
    border: 1px solid var(--s8-border, rgba(255,255,255,0.08));
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none !important;
    transition: border-color 0.15s, transform 0.15s;
}
.ep-hero-stat:hover {
    border-color: var(--s8-brand-secondary, #14588B);
    transform: translateY(-2px);
}
.ep-hero-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.ep-hero-stat-icon.icon-blue  { background: rgba(20,88,139,0.25);  color: var(--s8-brand-secondary, #14588B); }
.ep-hero-stat-icon.icon-green { background: rgba(0,200,83,0.15);   color: var(--s8-brand-accent, #00C853); }
.ep-hero-stat-icon.icon-gold  { background: rgba(245,166,35,0.15); color: #F5A623; }
.ep-hero-stat-icon.icon-red   { background: rgba(239,68,68,0.15);  color: #ef4444; }
.ep-hero-stat-body { display: flex; flex-direction: column; min-width: 0; }
.ep-hero-stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--s8-text-primary, #f0f4f8);
    line-height: 1;
}
.ep-hero-stat-label {
    font-size: 0.72rem;
    color: var(--s8-text-muted, #64748b);
    font-weight: 600;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

@media (max-width: 768px) {
    .ep-hero-strip { gap: 8px; }
    .ep-hero-stat  { padding: 12px 14px; gap: 10px; border-radius: 10px; }
    .ep-hero-stat-icon { width: 36px; height: 36px; font-size: 1rem; border-radius: 8px; }
    .ep-hero-stat-value { font-size: 1.1rem; }
}
@media (max-width: 500px) {
    .ep-hero-strip { flex-wrap: wrap; }
    .ep-hero-stat  { flex: calc(50% - 4px); min-width: 0; }
}

/* ============================================================
   PAGE TITLE AREA
   ============================================================ */
.ep-page-header {
    margin-bottom: 20px;
    padding-top: 4px;
}
.ep-page-title {
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    font-weight: 800;
    color: var(--s8-text-primary, #f0f4f8);
    margin: 0 0 6px;
    line-height: 1.15;
}
.ep-page-subtitle {
    font-size: 0.9rem;
    color: var(--s8-text-muted, #64748b);
    margin: 0;
    max-width: 600px;
}

/* ============================================================
   RIGHT PANEL CARDS (leagues, countries)
   ============================================================ */
.ep-panel-card {
    background: var(--s8-bg-card, #161b22);
    border: 1px solid var(--s8-border, rgba(255,255,255,0.08));
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}
.ep-panel-card-header {
    padding: 12px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--s8-text-primary, #f0f4f8);
    border-bottom: 1px solid var(--s8-border, rgba(255,255,255,0.08));
    background: rgba(255,255,255,0.02);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Override bm-sidebar styles inside right panel */
.ep-right-panel .bm-sidebar {
    position: static;
    width: 100%;
    height: auto;
    max-height: none;
    top: auto;
    left: auto;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}
.ep-right-panel .bm-sidebar-section {
    background: var(--s8-bg-card, #161b22);
    border: 1px solid var(--s8-border, rgba(255,255,255,0.08));
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 0;
}
.ep-right-panel .bm-sidebar-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.5);
    padding: 10px 14px 8px;
    margin: 0;
    border-bottom: 1px solid var(--s8-border, rgba(255,255,255,0.06));
}
.ep-right-panel .bm-sidebar-link {
    padding: 9px 14px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.7);
    border-left: none;
    gap: 10px;
}
.ep-right-panel .bm-sidebar-link:hover,
.ep-right-panel .bm-sidebar-link.active {
    background: rgba(255,255,255,0.05);
    color: #fff;
    border-left: none;
    padding-left: 14px;
}
.ep-right-panel .bm-countries-list { max-height: 320px; }

/* ============================================================
   SCROLL-TO-TOP
   ============================================================ */
.s8-scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--s8-brand-secondary, #14588B);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s, transform 0.25s;
    z-index: 800;
    box-shadow: 0 4px 14px rgba(20,88,139,0.4);
}
.s8-scroll-top.visible { opacity: 1; transform: translateY(0); }
.s8-scroll-top:hover { background: var(--s8-brand-accent, #00C853); }

/* On mobile, keep above bottom nav */
@media (max-width: 900px) {
    .s8-scroll-top { bottom: calc(var(--s8-bottom-nav-h, 64px) + 12px); right: 12px; }
}

/* ============================================================
   OVERRIDE: remove old bm- layout from wrapper
   (ensures old sidebar positions don't bleed through)
   ============================================================ */
body.ep-layout .bm-layout-wrapper { display: contents; }
body.ep-layout .bm-sidebar-nav    { display: none !important; } /* Replaced by ep-drawer */
body.ep-layout .bm-main-content   { margin-left: 0 !important; all: unset; display: contents; }
body.ep-layout .bm-content-body   { padding: 0 !important; }

/* ============================================================
   FOOTER override
   ============================================================ */
.ep-main-content .bm-footer {
    margin-top: 40px;
}

/* ============================================================
   RESPONSIVE: below-nav padding
   ============================================================ */
@media (max-width: 600px) {
    .ep-below-nav { padding: 0 8px; }
    .ep-content-body { padding: 16px 0; }
}

/* ============================================================
   MATCH ROW OVERRIDE: ensure cards respect new layout width
   ============================================================ */
.ep-main-content .bm-search-bar {
    border-radius: 12px 12px 0 0;
    background: var(--s8-bg-card, #161b22);
    border: 1px solid var(--s8-border, rgba(255,255,255,0.08));
    border-bottom: 1px solid var(--s8-border);
    padding: 10px 16px;
}
.ep-main-content .bm-match-list {
    border-radius: 0 0 12px 12px;
    border: 1px solid var(--s8-border, rgba(255,255,255,0.08));
    border-top: none;
    background: var(--s8-bg-card, #161b22);
}
.ep-main-content .bm-market-filters {
    margin-bottom: 16px;
}

/* VIP Banner inside main content */
.ep-main-content .s8-vip-banner {
    border-radius: 12px;
}

/* ============================================================
   SECTION CARD override
   ============================================================ */
.ep-main-content .s8-card {
    border-radius: 12px;
}


/* ============================================================
   DATE-NAV OVERRIDE: match EaglePredict pill style inside ep-layout
   ============================================================ */
body.ep-layout .bm-date-nav {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    gap: 4px;
    margin-bottom: 20px;
}
body.ep-layout .bm-date-live {
    background: #c0392b !important;
    border-radius: 10px !important;
    padding: 8px 14px !important;
    font-size: 0.82rem;
    font-weight: 700;
    gap: 6px;
}
body.ep-layout .bm-date-live.active,
body.ep-layout .bm-date-live:hover {
    background: #e74c3c !important;
}
body.ep-layout .bm-date-item {
    border-radius: 10px !important;
    color: rgba(255,255,255,0.5) !important;
    padding: 8px 10px !important;
    min-width: 48px;
    background: transparent !important;
}
body.ep-layout .bm-date-item:hover {
    background: rgba(255,255,255,0.06) !important;
    color: rgba(255,255,255,0.85) !important;
}
body.ep-layout .bm-date-item.active {
    background: var(--s8-brand-secondary, #14588B) !important;
    color: #fff !important;
    box-shadow: 0 2px 10px rgba(20,88,139,0.4);
    padding: 8px 10px !important;
}
body.ep-layout .bm-date-item.active .bm-date-day { color: #fff !important; }
body.ep-layout .bm-date-item.active .bm-date-label { display: block; color: rgba(255,255,255,0.8) !important; }
body.ep-layout .bm-date-divider {
    background: rgba(255,255,255,0.1);
    margin: 0 6px;
}

/* ============================================================
   FOOTER inside ep-layout: full-width spanning below both columns
   ============================================================ */
body.ep-layout .ep-main-content .bm-footer {
    margin-top: 32px;
}


/* ============================================================
   AD SYSTEM — All betting company ad slot styles
   ============================================================ */

/* Shared label */
.ad-label {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.3);
    margin-bottom: 6px;
}

/* ── Leaderboard wrap (below navbar) ──────────────────────── */
.ep-leaderboard-wrap {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.ad-leaderboard {
    max-width: 1440px;
    margin: 0 auto;
    padding: 6px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ad-leaderboard-link {
    display: block;
    width: 100%;
    max-width: 970px;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none !important;
    transition: opacity 0.2s;
}
.ad-leaderboard-link:hover { opacity: 0.92; }

.ad-leaderboard-img {
    width: 100%;
    height: auto;
    max-height: 90px;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

/* Fallback styled banner when no image is set */
.ad-leaderboard-fallback {
    width: 100%;
    max-width: 970px;
    height: 72px;
    background: linear-gradient(135deg, var(--s8-brand-primary, #092337) 0%, #0f3a5e 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    border: 1px solid rgba(255,255,255,0.08);
}
.ad-fallback-logo {
    max-height: 38px;
    max-width: 100px;
    object-fit: contain;
    flex-shrink: 0;
}
.ad-fallback-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ad-fallback-text strong {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
}
.ad-fallback-badge {
    font-size: 0.75rem;
    color: #F5A623;
    font-weight: 600;
}
.ad-fallback-cta {
    flex-shrink: 0;
    background: #F5A623;
    color: #000;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 8px 18px;
    border-radius: 8px;
    white-space: nowrap;
}

/* ── Rectangle banner ──────────────────────────────────────── */
.ad-slot.ad-rectangle {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 24px 0;
}

.ad-rectangle-link {
    display: block;
    width: 300px;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none !important;
    transition: opacity 0.2s, transform 0.2s;
}
.ad-rectangle-link:hover { opacity: 0.93; transform: translateY(-2px); }

.ad-rectangle-img {
    width: 300px;
    height: 250px;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

.ad-rectangle-fallback {
    width: 300px;
    height: 250px;
    background: linear-gradient(160deg, var(--s8-brand-primary, #092337) 0%, #0f3a5e 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    text-align: center;
}
.ad-rect-logo {
    max-height: 50px;
    max-width: 160px;
    object-fit: contain;
}
.ad-rect-title {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
}
.ad-rect-badge {
    font-size: 0.8rem;
    color: #F5A623;
    font-weight: 700;
    background: rgba(245,166,35,0.12);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(245,166,35,0.25);
}
.ad-rect-cta {
    background: #F5A623;
    color: #000;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 10px 24px;
    border-radius: 8px;
    display: inline-block;
    margin-top: 4px;
}

/* On wider screens, float rectangle to the right when inside content */
@media (min-width: 768px) {
    .ad-slot.ad-rectangle.ad-float-right {
        float: right;
        margin: 0 0 20px 24px;
        clear: right;
    }
    .ad-slot.ad-rectangle.ad-float-right::after {
        content: '';
        display: table;
        clear: both;
    }
}

/* ── Native sponsor card strip ─────────────────────────────── */
.ad-slot.ad-native-strip {
    margin: 24px 0;
}

.ad-native-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.ad-native-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.ad-native-card {
    background: linear-gradient(145deg, var(--s8-brand-primary, #092337) 0%, #0d2e4a 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 16px 14px;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}
.ad-native-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #F5A623, #00C853);
}
.ad-native-card:hover {
    transform: translateY(-3px);
    border-color: rgba(245,166,35,0.3);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.ad-native-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ad-native-logo {
    max-height: 28px;
    max-width: 80px;
    object-fit: contain;
    background: rgba(255,255,255,0.9);
    border-radius: 5px;
    padding: 3px 6px;
}

.ad-native-name-fallback {
    font-size: 0.75rem;
    font-weight: 900;
    color: #fff;
    background: rgba(255,255,255,0.1);
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.ad-native-badge {
    font-size: 0.65rem;
    font-weight: 700;
    color: #F5A623;
    background: rgba(245,166,35,0.12);
    border: 1px solid rgba(245,166,35,0.25);
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
    text-align: right;
    flex-shrink: 0;
}

.ad-native-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    line-height: 1.3;
}

.ad-native-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #000;
    background: #F5A623;
    padding: 7px 14px;
    border-radius: 7px;
    align-self: flex-start;
    transition: background 0.15s;
}
.ad-native-card:hover .ad-native-cta {
    background: #ffc13a;
}
.ad-native-cta i { font-size: 0.65rem; }

/* ── Partner logo bar ──────────────────────────────────────── */
.ad-slot.ad-partner-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 0;
    margin: 16px 0;
}

.ad-partner-logos {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.ad-partner-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 6px 12px;
    text-decoration: none !important;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
    min-width: 80px;
    min-height: 40px;
}
.ad-partner-pill:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.18);
    transform: translateY(-2px);
}

.ad-partner-logo-img {
    max-height: 26px;
    max-width: 90px;
    object-fit: contain;
    filter: brightness(0.9);
    transition: filter 0.15s;
}
.ad-partner-pill:hover .ad-partner-logo-img { filter: brightness(1.1); }

.ad-partner-text {
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255,255,255,0.75);
}

/* ── Text link row ─────────────────────────────────────────── */
.ad-slot.ad-text-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    align-items: center;
    padding: 8px 0;
}

.ad-text-link {
    font-size: 0.8rem;
    color: var(--s8-brand-accent, #00C853);
    text-decoration: none !important;
    font-weight: 600;
    transition: color 0.15s;
}
.ad-text-link:hover { color: #fff; text-decoration: underline !important; }

.ad-text-sep {
    color: rgba(255,255,255,0.2);
    font-size: 0.75rem;
}

/* ── Sticky mobile ad bar ──────────────────────────────────── */
.ep-sticky-mobile-ad {
    display: none;                    /* JS shows it on mobile only */
    position: fixed;
    bottom: var(--s8-bottom-nav-h, 64px);
    left: 0;
    right: 0;
    z-index: 1080;
    background: var(--s8-brand-primary, #092337);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.ep-sticky-mobile-ad.ep-sticky-ad-visible {
    display: flex;
    align-items: center;
    transform: translateY(0);
}

.ep-sticky-ad-close {
    position: absolute;
    top: -12px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background 0.15s;
}
.ep-sticky-ad-close:hover { background: rgba(239,68,68,0.8); }

.ep-sticky-ad-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none !important;
    width: 100%;
}

.ep-sticky-ad-logo {
    max-height: 32px;
    max-width: 80px;
    object-fit: contain;
    background: rgba(255,255,255,0.9);
    border-radius: 5px;
    padding: 3px 6px;
    flex-shrink: 0;
}

.ep-sticky-ad-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.ep-sticky-ad-text strong {
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ep-sticky-ad-text span {
    font-size: 0.7rem;
    color: #F5A623;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ep-sticky-ad-cta {
    flex-shrink: 0;
    background: #F5A623;
    color: #000;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 8px 14px;
    border-radius: 8px;
    white-space: nowrap;
}

/* Responsive: stack on very small screens */
@media (max-width: 360px) {
    .ep-sticky-ad-logo { display: none; }
    .ep-sticky-ad-cta  { padding: 7px 10px; font-size: 0.72rem; }
}

/* Accessibility: reduce motion */
@media (prefers-reduced-motion: reduce) {
    .ep-sticky-mobile-ad,
    .ad-native-card,
    .ad-rectangle-link,
    .ad-partner-pill { transition: none; }
}


/* ============================================================
   MOBILE-FIRST PATCHES (appended — override desktop-first rules above)
   All written with min-width so they build up from mobile base.
   ============================================================ */

/* ── Hamburger: 44×44px tap area ──────────────────────────── */
.ep-hamburger {
    min-width:  44px;
    min-height: 44px;
    padding:    10px 8px;
    display:    flex;          /* show by default on mobile */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* Hide hamburger only once desktop nav becomes visible */
@media (min-width: 1024px) {
    .ep-hamburger   { display: none !important; }
    .ep-nav-links   { display: flex !important; }
    .ep-search-form { display: flex !important; }
    .ep-vip-btn-label { display: flex !important; }
    .ep-vip-btn { padding: 0 16px; gap: 8px; }
}

/* ── VIP button: always ≥ 44px ────────────────────────────── */
.ep-vip-btn {
    min-height: 44px;
    height:     auto;
    padding:    0 12px;
}

/* Show VIP on all phones (was hidden at 480px) */
@media (max-width: 480px) {
    .ep-vip-btn { display: inline-flex !important; }
    .ep-vip-btn-label { display: none; }  /* keep icon-only on tiny screens */
}

/* ── Category tabs (market filters): 44px touch ──────────── */
.ep-cat-tab {
    min-height: 44px;
    padding:    10px 16px;
    font-size:  0.82rem;
}

/* ── Date pills: 44px touch ───────────────────────────────── */
.ep-date-pill {
    min-height: 44px;
    min-width:  44px;
    padding:    8px 10px;
}

.ep-date-live-pill {
    min-height: 44px;
    padding:    8px 14px;
}

/* ── ep-icon-btn (close button etc): 44px ────────────────── */
.ep-icon-btn {
    min-width:  44px;
    min-height: 44px;
    padding:    10px;
}

/* ── Ad rectangle: no fixed width overflow ───────────────── */
.ad-rectangle-link {
    width:     100%;
    max-width: 300px;
}

.ad-rectangle-img {
    width:        100%;
    height:       auto;
    aspect-ratio: 6 / 5;
    max-height:   250px;
    object-fit:   cover;
}

.ad-rectangle-fallback {
    width:     100%;
    max-width: 300px;
    height:    auto;
    min-height: 160px;
    aspect-ratio: 6 / 5;
}

/* ── Leaderboard: never overflow viewport ────────────────── */
.ad-leaderboard-img,
.ad-leaderboard-fallback,
.ad-leaderboard-link {
    max-width: 100%;
    width:     100%;
}

/* ── Below-nav: mobile base → expand at breakpoints ─────── */
/* (overrides the single desktop-first rule above) */
.ep-below-nav {
    padding: 0 10px;
}

@media (min-width: 600px)  { .ep-below-nav { padding: 0 14px; } }
@media (min-width: 768px)  { .ep-below-nav { padding: 0 16px; } }
@media (min-width: 1280px) { .ep-below-nav { padding: 0 24px; } }

/* ── Content body: compact on phones, spacious on desktop ── */
.ep-content-body { padding: 14px 0; }

@media (min-width: 640px)  { .ep-content-body { padding: 18px 0; } }
@media (min-width: 1024px) { .ep-content-body { padding: 24px 0; } }

/* ── Right panel: hidden on phones/tablets ───────────────── */
/* (already handled in mobile-first.css; this ensures EP tokens agree) */
@media (max-width: 1099px) {
    .ep-right-panel { display: none !important; }
}

/* ── Scroll-to-top: stays above bottom nav ───────────────── */
@media (max-width: 1023px) {
    .s8-scroll-top {
        bottom: calc(var(--s8-bottom-nav-h, 64px) + env(safe-area-inset-bottom, 0px) + 12px);
        right:  14px;
        width:  44px;
        height: 44px;
    }
}

/* ── Drawer: full safe-area coverage ────────────────────── */
.ep-drawer {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.ep-drawer-link {
    min-height: 48px;
    padding:    12px 20px;
}

/* ── Sticky ad: sits above bottom nav + safe area ─────────── */
.ep-sticky-mobile-ad {
    bottom: calc(var(--s8-bottom-nav-h, 64px) + env(safe-area-inset-bottom, 0px));
}


/* ── VIP nav link — gold accent in top navbar ─────────── */
.ep-nav-vip-link {
    color: var(--s8-brand-gold, #F5A623) !important;
    font-weight: 700;
    gap: 4px;
}
.ep-nav-vip-link:hover,
.ep-nav-vip-link.active {
    background: rgba(245,166,35,0.12) !important;
    color: #F5A623 !important;
}
.ep-nav-vip-link.active::after {
    background: #F5A623 !important;
}
