/* ═══════════════════════════════════════════════════════════════
   Liga Al-Ahyaa — FIFA / SofaScore UI Components  v1.0
   ═══════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════
   🎮  FIFA ULTIMATE TEAM — PLAYER CARD
   ══════════════════════════════════════════════════════════ */
.fifa-card {
  --c-gold1: #f5c518;
  --c-gold2: #d4a017;
  --c-gold3: #8b6500;
  --c-bg1:   #1a130a;
  --c-bg2:   #0b0804;
  --w: 176px;

  position: relative;
  width: var(--w);
  aspect-ratio: 148/200;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .28s cubic-bezier(.34,1.56,.64,1), box-shadow .28s;
  user-select: none;
  flex-shrink: 0;

  /* Layered background */
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(245,197,24,.22) 0%, transparent 70%),
    linear-gradient(165deg, rgba(245,197,24,.10) 0%, rgba(180,130,0,.08) 45%, transparent 100%),
    linear-gradient(180deg, var(--c-bg1) 0%, var(--c-bg2) 100%);

  /* Border */
  box-shadow:
    0 0 0 1.5px rgba(245,197,24,.30),
    0 0 0 3px rgba(0,0,0,.9),
    0 12px 40px rgba(0,0,0,.75),
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -1px 0 rgba(0,0,0,.5);
}

.fifa-card:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow:
    0 0 0 1.5px rgba(245,197,24,.55),
    0 0 0 3px rgba(0,0,0,.9),
    0 24px 60px rgba(0,0,0,.85),
    0 0 50px rgba(245,197,24,.18);
}

/* Inner shimmer overlay */
.fifa-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    135deg,
    transparent 20%,
    rgba(255,255,255,.04) 45%,
    rgba(255,255,255,.08) 50%,
    rgba(255,255,255,.04) 55%,
    transparent 80%
  );
  pointer-events: none;
  z-index: 5;
}

/* Top section: rating + position */
.fifa-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 12px 0;
  position: relative; z-index: 2;
}
.fifa-rating {
  font-family: 'Oswald', 'Rajdhani', sans-serif;
  font-size: 30px; font-weight: 700; line-height: 1;
  color: var(--c-gold1);
  text-shadow: 0 0 16px rgba(245,197,24,.6), 0 2px 4px rgba(0,0,0,.8);
}
.fifa-left-labels {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
}
.fifa-pos {
  font-family: 'Oswald', sans-serif;
  font-size: 12px; font-weight: 600; line-height: 1;
  color: var(--c-gold2);
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
}
.fifa-nation {
  font-size: 13px; line-height: 1; margin-top: 2px;
}
.fifa-club-img {
  width: 22px; height: 22px; object-fit: contain; opacity: .85;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.6));
}

/* Photo area */
.fifa-photo-wrap {
  position: relative; z-index: 2;
  display: flex; justify-content: center;
  margin: -4px 0 0;
}
.fifa-photo {
  width: 94px; height: 94px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255,255,255,.06);
  border: 2px solid rgba(245,197,24,.3);
  box-shadow: 0 4px 20px rgba(0,0,0,.7), 0 0 24px rgba(245,197,24,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 38px;
  overflow: hidden;
}
.fifa-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* Name */
.fifa-name {
  font-family: 'Oswald', 'Tajawal', sans-serif;
  font-size: 15px; font-weight: 600;
  color: #fff;
  text-align: center;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 8px 8px 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0,0,0,.8);
  position: relative; z-index: 2;
}

/* Gold divider */
.fifa-divider {
  height: 1px;
  margin: 6px 18px;
  background: linear-gradient(90deg, transparent, rgba(245,197,24,.45), transparent);
  position: relative; z-index: 2;
}

/* Stats grid: 3 left + divider + 3 right */
.fifa-stats {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  padding: 0 10px 10px;
  position: relative; z-index: 2;
  gap: 0;
}
.fifa-stats-divider {
  background: rgba(245,197,24,.18);
  margin: 2px 0;
}
.fifa-stats-col {
  display: flex; flex-direction: column; gap: 2px;
}
.fifa-stat {
  display: flex; align-items: baseline; justify-content: center; gap: 4px;
  padding: 1px 4px;
}
.fifa-stat-n {
  font-family: 'Oswald', sans-serif;
  font-size: 16px; font-weight: 700; line-height: 1;
  color: var(--c-gold1);
  text-shadow: 0 0 8px rgba(245,197,24,.4);
  min-width: 24px; text-align: right;
}
.fifa-stat-l {
  font-family: 'Oswald', sans-serif;
  font-size: 8px; font-weight: 600; line-height: 1;
  color: rgba(255,255,255,.55);
  text-transform: uppercase; letter-spacing: .5px;
}

/* ── Variants ── */
.fifa-card.silver {
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(210,210,210,.18) 0%, transparent 70%),
    linear-gradient(165deg, rgba(200,200,200,.08) 0%, rgba(120,120,120,.06) 45%, transparent 100%),
    linear-gradient(180deg, #121212 0%, #060606 100%);
  box-shadow: 0 0 0 1.5px rgba(200,200,200,.25), 0 0 0 3px rgba(0,0,0,.9), 0 12px 40px rgba(0,0,0,.7);
}
.fifa-card.silver .fifa-rating,
.fifa-card.silver .fifa-stat-n { color: #c8c8c8; text-shadow: none; }
.fifa-card.silver .fifa-pos { color: #a0a0a0; }

.fifa-card.bronze {
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(180,90,30,.2) 0%, transparent 70%),
    linear-gradient(165deg, rgba(160,80,20,.1) 0%, rgba(90,40,5,.08) 45%, transparent 100%),
    linear-gradient(180deg, #130d06 0%, #070400 100%);
  box-shadow: 0 0 0 1.5px rgba(180,100,40,.3), 0 0 0 3px rgba(0,0,0,.9), 0 12px 40px rgba(0,0,0,.7);
}
.fifa-card.bronze .fifa-rating,
.fifa-card.bronze .fifa-stat-n { color: #cd7f32; text-shadow: none; }
.fifa-card.bronze .fifa-pos { color: #a06020; }

.fifa-card.totw {
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(0,200,80,.15) 0%, transparent 70%),
    linear-gradient(165deg, rgba(0,180,70,.08) 0%, rgba(0,100,30,.06) 45%, transparent 100%),
    linear-gradient(180deg, #060f08 0%, #020603 100%);
  box-shadow: 0 0 0 1.5px rgba(46,204,113,.3), 0 0 0 3px rgba(0,0,0,.9), 0 12px 40px rgba(0,0,0,.75), 0 0 30px rgba(46,204,113,.12);
}
.fifa-card.totw .fifa-rating,
.fifa-card.totw .fifa-stat-n { color: #2ecc71; text-shadow: 0 0 12px rgba(46,204,113,.5); }
.fifa-card.totw .fifa-pos { color: #27ae60; }

/* Responsive */
@media (max-width: 400px) {
  .fifa-card { --w: 148px; }
  .fifa-rating { font-size: 26px; }
  .fifa-photo  { width: 80px; height: 80px; }
}

/* ═══════════════════════════════════════════════════════
   Horizontal scroll row of cards
   ═══════════════════════════════════════════════════════ */
.fifa-cards-row {
  display: flex; gap: 14px; overflow-x: auto;
  padding: 14px 4px 20px;
  scrollbar-width: none;
}
.fifa-cards-row::-webkit-scrollbar { display: none; }


/* ══════════════════════════════════════════════════════════
   ⚽  MATCH LIST — SofaScore Style
   ══════════════════════════════════════════════════════════ */
.sf-match-group { margin-bottom: 8px; }

.sf-date-header {
  font-size: 10px; font-weight: 800;
  color: var(--text-muted, #8b949e);
  padding: 8px 14px 5px;
  letter-spacing: .8px; text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.sf-match-row {
  display: grid;
  grid-template-columns: 1fr 68px 1fr;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  cursor: pointer;
  transition: background .12s;
  text-decoration: none; color: inherit;
  gap: 8px;
}
.sf-match-row:hover { background: rgba(255,255,255,.04); }
.sf-match-row:active { background: rgba(255,255,255,.07); }

/* Team side */
.sf-team {
  display: flex; align-items: center; gap: 9px; min-width: 0;
}
.sf-team.right { flex-direction: row-reverse; }

.sf-t-logo {
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: 7px; overflow: hidden;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 900; color: rgba(255,255,255,.6);
}
.sf-t-logo img { width: 100%; height: 100%; object-fit: cover; }

.sf-t-name {
  font-size: 13px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #e6edf3;
}
.sf-t-name.dim { color: rgba(255,255,255,.38); }

/* Center column */
.sf-match-mid {
  display: flex; flex-direction: column;
  align-items: center; gap: 3px;
}
.sf-score-txt {
  font-family: 'Oswald', monospace;
  font-size: 20px; font-weight: 700; letter-spacing: 3px;
  color: #fff; line-height: 1;
}
.sf-badge {
  font-size: 8px; font-weight: 900;
  border-radius: 4px; padding: 2px 6px;
  letter-spacing: .5px; line-height: 1.4;
  text-transform: uppercase;
}
.sf-badge-live    { background: rgba(231,76,60,.15); color: #e74c3c; border: 1px solid rgba(231,76,60,.28); animation: sf-blink 1.4s ease-in-out infinite; }
.sf-badge-ft      { background: transparent; color: rgba(255,255,255,.35); border: 1px solid rgba(255,255,255,.1); }
.sf-badge-sched   { background: transparent; color: rgba(88,166,255,.8); border: 1px solid rgba(88,166,255,.2); }
.sf-badge-paused  { background: rgba(52,152,219,.1); color: #3498db; border: 1px solid rgba(52,152,219,.2); }
.sf-live-min      { font-family: 'Oswald', monospace; font-size: 10px; font-weight: 800; color: #e74c3c; }

@keyframes sf-blink { 0%,100%{opacity:1} 50%{opacity:.45} }

/* Time label when not started */
.sf-time-lbl {
  font-family: 'Oswald', monospace;
  font-size: 14px; font-weight: 700;
  color: rgba(255,255,255,.55); letter-spacing: 1px;
}


/* ══════════════════════════════════════════════════════════
   🏟️  MATCH HEADER (Details Page)
   ══════════════════════════════════════════════════════════ */
.mh-card {
  background: linear-gradient(
    160deg,
    rgba(10,30,15,.97) 0%,
    rgba(4,12,6,.97) 100%
  );
  border: 1px solid rgba(63,185,80,.14);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 4px 32px rgba(0,0,0,.5);
}

.mh-league-strip {
  padding: 7px 16px;
  font-size: 10px; font-weight: 800;
  color: rgba(255,255,255,.45); letter-spacing: .8px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; gap: 6px;
  text-transform: uppercase;
}
.mh-league-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent,#3fb950); }

.mh-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 10px;
  padding: 22px 16px 16px;
}

.mh-team-block {
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
}
.mh-team-crest {
  width: 68px; height: 68px;
  border-radius: 14px; overflow: hidden;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 34px;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
}
.mh-team-crest img { width: 100%; height: 100%; object-fit: cover; }
.mh-team-label {
  font-size: 12px; font-weight: 900; color: #fff;
  text-align: center; max-width: 100px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.mh-score-block { text-align: center; }
.mh-score-nums {
  font-family: 'Oswald', 'Rajdhani', sans-serif;
  font-size: 52px; font-weight: 700; line-height: 1;
  color: #fff; letter-spacing: 6px;
}
.mh-status-pill {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px; font-weight: 800;
  border-radius: 20px; padding: 4px 12px;
  letter-spacing: .5px;
}
.mh-status-pill.live   { background:rgba(231,76,60,.15); color:#e74c3c; border:1px solid rgba(231,76,60,.3); animation:sf-blink 1.4s infinite; }
.mh-status-pill.ft     { background:rgba(63,185,80,.1);  color:#3fb950; border:1px solid rgba(63,185,80,.25); }
.mh-status-pill.sched  { background:rgba(88,166,255,.1); color:#58a6ff; border:1px solid rgba(88,166,255,.25); }
.mh-status-pill.paused { background:rgba(52,152,219,.1); color:#3498db; border:1px solid rgba(52,152,219,.25); }
.mh-live-clock {
  font-family: 'Oswald', monospace;
  font-size: 13px; font-weight: 700;
  color: #e74c3c; margin-top: 2px;
}

.mh-info-strip {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 14px; padding: 8px 16px 14px;
  border-top: 1px solid rgba(255,255,255,.05);
}
.mh-info-item {
  font-size: 11px; color: rgba(255,255,255,.38);
  display: flex; align-items: center; gap: 4px;
}
.mh-info-item b { color: rgba(255,255,255,.6); }

/* Responsive */
@media (max-width: 380px) {
  .mh-score-nums { font-size: 40px; }
  .mh-team-crest { width: 54px; height: 54px; font-size: 26px; }
}


/* ══════════════════════════════════════════════════════════
   📊  MATCH STATS BAR
   ══════════════════════════════════════════════════════════ */
.sf-stat-row { margin-bottom: 12px; }
.sf-stat-labels {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 5px;
}
.sf-stat-val { font-size: 13px; font-weight: 800; color: #fff; }
.sf-stat-name {
  font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,.45); text-transform: uppercase; letter-spacing: .6px;
}
.sf-stat-track {
  height: 4px; background: rgba(255,255,255,.07);
  border-radius: 2px; display: flex; overflow: hidden;
}
.sf-stat-home {
  height: 100%; background: var(--accent,#3fb950);
  border-radius: 2px 0 0 2px;
  transition: width .9s cubic-bezier(.4,0,.2,1);
}
.sf-stat-away {
  height: 100%; background: #ef4444;
  border-radius: 0 2px 2px 0;
  transition: width .9s cubic-bezier(.4,0,.2,1);
  margin-right: auto;
}


/* ══════════════════════════════════════════════════════════
   🗂️  DRAW PAGE — Animated
   ══════════════════════════════════════════════════════════ */
.draw-group-card {
  background: var(--bg-surface, #161b22);
  border: 1px solid var(--border, #30363d);
  border-radius: 14px; overflow: hidden;
  opacity: 0; transform: translateY(18px);
  transition: opacity .45s ease, transform .45s ease;
}
.draw-group-card.show { opacity: 1; transform: translateY(0); }

.draw-group-hdr {
  padding: 10px 14px;
  background: linear-gradient(90deg, rgba(63,185,80,.12), transparent);
  border-bottom: 1px solid var(--border, #30363d);
  font-weight: 900; font-size: 14px; color: var(--accent, #3fb950);
  display: flex; align-items: center; gap: 6px;
}

.draw-team-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  opacity: 0; transform: translateX(-8px);
  transition: opacity .3s, transform .3s;
}
.draw-team-row.show { opacity: 1; transform: translateX(0); }
.draw-team-row:last-child { border-bottom: none; }

.draw-team-logo {
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--bg-elevated, #1e2530);
  border: 1px solid var(--border, #30363d);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 900; color: rgba(255,255,255,.5);
  flex-shrink: 0; overflow: hidden;
}
.draw-team-logo img { width: 100%; height: 100%; object-fit: cover; }
.draw-team-name { font-size: 13px; font-weight: 700; }


/* ══════════════════════════════════════════════════════════
   🎲  DRAW REVEAL OVERLAY
   ══════════════════════════════════════════════════════════ */
.draw-overlay {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.9); backdrop-filter: blur(10px);
  align-items: center; justify-content: center;
  flex-direction: column; gap: 20px;
}
.draw-overlay.active { display: flex; }

.draw-reveal {
  background: linear-gradient(145deg, #1a6b3a, #0b3a1d, #081d0f);
  border: 2px solid rgba(63,185,80,.4);
  border-radius: 22px; padding: 32px 44px;
  text-align: center; min-width: 280px;
  box-shadow: 0 0 60px rgba(63,185,80,.2), 0 24px 80px rgba(0,0,0,.8);
  animation: revealIn .55s cubic-bezier(.34,1.56,.64,1);
}
@keyframes revealIn {
  from { transform: scale(.4) rotateY(90deg); opacity: 0; }
  to   { transform: scale(1) rotateY(0);      opacity: 1; }
}

.draw-reveal-team {
  font-family: 'Oswald', 'Tajawal', sans-serif;
  font-size: 28px; font-weight: 700; color: #fff;
  margin: 14px 0 8px; letter-spacing: 1px;
}
.draw-reveal-arrow { font-size: 28px; color: var(--accent, #3fb950); }
.draw-reveal-group {
  font-family: 'Oswald', sans-serif;
  font-size: 36px; font-weight: 700; color: var(--accent, #3fb950);
  text-shadow: 0 0 20px rgba(63,185,80,.5);
}
.draw-reveal-prog { font-size: 11px; color: rgba(255,255,255,.35); margin-top: 10px; }

.draw-sound-wave {
  display: flex; gap: 4px; align-items: center; justify-content: center;
  height: 22px; margin-bottom: 6px;
}
.draw-sound-bar {
  width: 3px; border-radius: 2px; background: var(--accent, #3fb950);
  animation: sw .6s ease-in-out infinite alternate;
}
.draw-sound-bar:nth-child(2) { animation-delay:.12s }
.draw-sound-bar:nth-child(3) { animation-delay:.24s }
.draw-sound-bar:nth-child(4) { animation-delay:.12s }
.draw-sound-bar:nth-child(5) { animation-delay:.0s  }
@keyframes sw { from{height:3px} to{height:18px} }
