body{
    background-image: url('../img/bg.jpg');
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    color: #333333;
    font-family: "Noto Sans CJK";
    letter-spacing: 1px;
    box-sizing: border-box;
}
.headpic {
    width: 100%;
    max-width: 1000px; 
    margin: 0 auto; 
    position: relative;
    text-align: center;
}
.toppic {
    position: relative;
    width: 100%;
    aspect-ratio: 1000 / 650;
    animation: fadeIn 0.8s ease-in-out forwards; 
    opacity: 0; 
    /* Fallback for old browsers: 
    height: 0;
    padding-top: 65%; /* (650/1000)*100% */
}

.overlay-img {
    position: absolute; 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); 
    width: 1140px; 
    height: 650px; 
}
.overlay-img:nth-child(1) { 
    z-index: 2; /* 最低層 */
    
}
.overlay-img:nth-child(2) { /* 第二張圖 */
    z-index: 1;
    
}

.overlay-img:nth-child(3) { /* 第三張圖 */
    z-index: 3; /* 中層 */
    
}

.overlay-img:nth-child(4) { /* 第四張圖 */
    z-index: 4; /* 最上層 */
    
}
.overlay-img:nth-child(1) { animation: heartbeat 6s ease-in-out infinite; }
.overlay-img:nth-child(2) { animation: flicker 1.5s ease-in-out infinite; } 
.overlay-img:nth-child(3) { animation: bobble 2.5s ease-in-out infinite; } 
.overlay-img:nth-child(4) { animation: bobble 1.5s ease-in-out infinite reverse; } 



.btn1{
    width: 160px;
    height: 46px;
    overflow: hidden;
    background-image: url('../img/btn1.svg'); 
    background-size: 160px 92px;
    background-position: 0 0;
    background-repeat: no-repeat;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    transition: background-position 0.2s ease;
}
.btn1:hover{
    background-position: 0 -46px;
}
.btn2{
    width: 160px;
    height: 46px;
    overflow: hidden;
    background-image: url('../img/btn2.svg'); 
    background-size: 160px 92px;
    background-position: 0 0;
    background-repeat: no-repeat;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    transition: background-position 0.2s ease;
}
.btn2:hover{
    background-position: 0 -46px;
}
.btn3{
    width: 160px;
    height: 46px;
    overflow: hidden;
    background-image: url('../img/btn3.svg');
    background-size: 160px 92px;
    background-position: 0 0;
    background-repeat: no-repeat;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    transition: background-position 0.2s ease;
}
.btn3:hover{
    background-position: 0 -46px;
}

.topbtn{
    text-indent: -9999px;
    overflow: hidden;
    animation: fadeInUp 0.8s 0.2s ease-in-out forwards; 
    opacity: 0; 
}
.topbtn a{
    margin: 5px 10px;
}
.pl45{
    padding-left: 45px;
    line-height: 1.4em;
}
.row {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
}
.alltxt{
    margin-top: 20px;
    margin-bottom: 20px;
    line-height:1em;
    font-size: 1.2em;
}
.title_style{
    padding: 5px 0 10px 20px;
}
.vector{
  width: 30px;
  height: 30px;
}
.text-title{ 
  color: #DB4713;
  font-weight: bold;
}
.ruletitle{
 color: #db4713;
 font-weight: bold;
 font-size: 1.4em;
}
.rules{
    padding:15px 10px 5px 45px;
    line-height: 1.6em;
}
.rules a{
  color: #db4713;
}
.rules a:hover{
  color: #f06d3d;
}
.wav{
  margin: 10px 0 10px 0;
}
.sstxt{
  font-size: 0.7em;
  font-weight: bold;
}
.giftcontainer{
  margin-top: 20px;
  line-height: 1.5em;
}
.gift_title{
  display: inline-flex;
  width: fit-content;
  height: 2rem;
  color: #ffffff;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  background-color: #db4713;
  border-radius: 4px;
  margin-top: 15px;
}
.txt5{
    text-shadow: 0px 0px 0px rgba(255, 255, 255, 0);
    font-weight: bold;
    color: #ffffff;
    background: linear-gradient(to right,  #6d53a0 0%,#e36599 100%);
    width: auto;
    border-radius: 25px;
    margin-left: 10px;
    font-size: 1.1em;
}
.txt6{
    font-size: 0.7em;
    padding:10px 20px;
    color: #7F7F7F;
    line-height: 1.5em;
    background-color: #EBE7E1;
    border-radius: 10px;
}
.txt6 ul{ 
    list-style-type: none;
    margin-left: 1em;
  } 
.txt6 ul li{
    list-style: number;
  }
.txt7{
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 1.2em;
    color: #7f7f7f;
}
.txt8{
  font-weight: 600;
}

.gifttxt{
    color:#db4713;
}
.gift_img{
   width: auto;
   margin-bottom: 15px;
}
.gift_img img{
   max-width: 100%;
   height: auto;
   display: block;
}
footer {
  height: 80px;
  margin-bottom: 50px;
}
.footer-img {
  max-width: 610px;    
  max-height: 50px;    
  width: auto;         
  height: auto;        
  display: block;     
}

/* ---------RWD--------- */
@media (max-width: 575.98px) {
    .txt1 {
        font-size: 1em;
    }
    
    .topbtn {
        margin-top: 20px;
    }

    .overlay-img {
        width: 98%; 
        height: auto;
    }

    .overlay-img:nth-child(1),
    .overlay-img:nth-child(2),
    .overlay-img:nth-child(3),
    .overlay-img:nth-child(4) {
        top: 50%;
        left: 52%;
        transform: translate(-30%, -50%);
    }
    .overlay-img:nth-child(1) { 
        z-index: 2;
        transform: translate(-50%, -50%) scale(1.15) translate(0px, 0px);
        animation: none;
    }
    
    .overlay-img:nth-child(2) { /* popcorn */
        z-index: 1;
        opacity: 0.5;
        transform: translate(-50%, -50%) translate(-20px, 5px); 
        animation: none;
    }
    
    .overlay-img:nth-child(3) { /* boy */
        z-index: 3;
        transform: translate(-50%, -50%)scale(1.2) translate(10px, 5px);
        animation: none;
    }
    
    .overlay-img:nth-child(4) { /* girl */
        z-index: 4;
        transform: translate(-50%, -50%) translate(15px, 0px);
        animation: none;
    }
    
    .particle-bg::before,
    .particle-bg::after {
        animation-duration: 30s; 
    }
}

/* 平板版：576px ~ 767px */
@media (min-width: 576px) and (max-width: 767.98px) {
    .txt1 {
        font-size: 1.2em;
    }
    .overlay-img {
        width: 90%;
        height: auto;
    }
    
    .overlay-img:nth-child(1),
    .overlay-img:nth-child(2),
    .overlay-img:nth-child(3),
    .overlay-img:nth-child(4){
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    .overlay-img:nth-child(1) {
        z-index: 2;
        transform: translate(-50%, -50%) scale(1.1) translate(0px,-30px);
    }
    
    .overlay-img:nth-child(2) {
        z-index: 1;
        opacity: .5;
        transform: translate(-50%, -50%) scale(1.1) translate(0px,15px);
    }
    
    .overlay-img:nth-child(3) {
        z-index: 3;
        transform: translate(-50%, -50%) translate(-50px, 0px);
    }
    
    .overlay-img:nth-child(4) {
        z-index: 4;
        transform: translate(-50%, -50%) translate(50px, -10px);
    }
    

}

@media (min-width: 768px) and (max-width: 991.98px) {
    .txt1 {
        font-size: 1.3em;
    }
    .overlay-img {
        width: 95%; 
        height: auto;
    }
}

@media (min-width: 992px) {
    .txt1 {
        font-size: 1.4em; 
    }
}
/* ---------ANIMATION--------- */
@keyframes bobble {
    0%, 100% {
        transform: translate(-50%, -50%) translateY(0); 
    }
    50% {
        transform: translate(-50%, -50%) translateY(-10px); 
    }
}
@keyframes flicker {
    0%, 100% {
        opacity: 1; 
    }
    50% {
        opacity: 0.7; 
    }
}
@keyframes fadeIn {
    from {
        opacity: 0; 
        transform: translateY(-50px); 
    }
    to {
        opacity: 1; 
        transform: translateY(0); 
    }
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0); 
    }
}
@keyframes heartbeat {
    0%, 83.33% {
        opacity: 1;
    }
    84.17% {
        opacity: 0.9;
    }
    85% {
        opacity: 1;
    }
    86.67% {
        opacity: 0.7;
    }
    88.33% {
        opacity: 1;
    }
    91.67% {
        opacity: 0.9;
    }
    93.33% {
        opacity: 1;
    }
    95% {
        opacity: 0.8;
    }
    96.67% {
        opacity: 1;
    }
    98.33% {
        opacity: 0.9;
    }
    100% {
        opacity: 1;
    }
}


/* ---------END--------- */

/* partical effect */
.particle-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; 
    overflow: hidden;
}
.particle-bg::before,
.particle-bg::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, #fff, transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, #eee, transparent),
        radial-gradient(2px 2px at 160px 30px, #fff, transparent);
    background-repeat: repeat;
    background-size: 200px 100px; 
    animation: float 20s linear infinite; 
}
.particle-bg::after {
    background-image: 
        radial-gradient(2px 2px at 10px 50px, #ddd, transparent),
        radial-gradient(1px 1px at 60px 20px, #fff, transparent),
        radial-gradient(2px 2px at 100px 60px, #eee, transparent),
        radial-gradient(1px 1px at 140px 90px, #fff, transparent);
    animation: float 25s linear infinite reverse; 
    animation-delay: -10s; 
}
@keyframes float {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
    100% {
        transform: translateX(100px) translateY(50px) rotate(360deg); /* 輕微偏移 + 旋轉 */
    }
}
.gradient-background {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;   
    z-index: -1;     
    overflow: hidden;
}
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}
.particle {
    position: fixed;
    background: #DB4713;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}
.particle.square {
    border-radius: 0;
}
.particle.triangle {
    border-radius: 0;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%); 
    background: #DB4713;
}
.particle.circle {
    border-radius: 50%;
}
