@charset "UTF-8";
@import url("reset.css");

/* -----------------------------------------
    共用與基礎設定
------------------------------------------*/
html {
    scroll-behavior: smooth;
}

html, body {
    width: 100%;
    letter-spacing: 1px;
}

figure {
    margin: 0;
}

em {
    font-style: normal;
}

/* 錨點預留頂部 Header 空間 */
#rules,
#prizes {
    scroll-margin-top: 90px;
}

/* ==========================================================================
   歲末迎新玉番賞抽獎活動 - Main 內容區塊與模組 CSS
   ========================================================================== */

/* ---------------------------------- */
/* 0. 基礎容器與通用設定 */
/* ---------------------------------- */
.container_custom {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    box-sizing: border-box;
}

.break {
    display: block;
}

.txt_red {
    color: #f8524c;
    font-weight: 600;
}

.txt-white {
    color: #00a19b;
}

/* ---------------------------------- */
/* 1. 主視覺區塊 (KV Section) */
/* ---------------------------------- */
.kv_section {
    width: 100%;
    overflow: hidden;
    margin-top: 68px;
}

.kv_img {
    width: 100%;
    height: auto;
    display: block;
}

/* ---------------------------------- */
/* 2. 活動說明區塊 (Rules Section) */
/* ---------------------------------- */
.rules_section {
    padding: 50px 0;
    background-color: #ffffff;
}

/* 信用卡小圖微動態與光影效果 */
.rules_top_img {
    margin: 0 auto 15px auto;
    width: 346px;
    max-width: 80%;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    animation: cardFloat 3s ease-in-out infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rules_top_img img {
    width: 100%;
    height: auto;
    display: block;
}

.rules_top_img:hover {
    transform: translateY(-8px) scale(1.02);
    cursor: pointer;
}

.rules_top_img::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 50%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    transition: none;
}

.rules_top_img:hover::after {
    left: 150%;
    transition: left 0.75s ease-in-out;
}

@keyframes cardFloat {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-6px);
    }
    100% {
        transform: translateY(0px);
    }
}

.badge_date {
    display: inline-block;
    background-color: #fdd13a;
    color: #2f2f2f;
    font-weight: 600;
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.rules_desc {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #2f2f2f;
    margin-bottom: 15px;
}

.highlight_sub {
    font-weight: 500;
}

.highlight_sub2 {
    color: #00a19b;
    font-weight: 500;
}

.rules_notes {
    list-style: none;
    padding: 0;
    font-size: 1rem;
    line-height: 1.5;
    color: #666666;
    margin-bottom: 25px;
}

/* ---------------------------------- */
/* 3. 按鈕組合 (Action Buttons) */
/* ---------------------------------- */
.action_btn_group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

/* 主要按鈕 */
.btn {
    width: 100%;
    max-width: 12.5rem;
    height: 4.0625rem;
    border-radius: 0.25rem;
    color: #ffffff;
    background-color: #00a19b;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    border: none;
    margin: 8px;
    text-align: center;
    transition: 0.3s;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
    font-size: 1rem;
    box-sizing: border-box;
}

/* 次要按鈕 */
.btnLine {
    width: 100%;
    max-width: 12.5rem;
    height: 4.0625rem;
    border-radius: 4px;
    text-align: center;
    border: solid 1px #00a19b;
    color: #00a19b;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1rem;
    font-weight: 500;
    margin: 8px;
    text-decoration: none;
    box-sizing: border-box;
}

.btnLine:hover {
    opacity: 0.7;
}

.btnLine:disabled {
    background: #acacac;
    color: #ffffff;
    border: none;
    cursor: not-allowed;
}

/* ---------------------------------- */
/* 4. 獎項展示區塊 (Prize Section) */
/* ---------------------------------- */
.prize_section {
    background-color: #fff9e6;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 15px,
        rgba(255, 255, 255, 0.45) 15px,
        rgba(255, 255, 255, 0.45) 30px
    );
    padding: 60px 0;
}

/* SVG 標題圖片 */
.category_title_img {
    margin: 0 auto 25px auto;
    text-align: center;
}

.category_title_img img {
    width: 300px;
    max-width: 80%;
    height: auto;
    display: inline-block;
}

.prize_grid {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
}

.prize_item img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.03));
}

/* 電腦版雙欄（豪華大賞 A、B、C、D賞，2x2 排列） */
.prize_grid_large {
    grid-template-columns: repeat(2, 1fr);
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

/* 電腦版三欄（玉番好禮 E、F、G、H、I、J賞，3x2 排列） */
.prize_grid_small {
    grid-template-columns: repeat(3, 1fr);
}

/* 重要日期公告標籤 */
.announcement_dates {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.date_pill {
    background-color: #fdd13a;
    color: #2f2f2f;
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
}

/* ---------------------------------- */
/* 5. 注意事項彈跳視窗 (Modal) */
/* ---------------------------------- */
.modal_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.modal_overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal_container {
    background-color: #ffffff;
    width: 100%;
    max-width: 700px;
    max-height: 80vh;
    border-radius: 8px;
    padding: 30px 25px 25px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.modal_close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #888888;
    cursor: pointer;
    line-height: 1;
}

.modal_close:hover {
    color: #333333;
}

.modal_title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2F2F2F;
    text-align: center;
    margin-bottom: 15px;
    padding: 0 32px 10px;
    line-height: 1.4;
    border-bottom: 2px solid #00a19b;
}

.modal_content {
    overflow-y: auto;
    padding-right: 10px;
    color: #2F2F2F;
    font-size: 16px;
    line-height: 1.6;
    text-align: left;
}

.notice_list {
    padding-left: 32px;
    margin: 0;
    list-style: decimal;
    text-align: justify;
}

.notice_list li {
    margin-bottom: 12px;
}

.notice_list li.highlight_red {
    color: #f8524c;
}

.notice_link {
    color: #00a19b;
    text-decoration: underline;
}

.notice_link:hover {
    opacity: 0.8;
}

/* ---------------------------------- */
/* 6. 分享彈出視窗 (Share Sheet) */
/* ---------------------------------- */
.share-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    visibility: hidden;
    transition: visibility 0.3s ease;
}

.share-sheet-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
}

.share-sheet-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 480px;
    background-color: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-sizing: border-box;
    margin-top: auto;
    margin-bottom: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
}

.share-sheet-overlay.active {
    visibility: visible;
}

.share-sheet-overlay.active .share-sheet-bg {
    background-color: rgba(0, 0, 0, 0.5);
}

.share-sheet-overlay.active .share-sheet-content {
    transform: scale(1);
    opacity: 1;
}

.share-sheet-drag-handle {
    display: none;
}

.share-sheet-title {
    font-size: 20px;
    color: #2F2F2F;
    font-weight: 500;
    text-align: center;
    margin: 0 0 25px 0;
}

.share-options-grid {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.share-option-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    flex: 1;
    outline: none;
}

.share-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transition: transform 0.2s ease;
}

.share-option-item:hover .share-icon-wrap {
    transform: scale(1.08);
}

.share-icon-wrap img {
    width: 100%;
    height: auto;
}

.share-text {
    font-size: 14px;
    color: #5f6368;
    font-weight: 500;
}

.share-sheet-close {
    width: 100%;
    padding: 12px 0;
    background-color: #f1f3f4;
    color: #5f6368;
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.share-sheet-close:hover {
    background-color: #e8eaed;
}

/* ---------------------------------- */
/* 7. RWD 響應式微調 */
/* ---------------------------------- */
@media (max-width: 800px) {
    .kv_section {
        margin-top: 62px;
    }
}

@media (max-width: 768px) {
    .btn, .btnLine {
        max-width: 8.75rem;
        margin: 4px 0;
    }

    /* 手機版：豪華大賞單欄呈現，玉番好禮雙欄呈現 */
    .prize_grid_large {
        grid-template-columns: 1fr;
    }

    .prize_grid_small {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 公告日期變垂直排列 */
    .announcement_dates {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .date_pill {
        width: 100%;
        max-width: 300px;
        box-sizing: border-box;
    }

    /* 注意事項彈窗手機版微調 */
    .modal_container {
        padding: 25px 18px 20px;
    }

    .modal_close {
        top: 12px;
        right: 14px;
    }

    .modal_title {
        font-size: 1.05rem;
        letter-spacing: 0.5px;
        padding: 0 26px 10px;
    }

    /* 分享視窗手機版轉底部滑出面板 */
    .share-sheet-overlay {
        align-items: flex-end;
    }

    .share-sheet-content {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        padding: 20px 20px 30px 20px;
        margin-top: 0;
        margin-bottom: 0;
        transform: translateY(100%);
        opacity: 1;
        transition: transform 0.35s cubic-bezier(0.15, 1, 0.3, 1);
    }

    .share-sheet-overlay.active .share-sheet-content {
        transform: translateY(0);
    }

    .share-sheet-drag-handle {
        display: block;
        width: 40px;
        height: 4px;
        background-color: #e8eaed;
        border-radius: 2px;
        margin: 0 auto 15px auto;
    }

    .share-sheet-title {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .share-icon-wrap {
        width: 54px;
        height: 54px;
    }
}

@media (max-width: 450px) {
    .badge_date {
        font-size: 1rem;
    }

    .break {
        display: none;
    }
}