:root {
  --colorBluePrimary: #3333d6;
  --colorRedPrimary: #ff1919;
}

.slidable {
  flex: 0 0 100%;
}

.slide-wrapper {
  display: flex;
  height: 100%;
  transition: transform 1s;
  transform: translateX(calc(var(--visibleSlide) * -100%));
}

.main {
  overflow: hidden;
  flex-grow: 1;
}

body {
  background: #ccccb2;
  display: flex;
  margin: 0;
  flex-direction: column;
  align-items: center;
  height: 100vh;
}

#content {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 0.3rem;
  box-sizing: border-box;
  flex-direction: column-reverse;
}

h1 {
  font-family: Arial;
  color: #000080;
  text-align: center;
  margin-top: 20px;
  margin-bottom: 10px;
  text-shadow: 1px 1px 13px rgba(113, 37, 96, 1);
}

#player {
  position: absolute;
  width: 40px;
  height: 40px;
  background: green;
  border: 0px;
  -webkit-transition:
    top 0.5s,
    left 0.5s;
  transition:
    top 0.5s,
    left 0.5s;
}

#tile-selector > button {
  border: 0px solid black;
  padding: 0px;
  margin: 0px;
}

#tile-selector > button.selected {
  outline: 1px solid var(--colorRedPrimary);
}

#tile-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, 40px);
  gap: 1px;
  padding: 0;
  cursor: pointer;
}

#gamediv {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.35rem;
  background: url('images/background.png');
  overflow: hidden;
  -webkit-box-shadow: 4px 4px 12px 0px rgba(50, 50, 50, 0.75);
  -moz-box-shadow: 4px 4px 12px 0px rgba(50, 50, 50, 0.75);
  box-shadow: 4px 4px 12px 0px rgba(50, 50, 50, 0.75);
}

#gamecontainer {
  display: flex;
  flex-grow: 1;
  overflow: auto;
  margin-top: 0.5rem;
}

#gamefield {
  display: inline-grid;
  position: relative;
  margin: auto;
  border: 0px;
}
.tile {
  width: 40px;
  height: 40px;
}

#menu-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
}

.player-prop-display {
  display: flex;
  gap: 0.2rem;
  flex-flow: column-reverse;
}

.meter-bar {
  position: relative;
  flex: 1 0 auto;
  height: 30px;
  background: url('images/displaybarbg.png');
  border: 1px outset #3b3b55;
}

.meter-bar-thumb {
  width: 100%;
  height: 100%;
  -webkit-transition: width 0.3s;
  transition: width 0.3s;
  opacity: 0.7;
}

.meter-bar-value {
  color: white;
  font-size: 25px;
  text-align: left;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding-left: 3px;
}

#health-bar .meter-bar-thumb {
  background: var(--colorRedPrimary);
}

#time-bar .meter-bar-thumb {
  background: var(--colorBluePrimary);
}

#controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.player-controls-container {
  display: flex;
  justify-content: center;
}

ul.menu {
  list-style-type: none;
  list-style-position: inside;
  padding: 0;
  margin-bottom: 0;
  flex-grow: 1;
}

ul.menu > li {
  margin-top: 0;
  margin-bottom: 10px;
}

ul.menu > li.separator {
  height: 1px;
  width: 125px;
  background: url('images/stone.png') #8a8a8a;
  border: 3px outset #8a8a8a;
}

#changelog-button {
  text-decoration: underline;
}

.button {
  background: url('images/stone.png') #8a8a8a;
  font-family: 'Times New Roman', Times, serif;
  font-size: 18px;
  cursor: pointer;
  width: 120px;
  height: 25px;
  padding: 0;
  line-height: 25px;
  border: 3px outset #8a8a8a;
  text-align: center;
  box-sizing: content-box;
}

.button:active,
.button.active {
  border: 3px inset #8a8a8a;
}

.game-description {
  background: gray;
  opacity: 0.6;
  margin: 10px auto 10px auto;
  padding: 2px;
}

.game-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.game-dialog {
  --dialogWidth: 400px;
  --dialogHeight: 280px;
  width: min(var(--dialogWidth), 100vw);
  height: min(var(--dialogHeight), 100vh);
  border: 2px outset gray;
  margin: 5px;
  padding: 0px;

  -webkit-box-shadow: 4px 4px 22px 0px rgba(115, 126, 156, 0.75);
  -moz-box-shadow: 4px 4px 22px 0px rgba(115, 126, 156, 0.75);
  box-shadow: 4px 4px 22px 0px rgba(115, 126, 156, 0.75);
  background: #9a9a9a;
}
.game-dialog__head {
  height: 23px;
  background: url('images/stone.png');
  vertical-align: middle;
  font-size: 23px;
  line-height: 100%;
  font-family: arial;
  vertical-align: middle !important;
  padding: 4px;
  margin: 0px;
}
.game-dialog__body {
  overflow-y: auto;
  height: 200px;
  padding: 5px;
}
.game-dialog__buttons {
  height: 42px;
  display: flex;
  gap: 5px;
  justify-content: center;
}

.level-def-string {
  width: 90%;
  height: 100%;
}

#player-controls {
  display: inline-grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

#player-controls .first-row {
  grid-column: 2;
}

#player-controls .second-row {
  grid-row: 2;
}

#player-controls button {
  width: 45px;
  height: 45px;
}

/* mobile landscape */
@media screen and (min-width: 500px) {
  #content {
    flex-direction: row;
  }
  .game-description {
    width: 75%;
  }
  .player-prop-display {
    flex-flow: row;
  }
}

/* desktop */
@media screen and (min-width: 1024px) {
  #content {
    padding: 2rem 3rem;
  }
  #gamediv {
    width: 70%;
    margin: 0.5rem;
  }
  #player-controls {
    display: none;
  }
}

.app-version {
  text-decoration: underline;
}