/* --- 1. 全域變數與基礎設定 --- */
:root {
    --bg-dark: #121212;
    --card-bg: #1e1e1e;
    --gold: #d4af37;
    --white: #ffffff;
    --gray: #a0a0a0;
    --accent: #ff4d4d;
    --btn-orange: #ff5722; /* 按鈕橘色 */
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Inter', 'Segoe UI', sans-serif; 
}

body {
    margin: 0;
    padding: 0;
    background-color: #000; /* 確保背景是黑色的 */
    display: flex;
    flex-direction: column;
    align-items: center; /* 讓內容在電腦版置中 */
    overflow-x: hidden; /* 防止水平溢出 */
}

/* 內容容器統一設定 */
.navbar, 
#content {
    width: 100%;
    max-width: 1200px; /* 電腦版最大寬度 */
    box-sizing: border-box; 
    padding-left: 20px;   
    padding-right: 20px;
    margin: 0 auto;       /* 置中 */
}

/* --- 2. 導航欄 (Navbar) & Logo 修正 --- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(18, 18, 18, 0.98);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    border-bottom: 1px solid #333;
}

.hamburger {
    display: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    order: 2; /* 放在右側 */
}

.navbar .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0; /* 防止 Logo 被選單擠壓 */
}

.navbar .logo img {
    height: 40px; 
    width: auto;
    object-fit: contain;
    margin-right: 8px;
}

.logo-text {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    white-space: nowrap;
}

.logo-text span {
    color: #ff5722; /* 橘色部分 */
}

/* 選單區域優化 */
.menu { 
    display: flex; 
    justify-content: flex-end; 
    align-items: center;
    gap: 20px; /* 控制選單間距 */
    flex: 1; 
}

/* --- 手機版 RWD (螢幕寬度小於 768px) --- */
@media (max-width: 768px) {
    .hamburger {
        display: block; /* 顯示漢堡圖示 */
    }

    .menu {
        position: absolute;
        top: 70px; /* 剛好在 navbar 下方 */
        left: 0;
        width: 100%;
        background: #121212;
        flex-direction: column; /* 垂直排列 */
        gap: 0;
        max-height: 0; /* 初始高度為 0 (隱藏) */
        overflow: hidden;
        transition: max-height 0.3s ease-in-out; /* 下拉動畫 */
        border-bottom: 0px solid #333;
        z-index: 999;
    }

    /* 當 Checkbox 被勾選時，展開選單 */
    #menu-toggle:checked ~ .menu {
        max-height: 300px; /* 足夠容納 4 個連結的高度 */
        border-bottom: 1px solid #333;
    }

    .nav-link {
        width: 100%;
        padding: 15px 25px;
        border-bottom: 1px solid #222;
        font-size: 14px;
        text-align: left;
    }

    .nav-link.active {
        border-bottom: 1px solid #222; /* 覆蓋電腦版的底部橫線 */
        background: rgba(212, 175, 55, 0.1); /* 手機版選中態給一點背景色 */
    }
}

.nav-link { 
    color: var(--gray); 
    text-decoration: none; 
    font-size: 13px; 
    font-weight: bold; 
    white-space: nowrap; /* 防止手機版文字斷行 */
    transition: color 0.3s;
}

.nav-link.active { 
    color: var(--gold); 
    border-bottom: 2px solid var(--gold); 
}

/* 修正手機版在窄螢幕下的 Navbar 體驗 */
@media (max-width: 480px) {
    .navbar, #content {
        padding-left: 15px; 
        padding-right: 15px;
    }
    .menu {
        gap: 12px; /* 縮小間距以適應手機 */
    }
    .nav-link {
        font-size: 12px;
    }
    .logo-text {
        font-size: 20px;
    }
    .navbar .logo img {
        height: 32px;
    }
}

/* --- 3. 頁面切換與動畫 --- */
.page { display: none; padding: 20px; animation: fadeIn 0.3s ease; }
.page.active { display: block; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- 4. Hero Card 推薦區域 --- */
.hero-card {
    background: linear-gradient(135deg, #2c2c2c, #000);
    padding: 30px 20px; 
    border-radius: 15px; 
    border: 1px solid var(--gold);
    text-align: center; 
    margin-bottom: 20px;
}

.badge { 
    background: var(--gold); 
    color: black; 
    padding: 3px 10px; 
    border-radius: 20px; 
    font-size: 10px; 
    font-weight: bold; 
    display: inline-flex;
    align-items: center;
}

.badge i { margin-right: 5px; color: #000; }

.btn-main {
    display: inline-block; 
    margin-top: 15px; 
    background: var(--gold);
    color: black; 
    padding: 12px 30px; 
    border-radius: 25px;
    text-decoration: none; 
    font-weight: bold; 
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    transition: transform 0.2s;
}

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

/* --- 5. 標題與清單樣式 (單色圖示) --- */
.section-title { 
    font-size: 16px; 
    margin: 25px 0 12px; 
    color: var(--gold); 
    font-weight: bold; 
    text-transform: uppercase; 
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    color: var(--gold);
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.live-scroll { 
    background: #252525; 
    padding: 12px; 
    border-radius: 8px; 
    border-left: 4px solid var(--gold); 
}

.live-item { font-size: 13px; margin-bottom: 5px; color: #eee; }

.live-tag { 
    color: var(--accent); 
    font-size: 10px; 
    border: 1px solid var(--accent); 
    padding: 1px 4px; 
    margin-left: 5px; 
    border-radius: 3px; 
}

/* --- 6. Platform Preview (橫向卡片) --- */
.platform-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plat-card {
    display: flex;
    align-items: center;
    background: #ffffff; 
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.2s;
    min-height: 85px;
}

.plat-card:active { transform: scale(0.98); }

.plat-rank {
    background: var(--card-bg); /* 深色背景標記編號 */
    color: var(--gold);
    min-width: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    align-self: stretch;
}

.plat-logo {
    padding: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
}

.plat-logo img {
    width: 65px;
    height: 45px;
    object-fit: contain;
}

.plat-info {
    flex: 1;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid #eee;
}

.plat-name {
    font-size: 15px;
    font-weight: 800;
    color: #111; /* 名字用深黑色 */
    margin-bottom: 2px;
}

.plat-bonus {
    font-size: 11px;
    color: #555;
    line-height: 1.3;
}

.plat-bonus .highlight {
    color: var(--btn-orange); /* 突顯獎勵訊息 */
    font-weight: bold;
    display: block;
    font-size: 12px;
}

.plat-action {
    padding: 0 15px;
}

.btn-play {
    background: var(--btn-orange);
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
    text-transform: uppercase;
}

/* --- 7. Promo Banners & Tips --- */
.promo-banner { display: flex; gap: 10px; margin-top: 15px; }

.promo-text { 
    background: #252010; 
    flex: 1; 
    padding: 15px; 
    border-radius: 10px; 
    text-align: center; 
    border: 1px solid rgba(212, 175, 55, 0.2); 
}

.promo-text h3 { font-size: 11px; color: var(--gray); margin-bottom: 5px; }

.big-num { font-size: 26px; color: var(--gold); font-weight: 900; }

.tips-box {
    background: #252525;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid var(--gold);
}

.tips-box h4 {
    color: var(--white);
    font-size: 14px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.tips-box h4 i { color: var(--gold); margin-right: 8px; }

.tips-box p { font-size: 12px; color: var(--gray); }

/* --- 8. Platform Page List (全列表頁面) --- */
.full-list { margin-top: 10px; }

.list-item {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: var(--card-bg);
    padding: 18px; 
    margin-bottom: 12px; 
    border-radius: 10px; 
    text-decoration: none; 
    color: white;
    border: 1px solid #333;
}

.list-item span { 
    background: var(--gold); 
    color: black; 
    padding: 4px 12px; 
    border-radius: 6px; 
    font-size: 11px; 
    font-weight: bold; 
}

/* --- 9. Social & Floating Elements --- */
.social-links { display: flex; justify-content: center; gap: 25px; margin: 40px 0; }

.social-links a { 
    color: var(--gray); 
    text-decoration: none; 
    font-size: 14px; 
    display: flex; 
    align-items: center; 
}

.social-links a i { margin-right: 8px; color: var(--gold); font-size: 18px; }

.whatsapp-float {
    position: fixed; 
    bottom: 25px; 
    right: 20px;
    background: #25d366; 
    color: white; 
    width: 55px; 
    height: 55px;
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 28px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.4); 
    z-index: 999;
    text-decoration: none;
}

/* --- 10. RWD 適應性修正 --- */
@media (max-width: 480px) {
    .plat-logo { display: none; } /* 手機端隱藏 Logo 以騰出空間給文字 */
    .plat-info { padding: 10px; border-left: none; }
    .plat-name { font-size: 14px; color: #111; }
    .plat-bonus .highlight { font-size: 11px; }
    .plat-rank { min-width: 30px; font-size: 12px; }
    .btn-play { padding: 6px 10px; font-size: 10px; }
}

/* Platform 頁面專用微調 */
.plat-desc {
    font-size: 11px;
    color: #888;
    margin-bottom: 5px;
}

.plat-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.tag-bonus {
    background: #f0f0f0;
    color: #ff5722; /* 橘色字體 */
    border: 1px solid #ff5722;
    font-size: 9px;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
}

/* 確保 Platform 頁面的列表間距充足 */
#platform .platform-list-container {
    padding-bottom: 100px; /* 防止被底部按鈕遮擋 */
}

/* --- LIVE 頁面專屬 (YouTube Style) --- */

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.video-card {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    padding-bottom: 10px;
}

.iframe-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.live-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff0000;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    z-index: 10;
    pointer-events: none;
}

.video-info {
    padding: 12px 10px 5px 10px;
}

.video-title {
    font-size: 14px;
    color: #fff;
    margin-bottom: 5px;
}

.video-meta {
    font-size: 12px;
    color: #888;
}

.section-divider {
    border: 0;
    border-top: 1px solid #333;
    margin: 20px 0;
}

/* Promo Banner 容器 */
.promo-banner-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.promo-card {
    position: relative;
    padding: 25px;
    border-radius: 15px;
    overflow: hidden;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.promo-card:hover {
    transform: translateY(-5px);
}

.welcome-bonus {
    background: linear-gradient(135deg, #001242 0%, #0052D4 50%, #61045f 100%);
    box-shadow: 0 10px 20px rgba(0, 82, 212, 0.3);
}

.free-credit {
    background: linear-gradient(135deg, #2b033d 0%, #8e2de2 50%, #4a00e0 100%);
    box-shadow: 0 10px 20px rgba(142, 45, 226, 0.3);
}

.promo-tag {
    font-size: 10px;
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 1px;
    font-weight: bold;
}

.promo-card h3 {
    margin: 15px 0 5px;
    font-size: 1.2rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.promo-card .big-num {
    font-size: 3rem;
    font-weight: 900;
    margin: 5px 0;
    background: linear-gradient(to bottom, #ffffff 0%, #d1d1d1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
    line-height: 1;
}

.promo-card .big-num span, .promo-card .big-num small {
    font-size: 1.5rem;
}

.promo-card p {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 15px;
}

.promo-btn {
    background: #fff;
    color: #000;
    border: none;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
    transition: 0.3s;
}

.promo-btn:hover {
    background: #ff5722;
    color: #fff;
    box-shadow: 0 4px 20px rgba(255, 87, 34, 0.5);
}

@media (max-width: 600px) {
    .promo-banner-container {
        grid-template-columns: 1fr;
    }
}

/* --- HERO SLIDER Section (高級霓虹風格) --- */

.hero-slider-container {
    padding: 10px 0; 
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.swiper-slide {
    margin-right: 15px; 
    border-radius: 15px;
    overflow: visible;
}

.swiper-slide.hero-card {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 30px 20px;
    min-height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-card.main-promo { background-image: url('hero-bg-casinogreen.jpg'); }
.hero-card.bonus-promo { background-image: url('hero-bg-casinoorange.jpg'); }

.swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.6) !important;
    opacity: 1;
    width: 10px;
    height: 10px;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: linear-gradient(135deg, #FFD700, #FFA500) !important;
    width: 25px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.swiper-pagination { bottom: 5px !important; }

.card-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,255,100,0.1), rgba(0,0,0,0.3), rgba(0,255,100,0.1));
    pointer-events: none;
}

.card-content { position: relative; z-index: 10; width: 100%; }

.welcome-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    margin: 10px 0 5px;
}

.glow-box {
    margin: 10px 0;
    border-left: 4px solid #00ff66;
    padding-left: 10px;
}

.big-offer-text {
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 5px;
}

.sub-text { font-size: 10px; color: #bbb; line-height: 1.3; }

.btn-main-glow {
    display: inline-block;
    margin-top: 15px;
    background: #ff0000;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
    transition: transform 0.2s;
}

@media (min-width: 768px) {
    .swiper-slide.hero-card {
        padding: 50px 30px;
        min-height: 350px;
    }
    .big-offer-text { font-size: 2.5rem; }
    .welcome-text { font-size: 1.5rem; }
}

/* --- Partner Page 專屬樣式 --- */

.partner-container {
    padding-bottom: 50px;
}

.partner-hero {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    display: flex;
    gap: 30px;
    align-items: center;
    border: 1px solid rgba(212, 175, 55, 0.2);
    margin-bottom: 30px;
}

.partner-logo-box {
    flex-shrink: 0;
}

.partner-logo-box img {
    width: 150px;
    height: 150px;
    border-radius: 15px;
    object-fit: cover;
    border: 2px solid var(--gold);
}

.partner-info h2 {
    color: var(--gold);
    margin-bottom: 15px;
    font-size: 22px;
}

.partner-info p {
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 14px;
}

.partner-benefits {
    list-style: none;
    margin-bottom: 25px;
}

.partner-benefits li {
    color: #fff;
    font-size: 13px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.partner-benefits li i {
    color: #25d366; /* 綠色打勾 */
}

/* WhatsApp 按鈕樣式 */
.btn-partner-wa {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25d366;
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-partner-wa:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    background: #20ba5a;
}

/* --- RWD 手機版適應 --- */
@media (max-width: 768px) {
    .partner-hero {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .partner-logo-box img {
        width: 120px;
        height: 120px;
    }

    .partner-benefits li {
        justify-content: center;
    }

    .btn-partner-wa {
        width: 100%;
        justify-content: center;
    }
}

/* 原本的夥伴 Logo 盒子微調 */
.partner-logos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.logo-box {
    background: #252525;
    color: var(--gray);
    padding: 15px;
    text-align: center;
    border-radius: 8px;
    font-size: 12px;
    border: 1px solid #333;
}