/* Hero Animation Styles */
.hero-animation-wrapper {
    position: relative;
    display: inline-block;
    transition: margin 0.5s ease;
}

.hero-animation-wrapper.expanded {
    margin: 0 1em 0 2em; /* Further reduced margins to prevent line breaks */
}

.glow-sex {
    position: relative;
    display: inline-block;
    transition: opacity 0.5s ease;
    z-index: 15; /* Higher z-index to stay on top */
}

.glow-sex.falling {
    animation: sexFallOff 2s ease-in forwards;
    transform-origin: bottom left;
}

@keyframes sexFallOff {
    0% {
        transform: rotate(0deg) translateY(0);
        opacity: 1;
    }
    10% {
        transform: rotate(-5deg) translateY(0.5vh);
    }
    30% {
        transform: rotate(15deg) translateY(2vh);
        opacity: 0.8;
    }
    60% {
        transform: rotate(-25deg) translateY(10vh);
        opacity: 0.5;
    }
    100% {
        transform: rotate(45deg) translateY(50vh);
        opacity: 0;
    }
}

.goose-should-stamp {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0) rotate(-15deg);
    transform-origin: center;
    display: inline-block;
    color: #FFD700;
    font-weight: bold;
    text-shadow: 
        0 0 0.2em #FFD700,
        0 0 0.4em #FFD700,
        0 0 0.6em #ff8c00,
        0 0 0.8em #ff8c00;
    opacity: 0;
    white-space: nowrap;
    font-size: 1em;
    z-index: 5; /* Lower z-index than surrounding text */
}

.goose-should-stamp.stamped {
    animation: stampIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes stampIn {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-15deg);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2) rotate(5deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* SELLS text wrapper */
.sells-wrapper {
    display: inline-block;
    position: relative;
    transition: margin-left 0.5s ease;
    white-space: nowrap; /* Prevent line breaks */
    z-index: 15; /* Higher z-index to stay on top */
}

.sells-wrapper.spaced {
    margin-left: 1.5em; /* Further reduced margin */
}

.sell-part {
    display: inline-block;
    position: relative;
    z-index: 15;
}

.s-letter {
    display: inline-block;
    transition: all 0.3s ease;
    position: relative;
    z-index: 15;
}

.s-letter.drop {
    animation: dropS 1s ease-in forwards;
    transform-origin: top center;
}

@keyframes dropS {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    20% {
        transform: translateY(0.5vh) rotate(10deg);
    }
    40% {
        transform: translateY(2vh) rotate(-15deg);
    }
    100% {
        transform: translateY(30vh) rotate(180deg) scale(0.8);
        opacity: 0;
    }
}

/* Stamp sound effect visual (optional) */
.stamp-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(255,215,0,0.3) 0%, transparent 70%);
    opacity: 0;
    pointer-events: none;
    z-index: 3; /* Behind everything */
}

.stamp-effect.active {
    animation: stampPulse 0.6s ease-out;
}

@keyframes stampPulse {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

/* Ensure the title line stays on one line */
.title-line-2 {
    white-space: nowrap;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10;
}

/* Additional safeguard for smaller screens */
@media (max-width: 768px) {
    .hero-animation-wrapper.expanded {
        margin: 0 0.5em 0 1em; /* Even smaller margins on mobile */
    }
    
    .sells-wrapper.spaced {
        margin-left: 0.5em;
    }
    
    /* Reduce font size of stamp on mobile to prevent overlap */
    .goose-should-stamp {
        font-size: 0.75em;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .goose-should-stamp {
        font-size: 0.8em;
    }
}
