
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

[hidden] {
    display: none !important;
}

html,
body {
    width: 100%;
    min-height: 100%;
    background-color: #FBF5EC;
    font-family: "Pretendard", "Noto Sans KR", sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100dvh;
}

/* 전체 화면 */
.gift-container {
    position: relative;
    width: min(100%, 56.25dvh);
    aspect-ratio: 9 / 16;
    overflow: hidden;
    background-color: #FBF5EC;
}

/* 공통 화면 */
.screen {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* 영상 */
#giftVideo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 영상 시작 버튼 */
.start-button {
    position: absolute;
    top: 83%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    padding: 18px 12px;
    border: none;
    border-radius: 14px;
    background-color: #737549;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* 영상 종료 화면 */
#endingScreen {
    z-index: 2;
    animation: fadeIn 0.8s ease both;
}

/* 꼬미 원본 이미지 */
.ending-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 하단 버튼 영역 */
.ending-buttons {
    position: absolute;
    top: 67%;
    left: 50%;
    transform: translateX(-50%);
    width: 84%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: buttonAppear 0.8s ease both;
}

/* 버튼 공통 설정 */
.ending-buttons button {
    width: 100%;
    min-height: 44px;
    padding: 14px 8px;
    border-radius: 14px;
    font-size: 14px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
}

/* 다시보기 버튼 */
.replay-button {
    background-color: transparent;
    border: 1.5px solid #737549;
    color: #737549;
}

/* 다른 선물 구경하기 버튼 */
.shop-button {
    background-color: #737549;
    border: 1.5px solid #737549;
    color: #ffffff;
}

/* 버튼 클릭 효과 */
.ending-buttons button:active {
    transform: scale(0.96);
    opacity: 0.85;
}

/* 화면 등장 효과 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* 버튼 등장 효과 */
@keyframes buttonAppear {
    from {
        opacity: 0;
        transform: translate(-50%, 15px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* 작은 휴대폰 화면 대응 */
@media (max-width: 360px), (max-height: 650px) {
    .ending-buttons {
        gap: 8px;
    }

    .ending-buttons button {
        font-size: 12px;
        padding: 10px 6px;
    }

    .start-button {
        font-size: 14px;
        padding: 14px 10px;
    }
}
