body {
  font-family: system-ui, sans-serif;
  background: #f9f9f9;
  margin: 0;
  padding: 0;
  color: #222;
}

header {
  background: #222;
  color: #fff;
  padding: 1rem 2rem;
    display: grid;
    grid-template-columns: 30% 10% 20% 10% 30%;
  align-items: center;
  justify-content: space-between;
  text-align: center;
	z-index: 9999;
	position:relative;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
}

header .controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

main {
	display: grid;
	grid-template-columns: 65% 35%;
}

.game-round {
  margin-bottom: 2rem;
}

.game-round h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  border-bottom: 2px solid #ddd;
  padding-bottom: 0.25rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.game-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none!important;
  color: black;
}

.game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.game-card .logos-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.game-card img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.score-inline {
  font-weight: bold;
  font-size: 1.1rem;
}

.team-codes {
  margin-top: 0.25rem;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
}

.game-info {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #666;
}

.no-games {
  text-align: center;
  padding: 2rem;
  color: #999;
}


.filter-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  gap: 10px;
  font-size: 14px;
  color: #000;
}

/* Toggle switch */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.switch input { display: none; }

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  border-radius: 20px;
  top: 0; left: 0; right: 0; bottom: 0;
  transition: 0.2s;
}

.slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  transition: 0.2s;
}

input:checked + .slider {
  background-color: #4caf50;
}

input:checked + .slider::before {
  transform: translateX(20px);
}

.clock {
	font-size: 40px;
}

.club-logo {
	height: 90px;
}

.club-logo-players {
	height: 40px;
}

.period {
	font-size: 20px;
}

.team-display.home-team {
	display: flex;
    align-items: center;
        gap: 20px;
    justify-content: flex-start;
}

.team-display.away-team {
	display: flex;
    align-items: center;
        gap: 20px;
    justify-content: flex-end;
}

.qtr-by-qtr-table {
    font-size: 10px;
    font-weight: normal;
}

.center-header {
	display: grid;
    justify-items: center;
}

.score {
	font-size: 60px;
}

.leaders {
      white-space: pre-line; /* Preserve line breaks */
      font-size: 1.1rem;
      line-height: 1.6;
    }

#home-total, #away-total {
	font-weight: bold;
}

sub-heading {
    display: flex;
    width: 100%;
    height: 35px;
    background-color: #222;
	border-top: 0.5px solid #FFFFFF;
    justify-content: center;
    gap: 25px;
}

leading-header {
    display: flex;
    width: 100%;
    height: 35px;
    background-color: #111;
	border-bottom: 0.5px solid #FFFFFF;
    justify-content: center;
    gap: 25px;
	z-index: 9999;
	position:relative;
}

.leading-header-row {
	display: flex;
	gap: 20px;
	    align-items: center;
	color: white;
}

.leading-header-row p, .leading-header-row a {
    margin-block-start: 0em!important;
    margin-block-end: 0em!important;
	font-size: 12px;
}

.leading-header-row a {
    margin-block-start: 0em!important;
    margin-block-end: 0em!important;
	font-size: 12px;
	color: white!important;
	font-weight: bold;
}

.sub-heading-row {
	display: flex;
	gap: 7.5px;
	    align-items: center;
	color: white;
}

.sub-heading-row p {
    margin-block-start: 0em!important;
    margin-block-end: 0em!important;
	font-size: 12px;
}

.boxscore-header, .players-header {
	display: flex;
    align-items: center;
	gap: 10px;
	padding-bottom: 5px;
}
.boxscore-header h2, .players-header h2 {
    margin-block-start: 0em!important;
    margin-block-end: 0em!important;
}

.divider-row {
    line-height: .6vw;
    text-transform: uppercase;
    border-top: 6px solid #fff;
    border-bottom: 6px solid #fff;
    background: #D8D8D8;
    color: #a0a0a0;
	font-size: 10px;
}

.divider-row td span {
	background-color: transparent!important;
    padding: 7px 5px;
    margin-top: -10px;
    margin-bottom: -10px;
}

.boxscore-rows {
	font-size: 12px;
	height: 25px;
	text-align: center;
}

.boxscore-rows-header {
	font-size: 13px;
}

.boxscore-rows-header tr th {
	min-width: 30px
}

.player-stats-rows-header {
	font-size: 13px;
}

.player-stats-rows-header tr th {
	min-width: 30px
}

.player-stats-rows-subheader th {
	font-weight: 500;
	font-size: 11px;
}

.player-inactive {
	background: #B3B3B3!important;
	font-weight: bold;
	color: white;
}

.player-number {
	font-weight: bold;
	color: white;
}

.boxscore-body {
	padding-bottom: 40px;
	padding-top: 1rem;
	margin-left: auto;
	margin-right: auto;
	display: flex;
    justify-content: center;
    overflow-y: scroll;
}

.boxscore {
	margin-left: auto;
	margin-right: auto;
	width: 100%;
}

.boxscore-row td {
    padding: 1px 4px;
}

.tabs {
  display: flex;
  background: #222;
  border-bottom: 2px solid #444;
}

#rightTabs {
	overflow-y: scroll;
}

.tab-button, .tab-stats-button {
  flex: 1;
  padding: 12px 4px;
  background: #333;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 13.5px;
}

.tab-button.active, .tab-stats-button.active {
  background: #555;
  font-weight: bold;
}

.hidden {
  display: none !important;
}

.carters-leaders, .stats-content, .pbp-feed {
	padding: 1rem 2rem;
}

.players-body {
	padding: 1rem 1.5rem;
}

.right-tabs {
	border-left: 1px solid #222222;
}

#loading-overlay {
  position: absolute;
  top: 0px; /* adjust to sit just below your game select panel */
  left: 0;
  width: 100%;
  height: 100%; /* subtract the panel height */
  background: rgba(255,255,255,1);
  display: flex; /* hidden until triggered */
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

.loading-overlay {
  top: 0px; /* adjust to sit just below your game select panel */
  left: 0;
  width: 100%;
  height: 100%; /* subtract the panel height */
  background: rgba(255,255,255,1);
  display: flex; /* hidden until triggered */
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

.tab-content {
	height: 100%;
}

.spinner {
  border: 16px solid #f3f3f3; /* Light grey */
  border-top: 16px solid #3498db; /* Blue */
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#last-generated {
	font-size: 13px;
	padding-bottom: 20px;
}

#last-update {
	font-size: 13px;
}

.boxscore-body div table tr:nth-child(odd) {
  background-color: oklch(0.97 0 0 / 1); /* Light grey for odd rows */
}

.boxscore-body div table tr:nth-child(even) {
  background-color: oklch(0.94 0 0 / 1); /* Light grey for odd rows */
}

.club-logo-team {
    height: 40px;
}

.team-stats-header-home, .team-stats-header-away {
    display: flex;
    align-items: center;
	gap: 20px;
}

.team-stats-header {
    display: flex;
    justify-content: space-between;
	width: 85%;
	margin-left: auto;
	margin-right: auto;
}

.team-stats-header h1 {
    margin-block-start: 0em!important;
    margin-block-end: 0em!important;
	font-size: 20px;
	font-weight 600;
}
.team-stats-table {
	width: 80%;
	margin-left: auto;
	margin-right: auto;
	padding-top: 20px;
}

.team-stats-table tr {
	height: 35px
}
.home-stat {
	text-align: left;
	padding-left: 20px;
	font-size: 14px;
}
.away-stat {
	text-align: right;
	padding-right: 20px;
	font-size: 14px;
}
.team-stat-title {
	text-align: center;
	font-weight: 500;
	font-size: 14px;
}

.team-stats-table tr:nth-child(odd) {
  background-color: oklch(0.97 0 0 / 1); /* Light grey for odd rows */
}

.team-stats-table tr:nth-child(even) {
  background-color: oklch(0.94 0 0 / 1); /* Light grey for odd rows */
}

.pbp-event {
    display: flex;
    justify-content: center;
    align-items: center;
	width: 100%;
}

.pbp-event-inner.period-label {
	border: 2px solid black;
    display: flex;
    justify-content: center;
    align-items: center;
	height: 42px;
}

.pbp-period-label {
	width: 100%;
	height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
	font-size: 12px
}

.pbp-period-label div {
	padding: 3px 0px;
	display: flex;
	width: 100%;
    justify-content: center;
    align-items: center;
	height: 15px;
}

.pbp-period-title {
	color: white;
	background-color: black;
	width: 110px!important;
}

.pbp-period-score {
	background-color: #EFEFEF;
}

.pbp-feed {
	display: flex;
    flex-direction: column;
	gap: 10px
}

.pbp-team-event-inner {
	display: grid;
	grid-template-columns: 40% 20% 40%;
	width: 100%;
}

.pbp-avatar {
	width: 50px
}

.pbp-period {
	font-weight: 600;
	font-size: 12px;
}

.pbp-clock {
	font-size: 12px;
}

.pbp-meta-team {
	height: 20px;
	display: flex;
    justify-content: center;
    align-items: center;
	flex-direction: column;
	height: 100%;
	gap: 4px;
	color: white;
}

.pbp-meta-team-sub {
	display: flex;
    justify-content: center;
    align-items: center;
	gap: 5px;
	color: black;
}

.pbp-team-score {
	font-size: 14px;
	font-weight: bold;
    margin-block-start: 0em;
    margin-block-end: 0em;
	padding: 6px;
}

.pbp-body {
	display: flex;
	flex-direction: row;
    justify-content: space-between;
    align-items: center;
	height: 100%;
}

.pbp-team-event-inner.home .pbp-body {
	text-align: right;
}

.pbp-text {
	font-size: 13px;
}

.pbp-desc {
	font-size: 11px;
}

.pbp-stats-header {
    display: flex;
    justify-content: space-between;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	padding-top: 1rem;
}

.pbp-stats-header-div {
    display: flex;
    justify-content: space-between;
	width: 74.5%;
	margin: 0 4rem;
	margin-left: auto;
	margin-right: auto;
}

.pbp-stats-header h1 {
    margin-block-start: 0em!important;
    margin-block-end: 0em!important;
	font-size: 20px;
	font-weight 600;
}

.tab-content.ladder-div {
	padding: 1em 2em;
}

.ladder-logo {
	height: 35px;
	padding-left: 5px;
}

.ladder-table {
	font-size: 13px;
	text-align: center;
	margin-left: auto;
	margin-right: auto;
}

.ladder-team {
	display: flex;
	flex-direction: row;
    align-items: center;
	gap: 7px;
	text-align: left;
	height: 45px
}

#ladder-team-header {
	width: 200px;
}

.ladder-table tr:nth-child(odd) {
  background-color: oklch(0.97 0 0 / 1); /* Light grey for odd rows */
}

.ladder-table tr:nth-child(even) {
  background-color: oklch(0.94 0 0 / 1); /* Light grey for odd rows */
}

.ladder-table thead tr th {
	min-width: 30px
}

#leaders-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0px 16px;
  
    padding: 1rem 2rem;
}

.leader-section {
  flex: 1 1 200px;
  border-radius: 10px;
  padding: 8px;
  transition: opacity 0.25s ease-in-out;
}

.leader-section h2 {
  text-align: center;
  margin-bottom: 8px;
    margin-block-start: 0.3em;
    margin-block-end: 0.3em;
}

.leader-player, .top-leader-card {
  display: flex;
  align-items: center;
  margin: 4px 0;
  transition: transform 0.3s ease;
}

.leader-player img {
  width: 60px;
  margin-right: 8px;
}

.leader-player.leader-top {
  background: rgba(255, 215, 0, 0.1);
  padding-left: 4px;
}

.leader-info, .top-leader-info {
  display: flex;
  justify-content: space-between;
  width: 100%;
    font-size: 13px;
    flex-direction: column;
    align-items: flex-end;
}

.leader-name, .top-leader-name {
	font-weight: bold;
    font-size: 14px;
	text-align: right;
}

.top-leader-card {
	width: 100%;
}

.top-leader-img {
	width: 80px!important;
}

#futureGame {
    justify-content: center;
    align-items: center;
	flex-direction: column;
	gap: 10px
}

#futureTrailingRow {
	display: flex;
    justify-content: center;
    align-items: center;
	gap: 5px
}

#futureLeadingRow {
	display: flex;
    justify-content: center;
    align-items: center;
	gap: 20px
}

.club-logo-future {
	width: 100px;
}

.club-title-name {
	font-size: 20px
}

.game-grid {
	padding: 5px 50px;
}

#away-team-name {
	text-align: right;
}

#home-team-name {
	text-align: left;
}

/* Styling for the container */
.subscribe-container {
  display: flex;
  align-items: center;
  font-family: Arial, sans-serif;
}

.subscribe-toggle {
  width: 40px;
  height: 20px;
  appearance: none;
  background-color: #ccc;
  border-radius: 50px;
  position: relative;
  transition: background-color 0.3s;
  cursor: pointer;
}

.subscribe-toggle:checked {
  background-color: #4CAF50;
}

.subscribe-toggle::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

.subscribe-toggle:checked::before {
  transform: translateX(20px);
}

.status-text {
  margin-left: 10px;
  font-size: 16px;
}
