/* ===== 基礎設定 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', 'Microsoft JhengHei', 'PingFang TC', Arial, sans-serif;
    width: 100%;
    max-width: 768px;
    margin: 0 auto;
    overflow-x: hidden;
    position: relative;
    background-color: #ffab41;
}

/* ===== RWD 裝置提示層 ===== */
/* 測試時註解掉 RWD_CSS_START 到 RWD_CSS_END 之間的代碼即可關閉裝置限制 */
/* RWD_CSS_START */
.pc-min-bg {
    background: url(../img/meta_pcpic.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: top center;
    height: 100vh;
    display: block;
}

.ipad-min-bg {
    background: url(../img/meta_padpic.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: top center;
    height: 100vh;
    display: none;
}

.pc {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

/* 平板尺寸（576px ~ 1024px）：顯示 ipad 背景 */
@media (max-width: 1024px) {
    .ipad-min-bg {
        display: block;
    }
    .pc-min-bg {
        display: none;
    }
}

/* 手機尺寸（< 576px）：隱藏提示層，顯示正常內容 */
@media (max-width: 576px) {
    .pc {
        display: none;
    }
}
/* RWD_CSS_END */

/* ===== 頂部導覽列 ===== */
.header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 768px;
    background-color:#F15A24 ;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    height: 60px;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.logo a{
    color: #fff;
    text-decoration: none;
}

/* ===== 漢堡選單按鈕 ===== */
.menu-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 30px;
    height: 30px;
    position: relative;
    z-index: 1001;
    transition: all 0.3s ease;
}

.menu-toggle .bar {
    display: block;
    width: 30px;
    height: 3px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
    position: absolute;
}

.menu-toggle .bar:nth-child(1) {
    top: 5px;
}

.menu-toggle .bar:nth-child(2) {
    top: 13px;
}

.menu-toggle .bar:nth-child(3) {
    top: 21px;
}

/* 選單開啟時的X形狀 */
.menu-toggle.active .bar:nth-child(1) {
    top: 13px;
    transform: rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    top: 13px;
    transform: rotate(-45deg);
}

/* ===== 側邊選單 ===== */
.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 768px;
    height: 100vh;
    margin: 0 auto;
    z-index: 999;
    pointer-events: none;
    overflow: hidden;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0);
    transition: background 0.4s ease;
    pointer-events: none;
    z-index: 998;
    opacity: 0;
}

.menu-overlay.active {
    background: rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    opacity: 1;
}

.menu-content {
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: #f7931eeb;
    transition: right 0.4s ease;
    padding-top: 100px;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    z-index: 999;
}

.side-menu.active {
    pointer-events: auto;
}

.side-menu.active .menu-content {
    right: 0;
}

/* ===== 選單列表 ===== */
.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-list li {
    /* 移除原有的邊框 */
}

.menu-list li:last-child {
    border-bottom: none;
}

.menu-divider {
    height: 1px;
    background: none;
    border-bottom: 4px dotted rgba(255, 255, 255, 0.6);
    margin: 0 30px;
    padding: 0;
}

.menu-list a {
    display: flex;
    align-items: center;
    padding: 0 40px;
    color: #ffffff;
    text-decoration: none;
    font-size: 30px;
    font-weight: bold;
    transition: all 0.3s ease;
    letter-spacing: 2px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.menu-list a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu-icon {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
}

.menu-list a span {
    flex: 1;
}

/* ===== 主要內容區域 ===== */
.main-content {
    margin-top: 60px;
    min-height: calc(100vh - 60px);
    position: relative;
    max-width: 768px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
}

.background-wrapper {
    width: 100%;
    min-height: calc(100vh - 60px);
    background-image: url('../img/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* ===== 主視覺區域 ===== */
.hero-section {
    width: 100%;
    padding: 0;
    text-align: center;
}

.hero-wrapper {
    position: relative;
    width: 100%;
    max-width: 768px;
    margin: 0 auto;
}

.hero-image {
    width: 100%;
    position: relative;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-title {
    position: absolute;
    top: 9%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    z-index: 10;
}

.hero-title img {
    width: 100%;
    height: auto;
    display: block;
}

/* 日期資訊 */
.hero-date-info {
    position: absolute;
    top: 37%;
    left: 50%;
    transform: translateX(-50%);
    width: 55%;
    z-index: 15;
}

.hero-date-info img {
    width: 100%;
    height: auto;
    display: block;
}

/* 飲料區域 */
.hero-products {
    position: absolute;
    top: 42%;
    left: 0;
    width: 100%;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 0 5%;
}

.product-left {
    width: 46%;
}

.product-left img {
    width: 100%;
    height: auto;
    display: block;
}

.product-right {
    width: 46%;
}

.product-right img {
    width: 100%;
    height: auto;
    display: block;
}

/* 文字區塊 */
.hero-text-block {
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translateX(-50%);
    width: 68%;
    z-index: 30;
}

.hero-text-block img {
    width: 100%;
    height: auto;
    display: block;
}

/* 按鈕區域 */
.hero-button {
    position: absolute;
    top: 83%;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    z-index: 35;
    animation: float 2.5s ease-in-out infinite;
}

.hero-button a {
    display: block;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.hero-button img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-button a:active {
    transform: scale(0.95) translateY(2px);
}

/* 漂浮動畫 */
@keyframes float {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* ===== 活動說明區域 ===== */
.rules-section {
    width: 100%;
    padding: 20px;
    background: transparent;
}
.rules-section.s2{
    padding: 20px 20px;
}

.rules-wrapper {
    width: 100%;
    max-width: 768px;
    margin: -30px auto 0 auto;
}

.rules-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.rules-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== 限量混搭經典好禮區域 ===== */

.prize-section {
    width: 100%;
    padding: 0;
    background: transparent;
}

.prize-title {
    width: 100%;
    max-width: 768px;
    margin: 0 auto -36px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.prize-title img {
    width: 100%;
    height: auto;
    display: block;
}

/* Swiper 輪播容器 */
.prize-swiper-container {
    width: 100%;
    max-width: 768px;
    margin: 0 auto;
    padding: 0 70px;
    position: relative;
    z-index: 1;
}

.prizeSwiper {
    width: 100%;
    padding: 0;
}

.prizeSwiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

.prizeSwiper .swiper-slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* 自訂箭頭樣式 */
.prize-arrow-prev,
.prize-arrow-next {
    position: absolute;
    top: 65%;
    transform: translateY(-50%);
    width: 70px;
    height: 70px;
    background-image: url('../img/swiper_arrow.png');
    background-size: cover;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.prize-arrow-prev {
    background-position: left center;
    left: 20px;
}

.prize-arrow-next {
    background-position: right center;
    right: 20px;
}

.prize-arrow-prev:hover,
.prize-arrow-next:hover {
    opacity: 0.7;
}

/* 隱藏 Swiper 預設箭頭的 ::after */
.prize-arrow-prev::after,
.prize-arrow-next::after {
    content: '';
    display: none;
}

/* ===== 註冊區域 ===== */
.register-section {
    width: 100%;
    /* padding: 30px 0; */
    padding-bottom: 60px;
    background: transparent;
    margin: -10px 0 0 0;
}

.register-wrapper {
    width: 100%;
    max-width: 768px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.register-bg {
    width: 100%;
    position: relative;
}

.register-bg img {
    width: 100%;
    height: auto;
    display: block;
}

/* LINE/FB 綁定按鈕 */
.register-social {
    position: absolute;
    top: 34%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 10;
}

.social-btn {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 60px;
    height: 60px;
}

.social-btn img {
    width: 100%;
    height: 100%;
    display: block;
}

.social-btn:hover {
    transform: scale(1.05);
}

.social-btn:active {
    transform: scale(0.95);
}

/* 貼紙序號輸入框 */
.register-input-wrapper {
    position: absolute;
    top: 77%;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    z-index: 10;
}

.sticker-number-input {
    width: 100%;
    padding: 12px 20px;
    background: transparent;
    border: none;
    outline: none;
    font-size: 22px;
    font-weight: 500;
    color: #000000;
    text-align: center;
    font-family: 'Microsoft JhengHei', 'PingFang TC', Arial, sans-serif;
}

.sticker-number-input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

/* 確認登入按鈕 */
.register-btn-wrapper {
    position: absolute;
    top: 91%;
    left: 50%;
    transform: translateX(-50%);
    width: 45%;
    z-index: 10;
}

.login-btn {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.login-btn img {
    width: 100%;
    height: auto;
    display: block;
}

.login-btn:hover {
    transform: scale(1.02);
}

.login-btn:active {
    transform: scale(0.97) translateY(2px);
}

/* ===== Footer 區域 ===== */
.footer-section {
    width: 100%;
    padding: 0;
    background: transparent;
    margin: -10px 0 0 0;
}

.footer-wrapper {
    width: 100%;
    max-width: 768px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}


/* ===== 響應式設計 ===== */
@media (max-width: 768px) {
    .logo {
        font-size: 18px;
    }
    
    .menu-list a {
        font-size: 26px;
        padding: 0 35px;
    }
    
    .menu-icon {
        width: 100px;
        height: 100px;
        /* margin-right: 18px; */
    }
    
    .prize-swiper-container {
        /* padding: 0 15px; */
        margin: 0;
        z-index: 1;
    }
    
    .prize-arrow-prev,
    .prize-arrow-next {
        width: 60px;
        height: 60px;
    }
    
    .prize-arrow-prev {
        /* left: -30px; */
    }
    
    .prize-arrow-next {
        /* right: -30px; */
    }
    
    .register-social {
        gap: 20px;
    }
    
    .social-btn {
        width: 50px;
        height: 50px;
    }
}
@media (max-width: 568px) {
    .sticker-number-input {
        font-size: 16px;
        padding: 10px 15px;
    } 
    .register-input-wrapper {
        top: 76%;
    }
    .social-btn {
        width: 55px;
        height: 55px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 16px;
    }
    
    .menu-list a {
        font-size: 22px;
        padding: 0 30px;
        letter-spacing: 1px;
    }
    
    .menu-icon {
        width: 80px;
        height: 80px;
        /* margin-right: 15px; */
    }
    
    .menu-divider {
        margin: 0 20px;
    }
    
    .prize-swiper-container {
        padding: 0 60px;
    }
    
    .prize-arrow-prev,
    .prize-arrow-next {
        width: 50px;
        height: 50px;
    }
    
    .prize-arrow-prev {
        /* left: -25px; */
    }
    
    .prize-arrow-next {
        /* right: -25px; */
    }
    
    .social-btn {
        width: 40px;
        height: 40px;
    }
    
    .sticker-number-input {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    .register-input-wrapper {
        top: 75%;
    }
    
    .register-btn-wrapper {
        width: 40%;
    }  
    
    .register-section {
        padding-bottom: 30px;
    }
    
}
@media (max-width: 300px) {
    .register-input-wrapper {
        top: 71%;
    } 
    .register-btn-wrapper {
        width: 40%;
    }  
}

/* ===== Loading 動畫 ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 8px solid rgba(255, 255, 255, 0.2);
    border-top-color: #F15A24;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== 未中獎彈窗 ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0 / 69%);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    overflow-y: auto;
    padding: 20px 0;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 90%;
    animation: modalFadeIn 0.3s ease-out;
}

.modal-content img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-close {
    position: absolute;
    top: 1.5%;
    right: 1.5%;
    width: 7%;
    height: auto;
    aspect-ratio: 1 / 1;
    background: url('../img/thanks_alert_close.png') no-repeat center center;
    background-size: contain;
    border: none;
    border-radius: 0;
    font-size: 0;
    line-height: 1;
    color: transparent;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    min-width: 40px;
    min-height: 40px;
}

.modal-close:hover {
    transform: scale(1.1);
}

/* 彈窗按鈕 */
.modal-buttons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.modal-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s ease;
    width: 70%;
    max-width: 280px;
}

.modal-btn img {
    width: 100%;
    height: auto;
    display: block;
}

/* 分享按鈕位置 - 在飲料下方 */
.share-btn {
    position: absolute;
    top: 67%;
    left: 50%;
    transform: translateX(-50%);
    width: 55%;
}

.share-btn:hover {
    transform: translateX(-50%) scale(1.05);
}

.share-btn:active {
    transform: translateX(-50%) scale(0.95);
}

/* 回首頁按鈕位置 - 在「再去開瓶」文字上方 */
.home-btn {
    position: absolute;
    top: 83%;
    left: 50%;
    transform: translateX(-50%);
    width: 45%;
}

.home-btn:hover {
    transform: translateX(-50%) scale(1.05);
}

.home-btn:active {
    transform: translateX(-50%) scale(0.95);
}

/* 領獎按鈕位置 - 中獎彈窗 */
.prize-btn {
    position: absolute;
    top: 77%;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
}

.prize-btn:hover {
    transform: translateX(-50%) scale(1.05);
}

.prize-btn:active {
    transform: translateX(-50%) scale(0.95);
}

/* ===== 分享燈箱 ===== */
.share-modal-overlay {
    z-index: 10010;
    padding: 0;
    align-items: center;
}

.share-modal-content {
    width: min(96vw, 720px);
    max-width: none;
    margin: 0 auto;
}

.share-bg-img {
    width: 100%;
    height: auto;
    display: block;
}

.share-modal-close {
    position: absolute;
    top: -25px;
    right: -8px;
    width: 68px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    z-index: 2;
}

.share-modal-close img {
    width: 100%;
    height: auto;
    display: block;
}

.share-modal-buttons {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.share-action-btn {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.share-action-btn img {
    width: 100%;
    height: auto;
    display: block;
}

.share-action-btn:hover {
    transform: scale(1.02);
}

.share-action-btn:active {
    transform: scale(0.98);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== 領獎資料填寫表單 ===== */
.prize-form-content {
    max-width: 90%;
    width: 100%;
    /* max-height: 95vh; */
    /* min-height: 600px; */
    margin: 20px 10px 0 15px;
    position: relative;
}

.prize-form-bg {
    width: 100%;
    height: auto;
    display: block;
    /* min-height: 600px; */
    object-fit: contain;
}

.prize-form {
    position: absolute;
    top: 17%;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 26.5% 8% 0;
    box-sizing: border-box;
    gap: 10px;
}

/* 表單行（標籤 + 輸入框） */
.form-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.form-row.full-width {
    padding-left: 77px;
}

/* 表單標籤 */
.form-label {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    white-space: nowrap;
    min-width: 70px;
    text-align: left;
}

/* 表單輸入框通用樣式 */
.form-input,
.form-select {
    background: #FFFF00;
    border: none;
    padding: 8px 12px;
    font-size: 15px;
    color: #000;
    flex: 1;
    box-sizing: border-box;
    height: 38px;
}

.form-input:focus,
.form-select:focus {
    outline: 2px solid #F15A24;
    background: #FFFF33;
}

.form-input::placeholder {
    color: #666;
}

/* Select 下拉框樣式 */
.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #FFFF00;
    background-image: url("../img/select_arrow_down.png");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 35px;
}

.form-select:focus {
    background-color: #FFFF33;
    /* background-image: url("../img/select_arrow_down.png"); */
}

.form-select option {
    background: #fff;
    color: #000;
}

/* 地址選擇 */
.address-selects {
    display: flex;
    gap: 12px;
    flex: 1;
}

.address-selects .city-select,
.address-selects .district-select {
    flex: 1;
}

/* 注意事項說明 */
.form-notice {
    color: #c2c2c2;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    padding: 8px 0;
    font-weight: bold;
    white-space: nowrap;
}

/* 同意條款區域 */
.form-agreement {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    /* margin-left: 105px; */
}

/* Checkbox 勾選框 */
.form-checkbox {
    cursor: pointer;
    width: 25px;
    height: 25px;
    flex-shrink: 0;
}

.checkbox-img {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.2s ease;
}

.form-checkbox:hover .checkbox-img {
    transform: scale(1.1);
}

/* 同意條款文字 */
.agreement-text {
    color: #fff;
    font-size: 16px;
    line-height: 1.4;
    margin: 0;
    font-weight: bold;
}

.agreement-link {
    color: #FFFF00;
    text-decoration: underline;
    cursor: pointer;
}

.agreement-link:hover {
    color: #FFFF33;
}

/* 條款燈箱 */
.agreement-modal-content {
    width: min(90vw, 640px);
    max-height: 85vh;
    background: url('../img/policy_bg.png') no-repeat center center;
    background-size: contain;
    position: relative;
    padding: 0;
    aspect-ratio: 640 / 960;
}

.agreement-modal-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 18%;
    pointer-events: none;
}

.agreement-modal-header img {
    display: none;
}

.agreement-modal-body {
    position: absolute;
    top: 18%;
    left: 8%;
    right: 8%;
    bottom: 5%;
    /* padding: 20px 24px; */
    overflow-y: auto;
}

.agreement-modal-title {
    display: none; /* 標題已改用圖片顯示 */
}

.agreement-modal-text {
    color: #222;
    font-size: 15px;
    line-height: 1.8;
}

.agreement-modal-text .event-rule {
    line-height: 1.8;
    font-size: 15px;
    color: #333;
}

.agreement-modal-text .rule-block {
    margin-bottom: 30px;
}

.agreement-modal-text .rule-block h2 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #F15A24;
    font-weight: 900;
}

.agreement-modal-text .rule-block ol,
.agreement-modal-text .rule-block ul {
    padding-left: 20px;
}

.agreement-modal-text .rule-block li {
    margin-bottom: 12px;
}

.agreement-modal-text p {
    margin: 0 0 14px;
}

.agreement-modal-text p:last-child {
    margin-bottom: 0;
}

.rule-block a{
    color: #2142c8;
}

/* 確認送出按鈕 */
.form-submit-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 60%;
    max-width: 300px;
    transition: all 0.3s ease;
    position: absolute;
    top: calc(100% + -85px);
    left: 50%;
    transform: translateX(-50%);
}

.form-submit-btn img {
    width: 100%;
    height: auto;
    display: block;
}

.form-submit-btn:hover {
    transform: translateX(-50%) scale(1.05);
}

.form-submit-btn:active {
    transform: translateX(-50%) scale(0.95);
}

/* 平板及以上尺寸 */
@media (min-width: 768px) {
    .modal-content {
        max-width: 500px;
    }

    .share-modal-content {
        width: min(92vw, 760px);
    }
    
    .loading-spinner {
        width: 100px;
        height: 100px;
        border-width: 10px;
    }
    
    .modal-btn {
        max-width: 300px;
    }
    
    .prize-form-content {
        max-width: 600px;
    }
}

@media (max-width: 480px) {
    .share-modal-close {
        width: 54px;
        top: -12px;
        right: -6px;
    }

    .share-modal-buttons {
        width: 66%;
        top: 20%;
        gap: 30px;
    }
}

/* 小屏幕优化 */
@media (max-height: 700px) {
    .prize-form-content {
        min-height: 500px;
    }
    
    .modal-overlay {
        align-items: flex-start;
    }

    .share-modal-overlay {
        align-items: center;
    }
}

@media (max-height: 600px) {
    .prize-form-content {
        min-height: 450px;
    }
    
    .form-input,
    .form-select {
        height: 35px;
        padding: 6px 10px;
        font-size: 14px;
    }
    
    .prize-form {
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .agreement-modal-content {
        width: 95vw;
        max-height: 90vh;
    }
    
    .agreement-modal-body {
        /* padding: 15px 18px; */
        font-size: 14px;
        top: 18%;
        left: 8%;
        right: 8%;
        bottom: 5%;
    }
    
    .modal-close {
        top: 1.5%;
        right: 1.5%;
        width: 8%;
        min-width: 35px;
        min-height: 35px;
    }
    
    .agreement-modal-text .rule-block h2 {
        font-size: 16px;
    }
    
    .agreement-modal-text .rule-block li {
        margin-bottom: 10px;
        font-size: 14px;
    }
}

/* ===== PDF 下載燈箱樣式 ===== */
.pdf-alert-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.pdf-alert-modal.active {
    display: flex;
}

.pdf-alert-content {
    position: relative;
    width: min(90vw, 640px);
    max-height: 85vh;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    aspect-ratio: 640 / 960;
}

.pdf-alert-bg {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.pdf-rules-link {
    position: absolute;
    top: 63.5%;
    left: 50%;
    transform: translateX(-50%);
    color: #2196F3;
    text-decoration: underline;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    z-index: 5;
    transition: color 0.2s ease;
}

.pdf-rules-link:hover {
    color: #1976D2;
    text-decoration: underline;
}

.pdf-alert-close {
    position: absolute;
    top: 30%;
    right: 1.5%;
    width: 7%;
    height: auto;
    aspect-ratio: 1 / 1;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 10;
    min-width: 40px;
    min-height: 40px;
}

.pdf-alert-close img {
    width: 100%;
    height: 100%;
    display: block;
}

.pdf-alert-close:hover {
    transform: scale(1.1);
}

.pdf-download-btn {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 55%;
    max-width: 320px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.pdf-download-btn img {
    width: 100%;
    height: auto;
    display: block;
}

.pdf-download-btn:hover {
    transform: translateX(-50%) scale(1.05);
}

.pdf-download-btn:active {
    transform: translateX(-50%) scale(0.95);
}

@media (max-width: 768px) {
    .pdf-alert-content {
        width: 95vw;
        max-height: 90vh;
    }
    
    .pdf-alert-close {
        /* top: 1.5%; */
        /* right: 1.5%; */
        width: 8%;
        min-width: 35px;
        min-height: 35px;
    }
    
    .pdf-rules-link {
        font-size: 14px;
    }
    
    .pdf-download-btn {
        /* bottom: 10%; */
        width: 60%;
    }
}

/* ===== QA 頁面樣式 ===== */
.qa-section {
    width: 100%;
    padding: 40px 20px 30px;
    /* background: linear-gradient(to bottom, #FFA500 0%, #FF8C00 100%); */
    min-height: 100vh;
}

.qa-top {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 20px;
    text-align: center;
}

.qa-top img {
    width: 100%;
    height: auto;
    display: block;
}

/* 手風琴區塊 */
.qa-accordion {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.qa-item {
    margin-bottom: 15px;
}

.qa-question {
    position: relative;
    cursor: pointer;
    min-height: 60px;
    display: flex;
    align-items: center;
    padding: 0;
}

.qa-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.qa-bg img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
}

.qa-text {
    position: relative;
    z-index: 2;
    padding: 15px 70px 15px 20px;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.5;
    text-align: left;
    display: flex;
}

.qa-text .qa-label {
    flex-shrink: 0;
    margin-right: 0.3em;
}

.qa-text .qa-content {
    flex: 1;
}

.qa-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qa-toggle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease;
}

.qa-toggle .arrow-down {
    opacity: 0;
}

.qa-toggle .arrow-right {
    opacity: 1;
}

.qa-item.active .qa-toggle .arrow-down {
    opacity: 1;
}

.qa-item.active .qa-toggle .arrow-right {
    opacity: 0;
}

.qa-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    position: relative;
    background-image: url(../img/qa_bg_ans.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: top center;
    /* margin-top: -5px; */
    margin-left:  5px;
}

.qa-item.active .qa-answer {
    max-height: 500px;
    padding: 20px;
}

.qa-answer-content {
    color: #333333;
    font-size: 15px;
    line-height: 1.8;
    text-align: left;
    display: flex;
}

.qa-answer-content .qa-label {
    flex-shrink: 0;
    margin-right: 0.3em;
    font-weight: bold;
}

.qa-answer-content .qa-content {
    flex: 1;
}

/* 回首頁區塊 */
.qa-footer {
    width: 100%;
    max-width: 600px;
    margin: 40px auto 0;
    position: relative;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qa-footer-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.qa-footer-bg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.qa-home-btn {
    position: relative;
    z-index: 2;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease;
    max-width: 250px;
    width: 100%;
}

.qa-home-btn img {
    width: 100%;
    height: auto;
    display: block;
}

.qa-home-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.qa-home-btn:active {
    transform: translateY(0);
    opacity: 1;
}

/* RWD 響應式調整 */
@media (max-width: 480px) {
    .qa-section {
        padding: 40px 15px 20px;
    }
    
    .qa-text {
        font-size: 15px;
        padding: 12px 60px 12px 15px;
    }
    
    .qa-toggle {
        width: 40px;
        height: 40px;
        right: 8px;
    }
    
    .qa-answer-content {
        font-size: 15px;
    }
    
    .qa-item.active .qa-answer {
        padding: 15px;
    }
    
    .qa-home-btn {
        max-width: 200px;
    }
}

/* ===== 活動辦法頁面樣式 ===== */
.rules-section {
    width: 100%;
    /* padding: 40px 20px 30px; */
    /* background: linear-gradient(to bottom, #FFA500 0%, #FF8C00 100%); */
    /* min-height: 100vh; */
}

.rules-top {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 0;
    text-align: center;
    position: relative;
    z-index: 2;
}

.rules-top img {
    width: 100%;
    height: auto;
    display: block;
}

/* 內容區塊 */
.rules-content-wrapper {
    width: 100%;
    max-width: 600px;
    margin: -30px auto 30px;
    position: relative;
    z-index: 1;
}

.rules-bg {
    position: relative;
    width: 100%;
    z-index: 1;
}

.rules-bg img {
    width: 100%;
    height: auto;
    display: block;
}

.rules-scrollable {
    position: absolute;
    top: 40px;
    left: 30px;
    right: 10px;
    bottom: 90px;
    z-index: 2;
    overflow-y: auto;
    overflow-x: hidden;
}

.rules-scrollable.s2 {
    position: absolute;
    top: 40px;
    left: 30px;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    overflow-y: auto;
    overflow-x: hidden;
}

/* 自訂捲軸樣式 */
.rules-scrollable::-webkit-scrollbar {
    width: 8px;
}

.rules-scrollable::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.rules-scrollable::-webkit-scrollbar-thumb {
    background: #666666;
    border-radius: 4px;
}

.rules-scrollable::-webkit-scrollbar-thumb:hover {
    background: #555555;
}
.rules-text {
    color: #333333;
    font-size: 15px;
    line-height: 1.8;
    text-align: left;
    /* overflow: hidden; */
    padding: 0 10px 0 5px;
    overflow-x: visible;
}
.rules-text p {
    margin-bottom: 15px;
}

.rules-text p:last-child {
    margin-bottom: 0;
}

.rules-text ol,
.rules-text ul {
    padding-left: 45px;
    margin: 15px 0;
    list-style-position: outside;
}

.rules-text ol {
    list-style-type: decimal;
    padding-left: 50px;
}

.rules-text li {
    padding-left: 8px;
    margin-bottom: 10px;
}

/* 回首頁區塊 */
.rules-footer {
    width: 100%;
    max-width: 600px;
    margin: -140px auto 0;
    position: relative;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}
.rules-footer.s2 {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    margin: 0;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}
.rules-footer.ewntry-winner-footer{
    margin: -30px auto 0;
}

.rules-footer-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.rules-footer-bg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.rules-home-btn {
    position: relative;
    z-index: 2;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease;
    max-width: 250px;
    width: 100%;
}

.rules-home-btn img {
    width: 100%;
    height: auto;
    display: block;
}

.rules-home-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.rules-home-btn:active {
    transform: translateY(0);
    opacity: 1;
}

/* RWD 響應式調整 */
@media (max-width: 480px) {
    .rules-section {
        /* padding: 70px 15px 20px; */
    }
    
    .rules-scrollable {
        /* top: 20px; */
        /* left: 20px; */
        /* right: 30px; */
        /* bottom: 70px; */
    }
    
    .rules-text {
        font-size: 13px;
    }
    
    .rules-footer {
        /* margin-top: -50px; */
    }
    
    .rules-home-btn {
        max-width: 200px;
    }
    .prize-form {
        top: 20%;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        padding: 26.5% 8% 0;
        box-sizing: border-box;
        gap: 10px;
    }

    /* 表單標籤 */
    .form-label {
        color: #fff;
        font-size: 14px;
        font-weight: bold;
        white-space: nowrap;
        min-width: 70px;
        text-align: left;
    }
    
    /* 表單輸入框通用樣式 */
    .form-input,
    .form-select {
        /* background: #FFFF00; */
        border: none;
        padding: 5px 12px;
        font-size: 14px;
        color: #000;
        flex: 1;
        box-sizing: border-box;
        height: 40px;
    }
    
    .form-input:focus,
    .form-select:focus {
        outline: 2px solid #F15A24;
        background: #FFFF33;
    }
    
    .form-input::placeholder {
        color: #666;
    }
    /* 同意條款文字 */
    .agreement-text {
        color: #fff;
        font-size: 14px;
        line-height: 1.4;
        margin: 0;
        font-weight: bold;
    }
    /* Checkbox 勾選框 */
    .form-checkbox {
        cursor: pointer;
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }
    /* 注意事項說明 */
    .form-notice {
        color: #c2c2c2;
        font-size: 12px;
        line-height: 1.6;
        text-align: center;
        padding: 5px 0;
        font-weight: bold;
        white-space: nowrap;
    }
}

/* ===== Loading 遮罩樣式 ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgb(255 167 0 / 95%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

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

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

.loading-text {
    color: #fff;
    font-size: 16px;
    margin-top: 20px;
    font-weight: 500;
}
