* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.container {
    width: 100%;
    min-height: 100vh;
    position: relative;
}

.scene {
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
    padding: 20px;
}

.scene.active {
    display: flex;
}

.title {
    color: white;
    font-size: 3em;
    text-align: center;
    margin-bottom: 40px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.cat-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cat {
    position: relative;
    z-index: 2;
}

.cat-face {
    position: relative;
    margin-bottom: -20px;
}

.head {
    width: 120px;
    height: 100px;
    background: #ff9a56;
    border-radius: 50% 50% 45% 45%;
    position: relative;
    z-index: 2;
}

.ear {
    width: 40px;
    height: 50px;
    background: #ff9a56;
    border-radius: 50% 50% 0 0;
    position: absolute;
    top: -25px;
}

.ear::before {
    content: '';
    width: 20px;
    height: 30px;
    background: #ffb380;
    border-radius: 50% 50% 0 0;
    position: absolute;
    left: 10px;
    top: 5px;
}

.ear-left {
    left: 10px;
    transform: rotate(-20deg);
}

.ear-right {
    right: 10px;
    transform: rotate(20deg);
}

.eyes {
    display: flex;
    justify-content: space-around;
    padding: 25px 20px 0;
}

.eye {
    width: 20px;
    height: 25px;
    background: white;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pupil {
    width: 10px;
    height: 12px;
    background: #333;
    border-radius: 50%;
    animation: blink 4s infinite;
}

@keyframes blink {
    0%, 95%, 100% {
        transform: scaleY(1);
    }
    97% {
        transform: scaleY(0.1);
    }
}

.nose {
    width: 12px;
    height: 10px;
    background: #ff6b9d;
    border-radius: 50% 50% 50% 50%;
    position: absolute;
    left: 50%;
    top: 55%;
    transform: translateX(-50%);
}

.mouth {
    position: absolute;
    left: 50%;
    top: 62%;
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
}

.mouth-left,
.mouth-right {
    width: 15px;
    height: 10px;
    border: 2px solid #333;
    border-top: none;
    border-radius: 0 0 50% 50%;
}

.whiskers {
    position: absolute;
    top: 50%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.whiskers-left {
    left: -35px;
}

.whiskers-right {
    right: -35px;
}

.whisker {
    width: 35px;
    height: 2px;
    background: #333;
    border-radius: 2px;
}

.whiskers-left .whisker:nth-child(1) {
    transform: rotate(-10deg);
}

.whiskers-left .whisker:nth-child(2) {
    transform: rotate(0deg);
}

.whiskers-left .whisker:nth-child(3) {
    transform: rotate(10deg);
}

.whiskers-right .whisker:nth-child(1) {
    transform: rotate(10deg);
}

.whiskers-right .whisker:nth-child(2) {
    transform: rotate(0deg);
}

.whiskers-right .whisker:nth-child(3) {
    transform: rotate(-10deg);
}

.cat-body {
    width: 100px;
    height: 80px;
    background: #ff9a56;
    border-radius: 50% 50% 60% 60%;
    position: relative;
    z-index: 1;
}

.arm {
    width: 30px;
    height: 80px;
    background: #ff9a56;
    border-radius: 15px;
    position: absolute;
    top: 10px;
}

.arm-left {
    left: -25px;
    transform: rotate(-30deg);
}

.arm-right {
    right: -25px;
    transform: rotate(30deg);
}

.cake {
    position: relative;
    margin-top: 20px;
}

.candles {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 15;
}

.candle {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.wick {
    width: 6px;
    height: 40px;
    background: linear-gradient(to bottom, #e74c3c 0%, #c0392b 100%);
    border-radius: 3px 3px 0 0;
    position: relative;
}

.wick::before {
    content: '';
    width: 3px;
    height: 8px;
    background: #333;
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
}

.flame {
    width: 12px;
    height: 18px;
    background: radial-gradient(ellipse at center, #fff700 0%, #ff8c00 40%, #ff4500 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    animation: flicker 0.3s ease-in-out infinite alternate;
    box-shadow: 0 0 10px #ff8c00, 0 0 20px #ff4500;
}

@keyframes flicker {
    0% {
        transform: translateX(-50%) scale(1) translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) scale(0.95) translateY(-2px);
        opacity: 0.9;
    }
}

.candle.blown .flame {
    animation: blowOut 0.5s ease-out forwards;
}

@keyframes blowOut {
    0% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateX(-50%) scale(1.3) translateY(-10px);
        opacity: 0.5;
    }
    100% {
        transform: translateX(-50%) scale(0);
        opacity: 0;
    }
}

.cake-top {
    width: 250px;
    height: 30px;
    background: #ff1493;
    border-radius: 10px 10px 0 0;
    position: relative;
    box-shadow: inset 0 -5px 10px rgba(0, 0, 0, 0.2);
}

.cake-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: #ffb6c1;
    border-radius: 10px 10px 0 0;
}

.cake-middle {
    width: 250px;
    height: 60px;
    background: #ffd700;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.cake-middle::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10px;
    right: 10px;
    height: 20px;
    background: repeating-linear-gradient(90deg, #ff69b4 0px, #ff69b4 15px, #00ced1 15px, #00ced1 30px);
    border-radius: 5px;
}

.cake-bottom {
    width: 280px;
    height: 40px;
    background: #ff8c00;
    border-radius: 0 0 20px 20px;
    margin-left: -15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.timer-text {
    color: white;
    font-size: 1.5em;
    margin-top: 40px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.age-reveal {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: bottom 1s ease-out;
}

.age-reveal.show {
    bottom: 0;
}

.age-popup {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    text-align: center;
    transform: scale(0);
    animation: popIn 0.8s ease-out 0.3s forwards;
}

@keyframes popIn {
    0% {
        transform: scale(0) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.baby-image {
    max-width: 400px;
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 20px;
    border: 5px solid white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.age-text {
    color: #e74c3c;
    font-size: 2.5em;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
    animation: wiggle 0.5s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-3deg);
    }
    75% {
        transform: rotate(3deg);
    }
}

.birthday-title {
    color: white;
    font-size: 3.5em;
    text-align: center;
    margin-bottom: 40px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    animation: scaleIn 1s ease-out;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.photo-container {
    animation: fadeInUp 1s ease-out 0.5s both;
}

@keyframes fadeInUp {
    0% {
        transform: translateY(50px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.photo-frame {
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 500px;
}

#birthdayPhoto {
    width: 100%;
    max-width: 450px;
    height: auto;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

.photo-caption {
    margin-top: 20px;
    font-size: 1.5em;
    color: #667eea;
    font-weight: bold;
}

.confetti {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

.confetti::before,
.confetti::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ffd700;
    animation: confettiFall 3s linear infinite;
}

@keyframes confettiFall {
    0% {
        top: -10%;
        opacity: 1;
    }
    100% {
        top: 110%;
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .title,
    .birthday-title {
        font-size: 2em;
    }

    .cake-top,
    .cake-middle {
        width: 200px;
    }

    .cake-bottom {
        width: 230px;
    }

    .candles {
        gap: 10px;
    }
}