/* ======================================
   src/embedded/public/sports.css
   تنسيقات قسم المباريات (مستقل تماماً)
   ====================================== */

/* ===============================
   قسم المباريات الرئيسي
   =============================== */
.sports-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  padding-bottom: 40px;
}

/* ===============================
   فلتر البطولات (Leagues Filter)
   =============================== */
.leagues-filter {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 5px 0;
  -webkit-overflow-scrolling: touch;
}

.leagues-filter::-webkit-scrollbar {
  display: none;
}

.league-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.league-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.league-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

/* ===============================
   شبكة المباريات (Matches Grid)
   =============================== */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* ===============================
   بطاقة المباراة (Match Card)
   =============================== */
.match-card {
  background: #2b2d31;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.match-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
}

/* خلفية متدرجة للبطاقة */
.match-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #a1a9ff);
  opacity: 0.5;
}

.match-card.is-live::before {
  background: linear-gradient(90deg, #ed4245, #ff7b7d);
  opacity: 1;
}

/* هيدر البطاقة (وقت / حالة / ملعب) */
.match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.match-status {
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.match-status.live {
  background: rgba(237, 66, 69, 0.1);
  color: #ed4245;
  animation: pulse-live 2s infinite;
  display: flex;
  align-items: center;
  gap: 6px;
}

.match-status.live::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #ed4245;
  border-radius: 50%;
}

@keyframes pulse-live {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* فرق المباراة (الوسط) */
.match-teams {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.match-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 40%;
}

.team-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  background: white;
  border-radius: 50%;
  padding: 5px;
}

.team-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* النتيجة والتفاصيل (المركز) */
.match-score-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 20%;
}

.match-score {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 2px;
  font-family: monospace;
}

.match-vs {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

/* زر المشاهدة (الأسفل) */
.match-footer {
  margin-top: 5px;
}

.watch-match-btn {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: var(--primary);
  color: white;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.watch-match-btn:hover {
  background: var(--primary-hover);
}

.watch-match-btn:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  cursor: not-allowed;
}

.watch-match-btn.live-btn {
  background: #ed4245;
}

.watch-match-btn.live-btn:hover {
  background: #d43b3e;
}
