/* 基本設定 */
:root {
    /* figma 設計色系 */
    /*-- 品牌主色 --*/
    --brand-color-main: #111111;
    /*-- 品牌副色 --*/
    --brand-color-sec1: #a9deff;

    --footer-game-18: #191919;

    --brand-color-sec0: #1e1b2c;

    --brand-color-sec2: #ffffff;
    --brand-color-sec3: #0050c9;
    --gradient-btn: linear-gradient(to bottom, #c50000, #ff6060);
    --gradient-btn-cta: linear-gradient(to bottom, #98090f, #ff5757);
    --gradient-btn-reversed: linear-gradient(to bottom, #98090f, #ff5757);
    --gradient-bg: linear-gradient(to top, #ffc296, #ffdd90);
    --marquee-bg: #ffde97;
    --black: #000000;
    --black-ish: #101010;
    --light-grey: #c4c4c4;
    --white: #ffffff;
    --text-pale: #bfaeae;
    --body-bg: #1b1b1b;
}

.font-noto-sans-tc {
    font-family: "Noto Sans TC", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
}

.nav-btn {
    text-decoration: none;
    padding: 10px 30px;
    background: #ffffff;
    color: var(--brand-color-main);
    border-radius: 10px;
    border: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--body-bg);
}

h3 {
    font-size: 2rem;
    color: flex-wrapper;
    margin-bottom: 5px;
}

.h3-deco {
    font-size: 2rem;
    color: var(--brand-color-sec1);
    margin-bottom: 5px;
    position: relative;
    display: inline-block;
    /*
    -webkit-text-stroke: 5px;
    -webkit-text-stroke-color: var(--brand-color-sec1);
    */
}

.h3-deco::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;

    /* 3. 這裡負責覆蓋上方的文字顏色，不帶邊框 */
    color: var(--white);
    -webkit-text-stroke: 0;

    /* 確保偽元素在最上層 */
    z-index: 1;
}

.textPale {
    padding-top: 15px;
    color: var(--text-pale);
    margin-bottom: 5px;
}

/* nav */
.navbar {
    height: 67px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: rgb(from var(--brand-color-main) r g b / 0.7);
    color: var(--brand-color-sec3);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0ma3);
    /*filter: drop-shadow(0 5px 5px rgcba(0, 0, 0, 0.6));*/
    line-height: 67px;
}
.navbar a {
    height: 100%;
    text-decoration: none;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 2px;
}
.copyrights {
    background-color: #000000;
    color: #ffffff;
    text-align: center;
    padding: 32px 16px;
}

#remain-quota {
    background-color: var(--brand-color-sec3);
    margin-left: 10px;
    padding: 2px 10px;
    font-weight: 800;
    color: var(--brand-color-sec1);
}

.btn-cta {
    background: var(--gradient-btn-cta);
    color: white !important;
    padding: 20px 50px;
    border-radius: 16px;
    text-decoration: none;
    border: 2px solid #ff5757;
    line-height: 80px;
    white-space: nowrap;
}

.btn-cta-card {
    padding: 10px 20px !important;
    border-radius: 10px;
}

.btn-cta:hover {
    background: var(--gradient-btn-reversed);
    border: 2px solid #bb0036;
}

/* 英雄區樣式 */
.hero {
    height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.6);
    background-size: cover;
    background-position: center;
    padding: 0 20px;
    padding-top: 67px;
    color: var(--white);
    margin-top: -150px;
}

.bottom-bg {
    background-image: linear-gradient(rgba(0, 5, 23, 0.35), rgba(0, 5, 23, 0.35)), url(img/treasure_bg.jpg) !important;
    background-size: cover !important;
    background-position: center !important;
    padding: 60px 56px !important;
    color: var(--white) !important;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px;
    color: var(--white);
}

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    margin: 10px;
    transition: 0.3s;
}

.btn-primary {
    background: var(--brand-color-main);
    background: var(--gradient-btn);
    color: white;
}

.btn-secondary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(108, 99, 255, 0.2);
}

/* 特色區塊樣式 */
.features {
    padding: 60px 10% 100px 10%;
    background: var(--brand-color-main);
    text-align: center;
}

.features .text-img {
    width: 45vw;
}

.text-img-forced {
    width: 45vw !important;
    filter: drop-shadow(3px 5px 2px rgba(0, 0, 0, 0.7));
}

.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-light);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    transition: 0.3s;
}

.icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
}

footer {
    text-align: center;
    padding: 40px;
    background: var(--footer-game-18);
    color: #fff5f5;
}

.flex-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px; /* 圖片與卡片之間的間距 */
    padding: 20px;
}

.image-wrapper img {
    height: 500px; /* 根據需求調整 */
    display: block;
}

/* 右側清單 */
.cards-list {
    display: flex;
    flex-direction: column;
    gap: 15px; /* 卡片與卡片之間的間距 */
    flex: 1;
    max-width: 500px; /* 限制寬度避免過長 */
}

/* 單張卡片樣式 */
.feature-card {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 15px; /* 圓角 */
    padding: 15px 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* 輕微陰影 */
}

/* 圖示區塊 */
.icon-box {
    flex-shrink: 0;
    margin-right: 20px;
}

.icon-box img {
    width: 60px; /* 圖示大小 */
    height: 60px;
}

.text-box {
    text-align: left;
}

/* 文字區塊 */
.text-box h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #333;
}

.text-box p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

/* 標籤容器樣式 */
.live-badge {
    position: absolute;
    top: 107px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.6); /* 半透明黑底 */
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    font-weight: 500;
    user-select: none;
}

/* 紅色閃爍圓點 */
.dot {
    height: 8px;
    width: 8px;
    background-color: #ff4d4f;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    animation: blink 1.5s infinite;
}

/* 閃爍動畫 */
@keyframes blink {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 1;
    }
}

/* 人數文字樣式 */
.count-text {
    letter-spacing: 0.5px;
}

.video-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* 你的 RGBA 濾鏡 */
    pointer-events: none; /* 讓滑鼠點擊可以穿透濾鏡，直接點到影片控製紐 */
    z-index: 1;
}

/* 手機版調整 */
@media (max-width: 768px) {
    .grid-wrapper {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
    .btn-cta {
        display: block !important;
        padding: 0;
        font-size: 1.3rem;
        line-height: 5rem;
    }
    .hint-text::before {
        display: block !important;
        margin-right: 0 !important;
        text-align: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    #luck-text {
        font-size: 0.8rem;
    }
    .hero {
        background-size: calc(100vw) 1;
        height: calc(100vw);
        background-position: center;
    }
}

/* 免責聲明區塊樣式 */
.game-disclaimer {
    color: ar(--white);
    padding: 10px 10%;
    font-size: 0.9rem;
    line-height: 1.1rem;
    /* border-top: 1px solid #333;*/
}

.disclaimer-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
}

.rating-icon img {
    width: 120px;
    height: auto;
    display: block;
}

.disclaimer-text p {
    margin-bottom: 10px;
    text-align: justify;
    opacity: 0.9;
}

.marquee-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: fixed;
    top: 67px;
    background-color: rgba(255, 0, 0, 0.8);
    width: 100vw;
    color: #fff;
}

.marquee-viewport {
    overflow: hidden;
    position: relative;
}

.marquee-container span{
     white-space: normal;
    word-break: break-all;
    display: block;
}

.marquee-content {
    font-size: 1.1rem;
    line-height: 1rem;
    color: #fff;
    white-space: normal;
    word-break: break-all;
    display: block;
}

.marquee-content strong {
    color: #d32f2f;
    font-weight: bold;
}

/* Modal Window */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #fff;
    margin: 15% auto;
    padding: 30px;
    border-radius: 60px 20px 60px 20px;
    width: 80%;
    max-width: 400px;
    text-align: center;
    position: relative;
    animation: zoomIn 0.3s ease;
}

#luck-hash {
    color: #b9b9b9;
    font-size: 1rem;
}

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

.close-btn {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    cursor: pointer;
}

.result-card {
    font-size: 3rem;
    font-weight: bold;
    color: #d32f2f;
    margin: 20px 0;
    padding: 20px;
    border: 3px double #d4b158;
    background-image: radial-gradient(rgba(255, 255, 255, 1), rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.9)),
        url(img/draw_bg.jpeg);
}

/* 簡易 Loading 動畫 */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #d32f2f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

.customFont {
    font-family: "Yuji Syuku", serif;
}
.result-desc {
    padding: 5px;
    border-radius: 5px;
}

.action-content {
    background-color: aqua;
    border-radius: 15px;
    overflow: hidden;
    scale: 1.1;
    box-sizing: content-box;
    border: 2px solid var(--brand-color-sec3);
    display: flex;
    flex-direction: column;
    transform: translateY(-20%);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.25);
}

.action-text {
    padding: 20px;
    background: var(--gradient-btn);
}
.action-text img {
    width: 100%;
}
.action-btn {
    background: var(--gradient-bg);
}

.action-btn p {
    margin: 20px;
    padding: 20px;
    background: var(--gradient-btn);
    color: var(--white);
    border-radius: 15px;
    border: 2px solid var(--brand-color-sec2);
}

.action-btn p:hover {
    background: var(--gradient-btn-cta);
    border: 2px solid black;
}

.spacer {
    height: 10px;
}

.step-card {
    background-color: #ffffff;
    padding: 20px 0;
    border-radius: 20px;
}

/* 讓容器填滿視窗 */
.video-background {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 影片本身的樣式 */
.hero video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100vw;
    width: 100%;
    height: 100%;
    z-index: -1; /* 確保影片在最底層 */
    transform: translate(-50%, -50%);
    object-fit: cover; /* 關鍵：確保影片裁切填滿而不變形 */
}

@media (min-width: 768px) {
    .action-content {
        transform: translateX(20%) translateY(-40%);
        max-width: 70%;
        vertical-align: bottom;
        align-self: center;
    }

    .action-content {
        flex-direction: row;
    }

    .action-content img {
        padding-left: 30px;
    }

    .action-text {
        width: 50vw;
    }

    .action-btn {
        width: 20vw;
    }
}

.flex-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: stretch;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.flex-wrapper-treasure {
    gap: 20px !important;
}

.hero-wrapper {
    max-width: 800px;
}

.flex-wrapper .flex-item {
    flex: 1;
    /*display: flex;*/
    flex-direction: column;
    align-items: top;
    color: var(--white);
}

.flex-item img {
    width: 90%;
}

.flex3 {
    min-width: 20px;
}

.flex3 img {
    filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.9));
}

.flex3 h4 {
    font-size: 1.5rem;
    color: var(--brand-color-sec0);
}

.flex4 {
    color: #111111 !important;
}
.flex4 p {
    font-size: 0.6rem;
}
.flex4 img {
    scale: 0.8;
    border-radius: 30px;
}

.flex4-treasure {
    filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.9));
    background-color: #142171;
    color: #ffffff !important;
    border-radius: 12px;
    padding: 10px 15px;
}

.feat-dark {
    color: #ffffff !important;
}
.feat-light {
    background-color: #e8e8e8;
    color: var(--brand-color-main);
}

.feat-core H4 {
    color: var(--brand-color-sec1);
    font-weight: 700;
}

.feat-bottom {
    background-color: #111111;
    color: #ffffff;
    background-image:
        linear-gradient(rgba(63, 79, 126, 0), rgba(63, 79, 126, 0)),
        /* 遮罩層 */ url(img/TZ-BACKGROUND-Red_01.jpg);
    background-size: cover;
    background-position: center;
}

.feat-bottom p {
    text-align: left;
}

.hero-wrapper h2 {
    font-size: 3rem;
}

.nav-promo {
    color: #ffffff;
    padding: 5px !important;
    text-align: center !important;
    position: fixed;
    font-size: 1.1rem;
    background-color: #111111;
    display: block;
    width: 100%;
    z-index: 999;
}

.promo-text {
    background-color: #111111;
    padding: 12px;
    border-radius: 12px;
    border: 1.5px solid var(--brand-color-main);
    margin-bottom: 20px;
}

.grid-wrapper {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: auto;
}

.hint-wrapper {
    display: inline;
    border: 1px solid #000000;
    border-radius: 500px;
    padding: 5px 10px;
}

.hint-wrapper-white {
    display: inline;
    border: 1px solid #ffffff;
    border-radius: 500px;
    padding: 5px 10px;
}

.hint-text::before {
    font-family: Verdana, Geneva, Tahoma, sans-serif !important;
    content: "\26BE";
    display: inline-block;
    animation: spin 2s linear infinite;
    margin-right: 5px;
}

.float-box {
    transform: translateZ(0);
    position: fixed;
    right: 0;
    bottom: 0;
    z-index: 9999;
    width: 200px;
}
.float-box img {
    width: 100%;
}

.event-rules {
    margin-top: 30px;
}

.event-rules p {
    background-color: #323232;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 12px;
}
.event-policy p {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #ffffff;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.content-force-white p,
.content-force-white h4 {
    color: #ffffff;
}
.content-force-white img {
    filter: invert(0);
}

.hint-text a {
    text-decoration: none;
    color: #d32f2f;
}

.bg-color-main {
    background-color: var(--brand-color-main);
}

.hint-card {
    background-color: #ffffff;
    color: rgba(0, 5, 23, 1);
    margin-top: 10px;
    text-align: left;
    border-radius: 8px;
    padding: 16px 32px;
    display: flex;
    align-items: center; /* 讓所有子元素垂直置中 */
    justify-content: left;
    gap: 0;
}

.bullet-box {
    display: flex;
    align-items: center;
    justify-content: center;
    /* 給予固定寬高，確保旋轉時不抖動 */
    width: 24px;
    height: 24px;
}

.indicator-box {
    display: flex;
    align-items: center;
    justify-content: center;
    /* 給予固定寬高，確保旋轉時不抖動 */
    width: 24px;
}

.dynamic-icon {
    color: var(--brand-color-main);
    display: inline-block;
    /* 確保旋轉中心在正中間 */
    transform-origin: center;
    line-height: 1;
    font-size: 20px;
}

/* 手機版響應式調整 */
@media (max-width: 768px) {
    .hint-card {
        flex-direction: column;
        gap: 0;
        justify-content: center;
        text-align: center;
    }
    .dynamic-icon {
        transform: rotate(90deg);
    }

    .flex4-treasure {
        padding: 30px 30px !important;
    }
    .float-box {
        width: 35vw !important;
    }

    .hint-wrapper,
    .hint-wrapper-white {
        display: block !important;
    }

    .flex-wrapper,
    .hero-wrapper {
        flex-direction: column !important;
        align-items: center;
        gap: 5px;
        max-width: 80% !important;
    }
    .hero {
        height: 100vh !important;
        padding: 200px 0;
    }

    .hero-wrapper p {
        font-size: 2rem;
        line-height: 2.5rem;
    }

    .hero-wrapper h2 {
        font-size: 1.8rem !important;
        scale: 1;
        line-height: 2.5rem;
        padding-bottom: 40px;
    }
    .hero-wrapper h2 span {
        font-size: 2.4rem !important;
        line-height: 4rem;
    }

    .flex-wrapper .flex-item {
        min-width: 60% !important;
    }

    .flex4 img {
        width: 35vw !important;
    }

    .flex4 h4 {
        font-size: 1.7rem !important;
    }
    .flex4 p {
        font-size: 1.3rem !important;
    }

    .disclaimer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .rating-icon {
        margin-bottom: 15px;
    }

    .disclaimer-text {
        font-size: 0.8rem;
    }
    .features .text-img,
    .text-img-forced {
        width: 100% !important;
    }

    .navbar {
        flex-flow: column;
        height: 140px;
        gap: 0;
    }
    .navbar img {
        padding-top: 3vw;
        width: 70vw !important;
        height: auto !important;
    }
    .navbar a {
        height: 80px;
    }
    .nav-btn {
        display: block;
        width: 70vw;
        padding: 0;
        line-height: 50px;
        text-align: center;
        border: 0;
        margin-bottom: 20px;
    }
    .flex-item img {
        width: 75%;
    }
    .mobile-layout {
        display: block;
    }
    .flex-container {
        flex-direction: column;
    }

    .feature-card {
        flex-direction: column;
        padding: 50px 40px;
        width: 70vw;
    }
    .icon-box {
        margin: 0;
    }

    .text-box {
        text-align: center;
    }

    .btn-cta-card {
        margin: 0 10%;
        padding: 0 20px !important;
        font-size: 1rem;
    }
    .live-badge {
        top: 190px;
    }
    .marquee-container {
        top: 140px;
        padding: 1px 0;
    }
}




@property --gradient-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.btn-vfx {
  /* 你的配色需求：按鈕深紅，光束金色 */
  --btn-bg: #b91c1c; 
  --beam-color: #f59e0b;
  --p: 15%; /* 光束長度控制 */
  
  /* 實作原理：
     1. padding-box: 按鈕內部的底色（會擋住中間的漸層）
     2. border-box: 邊框區域的漸層（會顯示出旋轉的光束）
  */
  background: 
    linear-gradient(var(--btn-bg), var(--btn-bg)) padding-box,
    conic-gradient(
        from var(--gradient-angle),
        transparent,
        var(--beam-color) var(--p),
        transparent calc(var(--p) * 2)
      ) border-box;
  
  /* 邊框必須設定為透明，寬度即為光束的粗細 */
  border: 1.5px solid transparent; 
  
  /* 啟動純 CSS 動畫 */
  animation: rotate-beam 3s linear infinite,
    button-bounce 0.6s ease-in-out infinite alternate;
}

/* 定義動畫幀 */
@keyframes rotate-beam {
  to {
    --gradient-angle: 360deg;
  }
}

/* 2. 專門負責按鈕跳動的動畫 */
@keyframes button-bounce {
  0% {
    transform: scale(0.98);
    filter: brightness(1); /* 原始亮度 */
  }
  100% {
    transform: scale(1.0); /* 稍微放大 */
    filter: brightness(1.2); /* 跳動時稍微變亮，更有動感 */
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3); /* 配合金色光束發光 */
  }
}
