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

body {
    font-family: 'Comic Sans MS', 'Arial', sans-serif;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 50%, #ffecd2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.container {
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.title {
    color: #fff;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 1s ease-out;
}

.subtitle {
    color: #ff6b9d;
    font-size: 1.3em;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 1s ease-out 0.3s both;
}

.gift-container {
    position: relative;
    margin-top: 10px;
}

/* Cadeau inspiré du CodePen */
.box {
    position: relative;
    cursor: pointer;
    animation: bounce 2s infinite;
}

.box.opening {
    animation: none;
}

.box-body {
    position: relative;
    height: 200px;
    width: 200px;
    margin: 0 auto;
    margin-top: 80px;
    background: linear-gradient(#ff6b9d, #ff8fab);
    border-bottom-left-radius: 5%;
    border-bottom-right-radius: 5%;
    box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.3);
}

.box-body::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    background: linear-gradient(#ffffff, #ffd700);
    z-index: 1;
}

.box-lid {
    position: absolute;
    z-index: 1;
    left: 50%;
    transform: translateX(-50%);
    bottom: 90%;
    height: 40px;
    background: linear-gradient(#ffd700, #ffb347);
    width: 220px;
    border-radius: 5%;
    box-shadow: 0 8px 4px -4px rgba(0, 0, 0, 0.3);
}

.box-lid::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    background: linear-gradient(#ffd700, #fff);
    z-index: 2;
}

.box-bowtie {
    z-index: 1;
    height: 100%;
}

.box-bowtie::before,
.box-bowtie::after {
    content: "";
    width: 60px;
    height: 60px;
    border: 12px solid #ff4757;
    border-radius: 50% 50% 0 50%;
    position: absolute;
    bottom: 99%;
    z-index: -1;
}

.box-bowtie::before {
    left: 50%;
    transform: translateX(-100%) skew(10deg, 10deg);
}

.box-bowtie::after {
    left: 50%;
    transform: translateX(0%) rotate(90deg) skew(10deg, 10deg);
}

/* Animation d'ouverture */
.box.opening .box-lid {
    animation: box-lid 1s forwards ease-in-out;
}

.box.opening .box-body {
    animation: box-body 1s forwards ease-in-out;
}

.box.opening .box-bowtie::before {
    animation: box-bowtie-left 1.1s forwards ease-in-out;
}

.box.opening .box-bowtie::after {
    animation: box-bowtie-right 1.1s forwards ease-in-out;
}

/* Contenu du cadeau */
.gift-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(0%);
    width: min(90vw, 420px);
    background: white;
    padding: 45px 50px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    z-index: 1000;
    transition: all 0.5s;
}

.hidden {
    display: none;
}

.box.opening .gift-content {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0px);
    transition-delay: 0.8s;
}

.quiz-step h2,
.countdown-step h2,
.gift-reveal h2 {
    color: #ff6b9d;
    font-size: 2em;
    margin-bottom: 20px;
}

.quiz-question {
    font-size: 1.3em;
    color: #333;
}

.quiz-options {
    display: flex;
    gap: 18px;
    justify-content: center;
    margin-top: 25px;
}

.quiz-option {
    padding: 12px 26px;
    font-size: 1.1em;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff6b9d 0%, #ff9bb5 50%, #ffa8a8 100%);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(255, 107, 157, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.quiz-option:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(255, 107, 157, 0.35);
}

.quiz-option:disabled {
    cursor: default;
    opacity: 0.5;
    transform: none;
    box-shadow: none;
}

.quiz-feedback {
    min-height: 24px;
    margin-top: 20px;
    font-weight: 600;
    color: #ff6b9d;
}

.countdown-step {
    text-align: center;
    animation: panicShake 1.5s infinite;
}

.countdown-message {
    font-size: 1.2em;
    color: #333;
}

.countdown-number {
    display: inline-block;
    font-size: 2.8em;
    font-weight: bold;
    margin: 0 6px;
    color: #ff4757;
    animation: countdownPulse 1s infinite;
}

.prank-ending {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 12px;
    font-style: italic;
}

.gift-message {
    margin: 20px 0;
}

.main-text {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 15px;
}

.spa-text {
    font-size: 2.5em;
    font-weight: bold;
    background: linear-gradient(135deg, #ff6b9d 0%, #ff8fab 50%, #ffa07a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 15px 0;
}

.sub-text {
    font-size: 1.2em;
    color: #666;
    font-style: italic;
}

.hearts {
    font-size: 2em;
    margin-top: 20px;
}

.hearts span {
    display: inline-block;
    margin: 0 10px;
    animation: heartBeat 1.5s infinite;
}

.hearts span:nth-child(1) {
    animation-delay: 0s;
}

.hearts span:nth-child(2) {
    animation-delay: 0.3s;
}

.hearts span:nth-child(3) {
    animation-delay: 0.6s;
}
.instruction {
    color: #fff;
    font-size: 1.5em;
    margin-top: 50px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transition: opacity 0.5s ease;
    animation: pulse 2s infinite;
    position: relative;
    z-index: 1;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes panicShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-6px);
    }
    50% {
        transform: translateX(6px);
    }
    75% {
        transform: translateX(-3px);
    }
}

@keyframes countdownPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

@keyframes box-lid {
    0%, 42% {
        transform: translate3d(-50%, 0%, 0) rotate(0deg);
    }
    60% {
        transform: translate3d(-85%, -230%, 0) rotate(-25deg);
    }
    90%, 100% {
        transform: translate3d(-119%, 225%, 0) rotate(-70deg);
    }
}

@keyframes box-body {
    0% {
        transform: translate3d(0%, 0%, 0) rotate(0deg);
    }
    25% {
        transform: translate3d(0%, 25%, 0) rotate(20deg);
    }
    50% {
        transform: translate3d(0%, -15%, 0) rotate(0deg);
    }
    70% {
        transform: translate3d(0%, 0%, 0) rotate(0deg);
    }
}

@keyframes box-bowtie-right {
    0%, 50%, 75% {
        transform: translateX(0%) rotate(90deg) skew(10deg, 10deg);
    }
    90%, 100% {
        transform: translate(-50%, -15%) rotate(45deg) skew(10deg, 10deg);
        box-shadow: 0px 4px 8px -4px rgba(0, 0, 0, 0.3);
    }
}

@keyframes box-bowtie-left {
    0% {
        transform: translateX(-100%) rotate(0deg) skew(10deg, 10deg);
    }
    50%, 75% {
        transform: translate(-50%, -15%) rotate(45deg) skew(10deg, 10deg);
    }
    90%, 100% {
        transform: translateX(-100%) rotate(0deg) skew(10deg, 10deg);
    }
}

/* Confettis */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: confettiFall linear forwards;
    opacity: 1;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotateZ(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotateZ(720deg);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .title {
        font-size: 2em;
    }
    
    .subtitle {
        font-size: 1.2em;
    }
    
    .box-body {
        width: 180px;
        height: 180px;
    }
    
    .box-lid {
        width: 200px;
    }
    
    .gift-content {
        width: min(90vw, 340px);
        padding: 30px 28px;
    }
    
    .quiz-options {
        flex-direction: column;
        gap: 14px;
    }
    
    .quiz-option {
        width: 100%;
    }
    
    .countdown-message {
        font-size: 1.1em;
    }
    
    .countdown-number {
        font-size: 2.2em;
    }
    
    .spa-text {
        font-size: 2em;
    }
}
