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

:root {
    --bg-page: #f1f5f9;
    --bg-card: #ffffff;
    --border-card: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --brand-blue: #00509d;
    --brand-blue-hover: #003870;
    --brand-orange: #c44d00;
    --brand-orange-hover: #a34000;
    --badge-navy: #1e293b;
    --badge-green: #15803d;
    --badge-red: #b91c1c;
    
    --card-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    --card-hover-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
    --bg-page: #0f172a;
    --bg-card: #1e293b;
    --border-card: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    --card-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    --card-hover-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    direction: rtl;
    text-align: right;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ========================================================
   Header Matching the Screenshot:
   [Moon Dark Box Left] [Yalla Shoot Logo Center] [☰ Menu Right]
   ======================================================== */
.main-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-card);
    padding: 12px 0;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

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

/* Moon Toggle Button inside dark rounded box */
.theme-toggle-btn {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #1e293b;
    border: 1px solid #334155;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    background: #0f172a;
    transform: rotate(15deg);
}

[data-theme="dark"] .theme-toggle-btn {
    background: #0f172a;
    border-color: #475569;
}

/* Center Brand Logo Pill */
.header-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-pill-logo {
    background: var(--brand-blue, #00509d);
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    padding: 6px 18px;
    border-radius: 8px;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s ease, background 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 80, 157, 0.25);
    text-decoration: none;
}

.brand-pill-logo:hover {
    background: var(--brand-blue-hover, #003870);
    transform: translateY(-1px);
}

.brand-logo-img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
    display: inline-block;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Right Section: Desktop Links + Mobile Menu Button */
.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-center-links.desktop-only {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
}

.header-center-links.desktop-only a:hover {
    color: var(--brand-blue);
}

/* Hamburger Menu Button inside dark rounded box */
.mobile-menu-btn {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #1e293b;
    border: 1px solid #334155;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4.5px;
    transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
    background: #0f172a;
}

.hamburger-bar {
    width: 20px;
    height: 2.5px;
    background-color: #ffffff;
    border-radius: 2px;
    display: block;
}

/* ========================================================
   Off-Canvas Mobile Navigation Drawer
   ======================================================== */
.mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    max-width: 85%;
    height: 100%;
    background: var(--bg-card);
    z-index: 9999;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-drawer.open {
    right: 0;
}

.drawer-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--brand-blue, #00509d);
    color: #ffffff;
}

.drawer-logo {
    font-size: 18px;
    font-weight: 800;
}

.drawer-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.drawer-close-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

.drawer-body {
    padding: 18px;
    flex: 1;
}

.drawer-section {
    margin-bottom: 22px;
}

.drawer-section-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.drawer-nav-list {
    list-style: none;
}

.drawer-nav-list li {
    margin-bottom: 4px;
}

.drawer-nav-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}

.drawer-nav-list a:hover {
    background: rgba(0, 80, 157, 0.08);
    color: var(--brand-blue);
}

.btn-drawer-admin {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    background: #1e293b;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    transition: background 0.2s;
}

.btn-drawer-admin:hover {
    background: #0f172a;
    color: #ffffff;
}

/* ========================================================
   Subheader: Timezone Tab + Schedule Banner + 3 Day Tabs
   Exact 1:1 Match with Mobile Screenshot
   ======================================================== */
.schedule-header-wrapper {
    margin-bottom: 18px;
}

/* Tab attached above the banner on the right */
.timezone-tab-pill {
    display: inline-block;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-right: 6px;
    position: relative;
    z-index: 2;
    margin-bottom: -1px;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.02);
}

/* Solid blue banner */
.schedule-main-banner {
    background: var(--brand-blue, #00509d);
    color: #ffffff;
    text-align: center;
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    box-shadow: 0 3px 8px rgba(0, 80, 157, 0.25);
}

.schedule-main-banner h1,
.schedule-main-banner h2 {
    font-size: 16px;
    font-weight: 800;
    margin: 0;
    color: #ffffff;
    letter-spacing: 0.5px;
}

/* 3 Navigation Tabs in a Row */
.nav-tabs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.day-tab-btn {
    padding: 10px 6px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    text-align: center;
    text-decoration: none;
}

/* Tomorrow Button (Orange in screenshot) */
.day-tab-btn.btn-tomorrow {
    background-color: var(--brand-orange, #c44d00);
}
.day-tab-btn.btn-tomorrow:hover {
    filter: brightness(1.1);
}

/* Today Button (Blue in screenshot) */
.day-tab-btn.btn-today {
    background-color: var(--brand-blue, #00509d);
}
.day-tab-btn.btn-today:hover {
    filter: brightness(1.1);
}

/* Yesterday Button (Navy/Blue in screenshot) */
.day-tab-btn.btn-yesterday {
    background-color: #0b3954;
}
.day-tab-btn.btn-yesterday:hover {
    filter: brightness(1.1);
}

.day-tab-btn.active {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--brand-orange, #c44d00);
}

/* ========================================================
   Quick League & Category Filter Bar
   ======================================================== */
.leagues-filter-scroller {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 20px;
    scrollbar-width: thin;
}

.league-filter-chip {
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.league-filter-chip:hover,
.league-filter-chip.active {
    background: var(--brand-blue);
    color: #ffffff;
    border-color: var(--brand-blue);
}

.league-filter-chip.friendly-chip {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}
[data-theme="dark"] .league-filter-chip.friendly-chip {
    background: #450a0a;
    border-color: #7f1d1d;
    color: #fca5a5;
}
.league-filter-chip.friendly-chip:hover,
.league-filter-chip.friendly-chip.active {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}

/* ========================================================
   Match Card Design - Exact 1:1 with Screenshot
   ======================================================== */
.matches-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 40px;
}

.match-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
    display: block;
    position: relative;
}

.match-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-hover-shadow);
    border-color: #94a3b8;
}

.match-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* Press / Touch / Hover Active Feedback Overlay (تفاعل الضغط الرمادي وزر التشغيل) */
.card-press-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(51, 65, 85, 0.78);
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 10;
    border-radius: 12px;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.press-play-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.85);
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.press-play-circle svg {
    margin-right: -2px;
}

/* Hover & Active / Touch Press Trigger */
.match-card:hover .card-press-overlay,
.match-card:active .card-press-overlay,
.match-card.is-pressed .card-press-overlay {
    opacity: 1;
    visibility: visible;
}

.match-card:hover .press-play-circle,
.match-card:active .press-play-circle,
.match-card.is-pressed .press-play-circle {
    transform: scale(1.05);
}

/* Main row: Home Team Right | Center Info | Away Team Left */
.match-main-row {
    display: grid;
    grid-template-columns: 1fr 130px 1fr;
    align-items: center;
    padding: 16px 16px 12px;
}

/* Both teams have Logo on Top and Name Below! */
.team-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
}

.team-logo-wrapper {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.team-logo-img {
    max-width: 46px;
    max-height: 46px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}

.team-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    text-align: center;
    word-break: break-word;
}

/* Center Info: Score, Time, Status, Play Button */
.match-center-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
}

.match-time-display {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    direction: ltr;
    letter-spacing: 0.5px;
    font-family: inherit;
}

.match-live-score {
    font-size: 22px;
    font-weight: 900;
    color: #dc2626;
    direction: ltr;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 1px;
}

/* Friendly Match Badge */
.friendly-stream-badge {
    background: #dc2626;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-top: 2px;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

/* Status Badges */
.status-pill {
    padding: 3px 14px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status-pill.badge-not-started {
    background-color: #1e293b;
}

.status-pill.badge-soon {
    background-color: #0d6e3c;
}

.status-pill.badge-live {
    background-color: #b91c1c;
    animation: pulse-live 1.6s infinite ease-in-out;
}

.status-pill.badge-finished {
    background-color: #475569;
}

.status-pill.badge-postponed {
    background-color: #d97706;
}

@keyframes pulse-live {
    0% { box-shadow: 0 0 0 0 rgba(185, 28, 28, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(185, 28, 28, 0); }
    100% { box-shadow: 0 0 0 0 rgba(185, 28, 28, 0); }
}

/* Bottom Metadata Bar: Channel on Right, League on Left */
.match-meta-bar {
    border-top: 1px solid var(--border-card);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.02);
}

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

.meta-item .icon {
    font-size: 14px;
}

/* ========================================================
   Empty State
   ======================================================== */
.empty-matches-box {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 12px;
}

.empty-matches-box .icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-matches-box h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-matches-box p {
    color: var(--text-secondary);
}

/* ========================================================
   Footer
   ======================================================== */
.main-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-card);
    padding: 30px 0;
    margin-top: auto;
    font-size: 14px;
    color: var(--text-secondary);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 28px;
    align-items: start;
}

.footer-col h3 {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 10px;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    line-height: 1.9;
}

.footer-col a:hover {
    color: var(--brand-blue);
}

.footer-copy {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--border-card);
    font-size: 12px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a:hover {
    color: var(--brand-blue);
}

.seo-breadcrumb {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 8px 0 16px;
}

.seo-breadcrumb a {
    color: var(--brand-blue);
    font-weight: 700;
    text-decoration: none;
}

.match-page-h1 {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.5;
    margin: 0 0 18px;
    color: var(--text-primary);
}

.match-details-header a {
    color: inherit;
    text-decoration: none;
}

.match-details-header a:hover h2 {
    color: var(--brand-blue);
}

.html-sitemap-matches {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.html-sitemap-matches a {
    color: var(--brand-blue);
    text-decoration: none;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.html-sitemap-matches span {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ========================================================
   Responsive Breakpoints for Mobile
   ======================================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .main-header {
        padding: 10px 0;
        margin-bottom: 14px;
    }

    .header-center-links.desktop-only {
        display: none;
    }

    .brand-pill-logo {
        font-size: 18px;
        padding: 6px 18px;
    }

    .theme-toggle-btn,
    .mobile-menu-btn {
        width: 40px;
        height: 40px;
    }

    .match-main-row {
        grid-template-columns: 1fr 105px 1fr;
        padding: 12px 10px 10px;
    }

    .team-name {
        font-size: 13px;
    }

    .team-logo-wrapper {
        width: 42px;
        height: 42px;
    }

    .team-logo-img {
        max-width: 40px;
        max-height: 40px;
    }

    .match-time-display {
        font-size: 14px;
    }

    .match-live-score {
        font-size: 20px;
    }

    .status-pill {
        font-size: 11px;
        padding: 2px 10px;
    }

    .press-play-circle {
        width: 44px;
        height: 44px;
    }

    .match-meta-bar {
        font-size: 11px;
        padding: 7px 10px;
    }

    .nav-tabs-grid {
        gap: 6px;
    }

    .day-tab-btn {
        font-size: 12px;
        padding: 8px 2px;
    }

    .schedule-main-banner {
        padding: 8px 12px;
    }

    .schedule-main-banner h1,
    .schedule-main-banner h2 {
        font-size: 14.5px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 18px;
    }

    .match-page-h1 {
        font-size: 18px;
    }
}

@media (max-width: 520px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================================
   Advanced SEO Content, FAQ Accordion & Keyword Cloud
   ======================================================== */
.seo-section-wrapper {
    margin-top: 36px;
    margin-bottom: 48px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.seo-card-box {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 14px;
    padding: 26px 24px;
    box-shadow: var(--card-shadow);
}

.seo-card-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--brand-blue);
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.seo-card-paragraph {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.85;
    margin: 0 0 14px 0;
}

.seo-card-paragraph:last-child {
    margin-bottom: 0;
}

.seo-keywords-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.seo-keyword-tag {
    background: rgba(0, 80, 157, 0.06);
    color: var(--brand-blue);
    border: 1px solid rgba(0, 80, 157, 0.15);
    border-radius: 9999px;
    padding: 5px 14px;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.seo-keyword-tag:hover {
    background: var(--brand-blue);
    color: #ffffff;
    border-color: var(--brand-blue);
    transform: translateY(-1px);
}

/* FAQ Accordion */
.seo-faq-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.seo-faq-item {
    background: rgba(0, 0, 0, 0.015);
    border: 1px solid var(--border-card);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

[data-theme="dark"] .seo-faq-item {
    background: rgba(255, 255, 255, 0.02);
}

.seo-faq-item:hover {
    border-color: var(--brand-blue);
}

.seo-faq-question {
    width: 100%;
    padding: 14px 18px;
    background: none;
    border: none;
    text-align: right;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-family: inherit;
}

.seo-faq-question .faq-icon {
    font-size: 16px;
    transition: transform 0.25s ease;
    color: var(--brand-blue);
    flex-shrink: 0;
}

.seo-faq-item.active .seo-faq-question .faq-icon {
    transform: rotate(180deg);
}

.seo-faq-answer {
    padding: 0 18px 16px 18px;
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.8;
    display: none;
    border-top: 1px dashed var(--border-card);
    padding-top: 12px;
}

.seo-faq-item.active .seo-faq-answer {
    display: block;
}

