/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: SF Pro TC, SF Pro Display, SF Pro Icons, PingFang TC, Helvetica Neue, Helvetica, Arial, sans-serif;
    background-color: #050505;
    background-image: url('img/bg.png');
    background-size: cover;
    background-position: top center;
    background-attachment: fixed;
    color: #FFFFFF;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
.cinzel {
    font-family: SF Pro TC, SF Pro Display, SF Pro Icons, PingFang TC, Helvetica Neue, Helvetica, Arial, sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}

a[href],
button,
.game-filter li,
.flag,
.menu-toggle {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

a[href],
button,
.game-filter li,
.flag,
.menu-toggle,
.casino-card,
.game-item {
    transition:
        color 0.25s ease,
        background-color 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        opacity 0.25s ease,
        filter 0.25s ease,
        transform 0.25s ease;
}

a[href]:focus-visible,
button:focus-visible,
.game-filter li:focus-visible,
.flag:focus-visible,
.menu-toggle:focus-visible {
    outline: 2px solid #d5b783;
    outline-offset: 4px;
}

a[href]:active,
button:active,
.game-filter li:active,
.flag:active,
.menu-toggle:active {
    transform: translateY(1px) scale(0.98);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-container {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

/* Colors */
:root {
    --gold: #bfa15f;
    --gold-light: #d8c291;
    --gold-dark: #8f7845;
    --text-gray: #a0a0a0;
}

/* Header */
.header {
    background: transparent;
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo img {
    height: 50px;
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-family: SF Pro TC, SF Pro Display, SF Pro Icons, PingFang TC, Helvetica Neue, Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #fff;
    transition: color 0.3s ease;
    letter-spacing: 1px;
    position: relative;
}

.main-nav a:hover {
    color: #eed5b3;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 1px;
    background: #d5b783;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
    transform: scaleX(1);
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #e9e9e9;
}

.lang-selector-mobile {
    display: none;
}

.flag {
    font-size: 16px;
    border-radius: 2px;
    cursor: pointer;
    display: inline-flex;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.flag:hover {
    filter: drop-shadow(0 0 6px rgba(213, 183, 131, 0.75));
    transform: translateY(-1px) scale(1.12);
}

/* Hero Section */
.hero-section {
    position: relative;
    padding-top: 120px;
    padding-bottom: 40px;
}

.carousel-container {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
}

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

@media (max-width: 768px) {
    .carousel-container {
        max-width: 100%;
    }

    .carousel-slide {
        height: auto;
        /* 讓高度跟隨圖片原始比例 */
    }

    .banner-img {
        width: 100%;
        height: auto;
        /* 維持圖片原始寬高比，不裁切 */
        object-fit: unset;
    }
}


.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #eed5b3;
    border: none;
    font-size: 2rem;
    padding: 10px 20px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.25s ease;
}

.carousel-btn:hover {
    background: rgba(212, 175, 55, 0.3);
    box-shadow: 0 0 18px rgba(213, 183, 131, 0.35);
    transform: translateY(-50%) scale(1.06);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.96);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.hero-text {
    text-align: center;
    margin-top: 30px;
    position: relative;
    z-index: 20;
}

.hero-text h1 {
    font-size: 42px;
    color: #eed5b3;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    font-family: 'Times New Roman', Times, serif;
}

.hero-text p {
    font-size: 16px;
    color: #e9e9e9;
    letter-spacing: 4px;
    margin-bottom: 30px;
}

.btn-primary {
    display: inline-block;
    padding: 12px 100px;
    border: 1px solid #eed5b3;
    color: #ffdb6f;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 0 rgba(213, 183, 131, 0);
}

.btn-primary::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    transform: skewX(-18deg);
    transition: left 0.45s ease;
}

.btn-primary:hover {
    background: #eed5b3;
    color: #000;
    box-shadow: 0 0 22px rgba(213, 183, 131, 0.38);
    transform: translateY(-2px);
}

.btn-primary:hover::before {
    left: 130%;
}

.btn-primary:active {
    transform: translateY(1px) scale(0.98);
}

/* Section Titles */
.section-title {
    text-align: center;
    font-size: 36px;
    color: #eed5b3;
    letter-spacing: 3px;
    margin-bottom: 10px;
    position: relative;
    font-family: 'Times New Roman', Times, serif;
}

.section-subtitle {
    text-align: center;
    font-size: 16px;
    color: #e9e9e9;
    margin-bottom: 40px;
}

/* Popular Games */
.popular-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: center;
    margin-bottom: 60px;
}

.feature-img {
    width: 100%;
    max-width: 500px;
    display: block;
    margin: 0 auto;
}

.game-feature-text-right,
.game-feature-text-left {
    padding: 20px;
}

.text-right-align {
    text-align: right;
}

.popular-grid h3 {
    font-size: 32px;
    color: #eed5b3;
    margin-bottom: 10px;
    font-weight: 300;
    text-align: center;
}

.popular-grid .subtitle {
    font-size: 22px;
    color: #eed5b3;
    margin-bottom: 20px;
    background: linear-gradient(to right,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.5) 20%,
            rgba(0, 0, 0, 0.5) 80%,
            rgba(0, 0, 0, 0) 100%);
    padding: 6px 20px;
    font-weight: 300;
    text-align: center;
}

.popular-grid .desc {
    font-size: 14px;
    color: #e9e9e9;
    line-height: 1.8;
    text-align: center;
    font-weight: 400;
}

.video-promo {
    margin-top: 60px;
    display: flex;
    justify-content: center;
}

.video-container {
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.1);
}

.video-container iframe {
    width: 100%;
    height: 100%;
}

/* Casino Games */
.casino-games-carousel {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.carousel-control {
    display: none;
    /* 桌機版隱藏，手機版再顯示 */
}

.casino-games-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: nowrap;
    max-width: 1400px;
    margin: 0 auto;
}

.casino-card {
    text-align: center;
    flex: 1;
    min-width: 0;
    transition: transform 0.3s ease;
}

.casino-card:hover {
    transform: translateY(-10px);
    filter: brightness(1.08);
}

.casino-card img {
    width: 100%;
    display: block;
    border: none;
}

.card-title {
    margin-top: 15px;
}

.card-title h4 {
    font-family: SF Pro TC, SF Pro Display, SF Pro Icons, PingFang TC, Helvetica Neue, Helvetica, Arial, sans-serif;
    font-size: 16px;
    color: #eed5b3;
    margin-bottom: 5px;
}

.card-title span {
    font-size: 12px;
    color: #e9e9e9;
    font-family: SF Pro TC, SF Pro Display, SF Pro Icons, PingFang TC, Helvetica Neue, Helvetica, Arial, sans-serif;
    letter-spacing: 1px;
}

/* Game List */
.game-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 30px;
    padding-top: 15px;
    border-top: 1px solid #eed5b3;
    /* Gold top line */
}

.game-filter li {
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s ease, background-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    letter-spacing: 1px;
    border-radius: 999px;
    padding: 6px 12px;
}

.game-filter li:hover,
.game-filter li.active {
    color: #eed5b3;
    background: rgba(213, 183, 131, 0.1);
    box-shadow: inset 0 0 0 1px rgba(213, 183, 131, 0.35);
}

.game-filter li:hover {
    transform: translateY(-1px);
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Custom Scrollbar for Game Grid */
.game-grid::-webkit-scrollbar {
    width: 8px;
}

.game-grid::-webkit-scrollbar-track {
    background: #0d0d0d;
    border-radius: 4px;
}

.game-grid::-webkit-scrollbar-thumb {
    background: #997a3d;
    border-radius: 4px;
}

.game-grid::-webkit-scrollbar-thumb:hover {
    background: #bfa15f;
}

.game-item {
    position: relative;
    background: transparent;
    border: none;
    display: block;
    overflow: hidden;
    box-shadow: 0 0 0 rgba(213, 183, 131, 0);
}

.game-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.game-item:hover img {
    filter: brightness(1.08);
}

.game-item img {
    width: 100%;
    display: block;
    border: none;
}

.game-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 22%;
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
}

.game-actions a {
    flex: 1;
    text-align: center;
    font-size: 13px;
    color: #bfa15f;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    display: block;
    padding: 8px 4px;
}

.game-actions a:first-child {
    border-right: 1px solid #bfa15f;
}

.game-actions a:hover {
    color: #ffffff;
    background: rgba(213, 183, 131, 0.16);
    text-shadow: 0 0 8px rgba(213, 183, 131, 0.55);
}

.game-actions a:active {
    background: rgba(213, 183, 131, 0.28);
}

/* About Section */
.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
    margin-top: 50px;
    margin-bottom: 80px;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.about-text {
    flex: 1;
    text-align: left;
}

.about-text h3 {
    font-size: 32px;
    color: #eed5b3;
    margin-bottom: 24px;
    font-family: 'Cinzel', serif;
}

.about-text p {
    font-size: 16px;
    line-height: 1.8;
    color: #e9e9e9;
    margin-bottom: 20px;
}

/* Feature Section */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 50px;
}

.feature-card {
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.4);
}

.feature-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.feature-icon img {
    width: 60px;
    height: auto;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.5));
}

.feature-card h4 {
    font-size: 20px;
    color: #eed5b3;
    margin-bottom: 16px;
    font-family: 'Cinzel', serif;
}

.feature-card p {
    font-size: 14px;
    line-height: 1.6;
    color: #b0b0b0;
}

@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }

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

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

@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

/* News Section */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.news-card {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
    border-color: rgba(212, 175, 55, 0.5);
}

.news-card img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 375 / 120;
    object-fit: cover;
}

.news-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 12px;
    color: #b0b0b0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.news-category {
    color: #d5b783;
}

.news-title {
    font-size: 18px;
    color: #eed5b3;
    margin-bottom: 20px;
    line-height: 1.5;
}

.news-btn {
    margin-top: auto;
    align-self: flex-start;
    padding: 8px 24px;
    border: 1px solid #d5b783;
    color: #eed5b3;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s, color 0.3s;
}

.news-btn:hover {
    background: #d5b783;
    color: #0d0d0d;
}

@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* Casino Girl Section */
.girl-section {
    text-align: center;
}

.girl-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.girl-card {
    text-align: center;
    background: transparent;
    padding: 10px;
    transition: transform 0.3s ease;
}

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

.girl-card img {
    width: 100%;
    max-width: 260px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.girl-name {
    margin-top: 18px;
    font-size: 22px;
    color: #eed5b3;
    font-family: 'Cinzel', serif;
    letter-spacing: 2px;
}

@media (max-width: 992px) {
    .girl-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .girl-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer */
.footer {
    background: #050505;
    border-top: 1px solid rgba(212, 175, 55, 0.16);
    padding: 48px 0 32px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1700px;
    margin: 0 auto;
    padding: 0 clamp(36px, 4vw, 72px);
    display: grid;
    grid-template-columns: minmax(210px, 1fr) minmax(0, 1.8fr) minmax(300px, 1.2fr);
    align-items: center;
    gap: clamp(32px, 1vw, 56px);
}

.footer-left {
    align-self: stretch;
    padding: 20px clamp(36px, 4vw, 70px) 20px 0;
    border-right: 1px solid rgba(255, 206, 100, 0.42);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.footer-logo {
    width: clamp(110px, 8vw, 110px);
    height: auto;
    margin-bottom: 30px;
}

.copyright {
    font-size: 10px;
    color: rgba(233, 233, 233, 0.8);
    line-height: 1.4;
    letter-spacing: 1px;
    font-weight: 500;
}

.footer-center {
    min-width: 0;
}

.license-info-wrapper {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 32px;
    align-items: center;
}

.license-badge {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.anjouan-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.anjouan-badge {
    color: #bda173;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 28px;
    line-height: 0.88;
    font-weight: 600;
    text-align: center;
    letter-spacing: -0.3px;
}

.anjouan-badge span {
    display: block;
    font-family: inherit;
    font-size: 12px;
    letter-spacing: 1.3px;
    margin-top: 6px;
}

.badge-row {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
}

.license-img {
    width: 40px;
    height: auto;
    object-fit: contain;
}

.anj-seal-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.anj-seal-container>div {
    max-width: 60px;
}

.license-info-text {
    font-size: 12px;
    color: rgba(233, 233, 233, 0.75);
    line-height: 1.6;
    letter-spacing: 0.4px;
    font-weight: 500;
}

.license-info-text p {
    margin-bottom: 26px;
}

.license-info-text p:last-child {
    margin-bottom: 0;
}

.footer-right {
    min-width: 0;
}

.social-links p {
    font-size: 16px;
    color: #bda173;
    margin-bottom: 20px;
    font-weight: 500;
    letter-spacing: 0.6px;
}

.icons {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.2vw, 22px);
    margin-bottom: 10px;
}

.icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(22px, 1.54vw, 27px);
    height: clamp(22px, 1.54vw, 27px);
    border-radius: 50%;
    color: rgba(233, 233, 233, 0.54);
    font-size: clamp(15px, 1.12vw, 20px);
    text-shadow: none;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.icons a:hover {
    opacity: 0.8;
    color: #d5b783;
    transform: translateY(-2px);
}

.footer-links {
    font-size: clamp(12px, 0.9vw, 14px);
    color: rgba(233, 233, 233, 0.7);
    margin-bottom: 30px;
    letter-spacing: 1.5px;
    font-weight: 500;
}

.footer-links a {
    transition: color 0.3s ease;
    position: relative;
}

.footer-links a:hover {
    color: #eed5b3;
}

.footer-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 1px;
    background: #d5b783;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.footer-links a:hover::after,
.footer-links a:focus-visible::after {
    transform: scaleX(1);
}

.partners {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 14px;
    align-items: flex-start;
    justify-content: flex-start;
}

.sponsor-logo {
    display: block;
    width: 295px;
    height: 50px;
    object-fit: contain;
    filter: grayscale(1) brightness(1.8);
}

/* Responsive */
@media (max-width: 992px) {

    .popular-grid,
    .footer-container {
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .footer-container {
        max-width: 720px;
        padding: 0 28px;
        gap: 34px;
    }

    .footer-left {
        min-height: auto;
        padding: 0 0 30px;
        border-right: none;
        border-bottom: 1px solid rgba(191, 161, 95, 0.62);
    }

    .license-info-wrapper {
        grid-template-columns: auto 1fr;
        gap: 28px;
    }

    .footer-right {
        text-align: center;
    }

    .icons {
        justify-content: center;
    }

    .footer-links {
        white-space: nowrap;
        font-size: 11px;
    }

    .partners {
        justify-content: center;
    }

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

    .casino-games-grid {
        justify-content: space-around;
    }

    .casino-card {
        width: calc(33.333% - 20px);
        margin-bottom: 20px;
    }

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

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
        gap: 15px;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .casino-card {
        width: calc(50% - 20px);
    }

    .game-grid {
        grid-template-columns: 1fr;
    }

    .game-filter {
        flex-wrap: wrap;
        gap: 15px;
    }

    .hero-text h1 {
        font-size: 24px;

    }

    .hero-text p {
        font-size: 12px;
        letter-spacing: 2px;
    }
}

.menu-toggle {
    display: none;
    /* Hidden by default for larger screens */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    padding: 2px 0;
}

.menu-toggle:hover span {
    background-color: #d5b783;
    box-shadow: 0 0 8px rgba(213, 183, 131, 0.55);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #eed5b3;
    transition: all 0.3s ease;
    border-radius: 2px;
}

@media (max-width: 992px) {
    .header {
        position: fixed;
        /* 手機版 header 固定在頂部 */
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    }

    .header-inner {
        flex-wrap: wrap;
        /* Allow items to wrap */
        justify-content: space-between;
        /* Space out items */
        padding: 15px 20px;

        height: auto;
    }

    .logo {
        order: 1;
    }

    #langSelectorDesktop {
        display: none;
        /* Hide desktop lang selector on mobile */
    }

    .lang-selector-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: row;
        flex-wrap: nowrap;
        padding: 12px 20px 5px;
        border-bottom: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 0;
        gap: 16px;
    }

    .lang-selector-mobile span {
        display: inline;
        font-family: SF Pro TC, SF Pro Display, SF Pro Icons, PingFang TC, Helvetica Neue, Helvetica, Arial, sans-serif;
        font-size: 16px;
        letter-spacing: 1px;
        color: #fff;
        white-space: nowrap;
    }

    .lang-selector-mobile .flag {
        font-size: 14px;
        border-radius: 3px;
    }

    .hero-section {
        padding-top: 100px;
        /* Adjust for potentially taller header */
    }
}

@media (min-width: 993px) {

    /* Hide menu toggle and mobile nav on larger screens */
    .menu-toggle {
        display: none;
    }

    .main-nav {
        display: block;
        /* Show main nav for desktop */
        position: static;
        /* Reset positioning */
        background-color: transparent;
        /* Reset background */
        box-shadow: none;
        /* Remove shadow */
        padding: 0;
        /* Remove padding */
        order: unset;
        width: auto;
    }

    .main-nav ul {
        flex-direction: row;
        gap: 30px;
    }

    .main-nav li {
        width: auto;
    }

    .main-nav a {
        border-bottom: none;
        padding: 0;
    }

    /* Ensure desktop lang selector is visible */
    #langSelectorDesktop {
        display: flex;
    }

    /* Hide mobile lang selector on desktop */
    .lang-selector-mobile {
        display: none;
    }
}

@media (max-width: 992px) {
    .header-inner {
        flex-wrap: wrap;
        /* Allow items to wrap */
        justify-content: space-between;
        /* Space out items */
        padding: 15px 20px;
        height: auto;
    }

    .logo {
        order: 1;
    }

    #langSelectorDesktop {
        display: none;
        /* Hide desktop lang selector on mobile */
    }

    .lang-selector-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: row;
        flex-wrap: nowrap;
        padding: 12px 20px 5px;
        border-bottom: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 0;
        gap: 16px;
    }

    .lang-selector-mobile span {
        display: inline;
        font-family: SF Pro TC, SF Pro Display, SF Pro Icons, PingFang TC, Helvetica Neue, Helvetica, Arial, sans-serif;
        font-size: 16px;
        letter-spacing: 1px;
        color: #fff;
        white-space: nowrap;
    }

    .lang-selector-mobile .flag {
        font-size: 14px;
        border-radius: 3px;
    }

    .menu-toggle {
        display: flex;
        /* Show hamburger icon on smaller screens */
        order: 3;
        margin-left: 20px;
        /* Add some space */
    }

    .main-nav {
        width: 100%;
        /* Full width for mobile nav */
        order: 4;
        display: none;
        /* Hide by default */
        flex-direction: column;
        background-color: #1a1a1a;
        /* Dark background for dropdown */
        position: absolute;
        top: 80px;
        /* Below the header */
        left: 0;
        right: 0;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .main-nav.active {
        display: flex;
        /* Show when active */
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 0;
        /* Remove gap for vertical list */
    }

    .main-nav li {
        width: 100%;
        text-align: center;
    }

    .main-nav a {
        padding: 15px 20px;
        display: block;
        width: 100%;
        font-size: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Remove border-bottom for the last actual navigation link, but keep for lang-selector-mobile if it's the last li */
    .main-nav li:last-of-type:not(.lang-selector-mobile) a {
        border-bottom: none;
    }

    .hero-section {
        padding-top: 100px;
        /* Adjust for potentially taller header */
    }

    /* General responsive adjustments */
    .popular-grid,
    .footer-container {
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .license-info-wrapper {
        flex-direction: column;
    }

    .license-badge {
        flex-direction: row;
        align-items: center;
        gap: 20px;
        margin-bottom: 10px;
    }

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

    .casino-games-grid {
        justify-content: space-around;
    }

    .casino-card {
        width: calc(33.333% - 20px);
        margin-bottom: 20px;
    }

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

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        /* Re-enable flex-wrap if needed */
        flex-direction: row;
        /* Keep elements in a row for top bar */
        justify-content: space-between;
        /* Re-adjust spacing */
        align-items: center;
        /* Align items vertically */
        height: 80px;
        /* Fixed height for top bar */
        padding: 0 20px;
        /* Reset padding */
    }

    .main-nav {
        top: 80px;
        /* Keep below header */
    }

    .casino-card {
        width: calc(50% - 20px);
    }

    .game-grid {
        grid-template-columns: 1fr;
    }

    .game-filter {
        flex-wrap: wrap;
        gap: 15px;
    }

    .hero-text h1 {
        font-size: 24px;
    }

    .hero-text p {
        font-size: 12px;
        letter-spacing: 2px;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .license-info-wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .license-info-text {
        font-size: 13px;
    }

    .icons {
        gap: 13px;
    }

    .partners {
        justify-content: center;
    }

    .footer-left,
    .footer-center,
    .footer-right {
        min-width: unset;
    }

    .license-badge {
        justify-content: center;
        /* Center badges */
    }

    .social-links .icons {
        justify-content: center;
    }

    .footer-links a {
        display: inline-block;
        margin-bottom: 0;
        margin: 0 5px;
    }

}

@media (max-width: 480px) {
    .casino-card {
        width: 90%;
        /* Almost full width for very small screens */
        margin-bottom: 20px;
    }

    .hero-text h1 {
        font-size: 20px;
    }
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

/* Guide Section (Portal & Detail) */
.guide-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 150px 20px 80px;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-top: 40px;
    align-items: stretch;
}

@media (max-width: 1200px) {
    .guide-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .guide-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.guide-category {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 15px;
    padding: 30px;
    transition: all 0.3s ease;
    text-align: center;
}

.category-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.guide-category:hover {
    transform: translateY(-5px);
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.guide-category h3 {
    color: #d4af37;
    font-family: 'Cinzel', serif;
    font-size: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 10px;
    text-transform: uppercase;
}

.guide-category ul {
    list-style: none;
    padding: 0;
}

.guide-category ul li {
    margin-bottom: 12px;
}

.guide-category ul li a {
    color: #ccc;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s ease;
}

.guide-category ul li a:hover {
    color: #d4af37;
    padding-left: 5px;
}

/* Guide Detail Content Styling */
.news-detail-section {
    padding: 160px 20px 100px;
    min-height: 80vh;
    background: radial-gradient(circle at top, #1a1a1a 0%, #0d0d0d 100%);
}

.box_news_p {
    background: rgba(15, 15, 15, 0.98);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 20px;
    padding: 50px;
    margin: 0 auto;
    max-width: 1000px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    position: relative;
}

.box_news_p::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
}

.box_news_p img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 25px auto;
    display: block;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.w-guide_tw {
    color: #eed5b3;
    font-size: 32px;
    font-family: 'Cinzel', serif;
    margin: 0 0 30px;
    text-align: center;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.w-guide_t {
    color: #d4af37;
    font-weight: 700;
    font-size: 22px;
    margin: 40px 0 20px;
    border-left: 4px solid #d4af37;
    padding-left: 15px;
    background: rgba(212, 175, 55, 0.05);
    padding-top: 10px;
    padding-bottom: 10px;
}

.w-guide_ww {
    color: #bbb;
    line-height: 1.8;
    font-size: 17px;
    margin-bottom: 25px;
}

.w-guide_tg {
    color: #f2e0a1;
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 10px;
    display: block;
    font-size: 18px;
}

.w-guide_ty {
    color: #777;
    font-size: 15px;
    margin-top: 25px;
    line-height: 1.7;
    font-style: italic;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 15px;
}

.gu_table {
    overflow-x: auto;
    margin: 30px 0;
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.gu_table table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(25, 25, 25, 0.5);
    color: #ccc;
}

.gu_table th,
.gu_table td {
    border: 1px solid rgba(212, 175, 55, 0.1);
    padding: 15px 20px;
    text-align: left;
}

.gu_table th {
    background: rgba(212, 175, 55, 0.15);
    color: #d4af37;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
}

.gu_table tr:hover {
    background: rgba(212, 175, 55, 0.03);
}

.back-btn-container {
    text-align: center;
    margin-top: 60px;
}

.bn20 {
    background: linear-gradient(135deg, #d4af37 0%, #f2e0a1 100%);
    color: #000;
    padding: 15px 50px;
    border-radius: 50px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.bn20:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.4);
    background: #fff;
}


.page-btn {
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: #e9e9e9;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.page-btn:hover:not(.disabled) {
    background: rgba(212, 175, 55, 0.2);
    color: #eed5b3;
    border-color: #eed5b3;
    box-shadow: 0 0 14px rgba(213, 183, 131, 0.28);
    transform: translateY(-1px);
}

.page-btn.active {
    background: #eed5b3;
    color: #000;
    border-color: #eed5b3;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-btn:active:not(.disabled) {
    transform: translateY(1px) scale(0.96);
}

/* Casino Dealer Section */
.dealer-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.dealer-item:hover {
    transform: translateY(-10px);
    border-color: #d4af37;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.dealer-item img {
    width: 100%;
    height: auto;
    display: block;
}

.dealer-info {
    padding: 15px;
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
}

.dealer-info h4 {
    color: #d4af37;
    margin: 0;
    font-size: 1.1rem;
    font-family: 'Cinzel', serif;
}

.dynamic-dealer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

@media (max-width: 992px) {
    .dynamic-dealer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 576px) {

    /* 手機版荷官圖：保持雙排，縮小間距 */
    .dynamic-dealer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .dealer-item img {
        width: 100%;
        height: auto;
    }

    .dealer-info {
        padding: 8px 10px;
    }

    .dealer-info h4 {
        font-size: 0.85rem;
    }

    /* guide.html iframe 手機版縮小字體並擴大顯示範圍 */
    .iframe-container iframe {
        transform: scale(0.85);
        /* 字體維持適中，縮放至 0.85 */
        transform-origin: top center;
        width: 117.65%;
        /* 1 / 0.85 = 117.65% 補償寬度 */
        height: 1000px;
        /* 大幅增加高度填滿空間 */
        margin-left: -8.825%;
        /* 居中補償 (117.65 - 100) / 2 */
        border: none !important;
    }

    .guide-section {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* Go Top Button */
#goTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #d4af37, #bda173);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#goTop.show {
    opacity: 1;
    visibility: visible;
}

#goTop:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    background: #fff;
}

/* Casino Games Carousel Mobile */
@media (max-width: 768px) {
    .casino-games-carousel {
        gap: 0;
        overflow: hidden;
        /* 讓 grid 負責滑動，carousel 本身不捲動 */
    }

    .carousel-control {
        display: flex;
        flex-shrink: 0;
        width: 32px;
        height: 32px;
        background: rgba(212, 175, 55, 0.85);
        color: #000;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        z-index: 10;
        cursor: pointer;
        font-size: 14px;
    }

    .casino-games-grid {
        display: flex !important;
        justify-content: flex-start !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 15px;
        padding-bottom: 10px;
        scroll-behavior: smooth;
        -ms-overflow-style: none;
        scrollbar-width: none;
        flex: 1;
        /* 佔滿剩餘空間 */
    }

    .casino-games-grid::-webkit-scrollbar {
        display: none;
    }

    .casino-games-grid .casino-card {
        min-width: 80%;
        width: 80%;
        flex-shrink: 0;
        scroll-snap-align: center;
        margin-bottom: 0;
    }
}

/* Game List Grid Mobile Fix */
@media (max-width: 768px) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        max-height: 450px !important;
        overflow-y: auto;
    }
}