/* .header{
    flex: auto;
    display: flex;
    justify-content: left;
    align-items: left;
    /* height: 10vh; */
    /* padding: 10vh;
} */ */

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

body, html {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Playfair Display', serif;
    background: #D75C53;
    min-height: 100vh;
    min-width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-bg {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #D75C53;
}

.center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.cookie-area {
    position: relative;
    width: 220px;
    height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cookie-whole {
    width: 140px;
    height: auto;
    display: block;
    margin: 0 auto;
    cursor: pointer;
    z-index: 2;
    transition: opacity 0.3s;
}

.cookie-halves {
    position: absolute;
    top: 0;
    left: 0;
    width: 220px;
    height: 140px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.5s;
}
.cookie-halves.fade-out {
    opacity: 0;
}

.cookie-half {
    position: absolute;
    top: 0;
    width: 100px;
    height: auto;
    transition: transform 0.7s cubic-bezier(.68,-0.55,.27,1.55);
    will-change: transform;
    pointer-events: none;
    opacity: 1;
}
#cookie-down-img,
#cookie-top-img {
    width: 170px;
    height: auto;
}

#cookie-top-img {
    left: 20px;
    top: 10px;
    z-index: 2;
    transform: translateX(0) rotate(0);
}

#cookie-down-img {
    left: 20px;
    top: 10px;
    z-index: 2;
    transform: translateX(0) rotate(20);
}

@keyframes crackTop {
    0% { transform: translateX(0) rotate(0); }
    70% { transform: translate(170px, -90px) rotate(45deg); }
    85% { transform: translate(160px, -80px) rotate(35deg); }
    100% { transform: translate(170px, -90px) rotate(45deg); }
} 
@keyframes crackDown {
    0% { transform: translateX(0) rotate(0); }
    70% { transform: translate(-170px, 40px) rotate(55deg); }
    85% { transform: translate(-160px, 30px) rotate(45deg); }
    100% { transform: translate(-170px, 40px) rotate(55deg); }
}    


.cookie-area.cracked #cookie-down-img {
    animation: crackDown 0.9s cubic-bezier(.68,-0.55,.27,1.55) forwards;
}
.cookie-area.cracked #cookie-top-img {
    animation: crackTop 0.9s cubic-bezier(.68,-0.55,.27,1.55) forwards;
}

.cookie-area.cracked .cookie-whole {
    opacity: 0;
    pointer-events: none;
}
.cookie-area.cracked .cookie-halves {
    pointer-events: auto;
    display: flex;
}

.cookie-label {
    font-family: 'Indie Flower', cursive;
    color: #fff;
    font-size: 1.3em;
    margin-top: 10px;
    margin-bottom: 30px;
    text-align: center;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px #b94b44;
    z-index: 1;
}

.fortune-reveal {
    position: absolute;
    left: 0;
    right: 0;
    top: 0px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(30px);
    transition: opacity 0.5s, transform 0.5s;
    z-index: 3;
}
.cookie-area.cracked .fortune-reveal {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.fortune-text {
    font-family: 'Indie Flower', cursive;
    color: #fff;
    font-size: 1.5em;
    margin: -10px 0 10px 0;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInFortune 0.7s 0.9s forwards;
}
@keyframes fadeInFortune {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.lucky-numbers {
    font-family: 'Indie Flower', cursive;
    color: #fff;
    font-size: 1.2em;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInFortune 0.5s 1.1s forwards;
}

.next-button, .reset-btn {
    background: #fff;
    color: #D75C53;
    border: none;
    border-radius: 20px;
    padding: 10px 28px;
    font-size: 1.1em;
    font-family: 'Indie Flower', cursive;
    margin: 10px auto 0 auto;
    display: block;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    transition: background 0.2s, color 0.2s, transform 0.2s;
    opacity: 0;
    transform: translateY(20px);
}
.next-button.visible {
    animation: fadeInButton 0.5s 1.5s forwards;
}
@keyframes fadeInButton {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.next-button:hover, .reset-btn:hover {
    background: #D75C53;
    color: #fff;
    transform: scale(1.05);
}

.lottery-result {
    font-family: 'Indie Flower', cursive;
    color: #fff;
    font-size: 1.2em;
    margin: 30px 0 10px 0;
    text-align: center;
    background: rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 18px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    animation: fadeIn 1s;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes flyUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.cookie-whole.fly-up,
.cookie-label.fly-up {
    animation: flyUp 0.7s cubic-bezier(.68,-0.55,.27,1.55);
}

