/* ================================================================
   WP GOAL PLUGIN â€” Next-Gen Responsive Sports Interface Design
   Design System: Modern Glassmorphism, Dynamic Typography & Responsive Layouts
   Compatible with ALL WordPress Themes (Light & Dark Auto-Adapt)
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Outfit:wght@600;800;900&display=swap');

.wp-goal-wrap {
    /* Color Palette Design Tokens (Tailored HSL System) */
    --wpg-font: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --wpg-num-font: 'Outfit', 'Cairo', sans-serif;
    
    /* Default Dynamic Theme (Light Canvas) */
    --wpg-bg-main: #f8fafc;
    --wpg-bg-card: #ffffff;
    --wpg-bg-card-hover: #ffffff;
    --wpg-bg-subtle: #f1f5f9;
    --wpg-bg-subtle-hover: #e2e8f0;
    --wpg-bg-accent: rgba(14, 165, 233, 0.08);
    
    --wpg-text-main: #0f172a;
    --wpg-text-muted: #475569;
    --wpg-text-light: #64748b;
    
    --wpg-border: #e2e8f0;
    --wpg-border-subtle: #f1f5f9;
    --wpg-border-focus: #38bdf8;
    
    --wpg-primary: #0284c7;
    --wpg-primary-gradient: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    --wpg-primary-hover: #0369a1;
    --wpg-primary-light: #e0f2fe;
    
    --wpg-success: #10b981;
    --wpg-success-bg: rgba(16, 185, 129, 0.1);
    --wpg-warning: #f59e0b;
    --wpg-warning-bg: rgba(245, 158, 11, 0.1);
    --wpg-danger: #ef4444;
    --wpg-danger-bg: rgba(239, 68, 68, 0.1);
    --wpg-live: #dc2626;
    
    --wpg-radius-xl: 20px;
    --wpg-radius-lg: 16px;
    --wpg-radius-md: 12px;
    --wpg-radius-sm: 8px;
    
    --wpg-shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
    --wpg-shadow-md: 0 4px 14px -2px rgba(0,0,0,0.06), 0 2px 6px -1px rgba(0,0,0,0.03);
    --wpg-shadow-lg: 0 12px 28px -4px rgba(0,0,0,0.1), 0 4px 10px -2px rgba(0,0,0,0.04);
    --wpg-shadow-glow: 0 0 20px rgba(14, 165, 233, 0.15);
    
    /* Core Scoped Resets */
    font-family: var(--wpg-font);
    background-color: var(--wpg-bg-main);
    color: var(--wpg-text-main);
    direction: rtl;
    text-align: right;
    width: 100%;
    margin: 0 auto;
    padding: 24px 16px;
    box-sizing: border-box;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Force dark mode compatibility if parent container or body is dark */
body.dark-theme .wp-goal-wrap,
body.dark .wp-goal-wrap,
[data-theme="dark"] .wp-goal-wrap,
.dark-mode .wp-goal-wrap {
    --wpg-bg-main: #0b1329;
    --wpg-bg-card: #111c38;
    --wpg-bg-card-hover: #162447;
    --wpg-bg-subtle: #1b294a;
    --wpg-bg-subtle-hover: #24355e;
    --wpg-bg-accent: rgba(56, 189, 248, 0.12);
    
    --wpg-text-main: #f8fafc;
    --wpg-text-muted: #94a3b8;
    --wpg-text-light: #64748b;
    
    --wpg-border: #1e2d4a;
    --wpg-border-subtle: #16233d;
    --wpg-border-focus: #38bdf8;
    
    --wpg-primary: #38bdf8;
    --wpg-primary-gradient: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
    --wpg-primary-hover: #7dd3fc;
    --wpg-primary-light: rgba(56, 189, 248, 0.15);
    
    --wpg-shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
    --wpg-shadow-md: 0 6px 16px rgba(0,0,0,0.35);
    --wpg-shadow-lg: 0 14px 32px rgba(0,0,0,0.5);
    --wpg-shadow-glow: 0 0 25px rgba(56, 189, 248, 0.2);
}

.wp-goal-wrap *, 
.wp-goal-wrap *::before, 
.wp-goal-wrap *::after { 
    box-sizing: border-box; 
}

.wp-goal-wrap a { 
    color: inherit; 
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Glass Card Base Component ---- */
.g-card {
    background: var(--wpg-bg-card);
    border: 1px solid var(--wpg-border);
    border-radius: var(--wpg-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--wpg-shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.g-card:hover {
    box-shadow: var(--wpg-shadow-md);
    border-color: var(--wpg-border-focus);
}

/* ---- Entity Hero Header ---- */
.ent-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px;
    background: linear-gradient(135deg, var(--wpg-bg-card) 0%, var(--wpg-bg-subtle) 100%);
    border: 1px solid var(--wpg-border);
    border-radius: var(--wpg-radius-xl);
    position: relative;
    overflow: hidden;
    box-shadow: var(--wpg-shadow-md);
}

.ent-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--wpg-primary-gradient);
}

.ent-logo {
    flex-shrink: 0;
}

.ent-logo img { 
    max-height: 95px; 
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.12));
    transition: transform 0.3s ease;
}

.ent-logo img:hover {
    transform: scale(1.06);
}

.ent-info {
    flex-grow: 1;
}

.ent-info h1 {
    font-size: 28px; 
    font-weight: 900; 
    margin: 0 0 10px;
    color: var(--wpg-text-main);
    line-height: 1.25;
    letter-spacing: -0.5px;
}

.ent-meta { 
    display: flex; 
    gap: 10px; 
    flex-wrap: wrap; 
}

.ent-meta span {
    background: var(--wpg-bg-card); 
    padding: 6px 16px;
    border-radius: 20px; 
    border: 1px solid var(--wpg-border);
    font-size: 13px; 
    font-weight: 700; 
    color: var(--wpg-text-muted);
    box-shadow: var(--wpg-shadow-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ---- Tabs Navigation ---- */
.g-tabs { 
    display: flex; 
    gap: 8px; 
    margin-bottom: 24px; 
    overflow-x: auto; 
    border-bottom: 2px solid var(--wpg-border); 
    padding-bottom: 8px; 
    scrollbar-width: none; 
}

.g-tabs::-webkit-scrollbar { display: none; }

.g-tab {
    background: transparent; 
    border: none; 
    color: var(--wpg-text-muted);
    padding: 10px 24px; 
    font-size: 15px; 
    font-weight: 800;
    cursor: pointer; 
    border-radius: var(--wpg-radius-md); 
    white-space: nowrap; 
    transition: all 0.25s ease;
    font-family: var(--wpg-font);
}

.g-tab:hover { 
    color: var(--wpg-text-main); 
    background: var(--wpg-bg-subtle); 
}

.g-tab.active { 
    color: var(--wpg-primary); 
    background: var(--wpg-primary-light); 
    font-weight: 900;
}

.g-tab-panel { display: none; }
.g-tab-panel.active { 
    display: block; 
    animation: wpgFadeUp 0.35s ease-out; 
}

@keyframes wpgFadeUp { 
    from { opacity: 0; transform: translateY(8px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* ---- Standings Table (Fully Responsive) ---- */
.st-table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--wpg-radius-md);
    -webkit-overflow-scrolling: touch;
}

.st-table { 
    width: 100%; 
    border-collapse: separate;
    border-spacing: 0;
    min-width: 600px;
}

.st-table th, 
.st-table td { 
    padding: 14px 12px; 
    text-align: center; 
    border-bottom: 1px solid var(--wpg-border); 
}

.st-table th { 
    background: var(--wpg-bg-subtle);
    color: var(--wpg-text-muted); 
    font-size: 12px; 
    font-weight: 800; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
}

.st-table tr:last-child td {
    border-bottom: none;
}

.st-table td { 
    font-size: 14px; 
    font-weight: 700; 
    color: var(--wpg-text-main);
    font-family: var(--wpg-num-font), var(--wpg-font);
}

.st-table tr:hover td { 
    background-color: var(--wpg-bg-subtle); 
}

.st-team { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    text-align: right !important; 
    font-family: var(--wpg-font);
}

.st-team img { 
    width: 30px; 
    height: 30px; 
    object-fit: contain; 
}

.st-team a { 
    color: var(--wpg-text-main); 
    font-weight: 800; 
}

.st-team a:hover { 
    color: var(--wpg-primary); 
}

.st-pos { 
    font-weight: 900; 
    width: 36px; 
    color: var(--wpg-text-muted); 
}

.st-pts { 
    font-weight: 900; 
    color: var(--wpg-primary); 
    font-size: 16px; 
}

/* ---- Match List & Scoreboard Cards ---- */
.m-list { 
    display: flex; 
    flex-direction: column; 
    gap: 14px; 
}

.m-card {
    display: grid; 
    grid-template-columns: 1fr auto 1fr;
    align-items: center; 
    padding: 16px 20px;
    background: var(--wpg-bg-card); 
    border: 1px solid var(--wpg-border);
    border-radius: var(--wpg-radius-md); 
    transition: all 0.25s ease;
}

.m-card:hover { 
    border-color: var(--wpg-primary); 
    box-shadow: var(--wpg-shadow-md); 
    transform: translateY(-2px); 
}

.m-team { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    font-weight: 800; 
    font-size: 15px; 
    color: var(--wpg-text-main); 
}

.m-team img { 
    width: 36px; 
    height: 36px; 
    object-fit: contain; 
    flex-shrink: 0;
}

.m-team.home { justify-content: flex-end; }
.m-team.away { justify-content: flex-start; }

.m-team a:hover { color: var(--wpg-primary); }

.m-center { 
    text-align: center; 
    padding: 0 16px; 
}

.m-score {
    display: inline-block; 
    padding: 6px 18px; 
    border-radius: var(--wpg-radius-sm);
    font-size: 20px; 
    font-weight: 900; 
    letter-spacing: 1px;
    background: var(--wpg-bg-subtle); 
    border: 1px solid var(--wpg-border);
    color: var(--wpg-text-main); 
    font-family: var(--wpg-num-font), var(--wpg-font);
    transition: all 0.2s ease;
}

.m-score:hover { 
    background: var(--wpg-primary); 
    color: #ffffff; 
    border-color: var(--wpg-primary); 
}

.m-time { 
    font-size: 12px; 
    color: var(--wpg-text-muted); 
    margin-top: 6px; 
    font-weight: 700; 
}

.live-badge { 
    background: var(--wpg-danger); 
    color: #ffffff; 
    padding: 3px 10px; 
    border-radius: 20px; 
    font-size: 11px; 
    font-weight: 900; 
    display: inline-block;
    animation: wpgPulse 2s infinite; 
}

@keyframes wpgPulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.96); }
    100% { opacity: 1; transform: scale(1); }
}

/* ---- Match Detail Header ---- */
.m-match-header-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    width: 100%;
    text-align: center;
}

.big-score { 
    font-size: 48px; 
    font-weight: 900; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    gap: 16px; 
    color: var(--wpg-text-main); 
    font-family: var(--wpg-num-font), var(--wpg-font);
}

.big-score .sep { 
    font-size: 24px; 
    color: var(--wpg-text-muted); 
}

.status-pill {
    display: inline-block; 
    padding: 6px 20px; 
    border-radius: 20px;
    font-weight: 800; 
    font-size: 14px; 
    color: var(--wpg-primary);
    background: var(--wpg-primary-light); 
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.match-team-link { 
    text-decoration: none; 
    color: var(--wpg-text-main); 
    text-align: center; 
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease, color 0.2s ease; 
}

.match-team-link:hover { 
    color: var(--wpg-primary); 
    transform: translateY(-3px); 
}

.match-team-link img { 
    max-height: 80px; 
    width: auto;
    display: block; 
    margin: 0 auto; 
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.08)); 
}

.match-team-link h3 { 
    margin-top: 12px; 
    font-size: 18px; 
    font-weight: 900; 
}

/* ---- Squad & Player Grid ---- */
.sq-title { 
    color: var(--wpg-primary); 
    font-size: 18px; 
    margin-bottom: 16px; 
    border-right: 4px solid var(--wpg-primary); 
    padding-right: 12px; 
    font-weight: 900; 
}

.sq-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); 
    gap: 16px; 
    margin-bottom: 28px; 
}

.sq-card {
    background: var(--wpg-bg-card); 
    border: 1px solid var(--wpg-border);
    border-radius: var(--wpg-radius-md); 
    padding: 16px 10px; 
    text-align: center;
    transition: all 0.25s ease; 
    display: block; 
    color: var(--wpg-text-main);
    box-shadow: var(--wpg-shadow-sm);
}

.sq-card:hover { 
    border-color: var(--wpg-primary); 
    transform: translateY(-4px); 
    box-shadow: var(--wpg-shadow-md); 
}

.sq-card img { 
    width: 65px; 
    height: 65px; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 3px solid var(--wpg-bg-subtle); 
    margin: 0 auto 10px; 
    display: block; 
}

.sq-card .name { 
    font-weight: 800; 
    font-size: 13px; 
    line-height: 1.3;
}

.sq-card .num { 
    font-size: 12px; 
    color: var(--wpg-text-muted); 
    margin-top: 6px; 
    font-weight: 700; 
    background: var(--wpg-bg-subtle); 
    display: inline-block; 
    padding: 2px 8px; 
    border-radius: 10px; 
    font-family: var(--wpg-num-font), var(--wpg-font);
}

/* ---- Player Profile ---- */
.player-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 24px; 
}

.player-photo { 
    text-align: center; 
    padding: 20px; 
}

.player-photo img {
    width: 130px; 
    height: 130px; 
    border-radius: 50%;
    border: 4px solid var(--wpg-primary); 
    box-shadow: var(--wpg-shadow-md);
    margin-bottom: 16px;
    object-fit: cover;
}

.p-stat-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); 
    gap: 16px; 
}

.p-stat { 
    background: var(--wpg-bg-card); 
    border: 1px solid var(--wpg-border); 
    border-radius: var(--wpg-radius-md); 
    padding: 16px; 
    text-align: center; 
    box-shadow: var(--wpg-shadow-sm); 
}

.p-stat .val { 
    font-size: 26px; 
    font-weight: 900; 
    color: var(--wpg-primary); 
    margin-bottom: 2px; 
    font-family: var(--wpg-num-font), var(--wpg-font);
}

.p-stat .lbl { 
    font-size: 13px; 
    color: var(--wpg-text-muted); 
    font-weight: 700; 
}

/* ---- Timeline (Events) ---- */
.timeline { 
    position: relative; 
    padding-right: 28px; 
    border-right: 2px solid var(--wpg-border); 
    margin-right: 12px; 
}

.tl-item { 
    margin-bottom: 20px; 
    position: relative; 
}

.tl-dot {
    position: absolute; 
    right: -40px; 
    top: 2px;
    width: 24px; 
    height: 24px; 
    border-radius: 50%;
    background: var(--wpg-bg-card); 
    border: 2px solid var(--wpg-primary);
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 12px;
    box-shadow: var(--wpg-shadow-sm);
}

.tl-time { 
    font-size: 13px; 
    font-weight: 900; 
    color: var(--wpg-primary); 
    margin-bottom: 2px; 
    font-family: var(--wpg-num-font), var(--wpg-font);
}

.tl-desc { 
    color: var(--wpg-text-main); 
    font-weight: 800; 
    font-size: 14px; 
}

.tl-desc .team-tag { 
    font-size: 12px; 
    color: var(--wpg-text-muted); 
    font-weight: 600; 
}

/* ---- Stats Bars ---- */
.stat-rows { 
    display: flex; 
    flex-direction: column; 
    gap: 18px; 
}

.stat-row-info { 
    display: flex; 
    justify-content: space-between; 
    font-weight: 800; 
    font-size: 14px; 
    margin-bottom: 6px; 
    font-family: var(--wpg-num-font), var(--wpg-font);
}

.stat-bar-wrap { 
    display: flex; 
    height: 10px; 
    background: var(--wpg-bg-subtle); 
    border-radius: 5px; 
    overflow: hidden; 
    border: 1px solid var(--wpg-border); 
}

.stat-bar-h { 
    background: var(--wpg-primary); 
    transition: width 0.8s ease; 
}

.stat-bar-sep { 
    width: 2px; 
    background: var(--wpg-bg-card); 
}

.stat-bar-a { 
    background: var(--wpg-danger); 
    transition: width 0.8s ease; 
}

/* ---- No Data Box ---- */
.no-data { 
    text-align: center; 
    color: var(--wpg-text-muted); 
    padding: 32px 20px; 
    font-style: italic; 
    font-weight: 600; 
    background: var(--wpg-bg-subtle); 
    border-radius: var(--wpg-radius-md); 
}

/* Base Headings */
h2, h3, h4 { color: var(--wpg-text-main); font-weight: 900; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }

/* ================================================================
   RESPONSIVE LAYOUT BREAKPOINTS
   ================================================================ */

/* Mobile Small (< 480px) */
@media (max-width: 480px) {
    .wp-goal-wrap {
        padding: 12px 10px;
    }
    .g-card {
        padding: 16px 12px;
        border-radius: var(--wpg-radius-md);
    }
    .ent-header {
        padding: 20px 14px;
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }
    .ent-logo img {
        max-height: 75px;
    }
    .ent-info h1 {
        font-size: 22px;
    }
    .ent-meta {
        justify-content: center;
    }
    .m-match-header-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .m-card {
        padding: 14px 10px;
        grid-template-columns: 1fr auto 1fr;
    }
    .m-team {
        font-size: 13px;
        gap: 6px;
    }
    .m-team img {
        width: 26px;
        height: 26px;
    }
    .m-score {
        padding: 4px 12px;
        font-size: 16px;
    }
    .big-score {
        font-size: 32px;
        gap: 10px;
    }
    .sq-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }
    .sq-card {
        padding: 12px 8px;
    }
    .sq-card img {
        width: 50px;
        height: 50px;
    }
    .timeline {
        padding-right: 20px;
        margin-right: 8px;
    }
    .tl-dot {
        right: -31px;
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
}

/* Tablet (>= 768px) */
@media (min-width: 768px) {
    .wp-goal-wrap { padding: 32px 24px; }
    .ent-info h1 { font-size: 32px; }
    .sq-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* Desktop (>= 1024px) */
@media (min-width: 1024px) {
    .wp-goal-wrap { 
        padding: 40px; 
        max-width: 1320px; 
    }
    
    .desktop-2col { 
        display: grid; 
        grid-template-columns: 7fr 3fr; 
        gap: 28px; 
        align-items: start; 
    }
    
    .desktop-2col-eq { 
        display: grid; 
        grid-template-columns: 1fr 1fr; 
        gap: 28px; 
        align-items: start; 
    }
    
    .player-grid { 
        grid-template-columns: 280px 1fr; 
    }
}

/* ================================================================
   TEAM PAGE REFERENCE DESIGN STYLES
   ================================================================ */

.wpg-team-header-card {
    padding: 24px;
    background: linear-gradient(135deg, var(--wpg-bg-card) 0%, var(--wpg-bg-subtle) 100%);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wpg-team-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wpg-follow-btn {
    background: var(--wpg-bg-card);
    border: 1px solid var(--wpg-border);
    color: var(--wpg-text-main);
    padding: 8px 24px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    box-shadow: var(--wpg-shadow-sm);
    transition: all 0.2s ease;
}

.wpg-follow-btn:hover {
    background: var(--wpg-primary);
    color: #ffffff;
    border-color: var(--wpg-primary);
}

.wpg-team-identity {
    display: flex;
    align-items: center;
    gap: 16px;
}

.wpg-team-tabs {
    margin-bottom: 0;
    border-bottom: 1px solid var(--wpg-border);
    padding-bottom: 0;
}

.wpg-team-tabs .g-tab {
    border-radius: 0;
    border-bottom: 3px solid transparent;
    padding: 10px 18px;
    font-size: 15px;
}

.wpg-team-tabs .g-tab.active {
    background: transparent;
    border-bottom-color: #10b981;
    color: #10b981;
}

/* Squad List Rows (Ref Design) */
.wpg-squad-section {
    margin-bottom: 24px;
}

.wpg-squad-group-header {
    background: var(--wpg-bg-subtle);
    padding: 10px 16px;
    border-radius: var(--wpg-radius-sm);
    font-size: 15px;
    font-weight: 900;
    color: var(--wpg-text-main);
    margin-bottom: 10px;
}

.wpg-squad-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wpg-player-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--wpg-bg-card);
    border: 1px solid var(--wpg-border);
    border-radius: var(--wpg-radius-md);
    transition: all 0.2s ease;
}

.wpg-player-row:hover {
    border-color: var(--wpg-primary);
    transform: translateX(-4px);
    box-shadow: var(--wpg-shadow-sm);
}

.wpg-p-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wpg-p-badge {
    background: var(--wpg-bg-subtle);
    border: 1px solid var(--wpg-border);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    color: var(--wpg-primary);
    font-family: var(--wpg-num-font), var(--wpg-font);
}

.wpg-p-role {
    font-size: 13px;
    color: var(--wpg-text-muted);
    font-weight: 700;
}

.wpg-p-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wpg-p-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--wpg-text-main);
}

.wpg-p-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--wpg-bg-subtle);
}

/* Sidebar Matches List Cards (Ref Design) */
.wpg-sidebar-matches-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wpg-side-match-card {
    background: var(--wpg-bg-subtle);
    border: 1px solid var(--wpg-border);
    border-radius: var(--wpg-radius-md);
    overflow: hidden;
}

.wpg-sm-header {
    background: rgba(0, 0, 0, 0.03);
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 800;
    color: var(--wpg-text-muted);
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--wpg-border);
}

.wpg-sm-body {
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr auto auto auto 1fr;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.wpg-sm-body .team-name {
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wpg-sm-body .team-name.home {
    text-align: left;
}

.wpg-sm-body .team-name.away {
    text-align: right;
}

.sm-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.sm-time-badge, .sm-score-badge {
    background: var(--wpg-bg-card);
    border: 1px solid var(--wpg-border);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 900;
    color: var(--wpg-text-main);
    font-family: var(--wpg-num-font), var(--wpg-font);
}

.sm-score-badge {
    background: var(--wpg-primary);
    color: #ffffff;
    border-color: var(--wpg-primary);
}


/* ================================================================
   MATCHES WIDGET SHORTCODE STYLES [wp_goal_matches]
   ================================================================ */

.wpg-shortcode-matches-wrapper {
    position: relative;
    transition: opacity 0.3s ease;
}

.wpg-shortcode-matches-wrapper.wpg-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Date Navigator Bar */
.wpg-date-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--wpg-bg-card);
    border: 1px solid var(--wpg-border);
    border-radius: var(--wpg-radius-lg);
    padding: 14px 20px;
    margin-bottom: 20px;
    box-shadow: var(--wpg-shadow-sm);
}

.wpg-nav-title {
    font-size: 20px;
    font-weight: 900;
    color: #10b981;
}

.wpg-date-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    direction: ltr;
}

.wpg-date-arrow {
    background: var(--wpg-bg-subtle);
    border: 1px solid var(--wpg-border);
    color: var(--wpg-text-main);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wpg-date-arrow:hover {
    background: var(--wpg-primary);
    color: #ffffff;
    border-color: var(--wpg-primary);
}

.wpg-date-display {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--wpg-bg-subtle);
    border: 1px solid var(--wpg-border);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 14px;
    color: var(--wpg-text-main);
    cursor: pointer;
    direction: rtl;
}

.wpg-date-picker-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Tournament Block */
.wpg-tournament-block {
    background: var(--wpg-bg-card);
    border: 1px solid var(--wpg-border);
    border-radius: var(--wpg-radius-lg);
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: var(--wpg-shadow-sm);
}

.wpg-tournament-header {
    background: #1e293b;
    color: #ffffff;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body.dark-theme .wpg-tournament-header,
body.dark .wpg-tournament-header,
[data-theme="dark"] .wpg-tournament-header {
    background: #0f172a;
}

.wpg-t-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wpg-t-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.wpg-t-name {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff !important;
}

.wpg-t-name:hover {
    color: #38bdf8 !important;
}

/* Matches List inside Tournament Block */
.wpg-tournament-matches {
    display: flex;
    flex-direction: column;
}

.wpg-match-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--wpg-border);
    transition: background 0.2s ease;
}

.wpg-match-row:last-child {
    border-bottom: none;
}

.wpg-match-row:hover {
    background: var(--wpg-bg-subtle);
}

.wpg-m-team {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 15px;
    color: var(--wpg-text-main);
}

.wpg-m-team.home {
    justify-content: flex-end;
}

.wpg-m-team.away {
    justify-content: flex-start;
}

.wpg-m-team .team-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

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

.wpg-m-team:hover {
    color: var(--wpg-primary);
}

.wpg-m-center {
    text-align: center;
    padding: 0 16px;
    min-width: 90px;
}

.time-box {
    display: inline-block;
    padding: 4px 14px;
    background: var(--wpg-bg-subtle);
    border: 1px solid var(--wpg-border);
    border-radius: 16px;
    font-size: 13px;
    font-weight: 800;
    color: var(--wpg-text-main);
    font-family: var(--wpg-num-font), var(--wpg-font);
}

.score-box {
    display: inline-block;
    padding: 4px 16px;
    background: var(--wpg-primary);
    color: #ffffff;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 900;
    font-family: var(--wpg-num-font), var(--wpg-font);
}

@media (max-width: 600px) {
    .wpg-date-nav-bar {
        padding: 12px 14px;
    }
    .wpg-nav-title {
        font-size: 16px;
    }
    .wpg-match-row {
        padding: 12px 10px;
        grid-template-columns: 1fr auto 1fr;
    }
    .wpg-m-team {
        font-size: 13px;
        gap: 6px;
    }
    .wpg-m-team .team-logo {
        width: 22px;
        height: 22px;
    }
    .time-box, .score-box {
        font-size: 12px;
        padding: 3px 10px;
    }
}

/* ================================================================
   2D VISUAL TACTICAL PITCH & APP-STYLE UI (E-FOOTBALL DESIGN)
   Inspired by modern mobile sports apps (Rounded cards, clean stats, smooth pills)
   ================================================================ */

/* ================================================================
   REFERENCE APP HERO MATCH HEADER & INTEGRATED TABS BAR
   ================================================================ */

.wpg-hero-card {
    padding: 0 !important;
    overflow: hidden;
    background: var(--wpg-bg-card);
    border: 1px solid var(--wpg-border);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    margin-bottom: 20px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.wpg-hero-top-wrap {
    display: flex;
    justify-content: center;
    padding-top: 16px;
}

.wpg-hero-top-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 16px;
    background: var(--wpg-bg-subtle, #f8fafc);
    border: 1px solid var(--wpg-border, #e2e8f0);
    border-radius: 30px;
    font-size: 13px;
    font-weight: 800;
    color: var(--wpg-text-main);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.wpg-tourn-badge-logo {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    object-fit: contain !important;
    display: inline-block !important;
    vertical-align: middle;
}

.wpg-hero-main-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 20px 24px 16px;
    gap: 16px;
}

.wpg-hero-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    transition: transform 0.2s ease;
}

.wpg-hero-team:hover {
    transform: translateY(-2px);
}

.wpg-hero-team-name {
    font-size: 17px;
    font-weight: 900;
    color: var(--wpg-text-main);
    text-align: center;
}

.wpg-hero-team-logo {
    width: 68px;
    height: 68px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.12));
}

.wpg-hero-center-cluster {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.wpg-hero-status-pill-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpg-hero-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
}

.wpg-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    box-shadow: 0 0 6px #10b981;
    animation: wpgPulse 1.5s infinite;
}

@keyframes wpgPulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.wpg-hero-score-ring-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.wpg-hero-score {
    font-size: 38px;
    font-weight: 900;
    color: #0f172a;
    font-family: var(--wpg-num-font), var(--wpg-font);
    line-height: 1;
    transition: color 0.3s ease;
}

.wpg-hero-score.is-winner {
    color: #0d9488;
}

.wpg-hero-vs {
    font-size: 26px;
    font-weight: 900;
    color: var(--wpg-text-muted);
}

.wpg-hero-score-sep {
    font-size: 32px;
    font-weight: 900;
    color: var(--wpg-text-muted);
    margin: 0 12px;
    line-height: 1;
}

.wpg-center-match-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    margin: 0 8px;
}

.wpg-countdown-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    transition: all 0.3s ease;
}

.wpg-scheduled-time-pill {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    font-size: 16px;
    font-weight: 800;
    padding: 6px 20px;
    border-radius: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    direction: rtl;
}

.wpg-scheduled-time-pill .wpg-ampm-symbol {
    order: 1;
}

.wpg-scheduled-time-pill .wpg-time-digits {
    order: 2;
    direction: ltr;
    font-family: var(--wpg-num-font), var(--wpg-font);
}

.wpg-scheduled-countdown-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--wpg-text-muted);
    font-family: var(--wpg-num-font), var(--wpg-font);
    direction: ltr;
    letter-spacing: 0.5px;
}

.wpg-countdown-icon {
    font-size: 13px;
    line-height: 1;
}

.wpg-countdown-text {
    font-size: 14px;
    font-weight: 800;
    color: #10b981;
    font-family: var(--wpg-num-font), var(--wpg-font);
    direction: ltr;
    display: inline-block;
    white-space: nowrap;
}

.wpg-timer-ring {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
}

.wpg-timer-ring svg {
    width: 64px;
    height: 64px;
}

.wpg-timer-text {
    position: absolute;
    font-size: 14px;
    font-weight: 800;
    color: #0d9488;
    font-family: var(--wpg-num-font), var(--wpg-font);
    white-space: nowrap;
    text-align: center;
    letter-spacing: -0.2px;
}

.wpg-timer-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.wpg-stoppage-sub-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 13.5px;
    font-weight: 800;
    color: #475569;
    margin-top: 6px;
    direction: ltr;
    font-family: var(--wpg-num-font), var(--wpg-font);
    line-height: 1;
}

.wpg-stoppage-ticking {
    color: #334155;
}

.wpg-stoppage-plus {
    color: #ef4444;
    margin-right: 1px;
}

.wpg-stoppage-sep {
    color: #ef4444;
    font-weight: 800;
    margin: 0 1px;
}

.wpg-stoppage-total-num {
    color: #ef4444;
    font-weight: 900;
}

.wpg-hero-footer-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 16px 14px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--wpg-text-muted);
}

.wpg-hero-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Integrated Tabs Strip at bottom of Hero Card */
.wpg-hero-tabs-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--wpg-bg-subtle, #f1f5f9);
    padding: 6px 12px 0;
    border-top: 1px solid var(--wpg-border);
    overflow-x: auto;
    scrollbar-width: none;
}

.wpg-hero-tabs-strip .g-tab {
    padding: 10px 18px;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    font-size: 14px;
    font-weight: 800;
    color: var(--wpg-text-muted);
    border-bottom: 3px solid transparent !important;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: none !important;
}

.wpg-hero-tabs-strip .g-tab.active {
    color: #10b981 !important;
    border-bottom-color: #10b981 !important;
}

.wpg-hero-tabs-strip .g-tab:hover {
    color: var(--wpg-text-main);
}

@media (max-width: 600px) {
    .wpg-hero-main-grid {
        padding: 14px 12px;
        gap: 8px;
    }
    .wpg-hero-team-name {
        font-size: 14px;
    }
    .wpg-hero-team-logo {
        width: 52px;
        height: 52px;
    }
    .wpg-hero-score {
        font-size: 30px;
    }
    .wpg-timer-ring {
        width: 48px;
        height: 48px;
    }
    .wpg-timer-ring svg {
        width: 48px;
        height: 48px;
    }
    .wpg-timer-text {
        font-size: 11.5px;
    }
    .wpg-hero-tabs-strip {
        justify-content: flex-start;
    }
    .wpg-hero-tabs-strip .g-tab {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Entity Main Hero Header (Team & Tournament Pages) */
.wpg-hero-main-entity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 20px;
    gap: 20px;
}

.wpg-hero-entity-body {
    display: flex;
    align-items: center;
    gap: 20px;
}

.wpg-hero-entity-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.12));
    flex-shrink: 0;
}

.wpg-hero-entity-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wpg-hero-entity-title {
    font-size: 24px;
    font-weight: 900;
    color: var(--wpg-text-main);
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.5px;
}

.wpg-hero-entity-sub-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wpg-hero-entity-sub {
    font-size: 13px;
    font-weight: 700;
    color: var(--wpg-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

@media (max-width: 600px) {
    .wpg-hero-main-entity {
        flex-direction: column;
        text-align: center;
        padding: 18px 14px 16px;
        gap: 14px;
    }

    .wpg-hero-entity-body {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .wpg-hero-entity-logo {
        width: 60px;
        height: 60px;
    }

    .wpg-hero-entity-title {
        font-size: 19px;
    }

    .wpg-hero-entity-sub-row {
        justify-content: center;
    }
}

/* App-style Pill Navigation Bar */
.g-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    border-bottom: none;
    padding: 6px 2px 10px;
    scrollbar-width: none;
}

.g-tab {
    background: var(--wpg-bg-card);
    border: 1px solid var(--wpg-border);
    color: var(--wpg-text-muted);
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    border-radius: 30px; /* Rounded pill style from mobile mockup */
    white-space: nowrap;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--wpg-shadow-sm);
}

.g-tab:hover {
    color: var(--wpg-primary);
    background: var(--wpg-bg-subtle);
}

.g-tab.active {
    color: #ffffff;
    background: var(--wpg-primary);
    border-color: var(--wpg-primary);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

/* Mobile Clean Stat Row Progress Bars */
.stat-rows {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-row-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 6px;
}

.stat-bar-wrap {
    height: 10px;
    background: var(--wpg-bg-subtle);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    position: relative;
}

.stat-bar-h {
    background: #0284c7; /* Home team bar color */
    border-radius: 20px 0 0 20px;
    transition: width 0.6s ease;
}

.stat-bar-sep {
    width: 2px;
    background: var(--wpg-bg-card);
    z-index: 2;
}

.stat-bar-a {
    background: #f97316; /* Away team bar color (Orange vs Blue from screenshot) */
    border-radius: 0 20px 20px 0;
    transition: width 0.6s ease;
}

/* Player Detail Mobile Card System */
.p-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 600px) {
    .p-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.p-stat {
    background: var(--wpg-bg-card);
    border: 1px solid var(--wpg-border);
    border-radius: 16px;
    padding: 14px 10px;
    text-align: center;
    box-shadow: var(--wpg-shadow-sm);
}

.p-stat .val {
    font-size: 22px;
    font-weight: 900;
    color: var(--wpg-text-main);
    font-family: var(--wpg-num-font), var(--wpg-font);
}

.p-stat .lbl {
    font-size: 12px;
    color: var(--wpg-text-muted);
    font-weight: 700;
}

/* Match Header Mobile Clean Design */
.m-match-header-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}

@media (max-width: 600px) {
    .wp-goal-wrap {
        padding: 12px 10px;
    }
    
    .ent-header {
        padding: 20px 14px;
        border-radius: 16px;
    }
    
    .match-team-link img {
        max-height: 52px;
    }
    
    .match-team-link h3 {
        font-size: 14px;
        margin-top: 6px;
    }
    
    .big-score {
        font-size: 32px;
        gap: 8px;
    }
    
    .status-pill {
        font-size: 12px;
        padding: 4px 12px;
    }
}

.wpg-pitch-2col-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

@media (max-width: 900px) {
    .wpg-pitch-2col-layout {
        grid-template-columns: 1fr;
    }
}

.wpg-lineup-team-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.wpg-lineup-team-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--wpg-bg-card);
    border: 1px solid var(--wpg-border);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 800;
    color: var(--wpg-text-muted);
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--wpg-shadow-sm);
}

.wpg-lineup-team-btn img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.wpg-lineup-team-btn:hover {
    border-color: var(--wpg-primary, #3b82f6);
    color: var(--wpg-text-main);
    transform: translateY(-1px);
}

.wpg-lineup-team-btn.active {
    background: var(--wpg-primary, #3b82f6);
    border-color: var(--wpg-primary, #3b82f6);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.wpg-team-lineup-panel {
    display: none;
    animation: wpgFadeIn 0.3s ease forwards;
}

.wpg-team-lineup-panel.active {
    display: block;
}

@keyframes wpgFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.wpg-pitch-card {
    background: var(--wpg-bg-card);
    border: 1px solid var(--wpg-border);
    border-radius: var(--wpg-radius-lg);
    padding: 18px;
    box-shadow: var(--wpg-shadow-sm);
    max-width: 540px;
    margin: 0 auto;
}

.wpg-pitch-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--wpg-border-subtle);
}

.wpg-pitch-team-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wpg-pitch-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.wpg-pitch-team-title h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--wpg-text-main);
}

.wpg-pitch-formation {
    font-size: 12px;
    color: var(--wpg-text-muted);
    font-weight: 700;
    font-family: var(--wpg-num-font), var(--wpg-font);
}

/* Green Grass Pitch Board */
.wpg-tactical-pitch {
    background: linear-gradient(180deg, #1b5e20 0%, #2e7d32 50%, #1b5e20 100%);
    border: 2px solid #144e18;
    border-radius: 14px;
    position: relative;
    padding: 24px 10px 18px;
    min-height: 490px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.35);
}

.wpg-pitch-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.wpg-pitch-lines::before {
    content: '';
    position: absolute;
    inset: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
}

.wpg-pitch-penalty-area-top {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 48%;
    height: 75px;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-top: none;
}

.wpg-pitch-center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
}

.wpg-pitch-center-line {
    position: absolute;
    top: 50%;
    left: 12px;
    right: 12px;
    height: 1.5px;
    background: rgba(255, 255, 255, 0.4);
}

/* Formation Grid Rows */
.wpg-pitch-formation-grid {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    gap: 16px;
    min-height: 440px;
}

.wpg-pitch-row {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    width: 100%;
}

.wpg-pitch-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    position: relative;
    cursor: default;
    transition: transform 0.2s ease;
}

.wpg-pitch-player:hover {
    transform: translateY(-2px) scale(1.04);
}

.wpg-player-jersey-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpg-player-jersey {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
}

.wpg-jersey-svg {
    width: 100%;
    height: 100%;
}

.wpg-jersey-home .wpg-jersey-body {
    fill: #e11d48;
}

.wpg-jersey-away .wpg-jersey-body {
    fill: #2563eb;
}

.wpg-jersey-gk .wpg-jersey-body {
    fill: #10b981;
}

.wpg-shirt-num {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -46%);
    font-size: 13px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    font-family: var(--wpg-num-font), var(--wpg-font);
    line-height: 1;
    z-index: 2;
}

.wpg-badge-goal {
    position: absolute;
    top: -5px;
    right: -7px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 1px 4px;
    font-size: 10px;
    font-weight: 800;
    color: #ffffff;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.wpg-badge-card {
    position: absolute;
    top: -5px;
    left: -7px;
    font-size: 11px;
    z-index: 3;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.4));
}

.wpg-player-name-pill {
    background: rgba(15, 23, 42, 0.88);
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 700;
    white-space: nowrap;
    max-width: 85px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
}

.wpg-player-rating-pill {
    background: #f5c518;
    color: #111111;
    font-size: 9.5px;
    font-weight: 900;
    padding: 1px 5px;
    border-radius: 8px;
    line-height: 1.2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.wpg-coach-card {
    margin-top: 16px;
    background: var(--wpg-bg-subtle);
    border: 1px solid var(--wpg-border);
    border-radius: var(--wpg-radius-md);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
}

.wpg-coach-title {
    font-weight: 800;
    color: var(--wpg-text-muted);
}

.wpg-coach-name {
    font-weight: 700;
    color: var(--wpg-text-main);
}

.wpg-subs-bench-card {
    margin-top: 12px;
    background: var(--wpg-bg-subtle);
    border: 1px solid var(--wpg-border);
    border-radius: var(--wpg-radius-md);
    padding: 14px;
}

.wpg-subs-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--wpg-text-main);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--wpg-border-subtle);
}

.wpg-subs-list-single {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wpg-sub-item-row {
    background: var(--wpg-bg-card);
    border: 1px solid var(--wpg-border);
    border-radius: var(--wpg-radius-sm);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    transition: background 0.15s ease;
}

.wpg-sub-item-row:hover {
    background: var(--wpg-bg-hover, rgba(0,0,0,0.02));
}

.wpg-sub-item-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wpg-sub-num-badge {
    width: 24px;
    height: 24px;
    background: var(--wpg-bg-subtle);
    border: 1px solid var(--wpg-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    color: var(--wpg-text-muted);
    font-family: var(--wpg-num-font), var(--wpg-font);
}

.wpg-sub-name {
    font-weight: 700;
    color: var(--wpg-text-main);
}

.wpg-sub-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wpg-sub-rating {
    background: #f5c518;
    color: #111111;
    font-size: 10px;
    font-weight: 900;
    padding: 1px 6px;
    border-radius: 6px;
}

.wpg-meta-badge {
    font-size: 12px;
}

/* Sidebar Widgets Layout */
.wpg-sidebar-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wpg-sidebar-card {
    padding: 20px !important;
}

.wpg-sidebar-title {
    font-size: 16px;
    font-weight: 900;
    color: var(--wpg-text-main);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--wpg-border-subtle);
}

.wpg-match-info-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
}

.wpg-info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px dashed var(--wpg-border-subtle);
}

.wpg-info-item:last-child {
    border-bottom: none;
}

.wpg-info-label {
    color: var(--wpg-text-muted);
    font-weight: 700;
}

.wpg-info-val {
    font-weight: 800;
    color: var(--wpg-text-main);
}

.wpg-news-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wpg-news-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    border-radius: var(--wpg-radius-sm);
    border: 1px solid var(--wpg-border);
    background: var(--wpg-bg-card);
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.wpg-news-item:hover {
    border-color: var(--wpg-primary);
    transform: translateY(-2px);
    box-shadow: var(--wpg-shadow-sm);
}

.wpg-news-text h5 {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 800;
    color: var(--wpg-text-main);
    line-height: 1.4;
}

.wpg-news-date {
    font-size: 11px;
    color: var(--wpg-text-light);
    font-weight: 700;
}

.wpg-news-img {
    width: 60px;
    height: 50px;
    border-radius: var(--wpg-radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.wpg-news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* More Stats Toggle Button */
.wpg-more-stats-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #0284c7;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 22px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.wpg-more-stats-btn:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
    transform: translateY(-1px);
}

/* ================================================================
   COMBINED HORIZONTAL LINEUP & 2-COLUMN LIST DESIGN
   ================================================================ */

.wpg-combined-lineups-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Top bar above pitch */
.wpg-pitch-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: var(--wpg-bg-card);
    border-radius: 12px;
    border: 1px solid var(--wpg-border);
    box-shadow: var(--wpg-shadow-sm);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.wpg-pitch-top-team {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wpg-pitch-top-team img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.wpg-pitch-top-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--wpg-text-main);
}

.wpg-pitch-top-form {
    font-size: 14px;
    font-weight: 700;
    color: var(--wpg-text-muted);
}

/* Horizontal Field */
.wpg-hz-pitch-card {
    background: #1b8a3e;
    border-radius: 16px;
    padding: 24px 16px;
    box-shadow: 0 4px 16px rgba(27, 138, 62, 0.25);
    overflow: hidden;
    position: relative;
}

.wpg-hz-pitch-field {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpg-hz-pitch-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 8px;
}

.wpg-hz-center-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: rgba(255,255,255,0.4);
    transform: translateX(-50%);
}

.wpg-hz-center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.wpg-hz-box-left {
    position: absolute;
    top: 25%;
    bottom: 25%;
    left: 0;
    width: 60px;
    border: 2px solid rgba(255,255,255,0.4);
    border-left: none;
}

.wpg-hz-box-right {
    position: absolute;
    top: 25%;
    bottom: 25%;
    right: 0;
    width: 60px;
    border: 2px solid rgba(255,255,255,0.4);
    border-right: none;
}

.wpg-hz-pitch-teams {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: space-between;
}

.wpg-hz-team-half {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-around;
}

.wpg-hz-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    gap: 16px;
    min-height: 380px;
}

/* ================================================================
   PITCH CIRCLE NODE DESIGN (Reference App Style)
   Home = dark circle, Away = white circle
   Rating badge top-right, Sub icon top-left, Events bottom-left
   ================================================================ */

.wpg-pn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: default;
    transition: transform 0.15s ease;
}

.wpg-pn:hover {
    transform: translateY(-3px);
}

.wpg-pn-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpg-pn-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #1e293b;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wpg-pn:hover .wpg-pn-circle {
    transform: scale(1.08);
}

.wpg-pn-circle.is-home {
    background: #ffffff;
    border-color: #1b8a3e;
    box-shadow: 0 4px 14px rgba(0,0,0,0.45);
}

.wpg-pn-circle.is-away {
    background: #ffffff;
    border-color: #1b8a3e;
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}

.wpg-pn-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    background: #ffffff;
}

.wpg-pn-num {
    font-size: 20px;
    font-weight: 900;
    font-family: var(--wpg-num-font), var(--wpg-font);
    line-height: 1;
    letter-spacing: -0.5px;
}

/* Rating Badge (top-right of circle) */
.wpg-pn-rating {
    position: absolute;
    top: -5px;
    right: -12px;
    font-size: 10.5px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 10px;
    color: #ffffff;
    line-height: 1.2;
    white-space: nowrap;
    z-index: 4;
    font-family: var(--wpg-num-font), var(--wpg-font);
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.wpg-pn-rating.elite {
    background: #3b82f6;
}

.wpg-pn-rating.good {
    background: #22c55e;
}

.wpg-pn-rating.avg {
    background: #f97316;
}

.wpg-pn-rating.poor {
    background: #ef4444;
}

/* Substitution Icon (top-left of circle) */
.wpg-pn-sub {
    position: absolute;
    top: -6px;
    left: -10px;
    z-index: 5;
    line-height: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 50%;
    padding: 1px;
}

/* Events Cluster (bottom-left of circle) */
.wpg-pn-evts {
    position: absolute;
    bottom: -4px;
    left: -14px;
    display: flex;
    align-items: center;
    gap: 2px;
    z-index: 5;
}

.wpg-pn-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.wpg-pn-ico svg {
    display: block;
}

/* White Circle Badge Background for Goal and Assist Icons */
.wpg-pn-goal-badge,
.wpg-pn-assist-badge {
    background: #ffffff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.35);
    border: 1px solid rgba(0,0,0,0.08);
}

.wpg-pn-card-badge {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

/* Player Name Below Circle */
.wpg-pn-name {
    font-size: 11.5px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.95);
    white-space: nowrap;
    text-align: center;
    max-width: 95px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    margin-top: 4px;
    direction: rtl;
}

/* Responsive: smaller circles on mobile */
@media (max-width: 600px) {
    .wpg-pn-circle {
        width: 42px;
        height: 42px;
    }
    .wpg-pn-num {
        font-size: 16px;
    }
    .wpg-pn-rating {
        font-size: 9px;
        padding: 1px 4px;
        right: -10px;
    }
    .wpg-pn-sub svg {
        width: 14px;
        height: 14px;
    }
    .wpg-pn-name {
        font-size: 9.5px;
        max-width: 60px;
    }
    .wpg-pn-evts {
        max-width: 30px;
    }
    .wpg-pn-goal-ico svg,
    .wpg-pn-assist-ico svg {
        width: 11px;
        height: 9px;
    }
}

/* Headings */
.wpg-lineup-section-heading {
    font-size: 17px;
    font-weight: 900;
    color: var(--wpg-text-main, #0f172a);
    margin: 20px 0 12px;
    padding-right: 12px;
    border-right: 4px solid var(--wpg-primary, #0284c7);
}

/* 2-Column Grid Cards (Theme Adaptable) */
.wpg-lineups-2col-card {
    padding: 0 !important;
    overflow: hidden;
    background: var(--wpg-bg-card);
    border: 1px solid var(--wpg-border);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.wpg-2col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.wpg-team-list-col {
    padding: 16px;
}

.wpg-team-list-col:first-child {
    border-left: 1px solid var(--wpg-border);
}

.wpg-team-col-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 14px;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--wpg-border);
}

.wpg-team-col-header img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.wpg-team-col-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--wpg-text-main);
}

.wpg-hz-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 4px;
    border-bottom: 1px dashed var(--wpg-border);
}

.wpg-hz-list-row:last-child {
    border-bottom: none;
}

.wpg-hz-player-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wpg-hz-num {
    font-size: 15px;
    font-weight: 800;
    color: var(--wpg-text-muted);
    min-width: 22px;
}

.wpg-hz-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--wpg-text-main);
}

.wpg-hz-events-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wpg-evt-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.wpg-icon-down {
    color: #ef4444;
    font-weight: 900;
    font-size: 13px;
    line-height: 1;
}

.wpg-icon-up {
    color: #22c55e;
    font-weight: 900;
    font-size: 13px;
    line-height: 1;
}

.wpg-icon-goal {
    font-size: 12px;
    line-height: 1;
}

.wpg-rect-yellow {
    width: 10px;
    height: 14px;
    background: #f59e0b;
    border-radius: 2px;
    display: inline-block;
}

.wpg-rect-red {
    width: 10px;
    height: 14px;
    background: #ef4444;
    border-radius: 2px;
    display: inline-block;
}

.wpg-min-text {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
}
/* ================================================================
   EVENTS TIMELINE CSS (Match Events Two-Column Layout)
   ================================================================ */

.events-timeline-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.evt-row {
    display: grid;
    grid-template-columns: 1fr 52px 1fr;
    align-items: center;
    gap: 8px;
    padding: 12px 6px;
    border-bottom: 1px dashed var(--wpg-border-subtle, #f1f5f9);
    transition: background 0.15s ease;
}

.evt-row:last-child {
    border-bottom: none;
}

.evt-row:hover {
    background: var(--wpg-bg-subtle, #f8fafc);
}

.evt-col {
    display: flex;
    align-items: center;
}

.evt-away {
    justify-content: flex-start;
    text-align: right;
    gap: 12px;
}

.evt-home {
    justify-content: flex-end;
    text-align: left;
    gap: 12px;
}

.evt-center {
    justify-content: center;
}

.evt-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.evt-player-main {
    font-size: 14px;
    font-weight: 800;
    color: var(--wpg-text-main);
    line-height: 1.3;
}

.evt-player-sub {
    font-size: 12px;
    color: var(--wpg-text-muted, #94a3b8);
    font-weight: 600;
}

.evt-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.evt-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 14px;
    flex-shrink: 0;
}

.evt-minute-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--wpg-border, #e2e8f0);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 13px;
    font-weight: 800;
    color: var(--wpg-text-main);
    font-family: var(--wpg-num-font), var(--wpg-font);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.evt-added-min {
    font-size: 9px;
    color: var(--wpg-warning, #f59e0b);
    font-weight: 900;
    vertical-align: super;
    margin-left: 1px;
}

@media (max-width: 600px) {
    .evt-row {
        grid-template-columns: 1fr 44px 1fr;
        padding: 6px 2px;
    }
    .evt-player-main {
        font-size: 12px;
    }
    .evt-player-sub {
        font-size: 10px;
    }
    .evt-minute-badge {
        font-size: 11px;
        padding: 2px 6px;
    }
}

/* ================================================================
   RESPONSIVE MOBILE PITCH LAYOUT (VERTICAL FIELD ON MOBILE)
   ================================================================ */
@media (max-width: 768px) {
    .wpg-pitch-top-bar {
        padding: 10px 14px;
    }

    .wpg-pitch-top-name {
        font-size: 13.5px;
    }

    .wpg-pitch-top-form {
        font-size: 12px;
    }

    .wpg-hz-pitch-card {
        padding: 16px 8px;
    }

    .wpg-hz-pitch-field {
        min-height: 540px;
        flex-direction: column;
    }

    /* Adjust pitch markings for vertical layout */
    .wpg-hz-center-line {
        top: 50%;
        left: 0;
        right: 0;
        bottom: auto;
        width: 100%;
        height: 2px;
        transform: translateY(-50%);
    }

    .wpg-hz-box-left {
        top: 0;
        left: 22%;
        right: 22%;
        bottom: auto;
        width: auto;
        height: 55px;
        border: 2px solid rgba(255,255,255,0.4);
        border-top: none;
    }

    .wpg-hz-box-right {
        bottom: 0;
        top: auto;
        left: 22%;
        right: 22%;
        width: auto;
        height: 55px;
        border: 2px solid rgba(255,255,255,0.4);
        border-bottom: none;
    }

    .wpg-hz-pitch-teams {
        flex-direction: column;
        justify-content: space-between;
        gap: 16px;
    }

    .wpg-hz-team-half {
        flex-direction: column;
        width: 100%;
        gap: 14px;
    }

    .wpg-hz-col {
        flex-direction: row;
        width: 100%;
        min-height: auto;
        justify-content: space-evenly;
        gap: 4px;
    }

    /* Stack 2-column lineups list on mobile */
    .wpg-2col-grid {
        grid-template-columns: 1fr;
    }

    .wpg-team-list-col:first-child {
        border-left: none;
        border-bottom: 2px solid var(--wpg-border);
    }
}

/* ==========================================================================
   Mobile Bottom Navigation Bar & Footer Removal on Mobile
   ========================================================================== */

/* 1. Hide Site Footer on Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
    footer.site-footer,
    .site-footer,
    footer#colophon,
    #footer,
    .footer-wrap {
        display: none !important;
    }

    body {
        padding-bottom: 74px !important;
    }
}

/* 2. Mobile Bottom Navigation Bar (Adaptive Light & Dark Mode) */
.wpg-mob-navbar {
    display: none;
}

@media (max-width: 768px) {
    /* Light Mode (Default) */
    .wpg-mob-navbar {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 99999;
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(16px) saturate(180%);
        -webkit-backdrop-filter: blur(16px) saturate(180%);
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
        padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
        direction: rtl;
        transition: background 0.3s ease, border-color 0.3s ease;
    }

    .wpg-mob-nav-container {
        display: flex;
        align-items: center;
        justify-content: space-around;
        max-width: 500px;
        margin: 0 auto;
    }

    .wpg-mob-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        flex: 1;
        padding: 6px 0;
        color: #64748b;
        text-decoration: none !important;
        background: none;
        border: none;
        outline: none;
        cursor: pointer;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        -webkit-tap-highlight-color: transparent;
    }

    .wpg-mob-nav-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        color: #64748b;
        transition: transform 0.25s ease, color 0.25s ease;
    }

    .wpg-mob-nav-icon svg {
        width: 22px;
        height: 22px;
        stroke-width: 2.2;
    }

    .wpg-mob-nav-label {
        font-size: 11px;
        font-weight: 700;
        color: #64748b;
        font-family: var(--wpg-font), 'Cairo', sans-serif;
        line-height: 1.1;
        white-space: nowrap;
        transition: color 0.25s ease;
    }

    /* Active State in Light Mode */
    .wpg-mob-nav-item.active,
    .wpg-mob-nav-item:active {
        color: #059669;
    }

    .wpg-mob-nav-item.active .wpg-mob-nav-icon,
    .wpg-mob-nav-item.active .wpg-mob-nav-label {
        color: #059669;
    }

    .wpg-mob-nav-item.active .wpg-mob-nav-icon {
        transform: translateY(-2px);
    }

    .wpg-mob-nav-item.active .wpg-mob-nav-label {
        font-weight: 800;
    }

    .wpg-mob-nav-item.active::before {
        content: '';
        position: absolute;
        top: -6px;
        width: 20px;
        height: 3px;
        background: linear-gradient(90deg, #10b981, #059669);
        border-radius: 3px;
        box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
    }
}

/* Dark Mode Overrides (body.dark-mode / html.dark) */
@media (max-width: 768px) {
    body.dark-mode .wpg-mob-navbar,
    html.dark .wpg-mob-navbar {
        background: rgba(15, 23, 42, 0.94);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.4);
    }

    body.dark-mode .wpg-mob-nav-item,
    html.dark .wpg-mob-nav-item {
        color: #94a3b8;
    }

    body.dark-mode .wpg-mob-nav-icon,
    body.dark-mode .wpg-mob-nav-label,
    html.dark .wpg-mob-nav-icon,
    html.dark .wpg-mob-nav-label {
        color: #94a3b8;
    }

    body.dark-mode .wpg-mob-nav-item.active,
    body.dark-mode .wpg-mob-nav-item:active,
    html.dark .wpg-mob-nav-item.active,
    html.dark .wpg-mob-nav-item:active {
        color: #10b981;
    }

    body.dark-mode .wpg-mob-nav-item.active .wpg-mob-nav-icon,
    body.dark-mode .wpg-mob-nav-item.active .wpg-mob-nav-label,
    html.dark .wpg-mob-nav-item.active .wpg-mob-nav-icon,
    html.dark .wpg-mob-nav-item.active .wpg-mob-nav-label {
        color: #10b981;
    }
}

/* Live Match Blinking Elapsed Timer */
.pill-badge.pill-live {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.8rem;
    display: inline-block;
    animation: blink-live-timer 1.2s infinite ease-in-out;
}

@keyframes blink-live-timer {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        opacity: 0.3;
        transform: scale(0.96);
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
    }
}
