
:root {
    --ymsb-red: #e5242a;
    --ymsb-dark: #090909;
    --ymsb-cream: #f5efe4;
}

.ymsb-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, .76);
    backdrop-filter: blur(8px);
}

.ymsb-overlay.is-visible {
    display: flex;
    animation: ymsbFade .25s ease-out;
}

.ymsb-modal {
    position: relative;
    width: min(480px, 100%);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 28px;
    background:
        radial-gradient(circle at 50% 20%, rgba(229,36,42,.24), transparent 35%),
        linear-gradient(145deg, #171717, #070707 70%);
    box-shadow: 0 24px 90px rgba(0,0,0,.65);
    color: #fff;
    padding: 34px 28px 28px;
    text-align: center;
}

.ymsb-close {
    position: absolute;
    z-index: 3;
    top: 10px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.ymsb-brand {
    color: var(--ymsb-red);
    font-weight: 900;
    letter-spacing: .18em;
    font-size: 12px;
    margin-bottom: 8px;
}

.ymsb-screen {
    display: none;
}

.ymsb-screen.is-active {
    display: block;
    animation: ymsbRise .35s ease-out;
}

.ymsb-screen h2 {
    margin: 6px 0 8px;
    color: #fff;
    font-size: clamp(26px, 7vw, 38px);
    line-height: 1.05;
}

.ymsb-screen p {
    color: rgba(255,255,255,.78);
    font-size: 15px;
}

.ymsb-primary,
.ymsb-order-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    border: 0;
    border-radius: 999px;
    padding: 12px 24px;
    background: var(--ymsb-red);
    box-shadow: 0 10px 30px rgba(229,36,42,.34);
    color: #fff !important;
    font-weight: 800;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform .2s ease, filter .2s ease;
}

.ymsb-primary:hover,
.ymsb-order-link:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.ymsb-box-button {
    position: relative;
    display: block;
    width: 210px;
    height: 180px;
    margin: 24px auto 10px;
    border: 0;
    background: transparent;
    cursor: pointer;
    perspective: 900px;
}

.ymsb-box-body {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 12px;
    height: 118px;
    display: grid;
    place-items: center;
    border-radius: 8px 8px 18px 18px;
    background: linear-gradient(135deg, #f5efe4, #cfc7b9);
    box-shadow: inset 0 -10px 20px rgba(0,0,0,.15), 0 18px 30px rgba(0,0,0,.45);
}

.ymsb-box-body::after {
    content: "";
    position: absolute;
    inset: 0 42%;
    background: var(--ymsb-red);
}

.ymsb-box-lid {
    position: absolute;
    z-index: 2;
    left: 4px;
    right: 4px;
    top: 28px;
    height: 50px;
    border-radius: 14px 14px 7px 7px;
    background: linear-gradient(135deg, #fff8eb, #d7cebf);
    box-shadow: 0 10px 16px rgba(0,0,0,.35);
    transition: transform .45s cubic-bezier(.2,.8,.2,1);
    transform-origin: 15% 100%;
}

.ymsb-box-lid::after {
    content: "";
    position: absolute;
    left: 43%;
    width: 14%;
    height: 100%;
    background: var(--ymsb-red);
}

.ymsb-box-button:hover .ymsb-box-lid {
    transform: translateY(-8px) rotate(-5deg);
}

.ymsb-box-mark {
    position: relative;
    z-index: 2;
    color: #111;
    font-size: 50px;
    font-weight: 900;
}

.ymsb-stars {
    position: absolute;
    color: rgba(255,255,255,.45);
    animation: ymsbTwinkle 1.6s infinite alternate;
}

.ymsb-stars-one { left: 32px; top: 86px; font-size: 30px; }
.ymsb-stars-two { right: 42px; top: 144px; font-size: 22px; animation-delay: .6s; }

#ymsb-form {
    margin-top: 20px;
    text-align: left;
}

#ymsb-form > label:not(.ymsb-check) {
    display: block;
    margin-bottom: 13px;
}

#ymsb-form label > span {
    display: block;
    margin-bottom: 6px;
    color: rgba(255,255,255,.84);
    font-size: 13px;
}

#ymsb-form input[type="email"],
#ymsb-form input[type="tel"] {
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 13px;
    background: rgba(255,255,255,.08);
    color: #fff;
    padding: 11px 13px;
    outline: 0;
}

#ymsb-form input:focus {
    border-color: var(--ymsb-red);
    box-shadow: 0 0 0 3px rgba(229,36,42,.16);
}

.ymsb-check {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 8px;
    align-items: start;
    margin: 12px 0;
    cursor: pointer;
}

.ymsb-check span {
    font-size: 12px !important;
    line-height: 1.4;
}

.ymsb-error {
    min-height: 22px;
    color: #ffb0b3;
    font-size: 13px;
    text-align: center;
    margin: 7px 0;
}

#ymsb-form .ymsb-primary {
    width: 100%;
}

.ymsb-opening-box {
    position: relative;
    width: 220px;
    height: 200px;
    margin: 25px auto;
}

.ymsb-opening-body {
    position: absolute;
    left: 25px;
    right: 25px;
    bottom: 20px;
    height: 110px;
    display: grid;
    place-items: center;
    border-radius: 10px 10px 20px 20px;
    background: linear-gradient(135deg, #f7f0e4, #cfc6b7);
    color: #111;
    font-size: 50px;
    font-weight: 900;
    animation: ymsbShake .7s infinite;
}

.ymsb-opening-lid {
    position: absolute;
    z-index: 2;
    left: 9px;
    right: 9px;
    top: 38px;
    height: 48px;
    border-radius: 14px 14px 8px 8px;
    background: linear-gradient(135deg, #fff7eb, #d8cfc1);
    animation: ymsbLid 1.1s infinite alternate;
    transform-origin: 15% 100%;
}

.ymsb-opening-body::after,
.ymsb-opening-lid::after {
    content: "";
    position: absolute;
    inset: 0 43%;
    background: var(--ymsb-red);
}

.ymsb-glow {
    position: absolute;
    left: 50%;
    top: 45%;
    width: 130px;
    height: 130px;
    transform: translate(-50%,-50%);
    border-radius: 50%;
    background: rgba(229,36,42,.55);
    filter: blur(32px);
    animation: ymsbPulse .7s infinite alternate;
}

.ymsb-animal-emoji {
    font-size: 88px;
    filter: drop-shadow(0 16px 20px rgba(0,0,0,.4));
    animation: ymsbPop .55s cubic-bezier(.2,1.5,.4,1);
}

.ymsb-animal-name {
    margin-top: -4px;
    color: #ffced0;
    font-weight: 800;
}

.ymsb-win-copy {
    margin-bottom: 0 !important;
}

.ymsb-discount {
    font-size: clamp(70px, 20vw, 104px);
    font-weight: 950;
    line-height: .95;
    color: var(--ymsb-red);
    text-shadow: 0 9px 35px rgba(229,36,42,.3);
}

.ymsb-code {
    display: block;
    width: min(260px, 100%);
    margin: 8px auto 12px;
    border: 2px dashed rgba(255,255,255,.3);
    border-radius: 14px;
    background: rgba(255,255,255,.09);
    color: #fff;
    padding: 13px;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: .17em;
    cursor: pointer;
}

.ymsb-validity {
    font-size: 13px !important;
}

.ymsb-play-again {
    display: block;
    margin: 14px auto 0;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,.72);
    text-decoration: underline;
    cursor: pointer;
}

.ymsb-confetti {
    color: #ffd98a;
    letter-spacing: 7px;
    animation: ymsbTwinkle .8s infinite alternate;
}

.ymsb-floating-button {
    position: fixed;
    z-index: 99990;
    right: 18px;
    bottom: 18px;
    border: 0;
    border-radius: 999px;
    background: var(--ymsb-red);
    color: #fff;
    padding: 12px 17px;
    font-weight: 800;
    box-shadow: 0 10px 35px rgba(0,0,0,.35);
    cursor: pointer;
}

@keyframes ymsbFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes ymsbRise { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: translateY(0) } }
@keyframes ymsbTwinkle { from { opacity: .25; transform: scale(.85) } to { opacity: 1; transform: scale(1.12) } }
@keyframes ymsbShake {
    0%,100% { transform: rotate(-1deg) translateX(-2px) }
    50% { transform: rotate(1deg) translateX(2px) }
}
@keyframes ymsbLid {
    from { transform: translateY(0) rotate(0) }
    to { transform: translateY(-38px) rotate(-15deg) }
}
@keyframes ymsbPulse { from { opacity: .35; transform: translate(-50%,-50%) scale(.8) } to { opacity: .9; transform: translate(-50%,-50%) scale(1.15) } }
@keyframes ymsbPop { from { opacity: 0; transform: scale(.2) translateY(30px) } to { opacity: 1; transform: scale(1) translateY(0) } }

@media (max-width: 520px) {
    .ymsb-overlay { padding: 10px; }
    .ymsb-modal { padding: 30px 19px 22px; border-radius: 22px; }
    .ymsb-box-button { width: 190px; height: 160px; margin-top: 15px; }
    .ymsb-box-body { height: 103px; }
}
