body {
   /* height: 100vh;*/
    background:  url(/img/bg2.png) repeat center center,url(/img/bg.jpg) no-repeat center center;
    background-size: auto 100px, cover;
   /* overflow: hidden;*/
}
.container{
    max-width: 800px!important;
    padding: 0!important;
}
.main-content {
    max-width: 800px;
    margin: 0 auto;
    background: url(/img/main_bg.png) no-repeat center center;
    background-size: auto 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    height: 100dvh;
}
.result-bg{
    background: url(/img/result_bg.png) no-repeat center center;
    background-size: auto 120%;
}
.container{
    position: relative;

}
.h-100vh{
    height: 100vh;
    /* 使用 dvh (dynamic viewport height) 作為備用，解決手機瀏覽器地址欄問題 */
    height: 100dvh; /* 現代瀏覽器支持，會自動覆蓋上面的 100vh */
}
.main-title-img{
    width: 100%;
    max-width: 80vw;
}
.title-img{
    width: auto;
    height: 13vh;
    max-height: 13vh;
    object-fit: cover;
}
.gift-text-img{
    width: 90%;
}
.gift-img{
    width: auto;
    height: 28vh;
    max-height: 28vh;
    object-fit: cover;
}
.gift-img-2{
    width: auto;
    height: 40vh;
    max-height: 40vh;
    object-fit: cover;
    max-width: 100%;
}
.redeem-box-img{
    width: auto;
    height: 55vh;
    max-height: 55vh;
    object-fit: cover;
}
.save-box-img{
    width: 100%;
}

.redeem-btn-img{
    width: 100%;
    max-width: 180px;
}
.redeem-btn-box{

}
.redeem-qrcode{
    display: flex;
    justify-content: center;

}
.joinus-text-img{
    width: auto;
    height: 14vh;
    max-height: 14vh;
    object-fit: cover;
    max-width: 100%;
}
.joinus-btn-img{
    width: 100%;
    max-width: 240px;
}
.save-message-img{
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
}

.qrcode-box-img{
    width: auto;
    height: 50vh;
    max-height: 50vh;
    object-fit: cover;
    max-width: 100%;
}
.input-box-img{
    width: auto;
    height: 40vh;
    max-height: 40vh;
    object-fit: cover;
    max-width: 100%;
}
.qrcode{
    position: absolute;
    bottom: 16%;
    left: 50%;
    width: 100%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    border-radius: 10px;
    height: 20vh;
}

.save-qrcode{
    position: absolute;
    top: 3%;
    height: 50%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
}
.save-qrcode img{
    max-width: none;
    width: auto;
    height: 100%;
    padding: 10px;
    border-radius: 10px;
    background-color: #ffffff;
}
.qrcode img, .qrcode canvas, .redeem-qrcode canvas{

    height: auto;
    padding: 10px;
    background-color: #ffffff;
    border-radius: 10px;
}
.redeem-qrcode img{
    height: 30%;
    padding: 10px;
    background-color: #ffffff;
    border-radius: 10px;
}

.roulette-box{
    height: 55vh;
    height: 55dvh;
}
.roulette-img,.roulette-border-img{
    width: auto;
    height: 55vh;
    max-height: 55vh;
    object-fit: cover;
}
.roulette-img-box, .roulette-border{
    position: absolute;
    top: 0;
    left: 10%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center center;
    transition: transform 0s;
}
.character-box-container{
    width: 50%;
    bottom: -1%;
    right: 50%;
}
.character-box{
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: end;
    align-items: end;
    position: relative;
}
.character-text-box{
    position: absolute;
    bottom: 5%;
    left: 0;
    width: 100%;
    color: #15446b;
    font-size: 30px;
    font-weight: bold;
    background: #fff;
    padding: 10px 10px 10px 22px;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
   
}
.character-img{
    width: auto;
    height: 75vh;
    max-height: 75vh;
    object-fit: cover;
}
.play-btn-box{
    position: absolute;
    bottom: 17%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: end;
    z-index: 10;
}


.play-btn-img, .back-btn-img{
    width: 100%;
    max-width: 40vw;
}
.main-content-box{
   
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 20px 0;
}
.phone-input-box-container{
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.phone-input-box-content{
    width: 75%;
}
.input-box-container{

    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.7);
    padding: 2px 5px;
    border-radius: 5px;
    margin-top: 20px;
}
.phone-input-wrapper{
    display: flex;
    align-items: center;
    width: 100%;
    flex: 1;
}
.phone-prefix{
    color: #999;
    font-size: inherit;
    margin-right: 5px;
    user-select: none;
    pointer-events: none;
}
.input-box-input{
    border: none;
    background: none;
    width: 100%;
    flex: 1;
    border-radius: 0;
}
.input-box-btn{
    border: none;
    background: none;
    width: 100px;
}
.input-box-btn img{
    width: 100%;
}

.winner-img-box{
    position: relative;
}
.gift-text-box{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
   
    font-weight: bold;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 65%;
}
.redeem-text-box,.save-text-box{
    position: absolute;
    top: 0;
    left: 0;
    color: #fff;
    font-weight: bold;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 27%;
    word-break: break-word;
}

.gift-text{
  background: -webkit-linear-gradient(#fff5e7, #ffca7a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 20px;
}
.message-box{

    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    padding-bottom: 20px;
}
.message-overlay{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}
.message-popup{
    position: relative;
    max-width: 600px;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.message-close-btn{
    position: absolute;
    top: 15px;
    right: 15px;
    max-width: 40px;
    width: 40px;
    height: auto;
    cursor: pointer;
    z-index: 10000;
}
.message-image{
    max-width: 100%;
    width: 100%;
    height: auto;
}
.redeem-qrcode-box{
    position: absolute;
    top: 0;
    left: 0;
    height: 90%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.save-code-link{
    position: relative;
}
.save-code-text{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-size: 18px;
    font-weight: bold;
    background: -webkit-linear-gradient(#fff5e7, #ffca7a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
}
.code-text{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #FFFFFF;
    font-weight: 700;
}
@media (max-width: 768px) {
    .character-box-container{
        width: 50%;
    }

    .character-text-box{
        right: auto;
        left: 0;
    }
    .main-content{
        overflow: hidden;
    }
    .title-img{
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: contain;
    }
    .gift-img,.gift-text-img{
        width: 100%;
        height: auto;
        max-height: auto;
        object-fit: contain;
    }
    .qrcode-box-img,.input-box-img{
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: contain;
    }
    .qrcode {
        max-width: 140px;
    }
    .gift-img-2{
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: contain;
    }
    .redeem-box-img,.save-box-img{
        width: 100%;
        height: auto;
        max-height: auto;
        object-fit: contain;
    }





    .redeem-btn-img{
        max-width: 130px;
    }

    .message-box{
        bottom: 20%;
        font-size: 12px;
    }
    .joinus-text-img{
        width: 100%;
        height: auto;
        max-height: none;
        max-width: 280px;
    
    }
    .joinus-btn-img{
        max-width: 160px;
    }
    .redeem-qrcode img{
        height: 120px;
    }

}

/* ============================================
   Footer Links & Terms Overlay Styles
   ============================================ */

/* Footer Links */
.footer-links {
    z-index: 1000;
    pointer-events: none;
}

.footer-links a {
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1 !important;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* Daily Quota Full Overlay */
.daily-quota-full-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.daily-quota-full-content {
    background: #fff;
    border-radius: 15px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.daily-quota-full-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.daily-quota-full-content h2 {
    color: #d9534f;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: bold;
}

.daily-quota-full-content p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.daily-quota-full-content .btn {
    padding: 12px 40px;
    font-size: 18px;
    border-radius: 25px;
}

/* Terms Overlay */
.terms-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.terms-overlay-content {
    background: white;
    border-radius: 10px;
    max-width: 600px;
    max-height: 80vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.terms-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.terms-overlay-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.terms-close-btn {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.terms-close-btn:hover {
    color: #333;
}

.terms-overlay-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.terms-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 20px;
}

.terms-content ol {
    padding-left: 20px;
    margin-bottom: 20px;
}

.terms-content li {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #555;
}

.terms-content p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #555;
}

.terms-content strong {
    color: #333;
}

/* Responsive for Footer Links */
@media (max-width: 768px) {
    .terms-overlay-content {
        max-width: 95%;
        max-height: 90vh;
    }
    
    .terms-overlay-header {
        padding: 15px;
    }
    
    .terms-overlay-header h2 {
        font-size: 20px;
    }
    
    .terms-overlay-body {
        padding: 15px;
    }
    
    .footer-links {
        padding: 10px !important;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    text-align: center;
}

/* Copy Success Overlay */
.copy-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    animation: fadeInOut 1.5s ease-in-out;
}

.copy-success-text {
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    min-width: 100px;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Hide DebugKit toolbar */
#debug-kit-toolbar,
#debug-kit-toolbar *,
.debug-kit-toolbar {
    display: none !important;
    visibility: hidden !important;
}
.footer-text{
    font-size: 16px!important;
}
#phoneInputBox{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}
@media (min-width: 1000px) {
    .play-btn-img, .back-btn-img{
        max-width: 200px;
    }

    .main-title-img{
        max-width: 400px;
    }
    .character-text-box{
        font-size: 16px;
    }
}
@media (max-height: 1000px) {
    .character-text-box {
        font-size: 16px;
    }
    .main-title-img {
        max-width: 400px;
    }
    .play-btn-img, .back-btn-img {
        max-width: 200px;
    }
    .play-btn-box{
        bottom: 19%;
    }
    .roulette-img-box, .roulette-border{
        left: 25%;
    }
}
.qrcode-img-box-content-text{
    position: absolute;
    top: 23%;
    left: 0;
    width: 100%;
    font-size: 22px;
    font-weight: bold;
    color: #000000;
    text-align: center;
    word-break: break-word;
    padding: 0 20px;
    line-height: 1.3;
}
