@charset "UTF-8";
/* 기본 스타일 */
body {
    /* font-family: Noto Sans KR, Apple SD Gothic Neo, Malgun Gothic, 맑은 고딕, Dotum, 돋움, Arial, sans-serif;
    font-size: 100%;
    line-height: 1; */
    background-color: #f2e4d5; /* 베이지색 배경 (figma) */
    display: flex;
    flex-direction: column;
    /* align-items: center; */
    justify-content: flex-start;
    min-height: 100vh;
    margin: 0;
    color: #191919;
    overflow-x: hidden;
}

.fortune-header {
    text-align: center;
    margin-bottom: 50px;
}

.fortune-header .subtitle {
    font-size: 18px;
    font-weight: 900;
    line-height: 120%;
    margin-bottom: 10px;
}

.title-image {
    width: 303px;
    /* max-width: 360px; */
    height: auto;
    display: block;
    margin: 0 auto;
}

/* 컨테이너 */
.fortune-container {
    /* width: 92%; */
    max-width: 380px;
    margin: 0 auto 70px;
    text-align: center;
    position: relative;
}

.cookie-stage {
    position: relative;
    width: 100%;
    min-height: 270px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.cookie-stage.collapsed {
    min-height: 0;
    height: 0;
    display: none;
}

/* 1. 기본 상태: 포춘쿠키 */
.fortune-cookie-wrapper {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    transition: opacity 0.4s;
    width: 100%;
    display: flex;
    justify-content: center;
    opacity: 1;
}

/* 위아래 움직이는 애니메이션 */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.fortune-cookie-wrapper.active .heart-cookie {
    animation: bounce 2s infinite ease-in-out;
}

.fortune-cookie-wrapper .touch-me {
    animation: bounce 2s infinite ease-in-out;
}

.fortune-cookie-wrapper.fading {
    opacity: 0;
    transition: opacity 0.28s ease;
}

.heart-cookie {
    width: 100%;
    height: auto;
    max-width: 320px;
    margin: 0 auto;
    display: block;
}

.touch-me {
    position: absolute;
    top: 0;
    left: 184px;
    /* width: 82px; */
    height: 26px;
    /* transform: translateX(-50%); */
    background: #ffffff;
    color: #e22d23;
    padding: 6px 6px 6px 7px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18); */
    opacity: 1;
    transition: opacity 0.3s;
}

.touch-me::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 10px solid #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* 2. 쪼개지는 상태 */
.cracked-cookie {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0s linear 0.28s;
    display: flex;
    justify-content: center;
}

.cracked-cookie.show {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

/* 3. 메시지 공개 상태 - 종이 디자인 (버튼 제외) */
.message-box {
    position: relative;
    width: 88%;
    max-width: 340px; 
    margin: 18px auto 0;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s, transform 0.6s;
}

.message-box.visible {
    opacity: 1;
    transform: translateY(0);
}

.clover {
    font-size: 32px; 
    display: block;
    margin-bottom: 8px;
    color: #1f7a1f; 
}

.luck-text {
    font-size: 26px; 
    font-weight: 900;
    line-height: 120%;
    margin-bottom: 19px; 
}

.fortune-message {
    font-size: 18px;
    line-height: 1.6;
    min-height: 4em; 
    white-space: pre-wrap;
    margin: 0;
    font-weight: 400;
}

.paper {
    width: 100%;
    height: auto;
    display: block;
    transform-origin: center;
}

.paper-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 22px 24px;
    pointer-events: none;
    text-align: center;
    transform-origin: center;
}

@keyframes unfold {
    0% {
        transform: translateY(24px) scaleY(0.12) scaleX(0.86) rotate(-6deg) skewX(-3deg);
        filter: blur(8px);
        opacity: 0;
    }
    40% {
        transform: translateY(-10px) scaleY(1.2) scaleX(1.06) rotate(3deg) skewX(2deg);
        filter: blur(1px);
        opacity: 1;
    }
    70% {
        transform: translateY(4px) scaleY(0.96) scaleX(0.97) rotate(-2deg);
        filter: blur(0.6px);
        opacity: 1;
    }
    100% {
        transform: scaleY(1) scaleX(1) rotate(0deg);
        filter: blur(0);
        opacity: 1;
    }
}

.message-box.unfold .paper,
.message-box.unfold .paper-text {
    animation: unfold 0.6s cubic-bezier(0.15, 0.85, 0.25, 1) forwards;
}

/* 설명 및 푸터 */
.description-box {
    background-color: #f8dcb3;
    padding: 17px 14px;
    margin: 30px auto 0;
    text-align: center;
    /* width: 86%; */
    max-width: 320px;
    box-sizing: border-box;
    font-size: 14px;
    font-weight: 400;
    line-height: 140%;
    color: #2b2018;
    border-radius: 5px;
    box-shadow: 0 0 15px 0 rgba(255, 255, 255, 0.25);
}

.description-box strong {
    font-weight: 800;
}

footer {
  background-color: #fff;
}

.footer-note {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #c4b5a8;
}

main {
  margin-top: 118px;
}

/* PC 전용: 푸터를 하단에 고정 (플렉스 레이아웃) */
/* @media (min-width: 986px) { */
    #wrapper {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }
    main {
        flex: 1 0 auto;
    }
    .fortune-container {
      margin-bottom: 132px;
    }
    #footer {
        margin-top: auto;
        flex: 0 0 auto;
    }
/* } */

/* --- 버튼 그룹 CSS (결과 화면용) --- */
.result-actions {
    opacity: 0;
    transition: opacity 0.4s ease;
    width: 100%;
    max-width: 350px;
    margin: 30px auto 0; /* 메시지 종이와의 간격 */
}

.result-actions.visible {
    opacity: 1;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    
}

.action-button {
    height: 60px;
    padding: 15px 20px;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 400;
    line-height: 26px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.primary-button {
    background-color: #CF2400;
    color: white;
}

.secondary-button {
    background-color: transparent;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
}

/* hover 이동 제거 */

/* 상태별 보이기/숨기기 */
.hidden {
    display: none !important;
}

.nav_re.black_type {
  top: 0 !important;
}

/* @media (max-width: 689px) {
    .footer_info p {
        max-width: 294px;
    }
} */