@font-face {
    font-family: 'DungGeunMo';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_six@1.2/DungGeunMo.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'PixelMplus10';
    src: url('/file/nmixx/PixelMplus10-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* 전체적인 픽셀 스타일 */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background-color: #ffffff;
    text-align: center;

}

main {
    position: absolute;
    top: 85px;
    left: 0;
    width: 100%;
    height: calc(100% - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DungGeunMo', 'PixelMplus10', cursive;
    
}

.main-container, .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 자판기 배치 */
#vending-machine {
    width: 100%;
    margin-bottom: 10px;
    cursor: pointer;
}

/* 깜박이는 텍스트 스타일 */
#start-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 40px;
}

.blink {
    animation: blink 1.5s infinite;
}

.loadingblink {
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* 흔들림 애니메이션 */

.shake {
    animation: machine-operation 1.5s ease-in-out infinite;
    transform-origin: center;
}

@keyframes machine-operation {
    0% {
        transform: scale(1, 1); /* 기본 상태 */
    }

    25% {
        transform: scale(1.05, 0.95); /* 가로로 늘어나고 세로로 줄어듦 */
    }

    50% {
        transform: scale(0.95, 1.05); /* 가로로 줄어들고 세로로 늘어남 */
    }

    75% {
        transform: scale(1.05, 0.95); /* 다시 가로로 늘어나고 세로로 줄어듦 */
    }

    100% {
        transform: scale(1, 1); /* 기본 상태로 돌아옴 */
    }
}

/* .shake {
    animation: machine-operation 2s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
    transform-origin: center;
}

@keyframes machine-operation {
    0% {
        transform: scale(1, 1) skew(0deg, 0deg) rotate(0deg) translate(0, 0);
    }

    15% {
        transform: scale(1.1, 0.9) skew(10deg, -5deg) rotate(3deg) translate(-10px, 3px);
    }

    30% {
        transform: scale(0.9, 1.1) skew(-10deg, 5deg) rotate(-3deg) translate(10px, -3px);
    }

    45% {
        transform: scale(1.05, 1) skew(5deg, -10deg) rotate(5deg) translate(-5px, -5px);
    }

    60% {
        transform: scale(0.95, 1.05) skew(-5deg, 10deg) rotate(-5deg) translate(5px, 5px);
    }

    75% {
        transform: scale(1.08, 0.92) skew(15deg, -7deg) rotate(7deg) translate(-8px, 5px);
    }

    90% {
        transform: scale(0.92, 1.08) skew(-15deg, 7deg) rotate(-7deg) translate(8px, -5px);
    }

    100% {
        transform: scale(1, 1) skew(0deg, 0deg) rotate(0deg) translate(0, 0);
    }
} */



/* 자판기 사라지기 */
.fade-out {
    animation: fadeOut 1s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

.text-out {
    animation: textOut 1s forwards;
}

@keyframes textOut {
    to {
        opacity: 0;
    }
}

.text-in {
    animation: textIn 1s backwards;
}

@keyframes textIn {
    from {
        opacity: 0; /* 시작 시 완전히 투명 */
    }
    to {
        opacity: 1; /* 애니메이션이 끝나면 완전히 보임 */
    }
}

#start-screen, .fortune-card {
    width: 50vh;
}

/* 행운 카드 */
.fortune-card {
    padding: 20px;
    background-color: #f1f1f1;
    border-radius: 10px;
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.227);
    display: none;
}

/* 버튼 스타일 */
.button-group {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.button {
    font-family: 'DungGeunMo', 'PixelMplus10', cursive;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    margin: 5px;
    position: relative;
    background-color: #333;
    color: #fff;
    box-shadow: 0 5px #222;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

#original-link {
    font-size: 14px;
    margin-top: 20px;
    color: #3541b1;
    cursor: pointer;
    display: none;
    justify-content: center;
}

.button i {
    margin-right: 5px;
}

/* 클릭 효과 */
.button:active {
    transform: translateY(5px);
    box-shadow: none;
}

/* 개별 버튼 스타일 */
.download-btn {
    background-color: #f2c100;
    color: white;
}

.share-btn {
    background-color: #4CAF50;
    color: white;
}

.retry-btn {
    background-color: #f34f43;
    color: white;
}

@media (max-width: 768px) {
    main {
        top: 56px;
        height: calc(100% - 56px);
    }

    .fortune-card, #start-screen {
        width: calc(100% - 40px);
    }

    #original-link {
        font-size: 12px;
    }

    .main-container {
        padding: 0 20px;
    }

}