.table_container {
  margin: 0 405px 0 auto;
}

.background_container {
  background-color: #005000;
}

.side_container {
  position: absolute;
  z-index: 1001;
}

.side_buttons {
  position: absolute;
  top: 550px;
  left: 10px;
  z-index: 1001;
}

h1.headline {
  color: white;
  font-weight: 300;
  font-size: 1.5em;
  z-index: 100;
  text-align: center;
  padding: 10px 0px 0px 10px;
}

.menu-buttons {
  position: absolute;
  top: 200px;
  left: 15px;
  width: 100px;
  z-index: 1000;
}

.table_container {
  max-width: 650px;
  height: 650px;
  position: relative;
}

.ad-container {
  position: absolute;
  top: 100px;
  right: 10px;
}

.hand {
  border: 0 solid white;
  position: absolute;
  z-index: 10;
  width: 300px;
  height: 100px;
  left: 50%;
  transform: translateX(-50%);
}

.template-game-card-other,
.template-game-card-user,
.game-card {
  position: absolute;
  width: 69px;
  height: 100px;
  transition: left 150ms ease-in-out;
}

#game-timer {
  text-align: right;
  font-size: smaller;
  position: absolute;
  bottom: 0;
  right: 0;
}

.name {
  display: flex;
  position: absolute;
  font-weight: bold;
}

.name-user {
  top: 620px;
  left: 150px;
  bottom: 35px;
}

.hand-user {
  top: 515px;
}

.name-opponent {
  left: 175px;
  top: 16px;
  cursor: pointer;
}

.hand-opponent {
  top: 46px;
  text-align: left;
}

.flip-image {
  transform: scaleX(-1);
}

#deck {
  position: absolute;
  top: 225px;
  left: 200px;
}

#discard {
  position: absolute;
  top: 225px;
  left: 300px;
}

.action-button {
  z-index: 1;
  position: absolute;
  top: 350px;
  left: 304px;
}

#playNextRoundAction,
#playNextGameAction {
  box-shadow: 0 0 13px 1px rgba(255, 255, 255, 0.5);
}

#msg {
  border-radius: 5px;
  text-align: center;
  position: absolute;
  width: 327px;
  height: 32px;
  top: 415px;
  left: 161px;
  z-index: 100;
}
#msg .inner {
  position: relative;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.melds-and-deadwood {
  position: absolute;
  left: 0;
  display: flex;
  flex-direction: column;
  row-gap: 4px;
  margin-left: 4px;
}

.melds-and-deadwood-user {
  bottom: 35px;
}

.melds-and-deadwood-opponent {
  top: 35px;
}

.melds h6,
.deadwood {
  font-size: 12px;
  font-weight: bold;
}
.melds h6 {
  margin-bottom: 3px;
}

.melds-and-deadwood .card-grouping {
  display: flex;
  column-gap: 2px;
}

.melds-and-deadwood .card-groupings {
  display: flex;
  flex-direction: column;
  row-gap: 2px;
}

.card-grouping .mini-card {
  background: white;
  width: 25px;
  height: 36px;
  border-radius: 4px;
  border-left: 1px solid black;
  border-bottom: 1px solid black;
}

.card-grouping .mini-card:nth-of-type(n + 2) {
  margin-left: -10px;
}

.deadwood-count-mobile {
  display: none;
}

#allScoresTable {
  position: absolute;
  bottom: 10px;
  right: 35px;
  width: 100px;
  font-size: 0.5em;
  color: white;
  margin: 0px;
}

#allScoresTable th div {
  writing-mode: vertical-lr;
}

.heartsScoreTable td,
.spadesScoreTable td {
  text-align: center;
}

/* Score modal table styling */
#ginRummyScoreModal .rounds table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

#ginRummyScoreModal .rounds th,
#ginRummyScoreModal .rounds td {
  padding: 0.75rem 0.5rem;
  text-align: center;
  border: 1px solid #dee2e6;
}

#ginRummyScoreModal .rounds thead th {
  background-color: #f8f9fa;
  font-weight: 600;
}

#ginRummyScoreModal .rounds tfoot td {
  background-color: #e9ecef;
  font-weight: 600;
}

#ginRummyScoreModal .rounds tbody tr:hover {
  background-color: #f8f9fa;
}

@media (min-width: 1460px) {
  .table_container {
    margin: 0 auto;
  }
}

@media (max-width: 1050px) {
  /* Overall resizing */
  h1.headline {
    font-size: 18px;
  }

  /* Buttons and menu resizing */
  .side_container {
    width: 100px;
  }

  .side_buttons {
    max-width: 120px;
    font-size: 12px;
  }

  /* Game resizing */
  .hand-opponent {
    width: 185px;
    height: 50px;
  }
  .hand-user {
    width: 250px;
    height: 83px;
  }

  .template-game-card-other,
  .hand-opponent .game-card {
    width: 35px;
    height: 50px;
  }

  .template-game-card-user,
  .game-card {
    width: 58px;
    height: 83px;
  }

  .name-user {
    top: 510px;
  }

  .hand-user {
    top: 420px;
  }

  .name-opponent {
    left: 160px;
  }

  #deck {
    top: 130px;
    left: calc(50% - 58px - 20px);
  }
  #discard {
    top: 130px;
    left: calc(50% + 20px);
  }

  #msg {
    height: 32px;
    z-index: 100;

    width: 80%;
    top: 290px;
    left: 50%;
    transform: translateX(-50%);
  }

  .action-button {
    top: 240px;
    left: 50%;
    transform: translateX(-50%);
  }

  .melds-and-deadwood {
    display: none !important;
  }

  .deadwood-count-mobile.show {
    display: block;
  }

  #ginRummyScoreModal .rounds table {
    font-size: 12px;
  }

  #ginRummyScoreModal .rounds th,
  #ginRummyScoreModal .rounds td {
    padding: 0.25rem;
  }
}

@media (max-width: 919px) {
  .table_container {
    margin: 0 auto;
  }
}

@media (max-width: 770px) {
  /* Overall resizing */
  .overlay-menu {
    width: 90%;
  }

  .table_container {
    width: 100%;
  }

  /* Game resizing */
  .name-user {
    top: 470px;
  }

  .hand-user {
    top: 370px;
  }
}

@media (max-width: 420px) {
  /* Game resizing */
  .menu-buttons {
    top: 700px;
    font-size: 0.7em;
  }
}
