html, body {
  line-height: 1;
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow:hidden;
}

body {
  font-family: 'Gotham', sans-serif;
  font-size: 1em;
  background-color: black;
  background-size: cover;
  background-image: url('in_css_bfb9d784ca2b1fa5ea9b4053c2e423992.static.jpeg') !important;
  background-attachment: scroll;
  position: relative;
  background-repeat: no-repeat; 
  max-height: 700px;  
  width: 100%;    
}

.red-packet {
    position: relative;
    text-align: center;
    top: 230px;
    left: 0%;
}

.red-packet img {
    width: 250px; 
    cursor: pointer;
}

.title img {
    width: 50px;
    margin-top: 150px;
}

.cta-button {
    position: absolute;
    top: 345px;
    left: 54%;
    transform: translate(-50%, -50%);
    background-color: transparent;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.cta-button img{
    width: 75%;
    height:75%;
}

.cta-button-popup {
    position: absolute;
    top: 35%;
    left: 16%;
    transform: translateX(-50%);
    background-color: transparent;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    width: 200px;
}

.steps {
    position: absolute;
    top: 300px; 
 
    left: 50% !important; 
    transform: translateX(-50%) !important;
    width: 100% !important; 
    text-align: center !important; 
    
    font-size: 18px !important; 
    font-weight: bold; 
    color: #FFD700; 
    animation: textBlink 0.8s infinite;
}

.popup {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: transparent;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 20px;
    color: #ff0000;
}

/* Popup GIF */  
#overlay {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh; 
    background-color: rgba(0, 0, 0, 0.8); 
    z-index: 1888; 
    display: none;    
}

#gifContainer {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1900;
    display: none;
}

#gifContainer img {
    width: 300px; 
    height: auto;
}

#popup {
    position: fixed;
    height: 400px;
    width: 300px;    
    top:78%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    display: none;
    text-align: center;
    padding: 50px; 
    border-radius: 10px; 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); 
}

#popup p {
    color: #fff; 
    font-size: 13px; 
    margin: 0px 10px;
}

#popup .cta-button-popup {
    display: inline-block;
    padding: 0px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 15px;
    filter: drop-shadow(0 7px 10px rgba(218, 165, 32, 0.9));
    animation: zoomInOut 0.7s infinite;
    transform: translateX(-50%, -50%);
    margin-left: 30px; 
    margin-top: -0.7rem;    
} 

@keyframes zoomInOut {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.13); }
}

/* Media Queries */
@media (min-width: 320px) and (max-width: 344px)  {
    body {
        background-size: 320px;
        max-width: 320px;
        background-position: top;
        left: 50%;
        transform: translateX(-50%);
    }    
    .red-packet img { width: 180px; top: 100px; }
    .red-packet { position: relative; text-align: center; top: 200px; left: 0%; }
    .cta-button { position: absolute; top: 290px; left: 53%; transform: translate(-50%, -50%); background-color: transparent; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; }
    .cta-button img{ width: 80%; height:80%; }
    .steps { position: absolute; top: 510px; left: 56%; transform: translateX(-50%); font-size: 11px; color: #fff; padding: 10px; border-radius: 5px; width: 80%; }
}
    
@media (min-width: 345px) and (max-width: 360px)  {
    body { background-size: 350px; max-width: 350px; background-position: top; left: 50%; transform: translateX(-50%); }    
    .red-packet img { width: 210px; top: 100px; }
    .red-packet { position: relative; text-align: center; top: 210px; left: 0%; }
    .cta-button { position: absolute; top: 310px; left: 43%; transform: translate(-50%, -50%); background-color: transparent; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; width: 50px; }
    .cta-button img{ width: 210%; height:210%; }
    .steps { position: absolute; top: 560px; left: 55%; transform: translateX(-50%); font-size: 12px; color: #fff; padding: 10px; border-radius: 5px; width: 80%; }
}
    
@media (min-width: 361px) and (max-width: 369px)  {
    body { background-size: 360px; max-width: 360px; background-position: top; left: 50%; transform: translateX(-50%); }    
    .red-packet img { width: 210px; top: 100px; }
    .red-packet { position: relative; text-align: center; top: 220px; left: 0%; }
    .cta-button { position: absolute; top: 330px; left: 40%; transform: translate(-50%, -50%); background-color: transparent; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; width: 50px; }
    .cta-button img{ width: 250%; height:250%; }
    .steps { position: absolute; top: 580px; left: 58%; transform: translateX(-50%); font-size: 12px; color: #fff; padding: 10px; border-radius: 5px; width: 80%; }
}
    
@media (min-width: 370px) and (max-width: 399px)  {
    body { background-size: 370px; max-width: 370px; background-position: top; left: 50%; transform: translateX(-50%); }    
    .red-packet img { width: 230px; top: 100px; }
    .red-packet { position: relative; text-align: center; top: 220px; left: 0%; }
    .cta-button { position: absolute; top: 330px; left: 28%; background-color: transparent; transform: translateY(-45%); padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; }
    .cta-button img{ width: 54%; height:54%; }
    .steps { position: absolute; top: 590px; left: 59%; transform: translateX(-50%); font-size: 12px; color: #fff; padding: 10px; border-radius: 5px; width: 80%; }
}
    
@media (min-width: 400px) and (max-width: 767px)  {
    body { background-size: 400px; max-width: 400px; background-position: top; left: 50%; transform: translateX(-50%); }    
    .red-packet img { width: 240px; top: 100px; }
    .red-packet { position: relative; text-align: center; top: 240px; left: 0%; }
    .cta-button { position: absolute; top: 350px; left: 29%; background-color: transparent; transform: translateY(-43%); padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; }
    .cta-button img{ width: 52%; height:52%; }
    .steps { position: absolute; top: 640px; left: 59%; transform: translateX(-50%); font-size: 13px; color: #fff; padding: 10px; border-radius: 5px; width: 80%; }
}
    
@media (min-width: 768px)  {
    body { background-size: 400px; max-width: 400px; background-position: top; left: 50%; transform: translateX(-50%); }    
    .red-packet img { width: 240px; top: 100px; }
    .red-packet { position: relative; text-align: center; top: 240px; left: 0%; }
    .cta-button { position: absolute; top: 350px; left: 29%; background-color: transparent; transform: translateY(-43%); padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; }
    .cta-button img{ width: 55%; height:55%; }
    .steps { position: absolute; top: 640px; left: 59%; transform: translateX(-50%); font-size: 13px; color: #fff; padding: 10px; border-radius: 5px; width: 80%; }
}

@keyframes redPacketPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

#redPacketImage {
    animation: redPacketPulse 1.0s infinite ease-in-out; 
}

@keyframes textBlink {
    0%, 100% { 
        opacity: 1; 
        text-shadow: 0px 0px 10px #FFD700, 0px 0px 20px #FF8C00; /* 亮起时带有金色发光阴影 */
    }
    50% { 
        opacity: 0.3;
        text-shadow: none; 
    }
}

/* --- 🌟 妮妮加的：炸开图弹出+晃动特效 --- */

/* 1. 定义弹出效果：从 0 瞬间放大到 1.1 倍，再回弹到原位 */
@keyframes burstPop {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    70% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* 2. 定义轻微的晃动（让它看起来像在空中飘浮） */
@keyframes chipFloat {
    0%, 100% { transform: translate(-50%, -50%) translateY(0px); }
    50% { transform: translate(-50%, -50%) translateY(-10px); }
}

/* 3. 把动画绑定到存放炸开图的容器上 */
#gifContainer img {
    /* 重点：先执行 0.4 秒的弹出，然后无限循环执行 2 秒的飘浮 */
    animation: burstPop 0.4s ease-out forwards, chipFloat 2s infinite ease-in-out 0.4s;
    
    /* 确保图片在屏幕正中间 */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}