#app-wrapper {
    width: 100%;
    /* header 높이만큼 뺀다. */
    /* 아래 성공한 사람을 보여주기 위해서 조금 더 뺀다.*/
    height: calc(100vh - var(--header-height) - 20px);
    padding: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#page-title {
    width: 100%;
    text-align: center;
    font-size: 25px;
    padding: 10px;
}

#heart-container {
    width: 100%;
    padding: 10px;
    display: flex;
    /* 가운데 배치한다. */
    justify-content: center;
    gap: 5px;
    font-size: 26px;
}

.heart-shape {
    color: #fe347e;
    animation: heartbeat 0.7s infinite;
}

@keyframes heartbeat {
    50% {
        transform: scale(1.1);
    }
}

#selected-info-container {
    width: 100%;
    position: relative;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 23px;
    /* height하면 적용이 안 된다. */
    /* min-height: 100px; */
}
#selected-number {
    padding: 10px 0px;
    min-width: 100px;
    text-align: center;
    border-radius: 15px;
    background-color: #fe347e;
}

#reaction-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
    border: 5px double #000000;
    padding: 20px;
}

/* 테두리에 들어가는 아이콘이다.*/
.border-icon {
    position: absolute;
    background-image: url('/public/img/icon/camera.png');
    background-size: cover;
    --icon-size: 40px;
    width: var(--icon-size);
    height: var(--icon-size);
}

/* 아이콘이 4개 있다. */
/* 아이콘의 크기의 반만큼 이동한다. */
.border-icon.one {
    top: calc(-1 * (var(--icon-size) / 2));
    left: calc(-1 * (var(--icon-size) / 2));
}

.border-icon.two {
    top: calc(-1 * (var(--icon-size) / 2));
    right: calc(-1 * (var(--icon-size) / 2));
}

.border-icon.three {
    bottom: calc(-1 * (var(--icon-size) / 2));
    right: calc(-1 * (var(--icon-size) / 2));
}

.border-icon.four {
    bottom: calc(-1 * (var(--icon-size) / 2));
    left: calc(-1 * (var(--icon-size) / 2));
}

#reaction-info {
    /* 왼쪽에 가도록 한다. */
    align-self: self-start;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 23px;
    padding: 0 20px 20px;
}

#reaction-number {
    padding: 10px 0px;
    min-width: 100px;
    text-align: center;
    border-radius: 15px;
    background-color: #fe347e;
}

#img-wrapper {
    position: relative;
    --img-size: 500px;
    /* 모바일에서는 작게 한다. */
    width: var(--img-size);
    height: var(--img-size);
    display: flex;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

#left-img-container {
    /* #img-wrapper의 반이 되도록 한다. */
    width: calc(var(--img-size) / 2);
    height: var(--img-size);
    overflow: hidden;
    /* 넘치는 부분 숨긴다. */
    position: relative;
}

#right-img-container {
    /* #img-wrapper의 반이 되도록 한다. */
    width: calc(var(--img-size) / 2);
    height: var(--img-size);
    overflow: hidden;
    /* 넘치는 부분 숨긴다. */
    position: relative;
}

#left-img {
    /* 이미지 너비를 2배로 정한다. */
    width: 200%;
    /* 높이를 그래도 정해서 비율 유지한다. */
    height: 100%;
    /* 이미지 비율 유지하면서 공간을 채운다.  */
    object-fit: cover;
    /* 이미지를 원래 위치에 둔다. */
    transform: translateX(0);
}

#right-img {
    /* 이미지 너비를 2배로 정한다. */
    width: 200%;
    /* 높이를 그래도 정해서 비율 유지한다. */
    height: 100%;
    /* 이미지 비율 유지하면서 공간을 채운다.  */
    object-fit: cover;
    /* 이미지를 왼쪽으로 50% 이동한다. */
    /* 그러면 오른쪽 부분만 보인다.  */
    transform: translateX(-50%);
}

#start-button {
    margin-top: 20px;
    padding: 20px;
    border-radius: 10px;
    outline: none;
    background: var(--site-color-1);
    font-size: 28px;
    width: 130px;
}

#app-button-wrapper {
    padding: 20px;
    display: flex;
    gap: 10px;
}

#message-container {
    position: absolute;
    /* 가운데 정렬한다. */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* 최소값으로 정했다. */
    /* 여기에 구글 사각형 광고가 들어간다. */
    min-width: 360px;
    min-height: 360px;
    border-radius: 20px;
    border: 5px solid #000000;
    box-shadow: 0px 0px 2px rgba(0, 0, 0, .2);
    background: #fff;
    z-index: 6;
    /* 처음에는 보이지 않는다. */
    display: none;
    pointer-events: none;
}

#message-container.is-active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
}

#app-message {
    padding: 20px;
    font-size: 24px;
    /* 넘치면 줄바꿈을 한다. */
    word-break: keep-all;
    font-weight: bold;
    text-align: center;
}

#message-confirm-button {
    padding: 20px;
    margin-bottom: 20px;
    font-size: 26px;
    border-radius: 20px;
    outline: none;
    background: #ffffff;
    border: 3px solid var(--site-color-1);
}

/* lottie.js 효과가 나온다. */
#confetti-wrapper {
    /* #app-wrapper가 기준이다. */
    position: absolute;
    /* 부모의 공간을 다 사용한다. */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    /* 클릭하지 못하도록 한다. */
    pointer-events: none;
    /* is-active 클래스를 추가하면 보인다. */
    display: none;
    display: flex;
    justify-content: center;
    align-items: center;
    /* 조각, mo.js 객체보다 위에 있도록 한다. */
    z-index: 7;
}

#confetti-wrapper.is-active {
    display: block;
}

#confetti-container {
    /* 부모의 공간을 다 사용한다. */
    width: 100%;
    height: 100%;
    /* 클릭하지 못하도록 한다. */
    pointer-events: none;
}

#random-selection-link {
    color: #fe347e;
    font-weight: bold;
}

#instagram-link {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    color: #ee729f;
    font-weight: bold;
}

#instagram-link img {
    width: 40px;
}

@media screen and (max-width: 880px) {

    #app-wrapper,
    #page-title,
    #heart-container,
    #selected-info-container {
        padding: 5px;
    }

    #selected-info-container {
        font-size: 18px;
        /* height하면 적용이 안 된다. */
        /* min-height: 100px; */
    }

    #selected-number {
        min-width: 100px;
    }

    #reaction-content {
        padding: 10px;
    }

    #reaction-info {
        font-size: 18px;
        padding: 0 10px 10px;
    }

    #img-wrapper {
        /* --img-size: 320px; */
        --img-size: 82vw;
    }
    #app-message {
        padding: 10px;
        font-size: 20px;
    }
    #start-button{
        padding: 15px;
        font-size: 22px;
        margin-top: 10px;
    }
    #app-button-wrapper{
        padding: 10px;
    }
}