/* 加载 SFUIText-Heavy.ttf */
@font-face {
    font-family: "SFUIText-Heavy";
    src: url("./fonts/SFUIText-Heavy.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

/* 加载 SFUIText-Semibold.otf */
@font-face {
    font-family: "SFUIText-Semibold";
    src: url("./fonts/SFUIText-Semibold.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
}

/* 加载 SFUIText-Medium.otf */
@font-face {
    font-family: "SFUIText-Medium";
    src: url("./fonts/SFUIText-Medium.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
}

/* 加载 SFUIText-Bold.otf */
@font-face {
    font-family: "SFUIText-Bold";
    src: url("./fonts/SFUIText-Bold.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Poppins-Bold";
    src: url("./fonts/Poppins-Bold.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Poppins-Regular";
    src: url("./fonts/Poppins-Regular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Poppins-SemiBold";
    src: url("./fonts/Poppins-SemiBold.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

:root {
    --header-image-height: 280;
    --header-image-transparent-top: 75;
    /* 图片底部与卡片重叠的高度 */
    --header-image-offset: 0;

    /* 活动名称 文字颜色 */
    --header-color: #ffffff;

    /* 倒计时 文字颜色 */
    --countdown-color: #13b5fe;
    /* 活动结束 文字颜色 */
    --countdown-finished-color: #ffe55e;

    /*价格卡片 阴影颜色*/
    --price-card-shadow-color: #08afffcc;

    /* 40%OFF  文字颜色*/
    --discount-color: #ff2957;
    --original-price-color: #cbcbcb;
    /* $5.39/First Year  文字颜色*/
    --price-color: #ff2957;
    /* NOW 文字颜色 */
    --prefix-price: #111111;

    /* continue 文字颜色 */
    --continue-color: #ffffff;
    --continue-disable-color: #ffffff4d;
    /* continue 背景颜色 支持渐变 */
    --continue-background-color: #32b9fd;
    --continue-background-color-1: #19caf1;
    /* continue 阴影颜色 */
    --continue-shadow-color: #11c0fd78;

    /* continue 描边颜色 */
    --border-width: 0px;
    --continue-border-color-left: #0000;
    --continue-border-color-middle: #0000;
    --continue-border-color-right: #0000;

    /* continue 禁用背景颜色 */
    --continue-backgrdoun-disable-color: #2ebcfb66;
    /* continue 禁用阴影颜色 */
    --continue-disable-shadow-color: #11c0fd4d;

    /* 提示文字颜色 */
    --tip-text-color: #41c0fe;
}

html,
body {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
    -webkit-user-select: none; /* Chrome/Safari/Opera */
    -khtml-user-select: none; /* Konqueror */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+ */
    user-select: none; /* Standard syntax */
}

img {
    -webkit-touch-callout: none;
    pointer-events: none;
}

.scale-font-size {
    display: inline-block;
    white-space: nowrap;
    padding: 0px;
    transform-origin: left center;
}

#app {
    position: relative;
    background: rgba(0, 0, 0, 0.5);
    width: 100%;
    height: 100%;
    font-family: SFUIText-Heavy, sans-serif;
    animation: backgroundAnimation 0.25s ease-in-out;
}

@keyframes backgroundAnimation {
    0% {
        background: rgba(0, 0, 0, 0);
    }

    50% {
        background: rgba(0, 0, 0, 0.5);
    }
}

#container {
    position: absolute;
    bottom: max(env(safe-area-inset-bottom), 4.26vw);
    width: 100%;
    animation: showAnimation 0.25s ease-in-out;

    background-image: url("./img/bg.png");
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

@keyframes showAnimation {
    from {
        transform: translateY(480px);
    }

    to {
        transform: translateY(0px);
    }
}

#header,
#header-background {
    position: relative;
    height: calc((var(--header-image-height) / 750) * 100vw);
}
#header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}
#header {
    z-index: 999;
}
#header-img,
#header-background-img {
    /* 如果用div包裹一个img，你会发现div的高度要超过img的高度。 */
    width: 100%;
    object-fit: fill;
    float: left;
    transform: translate(0, calc((var(--header-image-offset) / 750) * 100vw));
}

#header-container {
    width: 45%;
    text-align: left;
    margin-top: calc(var(--header-image-transparent-top) / 750 * 100vw);
    position: absolute;
    left: calc(4.26% + 24px);
    top: 50%;
    transform: translateY(-50%);
}

#header-container #title {
    font-size: 14px;
    line-height: 16px;
    color: var(--header-color);
    text-shadow: 0px 2px 0px #11b5ff;
}

#countdown {
    color: var(--countdown-color);
    font-size: 16px;
    line-height: 19px;
    width: 100%;
    margin-top: 10px;
    margin-left: 2px;
    font-family: SFUIText-Bold, sans-serif;
}
#countdown-finished {
    color: var(--countdown-finished-color);
    font-size: 12px;
    line-height: 14px;
    font-family: SFUIText-Heavy, sans-serif;
}

.timer-num {
    font-size: 16px;
    width: 26px;
    height: 20px;
    text-align: center;
    background-color: #fff;
    border-radius: 2px;
    color: var(--countdown-color);
    display: inline-block;
}

.timer-separator {
    width: 10px;
    height: 18px;
    line-height: 18px;
    font-size: 14px;
    text-align: center;
    color: #fff;
    display: inline-block;
}
#content {
    margin: auto;

    text-align: center;
    height: calc(608 / 750 * 100vw);
    border-radius: 0 0 24px 24px;
}

#price-card {
    margin: 0 calc(64 / 750 * 100vw);

    height: calc(400 / 750 * 100vw);
    filter: drop-shadow(0px 10px 16px var(--price-card-shadow-color));
    z-index: -1;

    background: #ffffff;

    border-radius: 16px;
    background-size: 51% 100%; /* width height 一般和 background-repeat: no-repeat; 搭配使用 */
    background-repeat: no-repeat;
}

#discount-container {
    padding-top: calc(40 / 750 * 100vw);
    padding-bottom: calc(20 / 750 * 100vw);
    margin-left: calc(64 / 750 * 100vw);
    margin-right: calc(64 / 750 * 100vw);
}
#discount {
    font-size: 62px;
    height: calc(148 / 750 * 100vw);
    line-height: calc(148 / 750 * 100vw);
    color: var(--discount-color);
}

#original-price {
    font-size: 18px;
    height: calc(42 / 750 * 100vw);
    line-height: calc(42 / 750 * 100vw);
    font-family: SFUIText-Bold, sans-serif;
    color: var(--original-price-color);
    text-decoration: line-through;
}

#current-price {
    margin-top: calc(16 / 750 * 100vw);
    font-size: 20px;
    height: calc(48 / 750 * 100vw);
    line-height: calc(48 / 750 * 100vw);
}

#prefix-price {
    color: var(--prefix-price);
    display: inline-block;
}

#price {
    color: var(--price-color);
    display: inline-block;
}

@keyframes scaleAnimation {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}
#bottom-container {
    position: absolute;
    margin: 0 calc(32 / 750 * 100vw);
    height: calc(302 / 750 * 100vw);
    width: calc(686 / 750 * 100vw);
    bottom: 0;

    background-image: url("./img/content_bottom.png");
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

#purchase-button {
    margin: 0 calc(32 / 750 * 100vw);
    margin-top: calc(116 / 750 * 100vw);
    height: calc(112 / 750 * 100vw);
    line-height: calc(112 / 750 * 100vw);
    border-radius: calc(56 / 750 * 100vw);
    font-size: 24px;
}
.purchase-button-enable {
    position: relative;

    box-shadow: 0px 8px 24px 0px var(--continue-shadow-color);

    color: var(--continue-color);
    animation: scaleAnimation 0.5s ease-in-out 2s;

    /* 带圆角描边  */
    border: var(--border-width) solid transparent;
    background-clip: padding-box, border-box;
    background-origin: padding-box, border-box;
    background-image: linear-gradient(
            90deg,
            var(--continue-background-color) 0%,
            var(--continue-background-color-1) 100%
        ),
        linear-gradient(
            90deg,
            var(--continue-border-color-left) 0%,
            var(--continue-border-color-middle) 50%,
            var(--continue-border-color-right) 100%
        );
}

.purchase-button-disable {
    background: var(--continue-backgrdoun-disable-color);
    box-shadow: 0px 6px 16px 0px var(--continue-disable-shadow-color);

    color: var(--continue-disable-color);
    pointer-events: none;

    border: var(--border-width) solid transparent;
}

#price-message {
    position: relative;
    font-size: 10px;
    font-family: SFUIText-Medium, sans-serif;
    height: 12px;
    line-height: 12px;
    color: var(--tip-text-color);
    padding-bottom: 22px;
    margin-top: 12px;
}
