* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Tajawal', sans-serif;
}

:root {
  --bg-main: #0b0f19;
  --bg-card: #151c2c;
  --bg-card-hover: #1e293b;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-yellow: #f59e0b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.08);
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  direction: rtl;
  min-height: 100vh;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Navbar */
.navbar {
  background: #111827;
  border-bottom: 1px solid var(--border-color);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  color: var(--accent-green);
}

.logo-accent {
  color: var(--accent-green);
}

.date-badge {
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* Main Layout */
.main-content {
  padding: 25px 15px;
}

/* Leagues Bar */
.leagues-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 25px;
}

.league-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 500;
  font-size: 0.9rem;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.league-btn:hover, .league-btn.active {
  background: var(--accent-green);
  color: #000;
  border-color: var(--accent-green);
  font-weight: 700;
}

/* Stats Overview */
.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 18px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-card.highlight {
  border-color: rgba(239, 68, 68, 0.4);
  background: radial-gradient(circle at top right, rgba(239, 68, 68, 0.1), var(--bg-card));
}

.stat-title {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
}

.live-dot {
  color: var(--accent-red);
  font-size: 0.6rem;
  vertical-align: middle;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
  100% { opacity: 1; }
}

/* Matches List */
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title h2 {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.refresh-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: 0.3s;
}

.refresh-btn:hover {
  color: var(--text-main);
  border-color: var(--accent-green);
}

.matches-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Match Card */
.match-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  transition: 0.3s;
}

.match-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.team {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team.home {
  justify-content: flex-start;
}

.team.away {
  justify-content: flex-end;
  flex-direction: row-reverse;
}

.team-flag {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #2a3447;
}

.team-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.match-status-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px;
  min-width: 140px;
}

.score-badge {
  background: #0b0f19;
  padding: 6px 16px;
  border-radius: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 2px;
  border: 1px solid var(--border-color);
  color: var(--accent-green);
}

.score-badge.live {
  color: var(--accent-red);
  border-color: rgba(239, 68, 68, 0.3);
}

.status-text {
  font-size: 0.75rem;
  margin-top: 6px;
  color: var(--text-muted);
}

.status-text.live {
  color: var(--accent-red);
  font-weight: 700;
}

.league-tag {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 5px;
  color: var(--text-muted);
}

/* Footer */
.footer {
  text-align: center;
  padding: 30px 0;
  margin-top: 40px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .match-card {
    grid-template-columns: 1fr;
    gap: 12px;
    text-align: center;
  }
  .team.home, .team.away {
    justify-content: center;
    flex-direction: row;
  }
  .match-status-box {
    order: -1;
  }
}
