/* GLOBAL THINGS */

:root {
  --princesses: #ff367f;
  --zombies: #078f2b;
  --iterators: #de6b00;
  --catboys: #ffee52;
  --prophets: #370075;
  --hags: #a89b9f;
  --jokers: #820101;
  --dwarves: #914217;
  --sumers: #91e4ff;
  --moths: #5183e0;
  --sages: #dec400;
  --thunders: #521700;
  --spices: #ffa3fa;
  --astronauts: #0b1452;
  --gamblers: #fa8c05;
  --trucks: #c73c00;
  --ghosts: #7fbf63;
  --librarians: #4f3421;

  --default: #808080;
}

button {
  all: unset;
  cursor: pointer;
}

button:focus-visible {
  outline: 2px solid blue;
}

dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.8);
}

dialog {
  /* border: none; */
  outline: none;
  border-width: 0.1rem;
  padding: 0;
}

body {
  background-color: #010101;
  color: #fff;
  font-family: "Roboto", sans-serif;
  margin: 0;
}

#tooltip {
  display: none;
  position: fixed;
  pointer-events: none;
  background: #010101;
  color: white;
  padding: 0.5rem 0.7rem;
  border-radius: 0.4rem;
  z-index: 1000;
  width: max-content;
  min-width: max-content;
}

.team-icon {
  width: fit-content;
  font-size: 1.3rem;
  background-color: #434343;
  border-radius: 50%;
  padding: 0.3em;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
}

.bold {
  font-weight: bold;
}

.lora {
  font-family: "Lora";
}

.star {
  display: inline-block;
  /* width: 0.5rem; */
  aspect-ratio: 1;
  background-color: #ffffff;
  clip-path: polygon(
    50% 0,
    calc(50% * (1 + sin(0.4turn))) calc(50% * (1 - cos(0.4turn))),
    calc(50% * (1 - sin(0.2turn))) calc(50% * (1 - cos(0.2turn))),
    calc(50% * (1 + sin(0.2turn))) calc(50% * (1 - cos(0.2turn))),
    calc(50% * (1 - sin(0.4turn))) calc(50% * (1 - cos(0.4turn)))
  );
}

/* GAMES */

.circle {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  border: 0.15rem solid white;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.base {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  border: 0.15rem solid white;
  transform: rotate(45deg);
  transition: background-color 0.3s ease;
}

.on {
  background-color: white;
}

#games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  justify-content: center;
  column-gap: 0.6rem;
  row-gap: 0.6rem;
  margin-left: clamp(0rem, -1.6761rem + 10.2273vw, 6.25rem);
  margin-right: clamp(0rem, -1.6761rem + 10.2273vw, 6.25rem);
}

.topbar {
  display: grid;
  grid-template-columns: 2rem auto auto;
  height: 2rem;
  font-size: 1.5rem;
  font-weight: bold;
  background-color: #773244;
  align-items: center;
}

.topbar .weather {
  width: fit-content;
  height: 100%;
  justify-self: end;
}

.team-runs {
  place-self: center;
  text-align: center;
}

.team-at-bat {
  font-weight: bold;
  font-size: 1.2rem;
  transition: font-size 0.3s ease;
}

.inning-state {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: repeat(3, auto);
  row-gap: 1rem;
  column-gap: 1rem;
  font-size: 1rem;
}

.score-view {
  padding: 0.5rem;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  row-gap: 0.5rem;
  font-size: 1rem;
}

.score-display {
  display: grid;
  grid-template-columns: 1fr 2rem;
  background-color: #808080;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: font-size 0.3s ease;
}

.game {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;
  background-color: #212121;
  border: 0.1rem solid black;
  width: 100%;
  align-content: start;
}

.bases {
  display: grid;
  grid-template-columns: repeat(auto-fit, 1.5rem);
  grid-template-rows: 1.5rem 1.5rem;
  margin-top: auto;
  margin-bottom: auto;
  grid-row: 1 / -1;
  place-self: center;
}

.bases > :nth-child(3n + 1) {
  grid-column: 1;
  grid-row: 2;
}

.bases > :nth-child(3n + 2) {
  grid-column: 2;
  grid-row: 1;
}

.bases > :nth-child(3n + 3) {
  grid-column: 3;
  grid-row: 2;
}

.counter {
  display: grid;
  grid-template-columns: repeat(auto-fit, 1.65rem);
}

.role-display,
.roles {
  display: grid;
  grid-template-columns: 1fr auto;
  font-size: 1rem;
}

.role-display {
  font-size: 0.9rem;
}

.player-role {
  font-weight: bold;
}

.comment {
  background-color: #2f2f2f;
  border-radius: 0.8rem;
  min-height: 5rem;
  font-size: 1rem;
  padding: 0.6rem;
}

.comment > p {
  margin-top: 0;
  white-space: pre-line;
}

.bet-btn {
  background-color: #483;
  padding: 0.2rem;
  border-radius: 0.3rem;
  text-align: center;
  grid-column: 1 / -1;
}

.betting-ui {
  display: grid;
  grid-template-columns: auto 1fr auto 5rem;
  row-gap: 0.5rem;
  position: absolute;
  background-color: #333;
  padding: 0.3rem;
  border-radius: 0 0 0.3rem 0.3rem;
  filter: drop-shadow(5px 10px 10px rgba(0, 0, 0, 0.8));
  width: calc(100% - 0.6rem);
}

.betting-thing {
  position: relative;
}

.betting-thing > summary {
  grid-column: 1 / -1;
  width: 100%;
  height: 2rem;
  text-align: center;
  background-color: #333;
  align-content: center;
  display: block;
}

.betting-slider {
  min-width: 0;
}

/* DIALOGS */

.team-player-view {
  width: min(26rem, 90%);
  height: min(41rem, 90%);
  background-color: #202020;
  border-radius: 0.5rem;
  color: #fff;
  padding: 0;
  scrollbar-gutter: stable;
}

.stars {
  display: grid;
  grid-template-columns: 1.2rem 1.2rem 1.2rem 1.2rem 1.2rem 1.2rem;
  column-gap: 0.5rem;
}

.star-name {
  display: grid;
  grid-template-columns: 1fr auto;
}

.close-pane {
  display: grid;
  grid-template-columns: 1fr 3rem;
  height: 2rem;
  justify-content: center;
  text-align: center;
  align-items: center;
  padding: 0;
}

.close-btn {
  background-color: #f44;
  color: #fff;
  font-weight: bold;
  height: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.fav-btn {
  margin-top: 0.2rem;
  background-color: #483;
  grid-column: 1 / -1;
  padding: 0.2rem;
  border-radius: 0.3rem;
  text-align: center;
}

/* TEAM VIEW DIALOG */

#team-view-top {
  display: grid;
  grid-template-columns: 15% auto;
  grid-template-rows: auto auto;
  background-color: #101010;
  padding: 0.6rem;
  column-gap: 0.4rem;
  border-radius: 0.4rem 0.4rem 0 0;
}

#team-view-team-name {
  font-size: 1.2rem;
  font-weight: bold;
}

#team-view-team-icon {
  grid-row: 1 / -1;
  place-self: center;
}

#team-view-team-slogan {
  font-style: italic;
}

#team-view-bottom {
  display: grid;
  grid-auto-rows: auto;
}

.team-view-playerkind {
  font-weight: bold;
  justify-self: center;
  margin-top: 0.7rem;
  margin-bottom: 0.5rem;
  background-color: #fff;
  color: black;
  padding: 0.5rem;
  border-radius: 0.5rem;
}

.team-view-player-list {
  display: grid;
}

.team-view-player-list > * {
  padding: 0.5em;
}

.team-view-player-list > *:nth-child(2n) {
  background-color: #101010;
}

.wl-display {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.7rem;
  margin-top: 0.7rem;
}

#wins-losses {
  grid-column: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* PLAYER DIALOG */

#player-view-top {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  background-color: #101010;
  padding: 0.6rem;
  gap: 0.4rem;
  border-radius: 0.4rem 0.4rem 0 0;
  align-items: center;
}

#player-view-team-icon {
  font-size: 1rem;
}

#player-view-name {
  grid-column: 1 / -1;
  font-family: "Lora";
  font-size: 1.5rem;
}

#player-view-bottom {
  margin-top: 1rem;
}

.ability-display {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 0.5em;
}

.ability-display-text {
  font-weight: bold;
}

#pitching-display {
  background-color: #101010;
}

/* SHOP DIALOG */

#shop {
  width: min(36rem, 90%);
}

#items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  column-gap: 1rem;
  padding: 1rem;
}

.item {
  background-color: #483;
  padding: 0.2rem;
  border-radius: 0.3rem;
}

/* SITE STUFF */
.blaseball-logo {
  display: grid;
  font-weight: bold;
  grid-template-rows: auto auto;
  font-family: "Lora";
}

.blaseball-logo .the-word {
  font-size: 2rem;
  font-family: "Lora";
}

.blaseball-season {
  border-radius: 0.3rem;
  background-color: #851e89;
  padding: 0.3rem;
  font-weight: bold;
  color: #ddd;
}

.blaseball-era {
  border-radius: 0.3rem;
  background-color: #f32;
  padding: 0.3rem;
  font-weight: bold;
  color: #333;
}

.season-era {
  display: grid;
  grid-template-columns: auto auto;
  font-size: 0.7rem;
  text-align: center;
  column-gap: 0.3rem;
}

.logo-and-menu {
  display: grid;
  grid-template-columns: auto 1fr;
  margin-left: clamp(0rem, -1.6761rem + 10.2273vw, 6.25rem);
  margin-right: clamp(0rem, -1.6761rem + 10.2273vw, 6.25rem);
}

.logo-stuff {
  padding: 1rem;
}

main {
  display: grid;
  grid-template-rows: auto auto;
}

#connection-report {
  align-self: center;
  justify-self: center;
  text-align: center;

  background-color: #fff;
  color: #000;
  padding: 0.6rem;
  border-radius: 0.4rem;
  font-family: "Lora";
  font-weight: bold;
}

.logo-and-marquee {
  display: grid;
  grid-template-rows: auto auto;
  width: 100%;
}

.the-news {
  height: 1.1rem;
  font-size: 1rem;
  width: 100%;
  background-color: #353;
}

.menu {
  display: grid;
  padding: 0.3rem;
  grid-template-columns: auto 1fr;
  column-gap: 0.5rem;
}

.menu-buttons {
  display: grid;
  padding: 0.3rem;
  grid-template-rows: auto auto;
  row-gap: 0.5rem;
  justify-items: center;
  align-items: center;
}

.menu-btn {
  background-color: #fff;
  color: #333;
  font-family: "Lora";
  font-weight: bold;
  padding: 0.3rem;
  border-radius: 5rem;
  width: fit-content;
  height: fit-content;
}

.money-display {
  display: none;
  background-color: #283;
  min-width: 3rem;
  width: fit-content;
  padding: 0.3rem;
  border-radius: 0.3rem;
  height: fit-content;
}

.fan-info {
  display: grid;
  justify-items: center;
  align-items: center;
}

/* SCREENS */

#screens > * {
  display: none;
}

#screens > .shown {
  display: grid;
}

/* SEASON STATUS */

#season-status > * {
  text-align: center;
  margin-bottom: 3rem;
  display: none !important;
}

#season-status > .shown {
  display: grid !important;
}

#season-status h1 {
  font-family: "Lora", serif;
}

#screen-buttons {
  width: 100%;
  display: grid;
  justify-content: center;
  grid-template-columns: auto auto auto;
  gap: 2rem;
  margin-bottom: 0.5rem;
}

#screen-buttons > * {
  background-color: white;
  color: black;
  font-weight: bold;
  padding: 0.5rem;
  border-radius: 0.3rem;
  font-family: "Lora", serif;
}

#teams-screen {
  grid-template-columns: 1fr;
  justify-content: center;
  align-items: center;
  & > h1 {
    text-align: center;
  }
}

#teams-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 0.5rem;
  margin-left: auto;
  margin-right: auto;
  width: 90%;
  grid-auto-flow: row;
}

.team-button {
  padding: 0.3rem;
  border-radius: 0.3rem;
}

#playoffs-standings {
  display: grid;
  text-align: center;
  /* justify-items: center; */
  min-height: max-content;
}

#playoffs-standings-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-left: auto;
  margin-right: auto;
  min-width: 32rem;
}

#playoffs-standings-display-right {
  direction: rtl;
}

.playoffs-standings-display {
  display: grid;
  grid-auto-columns: 4rem;
  grid-auto-flow: column;
  gap: 0.5rem;
  min-height: max-content;
  align-items: center;
}

.team-pair {
  display: grid;
  grid-template-rows: 1fr 1fr;
}

.team-row {
  display: grid;
  grid-auto-rows: 4rem;
  grid-auto-flow: row;
  justify-items: center;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: max-content;
  align-content: space-evenly;
  height: 100%;
}

#login-btn {
  display: grid;
  justify-items: center;
  align-items: center;
  font-family: "Google Sans", serif;
  grid-template-columns: auto 1fr;
  padding: 0.5rem;
  gap: 0.5rem;
  & img {
    max-height: 1rem;
  }
}

#election-options {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(5rem, 1fr));
  width: 80%;
  margin-left: auto;
  margin-right: auto;
}

.election-panel {
  padding: 0.5rem;
  border-radius: 0.1rem;
  border: 0.15rem solid white;
  color: white;
  background-color: #202020;
}

.election-name {
  font-family: "Lora", serif;
  font-size: 2rem;
  font-weight: bold;
  text-decoration: underline;
}

#election-screen {
  grid-template-columns: 1fr;
  justify-content: center;
  align-items: center;
  text-align: center;
  & > h1 {
    text-align: center;
    font-family: "Lora", serif;
  }
}

#blessings-options {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(5rem, 1fr));
  width: 80%;
  margin-left: auto;
  margin-right: auto;
}

.blessing-panel {
  display: grid;
  padding: 0.5rem;
  border-radius: 0.1rem;
  border: 0.15rem solid white;
  color: white;
  background-color: #202020;
  grid-auto-flow: row;
}

.blessing-name {
  font-family: "Lora", serif;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: underline;
}

#blessings-options {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(5rem, 1fr));
  width: 80%;
  margin-left: auto;
  margin-right: auto;
}

footer {
  margin-top: 2rem;
  text-align: center;
  font-family: "Lora", serif;
}

.tgb {
  color: #df2026;
}
