/* Mobi/* Fixed top menu */
/* .mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #f8fafc;
  color: #fff;
  padding: 8px;
  display: flex;
  justify-content: space-around;
  z-index: 1000;
  border-bottom: 1px solid #e1e5e9;
}oach */
body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
}

/* Mobile menu team colors */
.mobile-menu-away, .away-team-color {
  background: var(--away-primary) !important;
}

.mobile-menu-home, .home-team-color {
  background: var(--home-primary) !important;
}

/* Innings selector */
.innings-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background-color: var(--bg-light);
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  margin-bottom: 10px;
}

.inning-link {
  display: inline-block;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  text-decoration: none;
  border-radius: 20px;
  font-weight: bold;
  font-size: 14px;
  min-width: 44px;
  text-align: center;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}

.inning-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Mobile responsive improvements */
@media screen and (max-width: 768px) {
  .innings-selector {
    padding: 8px;
    gap: 6px;
    width: 100%;
  }

  .inning-link {
    padding: 10px 14px;
    font-size: 13px;
    min-width: 40px;
  }

  #game-view > tbody > tr > td {
    padding: 0;
    vertical-align: top;
    height: calc(100vh - 34px);
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/* Fixed top menu */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--primary);
  color: var(--white);
  height: 34px;
  /* padding: 8px; */
  display: flex;
  /* justify-content: space-around; */
  justify-items: stretch;
  z-index: 1000;
}

.mobile-menu div {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: bold;
  padding: 8px 12px;
  transition: all 0.2s ease;
  align-self: stretch;
  text-align: center;
  flex-grow: 1;
}

.mobile-menu-play {
  background: linear-gradient(135deg, var(--away-primary) 0%, var(--home-primary) 100%);
}

.mobile-menu div a {
  color: #fff;
  text-decoration: none;
}

.mobile-menu a:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Adjustments for mobile view */
#game-view {
  margin-top: 34px; /* Height of the mobile menu */
  padding: 0;
}

#play-by-play {
  overflow-y: scroll;
  height: calc(100cqh - 50px);
  width: 100%;
  margin: 0;
  padding: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 5px;
  text-align: center;
}

th {
  /* background-color: #5a3392; */
  color: #fff;
}

.geotemporal {
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
}

.geotemporal h2 {
  color: var(--primary);
  margin: 0;
  padding: 0;
}

.geotemporal h4 {
  margin: 0;
  padding: 0;
  font-weight: normal;
  color: var(--text-secondary);
}

.box-score-away h3, .box-score-home h3 {
  margin: 0;
}

.extra-stats {
  text-align: left;
  padding: 5px 5px 0px 5px;
  font-size: 12px;
}

/* Responsive tables */
@media screen and (max-width: 768px) {
  .responsive-table {
    overflow-x: auto;
  }

  .mobile-hide:not(.selected-view) {
    display: none !important;
  }

  .geotemporal {
    display: none;
  }

  canvas {
    width: 100% !important;
    max-width: 100%;
    aspect-ratio: 1;
    padding: 0;
  }

  .box-score-away, .box-score-home {
    width: 100%;
    overflow: scroll;
    padding-bottom: 10px !important;
  }

  p.current-status {
    margin: 0;
    padding: 0;
    font-size: 14px;
  }

  #cast-button {
    right: 16px;
    top: 16px;
    width: 16px;
    height: 16px;
    position: absolute;
  }
}

/* Media query for larger screens */
@media screen and (min-width: 769px) {
  #game-view {
    display: flex;
    margin-top: 0;
  }

  #play-by-play {
    height: 330px;
  }

  .mobile-menu {
    display: none;
  }

  .mobile-hide:not(.selected-view) {
    display: none !important;
  }

  svg {
    height: auto;
    width: 447.94775;
  }

  .box-score-away {
    border-left: 4px solid var(--away-primary);
    border-right: 4px solid var(--away-primary);
    background: linear-gradient(135deg, rgba(30, 136, 234, 0.05) 0%, rgba(229, 57, 53, 0.05) 100%);
  }

  .box-score-home {
    border-left: 4px solid var(--home-primary);
    border-right: 4px solid var(--home-primary);
    background: linear-gradient(135deg, rgba(67, 160, 71, 0.05) 0%, rgba(253, 216, 53, 0.05) 100%);
  }

  .box-score-header {
    display: none;
  }

  .desktop-layout {
    display: flex;
    height: 100vh;
  }

  .field-section {
    flex: 2;
    display: flex;
    flex-direction: column;
  }

  .sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #ddd;
  }

  .sidebar-menu {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
  }

  .sidebar-menu button {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
  }

  .sidebar-menu button.active {
    background-color: var(--primary);
    color: white;
  }

  .sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    /* padding: 5px; */
  }

  .sidebar-content #play-by-play, .sidebar-content .box-score-away, .sidebar-content .box-score-home {
    height: 100%;
    overflow-y: auto;
  }

  .sidebar-content table {
    min-width: 100%;
  }

  .sidebar-content table th:nth-child(n+2), .sidebar-content table td:nth-child(n+2) {
    width: 40px;
    text-align: center;
  }

  .sidebar-content td, .sidebar-content th {
    padding: 2px 4px;
  }

  .sidebar-content table {
    table-layout: fixed;
    width: 100%;
  }

  .sidebar-content td, .sidebar-content th {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 2px 4px;
  }

  .field-section canvas {
    width: 100% !important;
    max-width: 100%;
  }

  #cast-button {
    position: relative;
    top: 3px;
    width: 28px;
    height: 28px;
  }
}

tr.atbat {
  background-color: lightyellow;
}

.scorers {
  display: none !important;
}

.innings-selector {
  margin: 5px 0 0px 0;
  justify-content: space-between;
}

.inning-link {
  cursor: pointer;
  color: var(--white);
  text-decoration: none;
  /* border: 1px solid #5a3392; */
  background: linear-gradient(90deg, var(--away-primary) 0%, var(--home-primary) 100%);
  padding: 2px;
  text-align: center;
  border-radius: 4px;
  border: 2px solid var(--bg-light);
}

.inning-link.inning-selected {
  font-weight: bold;
  border: 2px solid var(--text-primary);
}

.line-score .home th {
  background-color: var(--home-primary);
}

.line-score .away th {
  background-color: var(--away-primary);
}

.line-score .header {
  background: linear-gradient(135deg, var(--away-primary) 0%, var(--home-primary) 100%);
}

.pitcher-vs-hitter {
  text-align: center;
  border-radius: 8px;
  display: flex;
  flex-direction: row;
  margin-bottom: -5px;
  gap: 2px;
  width: 100%;
}

.pitcher-vs-hitter div {
  flex: 1;
  background-color: #ffffff;
  padding: 2px 5px
}

#cast-button {
  fill: var(--text-secondary);
  cursor: pointer;
  transition: fill 0.2s ease;
}

#cast-button.casting {
  fill: var(--primary);
}

#receiver .receiver-hover-element {
  filter: drop-shadow(0 0 0.75rem var(--primary));
}
.spray-highlighted {
  animation: spray-highlight-pulse 2s ease-out;
}

@keyframes spray-highlight-pulse {
  0% { background-color: var(--bg-highlight); }
  100% { background-color: transparent; }
}
