/* Main Design Tokens */
:root {
    --primary-bg: #0d0d0d;
    --card-bg-gradient: linear-gradient(120deg, #ffffff, #e7e7e7 80%);
    --card-text: #5c5c5c;
    --footer-bg: #1a1a1a;
    --accent-red: #ff4d4d;
    --accent-yellow: #ffcc00;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 550;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

::-webkit-scrollbar {
    display: none;
}

body {
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%); /* Premium dark background for desktop */
    color: white;
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    margin: 0;
}

/* Layout Container */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    max-width: 480px;
    background-color: #f7e6e8;
    background-image: url("image/f88c5653dbb86ddca6f0b.png");
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth momentum scrolling for iOS */
}

/* Header */
#header {
    background-image: url("image/6a247f9f54a9673c3363c.gif");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    height: 70px;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 10px;
}

.header-left {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.custom-menu-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 0;
}

.custom-menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: white;
    border-radius: 1px;
}

.header-center {
    flex: 2;
    display: flex;
    justify-content: center;
}

.header-center img {
    height: 55px;
    display: block;
}

.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
}

.partner-link img {
    width: 80px;
    vertical-align: middle;
}

.lang-link img {
    width: 30px;
    vertical-align: middle;
}

/* Main Content Area */
main {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0;
    gap: 0;
    width: 100%;
}

/* Announcement Bar / Marquee */
.marquee-container {
    width: 100%;
    background-image: url("image/bannero.png");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    height: 35px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 99;
}

.marquee-icon {
    width: 35px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 0 5px;
    z-index: 10;
}

.marquee-icon img {
    height: 18px;
    width: auto;
}

.marquee-content-wrapper {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    display: flex;
    align-items: center;
}

.marquee-text {
    display: inline-block;
    padding-left: 100%;
    animation: marquee-scroll 40s linear infinite;
    font-size: 13px;
    font-weight: 800;
    color: #000;
    line-height: 35px;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.announcement-bar {
    display: none; /* Hide the old one if it exists */
}

/* User Panel Section (Figure 1 Re-implementation) */
.user-panel-section {
    padding: 15px 10px;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px; /* Added margin for bottom placement */
}

.auth-row {
    display: flex;
    gap: 10px;
}

.auth-btn {
    flex: 1;
    height: 55px;
    border-radius: 20px;
    border: 2px solid #000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 0 rgba(0,0,0,0.1);
    transition: transform 0.1s;
}

.auth-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.1);
}

.login-btn {
    background: linear-gradient(to bottom, #a4b7f5, #7c8cf4);
    color: #1a1a1b;
}

.register-btn {
    background: linear-gradient(to bottom, #f1f4ff, #c3d0ff);
    color: #1a1a1b;
    position: relative;
}

/* Add 'SIGN UP' badge to register button if needed */
.register-btn::before {
    content: 'SIGN UP';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8px;
    font-weight: 800;
    text-align: center;
    line-height: 1;
    width: 30px;
}

.auth-btn .btn-icon {
    width: 35px; /* Adjusting size to match Figure 1 icons better */
    height: auto;
    display: block;
}

.user-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.balance-column {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.baki-label {
    font-size: 14px;
    font-weight: 800;
    color: #000;
}

.balance-value {
    font-size: 28px;
    font-weight: 800;
    color: #000;
}

.min-limits {
    font-size: 14px; /* Increased from 11px */
    font-weight: 700;
    color: #000;
    line-height: 1.4;
}

.actions-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 140px;
}

.action-btn {
    width: 100%;
    height: 38px;
    border-radius: 10px;
    border: 1.5px solid #000;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 10px;
    font-size: 11px; /* Slightly smaller to accommodate icon */
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 2px 0 rgba(0,0,0,0.1);
}

.deposit-btn {
    background: linear-gradient(to bottom, #a4b7f5, #7c8cf4);
}

.withdraw-btn {
    background: linear-gradient(to bottom, #f1f4ff, #c3d0ff);
}

.refresh-btn {
    background: linear-gradient(to bottom, #f1f4ff, #e2e8ff);
}

.action-btn .btn-icon-small {
    width: 25px;
    height: auto;
    flex-shrink: 0;
}

/* Bottom Promotional Banners */
.bottom-promo-banners {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background-color: transparent;
}

.bottom-promo-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Referral and Tips Buttons Grid */
.referral-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 10px 15px 20px 15px;
}

.referral-btn {
    height: 50px;
    border-radius: 12px;
    border: 1.5px solid #000;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 8px;
    font-weight: 800;
    font-size: 11px;
    cursor: pointer;
    box-shadow: 0 3px 0 rgba(0,0,0,0.1);
    transition: transform 0.1s;
    text-align: left;
}

.referral-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.1);
}

.referral-btn img {
    width: 26px;
    height: auto;
    flex-shrink: 0;
}

.share-btn {
    background: linear-gradient(to bottom, #a4b7f5, #7c8cf4);
}

.downline-btn, .copy-btn, .tips-btn {
    background: linear-gradient(to bottom, #f1f4ff, #c3d0ff);
}

/* Game Tips Carousel */
.game-tips-section {
    padding: 10px 15px 30px 15px;
}

.section-title {
    font-size: 16px;
    font-weight: 900;
    color: #1a1a1a;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

.section-title i {
    color: #ffd700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.game-tips-carousel {
    display: block; /* Let Splide handle display */
}

/* Ensure splide slides don't have extra padding that breaks center focus */
.splide__slide {
    display: flex;
    justify-content: center;
}

.game-tip-card {
    width: 160px;
    margin: 10px 0;
}

.game-card-inner {
    background: transparent;
    border-radius: 12px;
    padding: 2px;
    text-align: center;
}

.game-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.1);
    display: block;
}

.game-info {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.game-name {
    font-size: 11px;
    font-weight: 800;
    color: #333;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rtp-text {
    font-size: 11px;
    font-weight: 700;
    color: #444;
}

.play-btn {
    width: 100%;
    height: 32px;
    background: linear-gradient(to bottom, #f1f4ff, #8ba4ff);
    border: 1.5px solid #000;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    color: #000;
    cursor: pointer;
    box-shadow: 0 2px 0 rgba(0,0,0,0.1);
}

.play-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.1);
}

/* Main Promotional Banners */
.main-promos {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px; /* Add some padding around the banners as well */
}

.promo-banner {
    width: 100%;
    display: block;
    height: auto;
    aspect-ratio: 1000 / 521;
}

/* Banner Carousel Styles */
.banner-carousel {
    width: 100%;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 900%; /* Based on 9 images */
}

.carousel-track .promo-banner {
    width: 11.111%;
    flex-shrink: 0;
}

.carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px; /* Slightly tighter for 9 dots */
    z-index: 10;
}

.dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transition: background 0.3s;
}

.dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* Payment Banner */
.payment-banner-container {
    width: 100%;
    background-color: #f1f5f9;
}

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

/* Promotional Banner Extra */
.promo-banner-extra {
    width: 100%;
    background-color: transparent;
    padding: 0;
}

.promo-banner-extra .promo-banner {
    width: 100%;
    display: block;
    border-radius: 0;
}

/* Live Stats Section */
.live-stats-container {
    background-color: transparent;
    font-family: 'Montserrat', sans-serif;
    margin-top: 10px;
    padding-bottom: 20px;
}

.live-stats-container {
    background-color: #f5f7ff; /* Clean light background */
    font-family: 'Inter', sans-serif;
    margin-top: 10px;
    padding-bottom: 5px;
    border-radius: 8px; /* Slightly more rounded */
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* Subtle shadow for premium feel */
}

.live-stats-header {
    background-color: transparent;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    font-size: 16px;
    color: #1a1a1b; /* Darker near-black */
}

.header-title {
    font-size: 16px;
    letter-spacing: 0.5px;
}

.header-subtitle {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #1a1a1b;
}

.red-dot {
    width: 8px;
    height: 8px;
    background-color: #ff4444; /* Brighter red */
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 5px rgba(255, 68, 68, 0.5);
}

.live-stats-columns {
    display: flex;
    font-weight: 800;
    font-size: 12px;
    color: #FFFFFF;
    gap: 0; /* Removed gap to join them */
    padding: 0 10px;
}

.stats-col-header {
    padding: 10px 15px;
}

.stats-col-header.topup {
    width: 45%;
    flex-shrink: 0;
    background-color: #7c8cf4; 
    border-radius: 6px 0 0 6px; /* Rounded only on the left */
}

.stats-col-header.withdraw {
    flex: 1;
    background-color: #7c8cf4;
    border-radius: 0 6px 6px 0; /* Rounded only on the right */
    border-left: 1px solid rgba(255, 255, 255, 0.2); /* Subtle divider */
}

.live-stats-content {
    background-color: transparent;
    display: flex;
    flex-direction: column;
    padding: 5px 10px;
}

.stats-row {
    display: flex;
    padding: 8px 5px;
    font-size: 11px;
    font-weight: 700;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    align-items: center;
    gap: 0; /* Removed gap for seamless alignment */
}

.stats-row:last-child {
    border-bottom: none;
}

.stats-row > div {
    display: flex;
    align-items: center;
}

.col-left {
    width: 45%;
    flex-shrink: 0;
    justify-content: space-between;
    padding-right: 15px;
}

.col-right {
    flex: 1;
    justify-content: flex-start;
    gap: 15px;
}

.phone-mask {
    color: #333;
    font-weight: 800;
    width: 75px; 
    flex-shrink: 0;
}

.amount {
    color: #9fb3f9; /* Lighter Amount Blue */
    font-weight: 800;
    width: 65px;
    flex-shrink: 0;
}

.game-tag {
    color: #333;
    font-weight: 800;
    margin-left: auto; 
    text-align: right;
}

/* Daily Check-in Widget Styling */
.checkin-widget {
    background-color: #ffffff;
    margin: 10px;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    font-family: 'Inter', sans-serif;
}

.checkin-baki-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
    margin-bottom: 8px;
}

.baki-text {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.baki-text span {
    font-size: 20px;
}

.tebus-btn {
    background-color: #e8efff;
    color: #90a4df;
    border: none;
    border-radius: 20px;
    padding: 5px 15px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

.reset-text {
    font-size: 11px;
    color: #333;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 15px;
}

.checkin-inner-box {
    background-color: #f1f4ff;
    border-radius: 10px;
    padding: 10px;
}

.checkin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.step-num {
    font-size: 14px;
    font-weight: 800;
    color: #000;
}

.checkin-btn {
    background-color: #a4b7f5;
    color: #1a1a1b;
    border: none;
    border-radius: 25px;
    padding: 8px 18px;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 4px 0 rgba(0,0,0,0.1);
    cursor: pointer;
}

.reward-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    align-items: end;
}

.reward-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.reward-item img {
    width: 32px;
    height: auto;
    object-fit: contain;
}

.reward-item.chest img {
    width: 38px;
}

.reward-item span {
    font-size: 9px;
    font-weight: 800;
    color: #000;
    white-space: nowrap;
}


@keyframes scroll-up {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* Sidebar Left: Live Transactions */
.sidebar-left {
    order: 3;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 15px;
    font-size: 11px;
}

.sidebar-left h3 {
    text-align: center;
    margin-bottom: 10px;
    color: var(--accent-red);
    text-transform: uppercase;
}

.transaction-list {
    height: 250px;
    overflow-y: hidden;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Center Content: Banners & Games */
.center-content {
    order: 2;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.promo-banners {
    width: 100%;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.game-card {
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s;
}

.game-card:hover {
    transform: scale(1.05);
}

.game-card img {
    width: 100%;
    display: block;
}

/* Sidebar Right: User Panel */
.sidebar-right {
    order: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Extracted Balance Card Style */
.vip-card.vip-regular {
    color: var(--card-text);
    background-image: var(--card-bg-gradient) !important;
    font-family: "Inter", sans-serif;
    position: relative;
    padding: 15px;
    border-radius: 8px;
    min-height: 200px;
}

.pbalance .vc-balance {
    font-size: 24px;
    font-weight: bold;
    margin: 5px 0;
}

.btns {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.btn {
    flex: 1;
    padding: 8px 5px;
    font-size: 10px;
    text-align: center;
    border-radius: 5px;
    background: #007bff;
    color: white;
    text-decoration: none;
    cursor: pointer;
}

.btn.danger { background: #dc3545; }
.btn.warning { background: #ffc107; color: #000; }

/* Footer */
footer {
    padding-bottom: 70px; /* Space for fixed bottom nav */
}

.home-footer {
    padding: 20px 15px;
    background: transparent; /* Seamless blend with main background */
}

.footer-section-1 {
    display: flex;
    flex-wrap: nowrap; 
    justify-content: flex-start; 
    align-items: flex-start; /* Align at the top as requested */
    gap: 30px; /* More space for just 2 items */
    margin-bottom: 30px;
    width: 100%;
}

.footer-section-2 {
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

.home-footer p {
    color: #000; /* Black font as requested */
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 8px;
    text-align: left;
}


.license img {
    height: 60px; /* Specific height for license */
    width: auto;
    max-width: 100%;
}

.certification {
    margin-left: 15px; /* Shift to the right for balance */
}

.certification img {
    height: 80px; /* Large provider logos as requested */
    width: auto;
    max-width: none; /* Allow full width to show groups properly */
    object-fit: contain;
}

.payment {
    width: 100%;
    margin-top: 10px; /* Space between rows */
}

.payment img {
    width: 100%; /* Fill the width */
    height: auto; /* Proportional scaling */
    max-width: 440px; /* Don't get too giant on desktop */
    display: block;
}

.footer-section-3 {
    margin-top: 20px;
    width: 100%;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 8px;
}

.social-icons img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: transform 0.2s ease;
    animation: flash-pulse 2s infinite ease-in-out; /* Continuous flashing/pulsing effect */
}

@keyframes flash-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.social-icons img:hover {
    transform: scale(1.2);
    animation-play-state: paused; /* Pause animation on hover for control */
}

/* Fixed Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 75px; /* Increased from 60px for larger icons */
    background: url('image/menubg.png') no-repeat center;
    background-size: 100% 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: none;
    z-index: 2000;
    padding-bottom: env(safe-area-inset-bottom); /* Support for iPhone notch/home bar */
    box-sizing: content-box; /* Ensures padding adds to height for safe area */
}

.nav-item {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 100%;
    width: 20%; /* Even distribution for 5 items */
}

.nav-item img {
    height: 55px; /* Enlarged from 40px as requested */
    width: 55px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.nav-item.active img {
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.7));
    transform: scale(1.15); /* More prominent for the larger size */
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 2px;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    display: none; /* Hidden by default */
}

.modal-content {
    background: white;
    border-radius: 10px;
    position: relative;
    max-width: 90%;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

/* Game Category Section */
.game-category-section {
    padding: 15px 0; /* Reduced side padding to allow arrows to sit at edges */
    width: 100%;
    background: #fcecf4; /* Light pink background from user screenshot */
    border-top: 1px solid rgba(0,0,0,0.05);
}

.category-nav-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.category-wrapper {
    width: 100%;
    overflow-x: auto; /* Enable horizontal scrolling */
    -webkit-overflow-scrolling: touch;
    position: relative;
    padding: 0 40px; /* Space for arrows */
}

.category-wrapper::-webkit-scrollbar {
    display: none;
}

.category-scroll-container {
    display: flex;
    flex-wrap: nowrap; /* Prevent items from wrapping */
    justify-content: flex-start; /* Align to start for scrolling */
    gap: 8px; /* Slightly reduced gap */
    padding: 0 10px; /* Add internal padding for better scrolling end-feel */
}

.category-pill {
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.category-pill:active {
    transform: scale(0.95);
}

.category-pill img {
    height: 38px; /* Slightly smaller to fit in grid layout */
    display: block;
    width: auto;
}

/* Category Scroll Buttons */
.category-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.category-scroll-btn.left {
    left: 8px;
}

.category-scroll-btn.right {
    right: 8px;
}

.category-scroll-btn i {
    font-size: 20px;
    color: #333;
    font-weight: bold;
}

.category-scroll-btn:active {
    background: #fff;
    transform: translateY(-50%) scale(0.9);
}

.category-scroll-btn:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Game Grid Section */
.game-grid-section {
    padding: 10px 12px 30px 12px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns on mobile */
    gap: 8px;
}

.game-card-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
}

.game-card-img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1.4; /* Tall aspect ratio for cards */
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.game-card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.game-card-label {
    font-size: 9px;
    font-weight: 800;
    color: #444;
    margin-top: 4px;
    text-transform: uppercase;
    text-align: center;
}

/* Active Pill Styling */
/* Testimonials Section */
.testimonials-section {
    padding: 20px 15px 50px 15px;
    background: #f9f2ff; /* Light lavender background from image */
}

.testimonial-card {
    background: #fff;
    border-radius: 20px;
    position: relative;
    padding-top: 15px;
    box-shadow: 0 10px 30px rgba(124, 140, 244, 0.08);
    border-left: 8px solid #c2d1ff; /* Thicker light-blue accent from image */
    min-height: 200px;
    margin: 0 5px 15px 5px; /* No top margin to stick to header */
    overflow: hidden;
}

/* Subtle Quote Icon in Card Background */
.testimonial-card::after {
    content: "format_quote";
    font-family: 'Material Icons';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 60px;
    color: rgba(124, 140, 244, 0.05); /* Very subtle */
    pointer-events: none;
}

.testi-tab {
    display: none; /* Removed from cards as per user request */
}

.testi-body {
    padding: 20px 25px;
}

.testi-title {
    color: #8ca4f8;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.3;
}

.testi-text {
    color: #5c5c5c;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 20px;
}

.testi-stars {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-bottom: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.testi-stars i {
    color: #ffc107;
    font-size: 24px;
}

.testi-user-pill {
    background: #e9ecef;
    color: #495057;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    display: inline-block;
    width: 100%;
}


/* Splide Pagination Customization for Testimonials */
#testimonials-splide .splide__pagination {
    bottom: -25px;
}

#testimonials-splide .splide__pagination__page {
    background: #ccc;
}

#testimonials-splide .splide__pagination__page.is-active {
    background: #7c8cf4;
    transform: scale(1.2);
}

/* Ensure bottom carousel styles are correct */
#bottom-testimonials {
    scroll-margin-top: 80px; /* Adjust for smooth scroll offset */
    padding-top: 40px; /* More space for the top tab */
}

/* Testimonial Section Header Tab */
.testi-section-header {
    width: 100%;
    margin-bottom: 0px; /* Stick to the carousel */
    padding-left: 10px;
}

.testi-section-tab {
    background: linear-gradient(180deg, #96c5f4 0%, #c9e2f8 100%); /* Official gradient from misai8.biz */
    color: #000;
    padding: 8px 35px 8px 15px; /* Symmetrical padding with slant adjustment */
    border-radius: 12px 12px 0 0; /* More rounded corners on top-left and top-right */
    font-weight: 800;
    font-size: 18px;
    display: inline-block;
    clip-path: polygon(0% 0%, 100% 0%, 85% 100%, 0% 100%); /* Inward slant from top-right */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-transform: capitalize;
    letter-spacing: 0.5px;
}

/* --- SEO Content Section --- */
.footer-seo {
    margin-top: 30px;
    margin-bottom: 0;
    text-align: center;
    background: transparent;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.seo-toggle-btn {
    background: linear-gradient(135deg, #e7ca26 0%, #d4b920 100%);
    color: #2c2c2c;
    border: none;
    padding: 15px 40px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 202, 38, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.seo-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 202, 38, 0.6);
}

.seo-toggle-btn i {
    font-size: 24px;
    transition: transform 0.3s ease;
}

.seo-toggle-btn.expanded i {
    transform: rotate(180deg);
}

.seo-content-wrapper {
    display: none;
    width: 100%;
}

.seo-content-wrapper.show {
    display: block;
    margin-top: 25px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- PREMIUM SEO CONTENT STYLING --- */
.seo-inner {
    padding: 25px 20px;
    background: linear-gradient(145deg, #1c1c1c, #0d0d0d);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 16px;
    text-align: left;
    color: #e0e0e0;
    font-size: 14px;
    line-height: 1.8;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
}

.seo-inner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, #d4b920, #fff275, #d4b920);
}

.seo-inner h1 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(to right, #ffd700, #ffaa00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    line-height: 1.4;
}

.seo-inner p {
    margin-bottom: 15px;
    letter-spacing: 0.3px;
    color: #cccccc;
}

.seo-inner p strong {
    color: #ffd700;
    font-weight: 700;
}

.seo-inner ul {
    margin: 20px 0;
    padding-left: 0;
    list-style-type: none;
}

.seo-inner li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 28px;
    color: #d1d1d1;
    background: rgba(255,255,255,0.03);
    padding: 12px 12px 12px 35px;
    border-radius: 8px;
    border-left: 3px solid #d4b920;
}

.seo-inner li::before {
    content: "★";
    color: #ffd700;
    position: absolute;
    left: 12px;
    top: 12px;
    font-size: 12px;
}

.copyright { 
    margin-top: 30px;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    width: 100%;
    text-align: center;
    font-size: 11px;
    color: #555;
    letter-spacing: 1px;
}
/* --- Promotion Page Specific Styles --- */
.promo-page-content {
    padding: 15px 10px 80px 10px;
    background: #fcecf4; /* Match mobile app background from screenshot */
    min-height: 100vh;
}

.promo-section {
    margin-bottom: 25px;
}

.promo-header {
    display: flex;
    margin-bottom: 15px;
}

.promo-header img {
    height: 35px; /* Adjust height to match live site look */
    width: auto;
    object-fit: contain;
}

.promo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 cards per row as standard in user edits */
    gap: 8px;
}

.promo-card {
    background-color: #2c2c2c;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    border: 2px solid #555;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1.35;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    padding-top: 10px;
    transition: transform 0.2s ease;
}

.promo-card:active {
    transform: scale(0.96);
}

.promo-card.bg-mystery {
    background-color: #333;
    background-image: url('image/mystery-bg.gif');
}

.promo-card.bg-ewallet {
    background-color: #1b3a6c;
    /* Using authentic Touch n Go background downloaded from live site */
    background-image: url('image/ewallet-bg.gif'); 
    background-size: cover;
    background-repeat: no-repeat;
    border-color: #2b5a9c;
}

.promo-card.bg-angpao {
    background-color: transparent;
    background-image: url('image/angpao.gif');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
    border-radius: 8px;
    box-shadow: none;
}

.promo-card.bg-angpao::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .6);
    z-index: 1;
}

.promo-card.bg-angpao .promo-card-header,
.promo-card.bg-angpao .promo-card-bonus {
    position: relative;
    z-index: 2;
}

.promo-card.bg-angpao .promo-card-title {
    color: #000;
    text-shadow: none;
    font-size: 16px;
    font-weight: 900;
    margin-top: 15px;
}

.promo-card.bg-angpao .promo-card-amount {
    color: rgba(0, 0, 0, 0.4);
    text-shadow: none;
    font-size: 24px;
    font-weight: 900;
}

.promo-card.bg-angpao .promo-card-footer {
    display: none;
}

.promo-card-header {
    width: 100%;
    text-align: center;
    z-index: 2;
    padding: 0 5px;
}

.promo-card-title {
    font-size: 13px;
    font-weight: 800;
    color: #000;
    line-height: 1.2;
    text-transform: uppercase;
}

.promo-card.bg-ewallet .promo-card-title {
    color: #8db5e6;
}

.promo-card-bonus {
    z-index: 2;
    margin: auto 0;
    text-align: center;
    width: 100%;
}

.promo-card-amount {
    font-size: 20px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.5);
    animation: blink-animation 1s steps(5, start) infinite;
    -webkit-animation: blink-animation 1s steps(5, start) infinite;
    display: inline-block;
}

.promo-card.bg-ewallet .promo-card-amount {
    color: #2b5a9c;
}

.promo-card-footer {
    position: absolute;
    bottom: -1px;
    left: -1px;
    right: -1px;
    height: 48px;
    background-image: url('image/promo-footer.png');
    background-size: cover;
    background-position: center bottom;
    z-index: 3;
}

@keyframes blink-animation {
  to { visibility: hidden; }
}
@-webkit-keyframes blink-animation {
  to { visibility: hidden; }
}

/* Specific layouts for large cards */
.promo-grid.large-cards {
    grid-template-columns: 1fr;
}

.promo-grid.multi-row {
    grid-template-columns: repeat(3, 1fr);
}

/* Fix for broken footer area */
.home-footer {
    position: relative;
    z-index: 10;
}

/* Sidebar Menu */
.sidebar-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sidebar-overlay.show {
    display: block;
    opacity: 1;
}
.sidebar-menu {
    position: fixed;
    top: 0; left: -280px; width: 280px; height: 100%;
    background: #111;
    z-index: 3000;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.5);
}
.sidebar-menu.open {
    left: 0;
}
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #333;
}
.sidebar-header img {
    height: 30px;
}
.close-btn {
    background: none; border: none; color: #fff; font-size: 28px; cursor: pointer;
}
.sidebar-content {
    padding: 20px 0;
}
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 16px;
    border-bottom: 1px solid #222;
    transition: background 0.2s;
}
.sidebar-link:hover {
    background: #0d0d0d;
    color: #f4d35e;
}
.sidebar-link i {
    margin-right: 15px;
    color: #f4d35e;
}


/* Language Dropdown Styles */
.lang-selector {
    position: relative;
    display: inline-block;
    z-index: 1000;
}
.lang-selector .dropbtn {
    background-color: transparent;
    color: #ffd700;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ffd700;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}
.lang-selector .dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #1a0000;
    min-width: 120px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.8);
    border: 1px solid #ffd700;
    border-radius: 5px;
    overflow: hidden;
}
.lang-selector .dropdown-content a {
    color: #fff;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: background 0.3s;
}
.lang-selector .dropdown-content a:hover {
    background-color: #5a0503;
    color: #ffd700;
}
.lang-selector:hover .dropdown-content {
    display: block;
}

/* SEO Content Table Styles */
.seo-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 25px 0;
    font-size: 13px;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, 0.15);
}

.seo-table th, .seo-table td {
    padding: 14px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    text-align: left;
    color: #e0e0e0;
}

.seo-table th {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.seo-table tr:last-child td {
    border-bottom: none;
}

/* SEO CTA Buttons */
.seo-cta-group {
    display: flex;
    gap: 15px;
    margin: 25px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.seo-cta-btn {
    padding: 14px 20px;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 140px;
    max-width: 240px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    text-align: center;
}

.seo-cta-btn:active {
    transform: scale(0.96);
}

.seo-cta-btn.login {
    background: linear-gradient(180deg, #ffcc00 0%, #ff9900 100%);
    color: #111;
    border: 1px solid #ffaa00;
}

.seo-cta-btn.register {
    background: linear-gradient(180deg, #ff4d4d 0%, #cc0000 100%);
    color: #fff;
    border: 1px solid #ff3333;
    animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 4px 15px rgba(204, 0, 0, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(255, 77, 77, 0.8); }
}
