:root {
    --primary-gradient: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    --secondary-gradient: linear-gradient(to top, #a18cd1 0%, #fbc2eb 100%);
    --button-color: #ff4d6d;
    --text-color: #2d3436;
    --soft-white: #f5f6fa;
    --cake-bottom: #f3a683;
    --cake-middle: #f7d794;
    --cake-top: #f8a5c2;
    --icing: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    overflow: hidden;
    background: #fdf2f2;
    color: var(--text-color);
}

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

/* Landing Screen */
#start-screen {
    background: var(--primary-gradient);
    text-align: center;
    padding: 20px;
}

h1 {
    font-family: 'Pacifico', cursive;
    font-size: 3.5rem;
    color: #fff;
    text-shadow: 2px 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

p {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 40px;
    font-weight: 300;
}

.primary-btn {
    background: #fff;
    color: var(--button-color);
    border: none;
    padding: 18px 40px;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.primary-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Blast Screen */
#blast-screen {
    background: var(--secondary-gradient);
}

.blast-text {
    font-family: 'Pacifico', cursive;
    font-size: 5rem;
    color: #fff;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

/* Cake Screen */
#cake-screen {
    background: #fff5f8;
}

.cake-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* CSS Cake Design */
.cake {
    position: relative;
    width: 250px;
    height: 200px;
    margin-bottom: 50px;
}

.plate {
    position: absolute;
    bottom: -10px;
    left: -25px;
    width: 300px;
    height: 15px;
    background: #ecf0f1;
    border-radius: 50%;
    box-shadow: 0 2px 0 #bdc3c7;
}

.layer {
    position: absolute;
    width: 100%;
    border-radius: 10px 10px 0 0;
}

.layer-bottom {
    bottom: 0;
    height: 50px;
    background: var(--cake-bottom);
}

.layer-middle {
    bottom: 50px;
    height: 50px;
    background: var(--cake-middle);
}

.layer-top {
    bottom: 100px;
    height: 50px;
    background: var(--cake-top);
}

.icing {
    position: absolute;
    bottom: 140px;
    width: 100%;
    height: 20px;
    background: var(--icing);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.drips {
    position: absolute;
    bottom: 130px;
    width: 100%;
    height: 20px;
    background: var(--icing);
    border-radius: 0 0 10px 10px;
}

.candle {
    position: absolute;
    bottom: 160px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 40px;
    background: #ff7675;
    border-radius: 5px;
}

.flame {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 20px;
    background: #fab1a0;
    border-radius: 50% 50% 10% 10%;
    box-shadow: 0 0 10px #ffeaa7;
    animation: flicker 0.1s infinite alternate;
}

@keyframes flicker {
    from {
        transform: translateX(-50%) scale(1);
        opacity: 0.8;
    }

    to {
        transform: translateX(-50%) scale(1.1);
        opacity: 1;
    }
}

.secondary-btn {
    background: var(--button-color);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.secondary-btn:hover {
    background: #ff1f4b;
}

/* Slice Animation & Clip Path */
.cake.cut .layer,
.cake.cut .icing,
.cake.cut .drips {
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 50%, 50% 50%, 20% 0%, 0% 0%);
    transition: clip-path 0.5s ease;
}

.cake-slice {
    position: absolute;
    top: 50px;
    left: 80px;
    width: 60px;
    height: 100px;
    z-index: 10;
    transition: all 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cake-slice.hidden {
    display: none;
}

.cake-slice.moving {
    display: block;
    transform: translate(120px, -20px) rotate(15deg);
    opacity: 0;
}

.s-layer {
    position: absolute;
    width: 100%;
}

.s-layer-bottom {
    bottom: 0;
    height: 33px;
    background: var(--cake-bottom);
    border-radius: 5px;
}

.s-layer-middle {
    bottom: 33px;
    height: 33px;
    background: var(--cake-middle);
}

.s-layer-top {
    bottom: 66px;
    height: 34px;
    background: var(--cake-top);
    border-radius: 5px 5px 0 0;
}

.s-icing {
    position: absolute;
    top: 0;
    width: 100%;
    height: 10px;
    background: var(--icing);
    border-radius: 10px 10px 0 0;
}

.flame.blown {
    display: none;
}

/* Final Screen */
#final-screen {
    background: var(--primary-gradient);
    text-align: center;
}

.final-content {
    padding: 20px;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-wrapper {
    width: 100%;
    max-width: 500px;
    margin-bottom: 30px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: 8px solid white;
    transform: rotate(-2deg);
    transition: transform 0.5s ease;
}

.image-wrapper:hover {
    transform: rotate(0deg) scale(1.05);
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
}

.birthday-text {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.sweet-message {
    color: #636e72;
    background: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 20px;
    line-height: 1.6;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.proposal-box {
    animation: fadeIn 1s ease-in;
    margin-top: 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.yes-btn {
    background: #ff4d6d;
    color: white;
    border: none;
    padding: 20px 50px;
    font-size: 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(255, 77, 109, 0.3);
    transition: all 0.3s ease;
}

.yes-btn:hover {
    transform: scale(1.1);
    background: #ff1f4b;
}

@media (max-width: 600px) {
    h1 {
        font-size: 2.5rem;
    }

    .blast-text {
        font-size: 3rem;
    }

    .birthday-text {
        font-size: 2.5rem;
    }
}