/* Course: SENG 513 */
/* Date: NOV 12, 2023 */
/* Assignment 3 */
/* Name: Yunfan Yang */
/* UCID: 30067857 */

:root {
  --battle-bg-slice-original-width: 144px;
  --battle-bg-slice-original-height: 103px;
  --battle-bg-slice-size-ratio: 1;
  --battle-bg-slice-width: calc(var(--battle-bg-slice-original-width) * var(--battle-bg-slice-size-ratio));
  --battle-bg-slice-height: calc(var(--battle-bg-slice-original-height) * var(--battle-bg-slice-size-ratio));
}

.battle {
  width: 100%;
  max-width: 1400px;
  margin: 1rem auto;
  position: relative;
  padding: 4.6rem 2rem 4rem;
}

.battle .description {
  text-align: center;
  font-size: 1.2rem;
  margin: 0.6rem;
}

.battle .buttons {
  position: absolute;
  bottom: 0rem;
  left: 0rem;
  right: 0rem;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 1rem;
}

.battle button {
  padding: 0.5rem 0.8rem;
  background-color: #903B2F;
  border: #5B2934 0.32rem solid;
  border-radius: 1rem;
  font-size: 1.1rem;
  transition: all 0.2s ease-in-out;
}

.battle button:hover {
  background-color: #B44E3A;
}

.battle button.hide {
  display: none;
}

.battle .border {
  position: absolute;
  background-repeat: no-repeat;
  pointer-events: none;
}

.battle .top-left {
  width: var(--battle-bg-slice-width);
  height: var(--battle-bg-slice-height);
  background-image: url('assets/battle/Blank_1.png');
  background-position: top left;
  top: 0;
  left: 0;
}

.battle .top-right {
  width: var(--battle-bg-slice-width);
  height: var(--battle-bg-slice-height);
  background-image: url("assets/battle/Blank_3.png");
  background-position: top right;
  top: 0;
  right: 0;
}

.battle .bottom-left {
  width: var(--battle-bg-slice-width);
  height: var(--battle-bg-slice-height);
  background-image: url("assets/battle/Blank_7.png");
  background-position: bottom left;
  bottom: 0;
  left: 0;
}

.battle .bottom-right {
  width: var(--battle-bg-slice-width);
  height: var(--battle-bg-slice-height);
  background-image: url("assets/battle/Blank_9.png");
  background-position: bottom right;
  bottom: 0;
  right: 0;
}

.battle .top,
.battle .bottom {
  left: var(--battle-bg-slice-width);
  width: calc(100% - (var(--battle-bg-slice-width) * 2));
  height: var(--battle-bg-slice-height);
  background-size: 100% cover;
  background-repeat: repeat-x;
}

.battle .top {
  background-image: url("assets/battle/Blank_2.png");
  background-position: top center;
  top: 0;
}

.battle .bottom {
  background-image: url("assets/battle/Blank_8.png");
  background-position: bottom center;
  bottom: 0;
}

.battle .left,
.battle .right {
  top: var(--battle-bg-slice-height);
  height: calc(100% - (var(--battle-bg-slice-height) * 2));
  width: var(--battle-bg-slice-width);
  background-size: cover 100%;
  background-repeat: repeat-y;
}

.battle .left {
  background-image: url("assets/battle/Blank_4.png");
  background-position: left center;
  left: 0;
}

.battle .right {
  background-image: url("assets/battle/Blank_6.png");
  background-position: right center;
  right: 0;
}

.battle .content {
  position: absolute;
  top: var(--battle-bg-slice-height);
  left: var(--battle-bg-slice-width);
  width: calc(100% - (var(--battle-bg-slice-width) * 2) + 2px);
  height: calc(100% - (var(--battle-bg-slice-height) * 2) + 2px);
  background-image: url("assets/battle/Blank_5.png");
  background-size: 100% 100%;
}

.battle .description {
  position: absolute;
  bottom: 3rem;
  left: 1.6rem;
  right: 1.6rem;
  color: black;
}

.battle .battlefield {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  justify-items: center;
  gap: 0.6rem;
  padding: 1rem 0.4rem;
  height: 100%;
  content: wrap;
}

@media (max-width: 960px) {
  .battle {
    padding-top: 3rem;
  }

  .battle .description {
    font-size: 1rem;
  }

  .battle button {
    font-size: 0.9rem;
  }
}

@media (max-width: 640px) {
  .battle {
    padding-top: 2.4rem;
  }

  .battle .description {
    font-size: 0.8rem;
  }

  .battle button {
    font-size: 0.7rem;
  }
}