JSFiddle - React, Tailwind, and code Playground

by Boban Stojanovski

HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>FlashScore Results</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 20px;
            background-color: #121212;
            color: white;
        }
        .results-container {
            max-width: 800px;
            margin: auto;
            background: #1e1e1e;
            border-radius: 8px;
            padding: 15px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
        }
        .match-group {
            margin-bottom: 15px;
        }
        .match-group-header {
            background: #2a2a2a;
            padding: 10px;
            font-weight: bold;
            border-radius: 5px 5px 0 0;
        }
        .match {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 10px;
            border-bottom: 1px solid #333;
        }
        .match:last-child {
            border-bottom: none;
        }
        .team {
            font-size: 16px;
            font-weight: bold;
            text-align: center;
            margin: 5px 0;
        }
        .score {
            font-size: 18px;
            font-weight: bold;
            color: #ff4c4c;
            margin: 5px 0;
        }
    </style>
</head>
<body>
    <div class="results-container">
        <div class="match-group">
            <div class="match-group-header">USA: NBA</div>
            <div class="match">
                <div class="team">Detroit Pistons</div>
                <div class="score">125 - 129</div>
                <div class="team">Washington Wizards</div>
            </div>
            <div class="match">
                <div class="team">Milwaukee Bucks</div>
                <div class="score">126 - 106</div>
                <div class="team">Los Angeles Lakers</div>
            </div>
  ...

CSS

/* Main container for the scores grid */
.scores-container {
  max-width: 1200px;
  margin: 0 auto;
  font-family: 'Arial', sans-serif;
}

/* League header styles */
.league-header {
  background-color: #15396a;
  color: white;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  margin-bottom: 1px;
}

.league-flag {
  width: 20px;
  height: 14px;
  margin-right: 8px;
}

.league-name {
  font-weight: bold;
  font-size: 14px;
  flex-grow: 1;
}

/* Match row styles */
.match-row {
  display: grid;
  grid-template-columns: 32px 1fr 60px 1fr 32px;
  background-color: #f8f8f8;
  border-bottom: 1px solid #e8e8e8;
  padding: 8px 0;
  font-size: 13px;
  align-items: center;
}

.match-row:hover {
  background-color: #e9f1ff;
}

.match-time {
  grid-column: 1;
  color: #666;
  font-weight: bold;
  text-align: center;
}

.home-team {
  grid-column: 2;
  text-align: right;
  padding-right: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-score {
  grid-column: 3;
  display: flex;
  justify-content: center;
  font-weight: bold;
  background-color: #ebebeb;
  border-radius: 3px;
  padding: 3px 0;
}

.score-home, .score-away {
  width: 24px;
  text-align: center;
}

.score-separator {
  color: #aaa;
}

.away-team {
  grid-column: 4;
  padding-left: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-stats {
  grid-column: 5;
  display: flex;
  justify-content: center;
  color: #888;
}

/* Status indicators */
.match-finished {
  background-color: #f1f1f1;
}

.match-live {
  background-color: #fff8f8;
}

.match-live .match-time {
  color: #d20000;
}

.match-live .match-score {
  background-color: #ffecec;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .match-row {
    grid-template-columns: 32px 1fr 50px 1fr;
  }
  
  .match-stats {
    display: none;
  }
}