/* 基本設定 */
:root {
    /* 設計色系 */
    --brand-color-main: #0050c9;
    --brand-color-sec0: #1E1B2C;
    --brand-color-sec1: #111111;
    --brand-color-sec2: #ffffff;
    --brand-color-sec3: #0050c9;
    --gradient-btn: linear-gradient(to bottom, #C50000, #FF6060);
    --gradient-btn-cta: linear-gradient(to bottom, #3b7cd1, #c5dfef);
    --gradient-btn-reversed: linear-gradient(to bottom, #001dfe, #019cff);
    --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: #2e172d;
}

.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: var(--gradient-btn);
    color: var(--white);
    border-radius: 10px;
    border:  1px solid #ce142c;
}

.nav-btn:hover {
    background: var(--gradient-btn-reversed);
    border: 1px solid #049bf1;
}

* {
    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: 20px;
}

.h3-deco {
    font-size: 2rem;
    color: var(--brand-color-sec1);
    margin-bottom: 20px;
    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: var(--brand-color-sec3);
    color: var(--brand-color-sec3);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.3);
    /*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;
}

#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-reversed);
    color: white !important;
    padding: 20px 100px;
    border-radius: 16px;
    text-decoration: none;
    border: 2px solid #049bf1;
    line-height: 80px;
}

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

/* 英雄區樣式 */
.hero {
    height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-image:
        linear-gradient(rgba(0, 5, 23, 0.35), rgba(0, 5, 23, 0.35)),
        /* 遮罩層 */ url(img/hero-banner.jpg);
    background-size: cover;
    background-position: center;
    padding: 0 20px;
    padding-top: 67px;
    color: var(--white);
    margin-top: -67px;
}

.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;
}

.highlight {
}

.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-sec3);
    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;
}

.feature-card:hover {
    transform: translateY(-10px);
    background: var(--white);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

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

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

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

/* 手機版調整 */
@media (max-width: 768px) {
    .grid-wrapper {
         grid-template-columns: repeat(2, 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 {
    background-color: var(--black);
    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;
}

/* 手機版響應式調整 */
@media (max-width: 768px) {
     .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: 40px;
        max-width: 80% !important;
    }
    .hero {
        height: 95vh !important;
    }

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

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

    .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;
    }
}

.marquee-container {
    background-color: var(--marquee-bg);
    padding: 15px;
    width: 95%;
    max-width: 600px;
    margin: 20px auto;
    text-align: center;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.marquee-content {
    font-size: 1.1rem;
    line-height: 1.5;
    color: #333;
    white-space: normal;
    word-break: break-all;
    display: block;
    animation: fadeInUp 0.8s ease-out forwards;
}

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

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .marquee-content {
        font-size: 0.95rem;
        padding: 0 5px;
    }
}

/* 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;
    border:;
}

.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;
}

@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: 76px;
    max-width: 800px;
    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: 100%;
}

.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;
    background-color: #111111;
}
.feat-light {
    background-color: var(--brand-color-sec2);
}

.feat-bottom {
    background-color: #111111;
    color: #ffffff;
}

.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{
    position: fixed;
    right: 0;
    bottom: 0;
    z-index: 1000;
    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);
  }
}