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

/* ==================================================
   1. المتغيرات والأساسيات (Matrix Elite 2030)
   ================================================== */
:root {
    --bg-matrix: #F3F6FD;
    --surface-matrix: #FFFFFF;
    --text-matrix: #0F172A;
    --text-sec: #64748B;
    --accent-matrix: #10B981;
    --border-matrix: rgba(0,0,0,0.06);
    --ease-matrix: cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-matrix: 0 10px 40px rgba(0,0,0,0.03);
}

body.dark-mode {
    --bg-matrix: #06090F;
    --surface-matrix: #121723;
    --text-matrix: #F8FAFC;
    --text-sec: #94A3B8;
    --border-matrix: rgba(255,255,255,0.06);
}

/* 🛑 إبادة النقاط li في كل الموقع للأبد */
ul, li { list-style: none !important; margin: 0 !important; padding: 0 !important; text-indent: 0 !important; }
li::before, li::after { content: none !important; display: none !important; }

body { background: var(--bg-matrix); color: var(--text-matrix); font-family: 'Tajawal', sans-serif; transition: 0.3s; margin: 0; direction: rtl; line-height: 1.6; -webkit-font-smoothing: antialiased; }
.container { max-width: 1260px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
img { max-width: 100%; height: auto; display: block; object-fit: cover; }
body.no-scroll { overflow: hidden !important; }

/* ==================================================
   2. الهيدر المطور (إصلاح التشوه وحجم اللوجو)
   ================================================== */
.main-header-2030 {
    background: var(--surface-matrix);
    border-bottom: 1px solid var(--border-matrix);
    height: 90px;
    position: sticky; top: 0; z-index: 1000;
    display: flex; align-items: center;
    backdrop-filter: blur(12px);
    background: color-mix(in srgb, var(--surface-matrix) 85%, transparent);
}

.header-container-fluid { display: flex; justify-content: space-between; align-items: center; width: 100%; }

/* قفل حجم اللوجو */
.matrix-logo-img { height: 45px !important; width: auto !important; display: block; transition: 0.3s; }
.matrix-logo-img:hover { transform: scale(1.05); }

.header-nav-center-2030 { flex: 1; display: flex; justify-content: center; }
.elite-nav-links { display: flex; gap: 30px; }
.elite-nav-links li a { font-weight: 800; color: var(--text-matrix); padding: 10px 15px; border-radius: 12px; transition: 0.3s; }
.elite-nav-links li a:hover { background: rgba(16, 185, 129, 0.1); color: var(--accent-matrix); }
.elite-nav-links li.current-menu-item a { color: var(--accent-matrix); background: rgba(16, 185, 129, 0.05); }

.header-tools-left-2030 { display: flex; gap: 12px; }
.tool-action-btn {
    background: var(--bg-matrix); border: 1px solid var(--border-matrix);
    color: var(--text-matrix); width: 48px; height: 48px; border-radius: 15px;
    cursor: pointer; display: flex; justify-content: center; align-items: center; transition: 0.3s;
}
.tool-action-btn:hover { background: var(--accent-matrix); color: #fff; transform: translateY(-3px); }

/* البحث المطور */
.elite-search-overlay {
    position: fixed; top: -110px; left: 0; width: 100%; height: 90px;
    background: var(--surface-matrix); z-index: 1100; transition: 0.4s var(--ease-matrix);
    display: flex; align-items: center; border-bottom: 3px solid var(--accent-matrix);
}
.elite-search-overlay.open { top: 0; }
.search-inner-2030 { display: flex; align-items: center; gap: 20px; width: 100%; }
.search-field-2030 { flex: 1; height: 50px; background: var(--bg-matrix); border: 1px solid var(--border-matrix); border-radius: 12px; padding: 0 20px; font-size: 18px; color: var(--text-matrix); font-family: 'Tajawal'; }
.close-search-2030 { font-size: 40px; background: none; border: none; color: var(--text-matrix); cursor: pointer; }

/* ==================================================
   3. أهم الأخبار (Top Stories) - إبداع 2030
   ================================================== */
.elite-top-stories-wrapper { margin: 30px 0 50px; }
.live-streaming-indicator { display: inline-flex; align-items: center; gap: 10px; color: #FF0055; font-weight: 900; font-size: 14px; margin-bottom: 20px; }
.pulse-dot { width: 10px; height: 10px; background: #FF0055; border-radius: 50%; animation: matrix-pulse 1.5s infinite; }
@keyframes matrix-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,0,85,0.7); } 70% { box-shadow: 0 0 0 10px rgba(255,0,85,0); } 100% { box-shadow: 0 0 0 0 rgba(255,0,85,0); } }

.stories-track { display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; padding-bottom: 20px; }
.stories-track::-webkit-scrollbar { display: none; }
.story-card-floating { flex: 0 0 290px; height: 360px; position: relative; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-matrix); transition: 0.4s; }
.story-img-mask img { width: 100%; height: 100%; transition: 0.8s; }
.story-gradient-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); }
.story-content-box { position: absolute; bottom: 20px; right: 20px; left: 20px; }
.story-timestamp-ago { color: rgba(255,255,255,0.7); font-size: 12px; font-weight: 700; display: block; margin-bottom: 5px; }
.story-title-fluid { color: #fff; font-size: 18px; font-weight: 900; margin: 0; line-height: 1.4; }
.story-card-floating:hover { transform: translateY(-8px); }
.story-card-floating:hover img { transform: scale(1.1); }

/* ==================================================
   4. أقسام الأندية (Cinematic Bento)
   ================================================== */
.elite-matrix-section { margin-bottom: 60px; }
.elite-section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 30px; }
.elite-section-header h2 { font-size: 32px; font-weight: 900; position: relative; padding-bottom: 10px; }
.elite-section-header h2::after { content: ''; position: absolute; right: 0; bottom: 0; width: 45px; height: 5px; background: var(--theme-color, var(--accent-matrix)); border-radius: 10px; }

/* ألوان الأندية */
.theme-hilal   { --theme-color: #0046BE; }
.theme-nassr   { --theme-color: #FFC400; }
.theme-ahli    { --theme-color: #008148; }
.theme-ittihad { --theme-color: #FFB800; }
.theme-saudi   { --theme-color: #10B981; }

.elite-matrix-bento { display: grid; grid-template-columns: 1.6fr 1fr; gap: 30px; }
.matrix-master-hero { position: relative; height: 500px; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-matrix); }
.matrix-master-hero img { width: 100%; height: 100%; transition: 0.8s; }
.master-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.95), transparent 60%); padding: 40px; display: flex; flex-direction: column; justify-content: flex-end; }
.matrix-club-badge { background: var(--theme-color); color: #fff; padding: 6px 16px; border-radius: 10px; font-size: 13px; font-weight: 900; align-self: flex-start; margin-bottom: 15px; }
.master-hero-overlay h3 { color: #fff; font-size: 32px; font-weight: 900; margin: 0; line-height: 1.3; }

.matrix-subs-grid { display: flex; flex-direction: column; gap: 20px; justify-content: space-between; }
.matrix-sub-item a { display: flex; gap: 20px; align-items: center; padding: 12px; border-radius: 20px; transition: 0.3s; }
.matrix-sub-item a:hover { background: var(--surface-matrix); transform: translateX(-10px); box-shadow: var(--shadow-matrix); }
.sub-item-img-container img { width: 140px; height: 100px; border-radius: 16px; }
.sub-item-txt-container h4 { font-size: 18px; font-weight: 700; color: var(--text-matrix); margin: 0; transition: 0.3s; }
.matrix-sub-item a:hover h4 { color: var(--theme-color); }

/* ================== 5. الفيديوهات والآراء ================== */
.elite-video-stream-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }
.video-stream-cover { position: relative; border-radius: 24px; overflow: hidden; height: 200px; margin-bottom: 15px; }
.elite-play-glass { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 60px; height: 60px; background: rgba(255,255,255,0.2); backdrop-filter: blur(8px); border-radius: 50%; display: flex; justify-content: center; align-items: center; border: 1px solid rgba(255,255,255,0.4); }
.play-triangle-matrix { border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent #fff; margin-left: 5px; }
.video-stream-item:hover .elite-play-glass { background: #FF0000; border-color: #FF0000; }

.elite-opinion-flow-track { display: flex; gap: 30px; overflow-x: auto; scrollbar-width: none; }
.opinion-flow-item { flex: 0 0 140px; text-align: center; }
.writer-flow-avatar img { width: 120px; height: 120px; border-radius: 50%; border: 4px solid var(--surface-matrix); outline: 2px solid var(--theme-color, var(--accent-matrix)); margin: 0 auto 15px; }

.elite-latest-stream-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.latest-stream-item { display: flex; gap: 20px; background: var(--surface-matrix); padding: 15px; border-radius: 22px; align-items: center; transition: 0.3s; border: 1px solid var(--border-matrix); }
.latest-stream-item:hover { transform: translateY(-5px); border-color: var(--accent-matrix); }
.lat-stream-img img { width: 120px; height: 90px; border-radius: 14px; }

/* ==================================================
   6. الموبايل المتجاوب (Mobile & Side Panel)
   ================================================== */
.side-panel-2030 {
    position: fixed; top: 0; right: -320px; width: 300px; height: 100vh;
    background: var(--surface-matrix); z-index: 2000; transition: 0.4s var(--ease-matrix);
    display: flex; flex-direction: column; box-shadow: -15px 0 50px rgba(0,0,0,0.1);
}
.side-panel-2030.open { right: 0; }
.panel-header-matrix { padding: 30px 20px; border-bottom: 1px solid var(--border-matrix); display: flex; justify-content: space-between; align-items: center; }
.panel-logo-img { height: 35px; width: auto; }
.close-panel-2030 { font-size: 35px; background: none; border: none; color: var(--text-matrix); cursor: pointer; }

.panel-items-list li a {
    display: block; padding: 20px 25px; font-size: 18px; font-weight: 900;
    border-bottom: 1px solid var(--border-matrix); text-align: right; transition: 0.3s;
}
.panel-items-list li a:hover { background: var(--accent-matrix); color: #fff; padding-right: 35px; }
.panel-dimmer-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: none; z-index: 1999; backdrop-filter: blur(5px); }

@media (max-width: 992px) {
    .hide-mobile { display: none !important; }
    .mobile-menu-toggle-btn { display: flex !important; }
    .main-header-2030 { height: 75px; }
    .matrix-logo-img { height: 35px !important; }
    .elite-matrix-bento { grid-template-columns: 1fr; gap: 20px; }
    .matrix-master-hero { height: 320px; }
    .master-hero-overlay h3 { font-size: 22px; }
    .sub-item-img-container img { width: 110px; height: 80px; }
    .sub-item-txt-container h4 { font-size: 15px; }
}