/* Shop */
.cardholder .shop {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  border-radius: 5px;
  /*background: url('../img/shop-bg.png');*/
  background-color: #0e060c;
  background-size: cover;
  border: 2px solid #545d9b;
  color: #ffc957;
  display: flex;
  flex-direction: column;
  padding: 6px;
  gap: 6px;
}

.cardholder .shop .header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  text-transform: uppercase;
}

.cardholder .shop .grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  grid-auto-rows: max-content;
  gap: 8px;
  overflow-y: auto;
  position: relative;
  z-index: 30;
}

.cardholder .shop .grid .item, .cardholder .shop .header {
  background-color: rgba(15, 11, 21, 0.7);
  box-shadow: inset 0 0 85px rgba(15, 11, 21, 0.5);
  border-radius: 5px;
  border: 1px solid #5e556b;
}

.shop .grid .item {
  font-size: 0.9rem;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  height: 100%;
  box-sizing: border-box;
}

.shop .item .info {
  flex: 1;
}

.shop .item .title {
  font-weight: bold;
}

.shop .item .desc {
  font-size: 0.85rem;
  color: #b4b4cb;
}

.shop .item .buy-button {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 2px;
  padding: 2px 4px 2px 4px;
  background: linear-gradient(to bottom, #866e5a, #675140);
  border: 1px solid #b89a85;
  cursor: pointer;
}

.shop .item .buy-button.locked {
  color: #bbbbbb;
  background: #58565c;
  border: 1px solid #5c5c5c;
}

.shop .item .buy-button:hover {
  color: #ffe0a7;
  background: linear-gradient(to bottom, #ad8c72, #8a684f);
  border: 1px solid #d4b5a0;
}

.shop .item .buy-button:active {
  color: #ffd78c;
  background: linear-gradient(to bottom, #675140, #866e5a);
  border: 1px solid #de7349;
}

.shop .item .price {
  position: absolute;
  top: 1px;
  right: 1px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2px 4px 2px 4px;
  font-size: 0.8rem;
  color: #47bad1;
  background-color: black;
  border-radius: 2px;
}

.img-box {
  width: 100%;
  position: relative;
  padding-bottom: 100%;
  height: 0;
  overflow: hidden;
}
.img-box img {
  position: absolute;
  height: 100%;
  margin: auto;
  text-align: center;
  vertical-align: middle;
}

/* Side Controls */
#side-controls {
  position: absolute;
  top: 6px;
  left: 6px;
  /*bottom: 6px;*/
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
}

@media only screen and (max-aspect-ratio: 5 / 8) {
  #side-controls {
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: auto;
    flex-direction: row;
    justify-content: flex-start;
    align-items: stretch;
  }
  #side-controls .side-button {
  }
}

#side-controls > * {
  color: #fff;
  background-color: #0e060c;
  border-radius: 5px;
  border: 1px solid #323232;
  overflow: hidden;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
  font-size: 1.2rem;
  z-index: 21;
  padding: 2px 5px 2px 5px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  cursor: pointer;
}

#side-controls > .display {
  line-height: 1.2rem;
  padding: 7px 5px;
  align-items: flex-start;
}

#side-controls > .display span {
  font-size: 0.9rem;
}

.display .description {
  font-size: 0.9rem;
  color: #9d9d9d;
  max-width: 220px;
  padding: 4px 6px 4px 12px;
}

#power-display span {
  color: #d0d0d0;
}

#gems-display {
  color: #47bad1;
}

#honor-display {
  color: #b9a4e6;
}

#honor-display span {
  margin-left: 3px;
}

#gems-display span {
  margin-left: 3px;
}

#leaderboard-button {
  color: #ffcd81;
  font-size: 0.9rem;
}

#side-controls > .side-button {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  min-width: 3rem;
  min-height: 1.8rem;
  box-sizing: border-box;
}

#side-controls > .side-button.discord {
  color: #7b7bce;
  font-size: 0.9rem;
}

#side-controls > .side-button.patreon {
  color: #a44848;
  font-size: 0.9rem;
}

/* Dungeons */
.cardholder .dungeon {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  border-radius: 5px;
  background: url('../img/dungeon-bg.png');
  background-size: cover;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  padding: 6px;
  gap: 6px;
  overflow: hidden;
  z-index: 23;
}

.dungeon .header {
  display: flex;
  justify-content: center;
  align-items: center;
  text-transform: uppercase;
  padding: 0.3rem;
  font-size: 0.85rem;
  overflow: hidden;
  white-space: nowrap;
  font-weight: bold;
  color: #ffc957;
  background-color: rgba(183, 27, 27, 0.7);
  border-radius: 5px;
  border: 1px solid #f84747;
}

.dungeon .content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
}

.dungeon .content .top {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 6px;
  overflow: hidden;
}

.dungeon .content .top > div, .dungeon .content .bottom > div {
  flex: 1;
  background-color: rgba(15, 11, 21, 0.7);
  box-shadow: inset 0 0 85px rgba(15, 11, 21, 0.5);
  border-radius: 5px;
  border: 1px solid #5e556b;
  color: #f0f0f0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 3px;
  position: relative;
}

.dungeon .results {
  color: #d9d9d9;
  font-size: 0.9rem;
}

.dungeon .results .defeated span {
  color: #e67777;
}

.dungeon .results .defender b {
  color: #c7e677;
}

.dungeon .results .defender span {
  color: #e67777;
}

.dungeon .results .loot {
  color: #ffd9ac;
}

.dungeon .subheader {
  background-color: #363636;
  font-size: 0.85rem;
  padding: 2px 4px 2px 4px;
  font-weight: bold;
  color: #b0b0b0;
  border-radius: 5px;
  margin-bottom: 3px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
}

.dungeon .list {
  font-size: 0.85rem;
  gap: 5px;
  overflow-y: auto;
  height: 100%;
}

.dungeon .list .player {
  color: #e0e0e0;
}

.dungeon .list > * {
  /*height: 1.7rem;*/
}

.dungeon .list .defeated {
  color: #f2f2f2;
  background-color: #903131;
  padding: 1px 2px 1px 2px;
  border-radius: 2px;
  border: 1px solid #c65252;
}

.dungeon .event.monster {
  color: #deb1a0;
}

.dungeon .event .crit {
  color: #ee6d6d;
}

.dungeon .event .miss {
  color: #d2c7c2;
}

.dungeon .event.smoke {
  color: #b5aead;
}

.dungeon .list .power {
  color: #f2f2f2;
  background-color: #2f2f2f;
  padding: 1px 2px 1px 2px;
  border-radius: 2px;
}

.dungeon-controls {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dungeon .button, .duel .button {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.1rem;
  border-radius: 3px;
  padding: 0.6rem;
  font-weight: bold;
  z-index: 30;
  cursor: pointer;
  text-transform: uppercase;
  min-height: 24px;
}

.dungeon .button.locked {
  color: #bbbbbb;
  background: #58565c;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  border: 1px solid #5c5c5c;
  cursor: auto;
}

.dungeon .button.loot {
  color: #ffebc9;
  background: transparent;
  box-shadow: none;
  border: 1px solid #ffebc9;
  cursor: auto;
  line-height: 1.1rem;
}

.dungeon .button.loot span {
  margin-left: 7px;
}

.dungeon .button.enter, .duel .button.ready {
  color: #ffd78c;
  background: linear-gradient(to bottom, #b65537, #bc3111);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  border: 1px solid #de7349;
}

.dungeon .button.enter:hover, .duel .button.ready:hover {
  color: #ffe0a7;
  background: linear-gradient(to bottom, #c76445, #ce3f1d);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  border: 1px solid #de7349;
}

.dungeon .button.enter:active, .duel .button.ready:active {
  color: #ffd78c;
  background: linear-gradient(to bottom, #b65537, #bc3111);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  border: 1px solid #de7349;
}

.dungeon .button.escape {
  color: #8cc9ff;
  background: linear-gradient(to bottom, #3792b6, #1180bc);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  border: 1px solid #49bbde;
}

.dungeon .button.escape:hover {
  color: #a7e0ff;
  background: linear-gradient(to bottom, #4b9db6, #1b8ebc);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  border: 1px solid #49bbde;
}

.dungeon .button.escape:active {
  color: #8cc9ff;
  background: linear-gradient(to bottom, #3792b6, #1180bc);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  border: 1px solid #49bbde;
}

.dungeon .button.smoke {
  color: #d4e0e9;
  background: linear-gradient(to bottom, #93a1a6, #7f8d96);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  border: 1px solid #96b8c2;
}

.dungeon .button.smoke:hover {
  color: #e0e9ed;
  background: linear-gradient(to bottom, #a6b4b9, #8f9da5);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  border: 1px solid #96b8c2;
}

.dungeon .button.smoke:active {
  color: #d4e0e9;
  background: linear-gradient(to bottom, #93a1a6, #7f8d96);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  border: 1px solid #96b8c2;
}

.dungeon .button.skip, .duel .button.leave, .duel .button.surrender {
  color: #bbbbbb;
  background: linear-gradient(to bottom, #393939, #242424);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  border: 1px solid #5c5c5c;
}

.dungeon .button.skip:hover, .duel .button.leave:hover, .duel .button.surrender:hover {
  color: #cecece;
  background: linear-gradient(to bottom, #4e4e4e, #363636);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  border: 1px solid #5c5c5c;
}

.dungeon .button.skip:active, .duel .button.leave:active, .duel .button.surrender:active {
  color: #bbbbbb;
  background: linear-gradient(to bottom, #393939, #242424);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  border: 1px solid #5c5c5c;
}

.dungeon .price {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}

.dungeon .price span {
  background-color: rgba(0, 0, 0, 0.9);
  height: 3rem;
  font-size: 1.5rem;
  line-height: 1.5rem;
  border-radius: 1.5rem;
  padding: 0 1.5rem 0 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  border: 1px solid rgba(92, 92, 92, 0.65);
  color: #ffc957;
}

.flare {
  animation: flare 3s infinite;
}

@keyframes flare {
  0% {
    box-shadow: 0 0 10px rgba(255, 38, 0, 0.6);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 38, 0, 0.9);
  }
  100% {
    box-shadow: 0 0 10px rgba(255, 38, 0, 0.6);
  }
}