/* ====================================
   紅龍撲克共用樣式表
   用於所有頁面的共用 CSS
   ==================================== */

html {
    overflow-y: scroll;
}

body {
    font-family: 'PingFang TC', 'PingFang SC', 'Microsoft JhengHei', 'Microsoft YaHei', 'Heiti TC', 'Heiti SC', 'Noto Sans CJK TC', 'Noto Sans CJK SC', sans-serif;
    background-color: #0f0f0f;
    color: #F5F5F5;
    scroll-behavior: smooth;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ============ 防止語言切換閃爍 ============ */
[data-i18n]:not(.i18n-ready),
[data-i18n-btn]:not(.i18n-ready) {
    opacity: 0;
}

[data-i18n].i18n-ready,
[data-i18n-btn].i18n-ready {
    opacity: 1;
    transition: opacity 0.15s ease-in;
}

/* ============ 導航列 ============ */
#header-placeholder {
    height: 104px;
    /* 64px nav + 40px ticker (approximate) */
    width: 100%;
}

nav.nav-sticky,
.nav-sticky {
    position: fixed !important;
    top: 0 !important;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999 !important;
    background-color: rgba(15, 15, 15, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #333;
    transition: box-shadow 0.3s ease;
}

/* Add shadow when scrolled */
nav.nav-sticky.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* ============ Announcement Ticker ============ */
#announcement-ticker {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    width: 100%;
    z-index: 9998 !important;
    /* 移除 background-color，使用 header.html 中的 Tailwind gradient */
}

/* ============ 龍鱗特效按鈕 ============ */
.btn-dragon {
    background: linear-gradient(135deg, #D90429 0%, #8D021F 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(217, 4, 41, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-dragon::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-dragon:hover::after {
    left: 100%;
}

.btn-dragon:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 4, 41, 0.5);
}

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

/* ============ 卡片懸浮效果 ============ */
.card-hover {
    transition: all 0.3s ease;
    cursor: pointer;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(217, 4, 41, 0.2);
    border-color: #D90429;
}

/* ============ 模態框 ============ */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    padding: 32px;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid #333;
    box-shadow: 0 10px 60px rgba(217, 4, 41, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-content h2 {
    color: white;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #D90429;
}

.modal-content p {
    color: #ccc;
    line-height: 1.8;
    margin-bottom: 16px;
}

.modal-content ul {
    list-style: none;
    padding-left: 0;
    margin: 16px 0;
}

.modal-content ul li {
    color: #ccc;
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
}

.modal-content ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #D90429;
    font-weight: bold;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 24px;
    color: #999;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.modal-close:hover {
    color: #D90429;
}

/* ============ 搬家公告 Drawer (右側滑出提示) ============ */
.relocation-drawer {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateX(100%) translateY(-50%);
    z-index: 11001;
    width: 90%;
    max-width: 400px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    border: 2px solid #FFD700;
    border-right: none;
    border-radius: 16px 0 0 16px;
    box-shadow: -8px 0 30px rgba(255, 215, 0, 0.6), 0 0 60px rgba(255, 215, 0, 0.3);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.relocation-drawer.show {
    transform: translateX(0) translateY(-50%);
}

.relocation-drawer.collapsed {
    transform: translateX(calc(100% - 36px)) translateY(-50%);
}

.relocation-drawer.collapsed .relocation-drawer-content {
    opacity: 0;
    pointer-events: none;
}

.relocation-drawer.collapsed .relocation-drawer-tab {
    opacity: 1;
    pointer-events: auto;
}

/* 收合时的小标签 */
.relocation-drawer-tab {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 90px;
    background: rgba(255, 215, 0, 0.15);
    border-radius: 12px 0 0 12px;
    box-shadow: -4px 0 12px rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.relocation-drawer-tab:hover {
    background: rgba(255, 215, 0, 0.25);
    box-shadow: -6px 0 16px rgba(255, 215, 0, 0.5);
    width: 40px;
}

.relocation-drawer-tab i {
    font-size: 18px;
    color: #FFD700;
    animation: pulse-chevron 2s ease-in-out infinite;
}

.relocation-drawer-tab:hover i {
    color: #FFF;
}

@keyframes pulse-chevron {

    0%,
    100% {
        transform: translateX(0);
        opacity: 1;
    }

    50% {
        transform: translateX(-4px);
        opacity: 0.7;
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.8);
        transform: scale(1.05);
    }
}

.relocation-drawer-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    position: relative;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

.relocation-drawer-icon {
    align-self: center;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 215, 0, 0.2);
    border-radius: 50%;
    animation: pulse-glow 2s ease-in-out infinite;
    margin-bottom: 8px;
}

.relocation-drawer-icon i {
    font-size: 24px;
    color: white;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
}

.relocation-drawer-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
    margin-bottom: 8px;
}

.relocation-drawer-title {
    font-size: 17px;
    font-weight: 700;
    color: white;
    line-height: 1.3;
}

.relocation-drawer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.1) 100%);
    border: 1.5px solid rgba(255, 215, 0, 0.5);
    border-radius: 8px;
    color: #FFD700;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.relocation-drawer-btn:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(255, 215, 0, 0.2) 100%);
    border-color: rgba(255, 215, 0, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.relocation-drawer-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.relocation-drawer-close:hover {
    background: rgba(255, 215, 0, 0.2);
    color: #FFD700;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .relocation-drawer {
        width: 85%;
        max-width: 320px;
    }

    .relocation-drawer.collapsed {
        transform: translateX(calc(100% - 30px)) translateY(-50%);
    }

    .relocation-drawer-tab {
        width: 30px;
        height: 70px;
        border-radius: 10px 0 0 10px;
        box-shadow: -3px 0 10px rgba(255, 215, 0, 0.3);
    }

    .relocation-drawer-tab:hover {
        width: 34px;
        box-shadow: -4px 0 12px rgba(255, 215, 0, 0.5);
    }

    .relocation-drawer-tab i {
        font-size: 16px;
    }

    .relocation-drawer-content {
        padding: 16px;
        gap: 10px;
    }

    .relocation-drawer-icon {
        width: 44px;
        height: 44px;
    }

    .relocation-drawer-icon i {
        font-size: 22px;
    }

    .relocation-drawer-title {
        font-size: 15px;
    }

    .relocation-drawer-subtitle {
        font-size: 12px;
    }

    .relocation-drawer-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .relocation-drawer-close {
        top: 10px;
        right: 10px;
        width: 24px;
        height: 24px;
        font-size: 16px;
    }
}

/* ============ 搬家公告模態框專屬樣式 ============ */
#relocationModal .modal-content {
    max-width: 700px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    border: 2px solid #FFD700;
    box-shadow: 0 10px 60px rgba(255, 215, 0, 0.6), 0 0 100px rgba(255, 215, 0, 0.3);
}

#relocationModal .relocation-icon {
    text-align: center;
    margin-bottom: 20px;
}

#relocationModal .relocation-icon i {
    font-size: 64px;
    color: white;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.6));
    animation: icon-pulse 2s ease-in-out infinite;
}

@keyframes icon-pulse {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.6));
    }

    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.8));
    }
}

#relocationModal h2 {
    text-align: center;
    color: #FFD700;
    font-size: 28px;
    margin-bottom: 24px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

#relocationModal .modal-content p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 16px;
}

#relocationModal .modal-content ul {
    background: rgba(217, 4, 41, 0.1);
    border-left: 4px solid #D90429;
    padding: 16px 16px 16px 32px;
    margin: 20px 0;
    border-radius: 8px;
}

#relocationModal .modal-content ul li {
    padding: 12px 0;
    font-size: 15px;
}

#relocationModal .modal-content ul li::before {
    content: '⚠️';
    font-size: 16px;
}

#relocationModal .relocation-new-site {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(217, 4, 41, 0.1) 100%);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
    text-align: center;
}

#relocationModal .relocation-new-site-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#relocationModal .relocation-new-site-label i {
    animation: star-twinkle 2s ease-in-out infinite;
}

@keyframes star-twinkle {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

#relocationModal .relocation-new-site-url {
    font-size: 18px;
    font-weight: 700;
    color: white;
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-family: 'SF Mono', 'Roboto Mono', 'Courier New', monospace;
    word-break: break-all;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#relocationModal .relocation-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

#relocationModal .relocation-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

#relocationModal .relocation-copy-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.2) 100%);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

#relocationModal .relocation-visit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, rgba(217, 4, 41, 0.3) 0%, rgba(255, 23, 68, 0.2) 100%);
    border: 2px solid rgba(217, 4, 41, 0.5);
    border-radius: 8px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

#relocationModal .relocation-visit-btn:hover {
    background: linear-gradient(135deg, rgba(217, 4, 41, 0.4) 0%, rgba(255, 23, 68, 0.3) 100%);
    border-color: rgba(217, 4, 41, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 4, 41, 0.4);
}

#relocationModal .relocation-visit-btn i {
    transition: transform 0.3s ease;
}

#relocationModal .relocation-visit-btn:hover i {
    transform: translateX(4px);
}

#relocationModal .relocation-info-list {
    background: rgba(217, 4, 41, 0.1);
    border-left: 4px solid #D90429;
    padding: 16px 16px 16px 32px;
    margin: 20px 0;
    border-radius: 8px;
    list-style: none;
}

#relocationModal .relocation-info-list li {
    position: relative;
    padding: 12px 0 12px 24px;
    font-size: 15px;
    color: #ccc;
}

#relocationModal .relocation-info-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    top: 12px;
    color: #D90429;
    font-weight: bold;
    font-size: 16px;
}



/* ============ 語言選擇器 ============ */
.lang-selector,
.language-selector {
    position: relative;
}

/* ============ 導航鏈接樣式 ============ */
.nav-link {
    position: relative;
    color: white;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #FFD700;
}

.nav-link.active {
    color: #FFD700;
    background: rgba(255, 215, 0, 0.08);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.15), 0 0 40px rgba(255, 215, 0, 0.08);
    border-radius: 12px;
}

@keyframes glow-pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* ============ 語言選擇器 ============ */

.lang-current {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-size: 14px;
    min-width: 120px;
}

.lang-current:hover {
    background: #2a2a2a;
    border-color: #D90429;
}

.lang-current .flag {
    font-size: 20px;
}

.lang-current .arrow {
    margin-left: auto;
    transition: transform 0.3s;
    color: #999;
}

.lang-current.active .arrow {
    transform: rotate(180deg);
}

.lang-toggle {
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    transform: translateY(-1px);
}

.lang-toggle span {
    color: #fff;
}

.lang-toggle i {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    transition: transform 0.3s;
}

.lang-toggle.active i {
    transform: rotate(180deg);
}

.lang-options {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    min-width: 140px;
    z-index: 1000;
}

.lang-options.show {
    display: flex;
}

.lang-btn {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 8px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    white-space: nowrap;
    width: 100%;
    text-align: left;
}

.lang-btn:hover {
    background: #2a2a2a;
    color: #fff;
}

.lang-btn.active {
    background: linear-gradient(135deg, #D90429 0%, #8D021F 100%);
    color: #fff;
    font-weight: bold;
}

.lang-btn .flag {
    font-size: 20px;
}

/* ============ LINE 圖標按鈕 ============ */
.line-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.line-icon-btn:hover {
    transform: scale(1.1);
    border-color: #D90429;
}

.line-icon-btn i {
    font-size: 20px;
    color: #fff;
}

/* ============ 漢堡菜單按鈕 ============ */
.hamburger-menu {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 2px solid #333;
    /* display: flex; 移除此行，讓 Tailwind 的 lg:hidden 能正常工作 */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.hamburger-menu:hover {
    border-color: #D90429;
    background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
}

.hamburger-menu.active {
    border-color: #D90429;
    background: linear-gradient(135deg, #D90429 0%, #8D021F 100%);
}

.hamburger-menu i {
    font-size: 18px;
    color: #fff;
    transition: transform 0.3s;
}

.hamburger-menu.active i {
    transform: rotate(90deg);
}

/* ============ 移動版菜單 ============ */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 15, 15, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid #333;
    display: none;
    flex-direction: column;
    padding: 16px 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    z-index: 40;
}

.mobile-menu.show {
    display: flex;
}

.mobile-menu-item {
    color: #fff;
    text-decoration: none;
    padding: 16px 24px;
    transition: all 0.3s;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.mobile-menu-item:hover {
    background: rgba(217, 4, 41, 0.1);
    border-left-color: #D90429;
    color: #FFD700;
}

/* ============ Hero Section 平板滚动优化 ============ */
#hero-section {
    /* 垂直隐藏，水平滚动 */
    overflow-y: hidden;
    overflow-x: auto;
}

/* 平板尺寸下确保内容不被裁切 */
@media (min-width: 768px) and (max-width: 1024px) {
    #hero-section {
        overflow-x: auto;
    }

    #hero-section .max-w-7xl {
        min-width: 900px;
        /* 确保内容有足够宽度 */
    }
}

/* 滚动条样式优化 */
#hero-section::-webkit-scrollbar {
    height: 8px;
}

#hero-section::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

#hero-section::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #D90429, #FFD700);
    border-radius: 4px;
}

#hero-section::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #ff1744, #FFD700);
}

/* ============ 背景圖片輪播（Hero） ============ */
.hero-bg-slider {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-bg-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: heroSlide 15s infinite;
}

.hero-bg-slide:nth-child(1) {
    animation-delay: 0s;
}

.hero-bg-slide:nth-child(2) {
    animation-delay: 5s;
}

.hero-bg-slide:nth-child(3) {
    animation-delay: 10s;
}

@keyframes heroSlide {
    0% {
        opacity: 0;
    }

    6.67% {
        opacity: 0.3;
    }

    33.33% {
        opacity: 0.3;
    }

    40% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

/* ============ 響應式設計 ============ */
@media (max-width: 640px) {
    .modal-content {
        padding: 24px;
        width: 95%;
    }

    .modal-content h2 {
        font-size: 20px;
    }

    .lang-current {
        min-width: 100px;
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* ============ 滾動條樣式 ============ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f0f0f;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #D90429;
}

/* ============ 金色邊框按鈕 ============ */
.btn-gold-outline {
    border: 2px solid #FFD700;
    color: #FFD700;
    background: transparent;
    transition: all 0.3s ease;
}

.btn-gold-outline:hover {
    background: #FFD700;
    color: #0f0f0f;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

/* ============ 卡片懸浮特效 ============ */
.feature-card {
    background-color: #1a1a1a;
    border: 1px solid #333;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: #D90429;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(217, 4, 41, 0.15);
}

/* ============ 邀請碼區塊 ============ */
.invite-box {
    background: rgba(255, 215, 0, 0.05);
    border: 1px dashed #FFD700;
    color: #FFD700;
    cursor: pointer;
    transition: all 0.2s;
}

.invite-box:hover {
    background: rgba(255, 215, 0, 0.15);
}

/* ============ QR Code 掃描框動畫 ============ */
.scan-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: #D90429;
    box-shadow: 0 0 4px #D90429;
    top: 0;
    left: 0;
    animation: scan 2.5s infinite linear;
}

@keyframes scan {
    0% {
        top: 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

/* ============ QR Code + 海报卡片轮播 ============ */
:root {
    --carousel-duration: 3s;
    /* 单张显示时间 */
    --carousel-total: 6s;
    /* 总循环时间 */
}

.qr-poster-container {
    position: relative;
    width: 100%;
}

.qr-poster-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    animation: cardToggle var(--carousel-total) infinite;
    transition: opacity 0.5s ease-in-out;
}

/* 第一个卡片用 relative 定位，撑开容器高度 */
.qr-poster-card:first-child {
    position: relative;
}

.qr-poster-card:nth-child(1) {
    animation-delay: 0s;
}

.qr-poster-card:nth-child(2) {
    animation-delay: var(--carousel-duration);
}

/* 手机版分享按钮与 QR Code 同步显示（第二张） */
.qr-share-btn {
    opacity: 0;
    pointer-events: none;
    animation: cardToggle var(--carousel-total) infinite;
    animation-delay: var(--carousel-duration);
}

/* 轮播进度条 */
.carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, #D90429 0%, #FFD700 100%);
    opacity: 0;
    animation: progressBar var(--carousel-total) infinite;
}

.qr-poster-card:nth-child(1) .carousel-progress {
    animation-delay: 0s;
}

.qr-poster-card:nth-child(2) .carousel-progress {
    animation-delay: var(--carousel-duration);
}

/* Hover 暂停动画 */
.qr-poster-container:hover .qr-poster-card,
.qr-poster-container:hover .qr-share-btn,
.qr-poster-container:hover .carousel-progress {
    animation-play-state: paused;
}

@keyframes progressBar {
    0% {
        width: 0;
        opacity: 0;
    }

    8% {
        opacity: 0.8;
    }

    16.66% {
        width: 33%;
    }

    33.33% {
        width: 66%;
    }

    45% {
        width: 100%;
        opacity: 0.8;
    }

    50% {
        width: 100%;
        opacity: 0;
    }

    100% {
        width: 100%;
        opacity: 0;
    }
}

@keyframes cardToggle {
    0% {
        opacity: 0;
        pointer-events: none;
    }

    8% {
        opacity: 1;
        pointer-events: auto;
    }

    42% {
        opacity: 1;
        pointer-events: auto;
    }

    50% {
        opacity: 0;
        pointer-events: none;
    }

    100% {
        opacity: 0;
        pointer-events: none;
    }
}

/* ============ 回到頂部按鈕 ============ */
.back-to-top-btn {
    position: fixed;
    right: 20px;
    bottom: 270px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a4a4a 0%, #2a2a2a 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 998;
}

.back-to-top-btn:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, #5a5a5a 0%, #3a3a3a 100%);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
}

.back-to-top-btn:active {
    transform: translateY(-3px) scale(1.05);
}

/* ============ 浮動按鈕菜單 ============ */
.floating-menu {
    position: fixed;
    right: 20px;
    bottom: 30px;
    z-index: 999;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1E90FF 0%, #1565C0 100%);
    box-shadow: 0 4px 20px rgba(30, 144, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: floatingPulseBlue 2s infinite;
}

@keyframes floatingPulseBlue {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(30, 144, 255, 0.4);
    }

    50% {
        box-shadow: 0 4px 30px rgba(30, 144, 255, 0.8), 0 0 0 10px rgba(30, 144, 255, 0.1);
    }
}

.floating-btn:hover {
    transform: scale(1.1);
}

.floating-btn.active {
    transform: rotate(45deg);
    animation: none;
}

.floating-options {
    position: absolute;
    bottom: 75px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.floating-options.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-option {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border: 2px solid #1E90FF;
    padding: 14px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    min-width: 160px;
}

.floating-option:hover {
    background: linear-gradient(135deg, #1E90FF 0%, #1565C0 100%);
    border-color: #FFD700;
    transform: translateX(-8px) scale(1.05);
    box-shadow: 0 6px 25px rgba(30, 144, 255, 0.6);
}

.floating-option i {
    font-size: 24px;
}

/* ====================================
   獨立禮物浮動按鈕
   ==================================== */
.floating-download-btn {
    position: fixed;
    right: 20px;
    bottom: 190px;
    z-index: 999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: floatingPulseGreen 2s infinite;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

@keyframes floatingPulseGreen {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.5);
    }

    50% {
        box-shadow: 0 4px 30px rgba(16, 185, 129, 0.9), 0 0 0 10px rgba(16, 185, 129, 0.15);
    }
}

.floating-download-btn:hover {
    transform: scale(1.15) translateY(-3px);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.6);
    border-color: rgba(255, 255, 255, 0.4);
}

.floating-gift-btn {
    position: fixed;
    right: 20px;
    bottom: 110px;
    z-index: 999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #D90429 0%, #8D021F 100%);
    box-shadow: 0 4px 20px rgba(217, 4, 41, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: floatingPulseRed 2s infinite;
}

@keyframes floatingPulseRed {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(217, 4, 41, 0.4);
    }

    50% {
        box-shadow: 0 4px 30px rgba(217, 4, 41, 0.8), 0 0 0 10px rgba(217, 4, 41, 0.1);
    }
}

.floating-gift-btn:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, #C00327 0%, #7D011A 100%);
}

/* ====================================
   撲克牌飄落動畫
   ==================================== */

/* Poker card falling animation */
@keyframes float-down {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* ============ Ticker 跑馬燈動畫 ============ */
@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.ticker-content {
    animation: ticker-scroll 30s linear infinite;
}

.ticker-content:hover {
    animation-play-state: paused;
}

.ticker-item {
    display: inline-flex;
    margin-right: 2rem;
}

.poker-cards-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.poker-card {
    position: absolute;
    width: 50px;
    height: 70px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    padding: 4px;
    opacity: 0;
    animation: float-down linear infinite;
}

.card-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
}

.card-rank {
    font-size: 0.75rem;
    font-weight: bold;
}

.card-suit {
    font-size: 0.65rem;
    margin-top: -2px;
}

.card-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
}

.poker-card.red {
    color: #dc2626;
}

.poker-card.black {
    color: #1f2937;
}

/* Responsive sizing for poker cards */
@media (min-width: 640px) {
    .poker-card {
        width: 60px;
        height: 84px;
        padding: 5px;
    }

    .card-rank {
        font-size: 0.9rem;
    }

    .card-suit {
        font-size: 0.8rem;
    }

    .card-center {
        font-size: 1.5rem;
    }
}

/* ============ 語言建議橫幅動畫 ============ */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slideDown {
    animation: slideDown 0.5s ease-out forwards;
}

#lang-suggest-banner {
    animation: slideDown 0.5s ease-out;
}

@media (min-width: 1024px) {
    .poker-card {
        width: 70px;
        height: 98px;
        padding: 6px;
    }

    .card-rank {
        font-size: 1.1rem;
    }

    .card-suit {
        font-size: 0.95rem;
    }

    .card-center {
        font-size: 1.8rem;
    }
}