/* ===========================================================
   FIFA — نهاية الظلم
   نظام تصميم: بطاقة صفراء / أسود الملعب
   =========================================================== */

:root{
  --yellow:   #FFC400;
  --yellow-dim:#8a6c00;
  --black:    #0B0B0C;
  --surface:  #1C1C1F;
  --surface-2:#242428;
  --red:      #E1261C;
  --white:    #F5F3EC;
  --muted:    #9A9790;
  --line:     #333336;

  --font-display: 'Tajawal', sans-serif;
  --font-body: 'Cairo', sans-serif;

  --radius: 2px;
}

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

html{ scroll-behavior:smooth; }

body{
  background:var(--black);
  color:var(--white);
  font-family:var(--font-body);
  line-height:1.7;
  min-height:100vh;
  overflow-x:hidden;
}

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

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important; scroll-behavior:auto !important; }
}

/* ---------- utility ---------- */
.wrap{ max-width:1180px; margin:0 auto; padding:0 24px; }
.eyebrow{
  font-family:var(--font-display);
  font-weight:700;
  color:var(--yellow);
  font-size:14px;
  letter-spacing:.12em;
  display:flex; align-items:center; gap:10px;
  margin-bottom:14px;
}
.eyebrow::before{
  content:"";
  width:22px; height:4px;
  background:var(--yellow);
  display:inline-block;
  transform:skewX(-20deg);
}
.section{ padding:64px 0; border-top:1px solid var(--line); }
.section-head{
  display:flex; justify-content:space-between; align-items:flex-end;
  margin-bottom:34px; flex-wrap:wrap; gap:14px;
}
.section-head h2{
  font-family:var(--font-display);
  font-weight:900;
  font-size:clamp(28px,4vw,42px);
}
.view-all{
  font-weight:700; font-size:14px;
  border-bottom:2px solid var(--yellow);
  padding-bottom:2px;
  white-space:nowrap;
}
.view-all:hover{ color:var(--yellow); }

.btn{
  display:inline-flex; align-items:center; gap:10px;
  font-family:var(--font-display); font-weight:900;
  font-size:15px;
  padding:14px 26px;
  border-radius:var(--radius);
  border:2px solid transparent;
  cursor:pointer;
}
.btn-primary{ background:var(--yellow); color:var(--black); }
.btn-primary:hover{ background:#ffd94d; }
.btn-ghost{ border-color:var(--white); color:var(--white); }
.btn-ghost:hover{ border-color:var(--yellow); color:var(--yellow); }

/* ---------- header ---------- */
.site-header{
  position:sticky; top:0; z-index:50;
  background:rgba(11,11,12,0.92);
  backdrop-filter:blur(6px);
  border-bottom:1px solid var(--line);
}
.header-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 24px;
  max-width:1180px; margin:0 auto;
}
.logo{ display:flex; align-items:center; gap:12px; }
.logo .card-mark{
  width:26px; height:36px;
  background:var(--yellow);
  border-radius:3px;
  transform:rotate(-8deg);
  box-shadow:4px 4px 0 var(--red);
  flex-shrink:0;
}
.logo-text{ font-family:var(--font-display); font-weight:900; line-height:1.1; }
.logo-text .main{ font-size:19px; display:block; }
.logo-text .sub{ font-size:11px; color:var(--yellow); letter-spacing:.08em; }

.main-nav ul{ display:flex; gap:6px; }
.main-nav a{
  display:block;
  font-weight:700; font-size:15px;
  padding:10px 16px;
  border-radius:var(--radius);
  position:relative;
}
.main-nav a:hover{ color:var(--yellow); }
.main-nav a.active{ color:var(--black); background:var(--yellow); }

.nav-toggle{
  display:none;
  background:none; border:2px solid var(--white); color:var(--white);
  width:42px; height:42px; border-radius:var(--radius); cursor:pointer;
  font-size:18px;
}

@media (max-width:820px){
  .main-nav{
    position:fixed; inset:0 0 0 auto; width:78%; max-width:320px;
    background:var(--surface); height:100vh; padding:100px 28px 28px;
    transform:translateX(100%); transition:transform .35s ease;
    border-left:1px solid var(--line);
    z-index:60; overflow-y:auto;
  }
  html[dir="rtl"] .main-nav{ inset:0 auto 0 0; transform:translateX(-100%); }
  .main-nav.open{ transform:translateX(0); }
  .main-nav ul{ flex-direction:column; gap:4px; }
  .main-nav a{ padding:14px 16px; font-size:17px; }
  .nav-toggle{ display:block; }
}

/* ---------- ticker ---------- */
.ticker{
  background:var(--yellow); color:var(--black);
  overflow:hidden; white-space:nowrap;
  border-bottom:1px solid var(--black);
}
.ticker-track{
  display:inline-flex;
  animation:scroll-left 32s linear infinite;
  font-family:var(--font-display); font-weight:700; font-size:14px;
}
.ticker-track span{ padding:9px 28px; border-left:1px solid rgba(0,0,0,.2); }
@keyframes scroll-left{
  from{ transform:translateX(0); }
  to{ transform:translateX(-50%); }
}

/* ---------- hero ---------- */
.hero{
  padding:70px 0 90px;
  position:relative;
}
.hero-grid{
  display:grid; grid-template-columns:1.1fr .9fr; gap:50px; align-items:center;
}
@media (max-width:900px){ .hero-grid{ grid-template-columns:1fr; } }

.hero h1{
  font-family:var(--font-display); font-weight:900;
  font-size:clamp(38px,6vw,64px);
  line-height:1.05;
  margin-bottom:22px;
}
.hero h1 .hl{ color:var(--yellow); }
.hero p{ color:var(--muted); font-size:17px; max-width:52ch; margin-bottom:30px; }
.hero-actions{ display:flex; gap:14px; flex-wrap:wrap; }

.hero-card{
  position:relative;
  display:flex; align-items:center; justify-content:center;
  min-height:340px;
}
.hero-card .card-shape{
  width:230px; height:320px;
  background:linear-gradient(155deg,var(--yellow),#e8ac00);
  border-radius:10px;
  transform:rotate(-9deg);
  box-shadow:14px 18px 0 rgba(0,0,0,.55);
  position:relative;
  display:flex; align-items:center; justify-content:center;
}
.hero-card .card-shape::after{
  content:"عادلة";
  position:absolute; inset:auto;
  font-family:var(--font-display); font-weight:900;
  color:rgba(11,11,12,.18);
  font-size:15px;
  bottom:22px;
}
.hero-card .stamp{
  font-family:var(--font-display); font-weight:900;
  color:var(--black);
  font-size:22px;
  text-align:center;
  transform:rotate(4deg);
  line-height:1.3;
}
.hero-card .card-shape-red{
  position:absolute;
  width:150px; height:210px;
  background:var(--red);
  border-radius:8px;
  transform:rotate(11deg);
  z-index:-1;
  bottom:-30px; left:20px;
  opacity:.9;
}

/* ---------- cards: news / video / photo ---------- */
.grid{ display:grid; gap:26px; }
.grid-3{ grid-template-columns:repeat(3,1fr); }
.grid-2{ grid-template-columns:repeat(2,1fr); }
@media (max-width:900px){ .grid-3{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:640px){ .grid-3, .grid-2{ grid-template-columns:1fr; } }

.card{
  background:var(--surface);
  border:1px solid var(--line);
  display:flex; flex-direction:column;
  transition:transform .25s ease, border-color .25s ease;
}
.card:hover{ transform:translateY(-4px); border-color:var(--yellow); }

.card-media{
  height:170px;
  position:relative;
  display:flex; align-items:flex-end;
  padding:16px;
  background:
    linear-gradient(0deg, rgba(0,0,0,.65), rgba(0,0,0,.05)),
    repeating-linear-gradient(135deg, #262629 0 18px, #202023 18px 36px);
}
.card-media .tag{
  font-family:var(--font-display); font-weight:900; font-size:12px;
  background:var(--yellow); color:var(--black);
  padding:5px 10px; letter-spacing:.05em;
}
.card-media.red .tag{ background:var(--red); color:var(--white); }
.card-media .icon-mark{
  position:absolute; top:14px; left:14px;
  width:16px; height:22px; border-radius:2px;
  background:var(--yellow);
  transform:rotate(-10deg);
}
.card-media.red .icon-mark{ background:var(--red); }

.card-body{ padding:20px; display:flex; flex-direction:column; gap:10px; flex:1; }
.card-body .meta{ font-size:12px; color:var(--muted); font-weight:700; letter-spacing:.04em; }
.card-body h3{ font-family:var(--font-display); font-weight:800; font-size:19px; line-height:1.4; }
.card-body p{ color:var(--muted); font-size:14.5px; flex:1; }
.card-link{ font-weight:700; font-size:14px; color:var(--yellow); margin-top:4px; }

/* video play button */
.play-btn{
  width:44px; height:44px; border-radius:50%;
  background:var(--yellow);
  display:flex; align-items:center; justify-content:center;
  position:absolute; top:50%; right:50%; transform:translate(50%,-50%);
}
.play-btn::after{
  content:""; width:0; height:0;
  border-top:8px solid transparent; border-bottom:8px solid transparent;
  border-right:13px solid var(--black);
  margin-right:-3px;
}

/* ---------- match scoreboard ---------- */
.match-card{
  background:var(--surface); border:1px solid var(--line);
  padding:18px 20px;
  display:flex; flex-direction:column; gap:14px;
}
.match-card .round{
  font-family:var(--font-display); font-weight:800; font-size:12px;
  color:var(--yellow); letter-spacing:.06em;
  display:flex; justify-content:space-between;
}
.match-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.team{ display:flex; align-items:center; gap:10px; font-weight:700; font-size:15.5px; flex:1; }
.team .flag{
  width:30px; height:30px; border-radius:50%;
  background:var(--surface-2); border:1px solid var(--line);
  display:flex; align-items:center; justify-content:center;
  font-family:var(--font-display); font-weight:900; font-size:11px; color:var(--yellow);
  flex-shrink:0;
}
.score{
  font-family:var(--font-display); font-weight:900; font-size:20px;
  min-width:64px; text-align:center;
  background:var(--black); border:1px solid var(--line);
  padding:4px 0;
}
.score.win{ color:var(--yellow); border-color:var(--yellow-dim); }
.match-note{ font-size:12.5px; color:var(--muted); border-top:1px dashed var(--line); padding-top:10px; }
.status-live{ color:var(--red); font-weight:800; }

/* ---------- footer ---------- */
.site-footer{
  border-top:1px solid var(--line);
  padding:50px 0 30px;
  margin-top:40px;
}
.footer-grid{ display:flex; justify-content:space-between; gap:30px; flex-wrap:wrap; margin-bottom:30px; }
.footer-nav{ display:flex; gap:22px; flex-wrap:wrap; }
.footer-nav a{ font-weight:700; font-size:14px; color:var(--muted); }
.footer-nav a:hover{ color:var(--yellow); }
.footer-bottom{
  border-top:1px solid var(--line); padding-top:20px;
  font-size:12.5px; color:var(--muted);
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px;
}

/* ---------- page header (inner pages) ---------- */
.page-hero{
  padding:56px 0 40px;
  border-bottom:1px solid var(--line);
}
.page-hero h1{
  font-family:var(--font-display); font-weight:900;
  font-size:clamp(32px,5vw,48px);
}
.page-hero p{ color:var(--muted); margin-top:12px; max-width:60ch; }

/* filter chips */
.chips{ display:flex; gap:10px; flex-wrap:wrap; margin:28px 0 6px; }
.chip{
  font-size:13.5px; font-weight:700;
  padding:8px 16px; border:1px solid var(--line);
  color:var(--muted); cursor:pointer;
}
.chip.active, .chip:hover{ border-color:var(--yellow); color:var(--yellow); }

/* photo gallery */
.photo-tile{
  aspect-ratio:4/3;
  background:
    linear-gradient(0deg, rgba(0,0,0,.55), rgba(0,0,0,0)),
    repeating-linear-gradient(45deg, #232326 0 16px, #1c1c1f 16px 32px);
  position:relative; overflow:hidden;
  display:flex; align-items:flex-end; padding:14px;
  border:1px solid var(--line);
}
.photo-tile span{ font-weight:700; font-size:13.5px; }
.photo-tile .icon-mark{
  position:absolute; top:12px; left:12px;
  width:14px; height:19px; border-radius:2px; background:var(--yellow); transform:rotate(-10deg);
}

/* ---------- lang toggle ---------- */
.lang-toggle{
  width:42px; height:42px;
  border:2px solid var(--yellow); background:transparent; color:var(--yellow);
  font-family:var(--font-display); font-weight:900; font-size:13px;
  border-radius:var(--radius); cursor:pointer;
  margin-inline-start:10px;
}
.lang-toggle:hover{ background:var(--yellow); color:var(--black); }


/* ---------- live badge ---------- */
.live-badge{
  display:inline-flex; align-items:center; gap:6px;
  color:var(--red); font-weight:800; font-size:12px;
}
.live-badge::before{
  content:""; width:8px; height:8px; border-radius:50%; background:var(--red);
  animation:pulse 1.4s infinite;
}
@keyframes pulse{ 0%,100%{opacity:1;} 50%{opacity:.25;} }

.state-msg{ color:var(--muted); padding:30px 0; text-align:center; }

/* ---------- match detail ---------- */
.match-hero{
  background:var(--surface); border:1px solid var(--line);
  padding:30px; display:flex; flex-direction:column; gap:22px; margin-bottom:10px;
}
.match-hero .teams{ display:flex; align-items:center; justify-content:center; gap:30px; }
.match-hero .team-block{ display:flex; flex-direction:column; align-items:center; gap:10px; text-align:center; width:160px; }
.match-hero .flag-lg{
  width:64px; height:64px; border-radius:50%; background:var(--surface-2); border:1px solid var(--line);
  display:flex; align-items:center; justify-content:center;
  font-family:var(--font-display); font-weight:900; color:var(--yellow); font-size:15px;
}
.match-hero .team-name{ font-family:var(--font-display); font-weight:800; font-size:17px; }
.match-hero .score-big{ font-family:var(--font-display); font-weight:900; font-size:44px; }
.match-hero .vs{ font-family:var(--font-display); font-weight:900; color:var(--muted); font-size:20px; }

/* ---------- fan zone chat ---------- */
.fanzone{ background:var(--surface); border:1px solid var(--yellow-dim); margin-top:30px; }
.fanzone-head{ padding:18px 20px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; }
.fanzone-head h3{ font-family:var(--font-display); font-weight:900; color:var(--yellow); font-size:18px; letter-spacing:.03em; }
.fanzone-head p{ color:var(--muted); font-size:13px; }

.fanzone-messages{
  max-height:380px; overflow-y:auto; padding:18px 20px; display:flex; flex-direction:column; gap:12px;
}
.fz-msg{ display:flex; flex-direction:column; gap:4px; max-width:82%; }
.fz-msg .fz-name{ font-size:12px; font-weight:800; color:var(--yellow); }
.fz-msg .fz-bubble{ background:var(--surface-2); border:1px solid var(--line); padding:10px 14px; border-radius:4px; font-size:14.5px; }
.fz-msg .fz-time{ font-size:11px; color:var(--muted); }
.fz-msg img, .fz-msg video{ max-width:220px; border-radius:4px; margin-top:4px; }
.fz-msg audio{ margin-top:4px; width:220px; }

.fanzone-input{
  border-top:1px solid var(--line); padding:14px 20px; display:flex; flex-direction:column; gap:10px;
}
.fanzone-input input[type="text"], .fanzone-input textarea{
  width:100%; background:var(--black); border:1px solid var(--line); color:var(--white);
  padding:10px 14px; font-family:var(--font-body); font-size:14.5px; border-radius:3px;
}
.fz-row{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.fz-media-btn{
  border:1px solid var(--line); background:transparent; color:var(--muted);
  font-size:12.5px; font-weight:700; padding:8px 12px; border-radius:3px; cursor:pointer;
}
.fz-media-btn:hover{ border-color:var(--yellow); color:var(--yellow); }
.fz-media-btn.recording{ border-color:var(--red); color:var(--red); }
.fz-send-btn{
  margin-inline-start:auto;
  background:var(--yellow); color:var(--black); font-family:var(--font-display); font-weight:900;
  border:none; padding:10px 22px; border-radius:3px; cursor:pointer; font-size:14px;
}

/* ---------- reels ---------- */
.reels-wrap{
  max-width:420px; margin:0 auto;
  height:calc(100vh - 130px); overflow-y:scroll; scroll-snap-type:y mandatory;
  border-left:1px solid var(--line); border-right:1px solid var(--line);
}
.reel{
  height:calc(100vh - 130px); scroll-snap-align:start;
  position:relative; display:flex; align-items:flex-end;
  background:
    linear-gradient(0deg, rgba(0,0,0,.85), rgba(0,0,0,.1) 50%),
    repeating-linear-gradient(135deg,#232326 0 20px,#1b1b1e 20px 40px);
}
.reel video{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0; }
.reel-info{ position:relative; z-index:1; padding:24px; }
.reel-info .icon-mark{ width:16px; height:22px; border-radius:2px; background:var(--yellow); transform:rotate(-10deg); margin-bottom:10px; }
.reel-info h3{ font-family:var(--font-display); font-weight:800; font-size:18px; margin-bottom:6px; }
.reel-info p{ color:var(--muted); font-size:13px; }

/* ---------- social links ---------- */
.footer-social{
  display:flex; gap:12px; margin-bottom:22px; flex-wrap:wrap;
}
.social-btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 18px;
  border:1px solid var(--line);
  font-weight:700; font-size:13.5px;
  border-radius:3px;
  transition:border-color .2s ease, color .2s ease;
}
.social-btn svg{ width:16px; height:16px; flex-shrink:0; }
.social-btn:hover{ border-color:var(--yellow); color:var(--yellow); }

/* ---------- match stats row ---------- */
.stats-row{ margin-top:18px; border-top:1px solid var(--line); padding-top:16px; display:flex; flex-direction:column; gap:10px; }
.stat-row{ display:flex; align-items:center; justify-content:space-between; font-size:14px; }
.stat-row .stat-val{ font-family:var(--font-display); font-weight:900; width:34px; text-align:center; }
.stat-row .stat-label{ color:var(--muted); font-weight:700; }

/* ---------- comparison bars (match stats) ---------- */
.cmp-row{ margin-top:14px; }
.cmp-label{ display:flex; justify-content:space-between; font-size:13px; font-weight:700; margin-bottom:6px; }
.cmp-label span:first-child, .cmp-label span:last-child{ font-family:var(--font-display); font-weight:900; color:var(--yellow); width:40px; }
.cmp-label span:last-child{ text-align:left; }
.cmp-label span:nth-child(2){ color:var(--muted); }
.cmp-bar{ height:6px; display:flex; background:var(--black); border-radius:3px; overflow:hidden; }
.cmp-bar-home{ background:var(--yellow); }
.cmp-bar-away{ background:var(--red); opacity:.85; }

/* ---------- fan zone moderation (admin) ---------- */
.fz-admin-msg{ display:flex; justify-content:space-between; align-items:center; gap:10px; background:var(--black); border:1px solid var(--line); padding:10px 14px; font-size:13.5px; }
.fz-admin-msg .fz-admin-actions{ display:flex; gap:10px; flex-shrink:0; }
.fz-admin-msg .fz-admin-actions span{ cursor:pointer; font-weight:700; font-size:12.5px; }
.fz-admin-msg .del{ color:var(--red); }
.fz-admin-msg .ban{ color:var(--yellow); }

/* ---------- svg icon system (no emoji) ---------- */
.card-icon{ width:11px; height:14px; display:inline-block; vertical-align:-2px; margin-inline-end:6px; border-radius:1px; }
.card-icon.yellow{ color:var(--yellow); }
.card-icon.red{ color:var(--red); }

.flag, .flag-lg{ overflow:hidden; }
.flag.flag-img, .flag-lg.flag-img{ padding:0; background:var(--surface-2); }
.flag.flag-img img, .flag-lg.flag-img img{ width:100%; height:100%; object-fit:cover; border-radius:50%; }

.fz-media-btn{ display:inline-flex; align-items:center; gap:6px; }
.fz-media-btn svg{ width:15px; height:15px; flex-shrink:0; }

/* ---------- polish: skeleton loading + entrance animation ---------- */
@keyframes fadeInUp{ from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:translateY(0); } }
.card, .match-card{ animation:fadeInUp .4s ease both; }

@keyframes shimmer{ 0%{ background-position:-300px 0; } 100%{ background-position:300px 0; } }
.skeleton{
  height:140px; border-radius:2px;
  background:linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 37%, var(--surface) 63%);
  background-size:600px 100%;
  animation:shimmer 1.4s infinite linear;
  border:1px solid var(--line);
}
.skeleton-row{ display:grid; gap:20px; grid-template-columns:repeat(3,1fr); }
@media (max-width:640px){ .skeleton-row{ grid-template-columns:1fr; } }

.nav-toggle svg{ width:20px; height:20px; }

/* ---------- lang select dropdown ---------- */
.lang-select{
  background:transparent; color:var(--yellow);
  border:2px solid var(--yellow); border-radius:var(--radius);
  font-family:var(--font-display); font-weight:800; font-size:12.5px;
  padding:8px 10px; margin-inline-start:10px; cursor:pointer;
}
.lang-select:hover{ background:var(--yellow); color:var(--black); }
.lang-select option{ background:var(--surface); color:var(--white); }

#account-link{ white-space:nowrap; }
