@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@200,400&display=swap");

/* 공통 스타일 설정 */
* {
  margin: 0 auto;
  box-sizing: border-box;
}

* ::-webkit-scrollbar {
  width: 10px;
}

* ::-webkit-scrollbar-thumb {
  background-color: var(--dark-stroke-color);
  border-radius: 10px;
  background-clip: padding-box;
  border: 3px solid transparent;
}

* ::-webkit-scrollbar-track {
  background-color: transparent;
  border-radius: 10px;
}

button:hover {
  cursor: pointer;
}

:root {
  --main-bg-color: #4d7c5a;
  --side-bg-color: #d9bf8e;
  --dark-stroke-color: #694c15;
  --light-stroke-color: #9a6f1e;
  --light-bg-color: rgb(255, 246, 216);
}

.ir {
  position: absolute;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn-style {
  box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.3);
}

/* 레이아웃 */
body {
  background-color: var(--main-bg-color);
  margin: 0 auto;
}

.img-top {
  display: block;
  margin: 0 auto 76px;
}

.wrapper {
  display: flex;
  gap: 0 28px;
  justify-content: center;
}

.vending-machine,
.my-info {
  flex-basis: 360px;
}

/* 자판기 영역 */
.vending-machine {
  padding: 21px 28px;
  height: 545px;
  background-color: var(--side-bg-color);
  border-radius: 10px;
}

.vending-machine .list-item {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.btn-item {
  width: 93px;
  height: 130px;
  border-radius: 10%;
  border: none;
  box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.3);
}

.btn-item:hover {
  outline: 3px solid var(--dark-stroke-color);
}

.btn-item:active {
  transform: scale(1.1);
}

.vending-machine .list-item li {
  position: relative;
}
.vending-machine .list-item li.sold-out::before {
  display: block;
  position: absolute;
  content: "";
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  z-index: 1;
  border-radius: 10px;
  background: no-repeat center/81px 97px url(../images/sold_out.png)
    rgba(0, 0, 0, 0.5);
}

.vending-machine .list-item li.sold-out {
  pointer-events: none;
}

.tit-item {
  font-size: 12px;
}

.text-price {
  display: block;
  width: 70px;
  height: 20px;
  line-height: 20px;
  color: #fff;
  font-size: 11px;
  background-color: var(--light-stroke-color);
  border-radius: 20px;
  margin: 6px auto 0;
}

/* 왼쪽 자판기 하단 */
.section-purchase {
  display: flex;
  flex-wrap: wrap;
  margin-top: 20px;
}

.info-balance {
  display: block;
  width: 200px;
  height: 32px;
  border-radius: 5px;
  line-height: 32px;
  background-color: var(--light-bg-color);
  margin-right: 10px;
  padding-left: 10px;
  font-size: 15px;
}

.info-balance .text-balance::before,
.info-mysnowflake .amount-mysnowflake::before {
  content: "❄️ ";
  margin: 0 5px;
}

.btn-return,
.btn-put {
  width: 93px;
  height: 32px;
  border-radius: 5px;
  border: none;
  background-color: #fff;
  font-size: 13;
}

.btn-purchase {
  background-color: var(--dark-stroke-color);
  color: #fff;
}

.section-inp {
  margin: 20px 0;
  display: flex;
}

.inp-put {
  font-size: 15px;
  display: block;
  width: 200px;
  height: 32px;
  border-radius: 5px;
  line-height: 32px;
  background-color: #fff;
  margin-right: 10px;
  border: none;
  padding-left: 10px;
}

.section-get-item {
  display: flex;
  gap: 10px;
}

.list-item-staged {
  padding: 12px;
  width: 200px;
  height: 106px;
  background-color: #fff;
  border-radius: 10px;
  overflow-y: scroll;
}

.list-item-staged li {
  border-radius: 5px;
  background-color: #d9bf8e;
}

.list-item-staged li + li {
  margin-top: 6px;
}

.list-item-staged .img-item,
.list-item-staged .txt-item {
  float: left;
}

.list-item-staged .btn-staged {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--dark-stroke-color);
  border-radius: 5px;
}

.vending-machine .list-item-staged .btn-staged {
  background-color: var(--side-bg-color);
}

.list-item-staged .txt-item {
  margin-left: 3px;
  font-size: 12px;
  line-height: 32px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-staged .num-counter {
  float: right;
  display: flex;
  margin-top: 3px;
  justify-content: center;
  align-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid var(--light-stroke-color);
  background-color: #fff;
  border-radius: 5px;
}

.list-item-staged .img-item {
  height: 32px;
}

.btn-purchase {
  width: 94px;
  height: 106px;
  border-radius: 10px;
  border: none;
}

/* 우측 내 정보 영역 */
.my-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.my-budget {
  position: relative;
  padding: 25px;
  height: 161px;
  background-color: #fff;
  border-radius: 10px;
}

.cont-campaign {
  width: 308px;
  height: 51px;
  background-color: var(--side-bg-color);
  text-align: center;
  padding-top: 10px;
}

.cont-campaign::after {
  content: url(../images/star.png);
  position: absolute;
  left: 37px;
  top: 35px;
}

.cont-campaign strong {
  font-size: 14px;
  font-weight: 500;
  line-height: 21px;
}

.cont-campaign p {
  font-size: 9px;
}

progress {
  appearance: none;
  width: 265px;
  height: 12px;
}

progress::-webkit-progress-bar {
  margin-top: 20px;
  background: #f0f0f0;
  border-radius: 10px;
  box-shadow: inset 3px 3px 10px #ccc;
}

progress::-webkit-progress-value {
  border-radius: 10px;
  background: var(--dark-stroke-color);
  background: linear-gradient(
    to right,
    var(--light-stroke-color),
    var(--dark-stroke-color)
  );
}

progress::after {
  content: url(../images/star.png);
  width: 33px;
  height: 33px;
  position: absolute;
  right: 30px;
  bottom: 40px;
}

.info-mysnowflake {
  margin-top: 40px;
  font-size: 14px;
}

.text-mysnowflake {
  bottom: 0;
  font-size: 14px;
}

.amount-mysnowflake {
  position: absolute;
  right: 30px;
  font-size: 14px;
}

/* 우측 하단 나의 오너먼트 영역*/
.my-ornament {
  position: relative;
  padding: 25px;
  height: 360px;
  background-color: #fff;
  border-radius: 10px;
  text-align: center;
}

.my-ornament h3 {
  font-size: 15px;
  font-weight: 700;
}

.my-info .list-item-staged {
  height: 250px;
  background-color: var(--side-bg-color);
  margin-top: 20px;
  width: 305px;
}

.my-info .list-item-staged .btn-staged {
  background-color: #fff;
}

.text-total {
  position: absolute;
  bottom: 25px;
  right: 25px;
  font-size: 13px;
}

/* 모달창 */

#modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 999;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.3);
}

#modal .modal-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 590px;
  height: 610px;
  background: no-repeat center/600px 620px url(../images/envelope.png);
  border: none;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
}

#modal .tit-modal {
  font-size: 30px;
  font-weight: bold;
  margin-top: 70px;
}

#modal .text-modal {
  font-size: 16px;
  margin-top: 35px;
}

#modal .img-modal {
  width: 35%;
}

#modal .footer-modal {
  text-align: center;
  line-height: 20px;
  font-size: 15px;
}

#modal .copyright-modal {
  margin-top: 15px;
  font-size: 14px;
}

#modal .btn-close {
  position: absolute;
  top: 30px;
  right: 40px;
  background-color: transparent;
  border: none;
}

.fa-snowflake {
  animation: fall 5s linear forwards;
  color: #fff;
  position: absolute;
}

@keyframes fall {
  to {
    transform: translateY(90vh);
  }
}
