:root {
    --text-color: #646b8c;
    --headline-color: #2b3044;
    --mail: #555b77;
    --mail-triangle: #494f69;
    --mail-background: #404660;
    --mail-shadow: #d1d6ee;
    --paper: #fff;
    --paper-border: #d1d6ee;
    --confirm-color: #fff;
    --confirm-background: #275efe;
    --game-paddle: #404660;
    --game-ball: #275efe;
    --controls-text: #646b8c;
    --controls-icon: #646b8c;
    --controls-background: #e1e6f9;
}

#unsubscribe .letter {
    width: 350px;
    height: 220px;
    margin: 0 auto 32px auto;
    position: relative;
    animation: letter 2s ease infinite;
}

#unsubscribe .letter:before,
#unsubscribe .letter:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 195px;
    z-index: 1;
}

#unsubscribe .letter:before {
    background: var(--mail);
    clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%);
}

#unsubscribe .letter:after {
    background: var(--mail-triangle);
    clip-path: polygon(0 100%, 50% 55%, 100% 100%);
}

#unsubscribe .letter .background {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: var(--mail-background);
    clip-path: polygon(0 24px, 50% 0, 100% 24px, 100% 100%, 0 100%);
}

#unsubscribe .letter .shadow {
    background: black;
    width: 100%;
    height: 5px;
    border-radius: 50%;
    position: absolute;
    top: 108%;
    left: -4px;
    background: var(--mail-shadow);
    animation: shadow 2s ease infinite;
}

#unsubscribe .letter .body {
    width: 650px;
    height: 1150px;
    bottom: 0;
    left: -150px;
    border-radius: 1px;
    background: var(--paper);
    box-shadow: inset 0 0 0 1px var(--paper-border);
    position: absolute;
    transform: translateY(36%) translateZ(0) scale(0.2, 0.16) rotate(90deg);
}

#unsubscribe .letter .body .game {
    width: 360px;
    height: 260px;
    position: relative;
    transition: opacity 0.3s ease 0.8s;
}

#unsubscribe .letter .body .game .headline {
    position: absolute;
    left: 0;
    right: 0;
    top: -32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateZ(0);
}

#unsubscribe .letter .body .game .headline span {
    color: var(--headline-color);
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
}

#unsubscribe .letter .body .game .headline .close {
    cursor: pointer;
}

#unsubscribe .letter .body .game .headline .close svg {
    width: 20px;
    height: 20px;
    display: block;
    fill: var(--text-color);
    padding: 2px;
}

#unsubscribe .letter .body .game .paddle,
#unsubscribe .letter .body .game .ball {
    top: 0;
    position: absolute;
    transition: opacity 0.3s;
    transform: translate(var(--x, 0), var(--y, 0));
}

#unsubscribe .letter .body .game .paddle {
    width: 6px;
    height: 48px;
    border-radius: 3px;
    --y: 106px;
    background: var(--game-paddle);
}

#unsubscribe .letter .body .game .paddle.one {
    left: 0;
}

#unsubscribe .letter .body .game .paddle.two {
    right: 0;
}

#unsubscribe .letter .body .game .ball {
    background: var(--game-ball);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    left: 0;
}

#unsubscribe .letter .body .game .controls {
    bottom: -80px;
    left: 0;
    right: 0;
    position: absolute;
}

#unsubscribe .letter .body .game .controls span {
    display: block;
    text-align: center;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--controls-text);
}

#unsubscribe .letter .body .game .controls div {
    display: flex;
    justify-content: center;
}

#unsubscribe .letter .body .game .controls div button {
    width: 64px;
    padding: 8px 0;
    margin: 0;
    background: var(--controls-background);
}

#unsubscribe .letter .body .game .controls div button:not(:last-child) {
    margin-right: 16px;
}

#unsubscribe .letter .body .game .controls div button svg {
    width: 20px;
    height: 20px;
    display: block;
    margin: 0 auto;
    fill: var(--controls-icon);
}

#unsubscribe .letter .body .game .start {
    position: absolute;
    text-align: center;
    white-space: nowrap;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
}

#unsubscribe .letter .body .game .start button {
    color: var(--confirm-color);
    background: var(--confirm-background);
}

#unsubscribe .letter .body .game .start small {
    margin: 4px 0 0 0;
    display: block;
    font-style: italic;
    font-size: 12px;
    color: var(--text-color);
}

#unsubscribe .letter .body .game:not(.idle) .start {
    opacity: 0;
    pointer-events: none;
}

#unsubscribe .letter .body .game:not(.init) .ball {
    opacity: 0;
}

#unsubscribe h1 {
    text-align: center;
    margin: 0 0 8px 0;
    font-family: inherit;
    font-weight: 600;
    font-size: 24px;
    color: var(--headline-color);
}

#unsubscribe p {
    text-align: center;
    margin: 100px auto;
    font-size: 20px;
    color: #FFEB3B;
}

#unsubscribe .cta {
    margin-top: 32px;
}

#unsubscribe .cta button {
    color: var(--confirm-color);
    background: var(--confirm-background);
}

#unsubscribe:not(.show-game) .letter .body .game {
    opacity: 0;
    pointer-events: none;
    transition-delay: 0s;
}

@keyframes paper {
    30% {
        z-index: 0;
        transform: translateY(18%) translateZ(0) scale(0.2, 0.16);
    }
}

@keyframes paper-back {
    0% {
        transform: translateY(63%) translateZ(0);
    }

    30% {
        transform: translateY(0) translateZ(0) scale(0.2, 0.16) rotate(0deg);
    }

    60% {
        z-index: 0;
        transform: translateY(18%) translateZ(0) scale(0.2, 0.16);
    }
}

@keyframes letter {
    50% {
        transform: translateY(-4px);
    }
}

@keyframes shadow {
    50% {
        opacity: 0.7;
        transform: translateY(4px) scale(0.8);
    }
}