@import url('https://fonts.googleapis.com/css2?family=Finlandica+Headline:ital,wght@0,100..900;1,100..900&display=swap');

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 32px;
  background: #111827;
  color: #f9fafb;
  font-family: "Finlandica Headline", system-ui, sans-serif;
}

/* =========================================================
   TYPOGRAPHY
========================================================= */

h1 {
  margin: 0 0 24px 0;
}

a {
  color: white;
  text-decoration: none;
}

/* =========================================================
   NAVBAR
========================================================= */

.navbar {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.nav-link {
  background: #1f2937;
  color: #f9fafb;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 10px;
  transition: 0.2s ease;
  font-weight: 600;
}

.nav-link:hover {
  background: #374151;
}

/* =========================================================
   STATUS / INFO
========================================================= */

#updated {
  color: #9ca3af;
  margin-bottom: 16px;
}

#loading {
  color: #9ca3af;
  margin-bottom: 16px;
}

.error {
  color: #fca5a5;
}

/* =========================================================
   REFRESH BAR
========================================================= */

.refresh-container {
  margin-bottom: 24px;
}

.refresh-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
  color: #d1d5db;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: #374151;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 100%;
  background: #10b981;
  transition: width 1s linear;
}

/* =========================================================
   TABLE
========================================================= */

table {
  width: 100%;
  border-collapse: collapse;
  background: #1f2937;
  border-radius: 12px;
  overflow: hidden;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid #374151;
  text-align: left;
  vertical-align: top;
}

th {
  background: #374151;
  font-weight: 700;
}

tr:hover {
  background: #263244;
}

.rank {
  font-weight: 800;
}

.rank-up {
  color: #10b981;
  font-weight: 700;
}

.rank-down {
  color: #ef4444;
  font-weight: 700;
}

.score {
  font-weight: 700;
}

.members {
  color: #d1d5db;
}

/* =========================================================
   TEAM STATUS
========================================================= */

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

.live-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.live-badge.live {
  background: #10b981;
  color: #000;
}

.live-badge.offline {
  background: #374151;
  color: #d1d5db;
}

/* =========================================================
   CONTROLS
========================================================= */

.controls {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

select {
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  background: #1f2937;
  color: white;
  font-size: 14px;
}

/* =========================================================
   CHART
========================================================= */

.chart-container {
  background: #1f2937;
  border-radius: 16px;
  padding: 24px;
  height: 700px;
}

/* =========================================================
   STREAMS GRID
========================================================= */

.grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fill, minmax(240px, 1fr));

  gap: 16px;
}

.card {
  background: #1f2937;
  border-radius: 14px;
  padding: 18px;
  border: 2px solid transparent;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
}

.card.live {
  border-color: #10b981;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  margin-top: 8px;
  font-weight: 700;
}

.badge.online {
  background: #10b981;
  color: black;
}

.badge.offline {
  background: #374151;
  color: #d1d5db;
}

.footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #374151;
  color: #9ca3af;
  font-size: 14px;
}

.footer a {
  color: #f9fafb;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}
