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

:root {
    --red:        #CC0000;
    --red-dark:   #990000;
    --bg:         #0a0a0a;
    --bg2:        #141414;
    --bg3:        #1e1e1e;
    --border:     rgba(255,255,255,0.07);
    --white:      #ffffff;
    --gray:       #888;
    --light:      #ccc;
    --nav-h:      64px;
    --radius:     10px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg);
    color: var(--white);
    direction: rtl;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ================================================================
   HEADER
================================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 500;
    background: var(--bg2);
    border-bottom: 2px solid var(--red);
    height: var(--nav-h);
}

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

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.logo-icon {
    width: 36px; height: 36px;
    background: var(--red);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900; font-size: 22px;
    color: #fff;
    flex-shrink: 0;
}

.logo-text {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 22px;
    letter-spacing: 1px;
    color: #fff;
}

.logo-ar {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: var(--red);
    padding: 2px 6px;
    border: 1px solid var(--red);
    border-radius: 4px;
}

/* Search */
.search-form {
    flex: 1;
    max-width: 340px;
    display: flex;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.search-form input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    padding: 0 14px;
    color: var(--white);
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
}

.search-form input::placeholder { color: var(--gray); }

.search-form button {
    background: none;
    border: none;
    padding: 0 14px;
    color: var(--gray);
    cursor: pointer;
    transition: color .2s;
}
.search-form button:hover { color: var(--red); }

/* Header nav */
.header-nav {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.hn-link {
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 12.5px;
    padding: 5px 12px;
    border-radius: 5px;
    color: var(--light);
    transition: all .2s;
    white-space: nowrap;
}

.hn-link:hover  { background: var(--bg3); color: #fff; }
.hn-link.active { background: var(--red); color: #fff; }

/* Live button */
.header-live-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    border: 1.5px solid var(--red);
    color: var(--red);
    padding: 6px 14px;
    border-radius: 5px;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    flex-shrink: 0;
    transition: all .2s;
}
.header-live-btn:hover { background: var(--red); color: #fff; }

.dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--red);
    animation: pulse 1.4s ease-in-out infinite;
}
.header-live-btn:hover .dot { background: #fff; }

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .5; transform: scale(.8); }
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}
.menu-toggle span {
    width: 22px; height: 2px;
    background: var(--white);
    border-radius: 2px;
    display: block;
    transition: all .3s;
}

/* ================================================================
   SIDE MENU
================================================================ */
.side-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 800;
}
.side-overlay.open { display: block; }

.side-menu {
    position: fixed;
    top: 0; right: -280px;
    width: 260px; height: 100%;
    background: var(--bg2);
    z-index: 900;
    transition: right .3s ease;
    overflow-y: auto;
    border-left: 1px solid var(--border);
}
.side-menu.open { right: 0; }

.side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 18px;
    border-bottom: 1px solid var(--border);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 18px;
}
.side-close {
    background: none; border: none;
    color: var(--gray); font-size: 18px; cursor: pointer;
}
.side-close:hover { color: var(--red); }

.side-links { padding: 12px 0; }
.side-links li a {
    display: block;
    padding: 10px 18px;
    font-size: 14px; font-weight: 600;
    color: var(--light);
    transition: all .2s;
}
.side-links li a:hover { background: var(--bg3); color: #fff; padding-right: 24px; }
.side-links .divider {
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    color: var(--gray);
    padding: 14px 18px 4px;
}

/* ================================================================
   TICKER BAR (live matches)
================================================================ */
.ticker-bar {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    height: 38px;
    overflow: hidden;
}

.ticker-label {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--red);
    padding: 0 16px;
    height: 100%;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ticker-track { flex: 1; overflow: hidden; }

.ticker-content {
    display: flex;
    align-items: center;
    gap: 40px;
    animation: tickerScroll 30s linear infinite;
    white-space: nowrap;
}

@keyframes tickerScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.match-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--light);
}
.match-item img {
    width: 20px; height: 20px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
}
.match-item em {
    font-style: normal;
    color: var(--red);
    font-size: 10px;
    font-weight: 700;
    border: 1px solid var(--red);
    border-radius: 3px;
    padding: 1px 5px;
    letter-spacing: .5px;
}

/* ================================================================
   CATEGORY PILLS
================================================================ */
.cat-pills {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: var(--nav-h);
    z-index: 400;
}

.cat-pills-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}
.cat-pills-inner::-webkit-scrollbar { display: none; }

.cp-btn {
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--light);
    padding: 6px 18px;
    border-radius: 20px;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
    flex-shrink: 0;
}
.cp-btn:hover  { border-color: var(--red); color: #fff; }
.cp-btn.active { background: var(--red); border-color: var(--red); color: #fff; }

/* ================================================================
   MAIN CONTENT
================================================================ */
.main-wrap {
    max-width: 1440px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

/* Section header */
.channels-section {
    margin-bottom: 48px;
}

.sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.sec-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 26px;
    letter-spacing: .5px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
}

.sec-bar {
    display: inline-block;
    width: 5px;
    height: 26px;
    background: var(--red);
    border-radius: 3px;
    flex-shrink: 0;
}

.sec-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
    transition: color .2s;
    white-space: nowrap;
}
.sec-more:hover { color: var(--red); }

/* ================================================================
   CHANNEL GRID
================================================================ */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

/* Channel Card */
.ch-card {
    display: block;
    background: var(--bg3);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform .2s, border-color .2s, box-shadow .2s;
    cursor: pointer;
}

.ch-card:hover {
    transform: translateY(-4px);
    border-color: var(--red);
    box-shadow: 0 8px 30px rgba(204,0,0,0.25);
}

.ch-thumb {
    position: relative;
    aspect-ratio: 16/9;
    background: #111;
    overflow: hidden;
}

.ch-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.ch-card:hover .ch-thumb img { transform: scale(1.04); }

.live-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--red);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    font-family: 'Barlow Condensed', sans-serif;
    letter-spacing: 1px;
    padding: 3px 7px;
    border-radius: 4px;
}

.ch-info {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ch-name {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ch-sub {
    font-size: 11px;
    color: var(--gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Featured card — slightly larger */
.ch-card.featured {
    grid-row: span 1;
    border-color: rgba(204,0,0,0.3);
}
.ch-card.featured .live-badge {
    background: #ff4500;
    animation: pulsebadge 2s infinite;
}
@keyframes pulsebadge {
    0%, 100% { opacity: 1; }
    50%       { opacity: .7; }
}

/* Hidden by filter */
.ch-card.hidden { display: none; }

/* ================================================================
   SEARCH RESULTS OVERLAY
================================================================ */
.search-empty {
    text-align: center;
    padding: 60px 0;
    color: var(--gray);
    font-size: 16px;
    display: none;
}

/* ================================================================
   FOOTER
================================================================ */
.site-footer {
    background: var(--bg2);
    border-top: 2px solid var(--red);
    padding: 50px 0 0;
    margin-top: 40px;
}

.footer-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px 40px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
}

.footer-logo {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 28px;
    margin-bottom: 12px;
    letter-spacing: 1px;
}
.footer-logo span { color: var(--red); }

.footer-col > p {
    color: var(--gray);
    font-size: 13px;
    line-height: 1.8;
    max-width: 300px;
}

.footer-col h4 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    color: var(--red);
}

.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a {
    font-size: 13px;
    color: var(--gray);
    transition: color .2s;
}
.footer-col ul a:hover { color: var(--white); }

.footer-bottom {
    background: #050505;
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: var(--gray);
    border-top: 1px solid var(--border);
}

/* ================================================================
   BACK TO TOP
================================================================ */
.back-top {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 42px; height: 42px;
    background: var(--red);
    color: #fff;
    border: none; border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: none;
    align-items: center; justify-content: center;
    z-index: 300;
    transition: background .2s, transform .2s;
    box-shadow: 0 4px 16px rgba(204,0,0,0.4);
}
.back-top.show { display: flex; }
.back-top:hover { background: var(--red-dark); transform: translateY(-2px); }

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 1100px) {
    .header-nav { display: none; }
    .menu-toggle { display: flex; }
    .channels-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

@media (max-width: 768px) {
    .logo-ar { display: none; }
    .channels-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
    .footer-inner { grid-template-columns: 1fr; gap: 30px; }
    .sec-title { font-size: 20px; }
}

@media (max-width: 480px) {
    .header-inner { padding: 0 12px; gap: 10px; }
    .search-form { max-width: 160px; }
    .logo-text { font-size: 18px; }
    .channels-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .main-wrap { padding: 20px 12px 40px; }
}

/* ================================================================
   WC2026 BANNER
================================================================ */
.wc-banner {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0000 40%, #CC0000 100%);
    border: 1px solid rgba(204,0,0,.4);
    border-radius: 14px;
    padding: 22px 24px;
    margin-bottom: 36px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}
.wc-banner::before {
    content: '2026';
    position: absolute;
    left: -10px; top: -20px;
    font-family: 'Barlow Condensed',sans-serif;
    font-weight: 900; font-style: italic;
    font-size: 140px; line-height: 1;
    color: rgba(255,255,255,.04);
    pointer-events: none; user-select: none;
}
.wc-left { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 200px; }
.wc-badge {
    background: var(--red); color: #fff;
    font-family: 'Barlow Condensed',sans-serif;
    font-weight: 700; font-size: 12px; letter-spacing: 1px;
    padding: 5px 10px; border-radius: 5px;
    animation: livepulse 2s infinite; flex-shrink: 0;
}
.wc-title {
    font-family: 'Barlow Condensed',sans-serif;
    font-weight: 900; font-size: 32px; line-height: 1;
    color: #fff; margin-bottom: 6px;
}
.wc-title strong { color: var(--red); }
.wc-flag { margin-right: 6px; }
.wc-subs {
    font-size: 11px; color: rgba(255,255,255,.55);
    font-weight: 600; display: flex; flex-wrap: wrap; gap: 4px;
}
.wc-subs span[lang] { color: rgba(255,255,255,.75); }
.wc-dot { color: rgba(255,255,255,.25); }
.wc-meta { font-size: 11px; color: rgba(255,255,255,.4); margin-top: 4px; }
.wc-channels { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.wc-ch {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    text-decoration: none; transition: transform .2s;
}
.wc-ch:hover { transform: translateY(-3px); }
.wc-ch img {
    width: 44px; height: 44px; border-radius: 8px; object-fit: cover;
    border: 2px solid rgba(255,255,255,.1);
    background: var(--bg3);
    transition: border-color .2s;
}
.wc-ch:hover img { border-color: var(--red); }
.wc-ch span { font-size: 10px; color: rgba(255,255,255,.6); font-weight: 700; }
.wc-btn {
    background: var(--red); color: #fff;
    padding: 10px 20px; border-radius: 7px;
    font-family: 'Cairo',sans-serif; font-weight: 700; font-size: 13px;
    text-decoration: none; white-space: nowrap; flex-shrink: 0;
    transition: background .2s;
}
.wc-btn:hover { background: var(--red-dark); }
@media (max-width: 768px) {
    .wc-banner { flex-direction: column; align-items: flex-start; gap: 16px; }
    .wc-title  { font-size: 24px; }
}

/* WC2026 nav link */
.hn-wc {
    background: var(--red) !important;
    color: #fff !important;
    font-weight: 700;
    animation: wcpulse 2s ease-in-out infinite;
}
@keyframes wcpulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(204,0,0,.5); }
    50%      { box-shadow: 0 0 0 6px rgba(204,0,0,0); }
}
