*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] { display: none !important; }

body {
  background: #111;
  color: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 300;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

main {
  width: 100%;
  max-width: 640px;
}

.toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
}

.toolbar-btn {
  background: none;
  border: 1px solid #333;
  border-radius: 4px;
  color: #555;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.6rem;
  text-transform: uppercase;
  transition: color 0.15s, border-color 0.15s;
}

.toolbar-btn:hover {
  color: #999;
  border-color: #555;
}

.toolbar-btn.active {
  border-color: #555;
  color: #fff;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 520px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

/* Cards */

.card {
  background: #181818;
  border-radius: 8px;
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-label {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #555;
}

/* Clock */

.clock-time {
  font-size: 2.5rem;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  margin-top: 0.25rem;
}

/* Date */

.date-weekday {
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: #fff;
  margin-top: 0.25rem;
  text-transform: capitalize;
}

.date-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-top: 0.1rem;
}

.date-full {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: #999;
}

.date-namedays {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: #555;
}

/* Weather */

.weather-status {
  font-size: 0.85rem;
  color: #555;
  margin-top: 0.25rem;
}

.weather-content {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.weather-main {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.weather-temp {
  font-size: 2rem;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.weather-label {
  font-size: 0.9rem;
  color: #999;
  letter-spacing: 0.04em;
}

.weather-details {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #666;
  letter-spacing: 0.04em;
}

.weather-detail-label {
  color: #555;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.weather-detail-unit {
  color: #555;
}

/* Sun */

.sun-row {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.25rem;
}

.sun-item {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.sun-icon {
  font-size: 0.75rem;
  color: #555;
}

.sun-time {
  font-size: 1.6rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.sun-daylight {
  font-size: 0.8rem;
  color: #555;
  letter-spacing: 0.04em;
  margin-top: 0.1rem;
}

.sun-bar-track {
  position: relative;
  height: 2px;
  background: #222;
  border-radius: 1px;
  margin-top: 0.9rem;
}

.sun-bar-fill {
  height: 100%;
  background: #444;
  border-radius: 1px;
  width: 0%;
}

.sun-bar-dot {
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  left: 0%;
}

/* Football */

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.league-toggle {
  display: flex;
  gap: 0.25rem;
}

.league-btn {
  background: none;
  border: 1px solid #333;
  border-radius: 4px;
  color: #555;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.45rem;
  text-transform: uppercase;
  transition: color 0.15s, border-color 0.15s;
}

.league-btn:hover {
  color: #999;
  border-color: #555;
}

.league-btn.active {
  border-color: #555;
  color: #fff;
}

#card-football {
  grid-column: span 2;
}

@media (max-width: 520px) {
  #card-football {
    grid-column: span 1;
  }
}

.football-status {
  font-size: 0.85rem;
  color: #555;
  margin-top: 0.25rem;
}

.pl-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.pl-table th {
  color: #444;
  font-weight: 400;
  text-align: left;
  padding: 0 0.4rem 0.4rem 0;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pl-table td {
  padding: 0.3rem 0.4rem 0.3rem 0;
  color: #999;
  border-top: 1px solid #1f1f1f;
}

.pl-table tr.arsenal td {
  color: #fff;
}

.pl-pos {
  width: 1.5rem;
  color: #555 !important;
}

.pl-team {
  width: 100%;
}

.pl-stat {
  text-align: right !important;
  white-space: nowrap;
  min-width: 1.6rem;
}

.pl-pts {
  color: #fff !important;
  font-weight: 400;
}

/* Arsenal next match card */

#card-arsenal-next {
  grid-column: span 2;
}

@media (max-width: 520px) {
  #card-arsenal-next {
    grid-column: span 1;
  }
}

.arsenal-next-status {
  font-size: 0.85rem;
  color: #555;
  margin-top: 0.25rem;
}

.arsenal-next-comp {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #555;
  margin-top: 0.25rem;
}

.arsenal-next-teams {
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  color: #fff;
  margin-top: 0.2rem;
}

.arsenal-next-info {
  font-size: 0.8rem;
  color: #666;
  letter-spacing: 0.03em;
  margin-top: 0.1rem;
  text-transform: capitalize;
}

/* CL knockout view */

.cl-stage-label {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #444;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.cl-date-group {
  margin-bottom: 0.75rem;
}

.cl-date {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #444;
  margin-bottom: 0.3rem;
}

.cl-match {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.25rem 0;
  border-top: 1px solid #1f1f1f;
  font-size: 0.85rem;
  color: #666;
}

.cl-match.arsenal {
  color: #fff;
}

.cl-time {
  font-variant-numeric: tabular-nums;
  color: #444;
  min-width: 2.5rem;
  flex-shrink: 0;
}

.cl-match.arsenal .cl-time {
  color: #777;
}

.cl-teams {
  flex: 1;
}

.cl-vs {
  color: #333;
  font-size: 0.75rem;
}

.cl-leg1 {
  margin-left: auto;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: #444;
  flex-shrink: 0;
}

.cl-empty {
  font-size: 0.85rem;
  color: #555;
  margin-top: 0.5rem;
}
