/* General Resets and Body Styles */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    background-color: #000000;
    color: #FFFFFF;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    background-image: radial-gradient(circle at center, #1a1a2e 0%, #000000 70%, #000000 100%);
    background-size: 250% 250%;
    animation: backgroundShine 20s ease-in-out infinite alternate;
}

/* Keyframes for background shine */
@keyframes backgroundShine {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

/* Splash Screen Styles */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
    opacity: 1;
    transition: opacity 1s ease-out;
    background-image: radial-gradient(circle at center, #1a1a2e 0%, #000000 70%, #000000 100%);
    background-size: 250% 250%;
    animation: backgroundShine 20s ease-in-out infinite alternate;
}

#splash-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.splash-logo {
    font-size: 4em;
    font-weight: bold;
    color: #FFFFFF;
    letter-spacing: -3px;
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.splash-logo span {
    color: #FF0000;
}

.loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #FF0000;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* App Container - Simulates a mobile screen */
.app-container {
    width: 100%;
    max-width: 420px;
    background-color: #000000;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
    background-image: radial-gradient(circle at center, #1a1a2e 0%, #000000 70%, #000000 100%);
    background-size: 250% 250%;
    animation: backgroundShine 20s ease-in-out infinite alternate;
}

/* Header Section (TOPX Logo and Auth Buttons) */
.header-section {
    padding: 10px 15px 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: transparent;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 2.5em;
    font-weight: bold;
    color: #FFFFFF;
    letter-spacing: -2px;
    margin: 0;
    line-height: 1;
}

.logo span {
    color: #FF0000;
}

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

.auth-button {
    padding: 8px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease, border-color 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.auth-button i {
    margin-right: 5px;
    font-size: 0.9em;
}

.login-button {
    background-color: transparent;
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.15);
}

.login-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.register-button {
    background-color: #FF0000;
    color: #FFFFFF;
    border: none;
}

.register-button:hover {
    background-color: #CC0000;
    transform: translateY(-1px);
}

/* Logged In Header */
.logged-in-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-pic-small {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #444;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #FFF;
    font-size: 0.9em;
    font-weight: bold;
    overflow: hidden;
}
.profile-pic-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.balance-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.balance-label {
    font-size: 0.7em;
    color: #BBB;
    margin-bottom: 2px;
}

.balance-amount {
    font-size: 1.1em;
    font-weight: bold;
    color: #FFD700;
}

.deposit-button {
    background-color: #FF0000;
    color: #FFFFFF;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease, transform 0.1s ease;
    white-space: nowrap;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.deposit-button:hover {
    background-color: #CC0000;
    transform: translateY(-1px);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    padding: 0 15px 80px 15px;
}

/* Install App Banner */
.install-app-banner {
    background-color: #333;
    color: #FFFFFF;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9em;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    gap: 10px;
}

.install-app-banner .close-button {
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 1.2em;
    cursor: pointer;
    padding: 5px;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    order: 1;
}
.install-app-banner .close-button:hover {
    color: #FF0000;
}

.install-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
    order: 2;
}

.install-icon {
    font-size: 1.8em;
    color: #FFD700;
}

.install-text {
    flex-grow: 1;
    line-height: 1.3;
}

.install-button {
    background-color: #FF0000;
    color: #FFFFFF;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    order: 3;
}
.install-button:hover {
    background-color: #CC0000;
}

/* Game Sections */
.game-promo-carousel, .game-section, .mid-promo-banner, .terms-conditions {
    background-color: rgba(26, 29, 44, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    margin-bottom: 25px;
    overflow: hidden;
}
.game-section {
    margin-bottom: 20px;
    padding-bottom: 5px;
}
.section-header {
    padding: 15px 15px 10px 15px;
    background-color: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.game-cards-horizontal-scroll {
    padding-left: 15px;
    padding-right: 15px;
}
.game-card {
    background-color: #222233;
}

/* Carousel Styles */
.game-promo-carousel {
    height: 180px;
    position: relative;
    margin-bottom: 25px;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.game-promo-banner {
    flex: 0 0 100%;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    color: #FFFFFF;
    padding-bottom: 15px;
    padding-left: 15px;
    box-sizing: border-box;
}

.promo-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.promo-content {
    position: relative;
    z-index: 2;
    padding: 0;
    text-shadow: none;
    text-align: left;
    width: 100%;
}

.play-button {
    background-color: #FF0000;
    color: #FFFFFF;
    border: none;
    padding: 10px 25px;
    border-radius: 28px;
    font-size: 1.0em;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.1s ease;
    box-shadow: 0 4px 10px rgba(255, 0, 0, 0.4);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.play-button:hover {
    background-color: #CC0000;
    transform: translateY(-2px);
}

.pagination-dots {
    position: absolute;
    bottom: 10px;
    right: 15px;
    z-index: 3;
    display: flex;
    gap: 5px;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: background-color 0.3s ease, width 0.3s ease, border-radius 0.3s ease;
}

.dot.active {
    background-color: #FFFFFF;
    width: 18px;
    border-radius: 4px;
}

.section-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    font-size: 1.1em;
    color: #FFD700;
}

.view-all {
    color: #BBBBBB;
    text-decoration: none;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.view-all:hover {
    color: #FFFFFF;
}

.game-count {
    color: #888888;
}

.game-cards-horizontal-scroll {
    display: flex;
    overflow-x: scroll;
    padding-bottom: 15px;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    scroll-snap-type: x mandatory;
}

/* Hide scrollbar for a cleaner look */
.game-cards-horizontal-scroll::-webkit-scrollbar {
    display: none;
}
.game-cards-horizontal-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.game-card {
    flex: 0 0 160px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    scroll-snap-align: start;
    min-width: 160px;
    max-width: 160px;
    box-sizing: border-box;
}

.game-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.card-image-container {
    width: 100%;
    height: 90px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.bonus-tag {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #2ECC71;
    color: #FFFFFF;
    padding: 3px 8px;
    font-size: 0.7em;
    font-weight: bold;
    border-bottom-right-radius: 8px;
    z-index: 10;
    text-transform: uppercase;
}

.game-info {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 55px;
    position: relative;
}

.game-card-name {
    font-size: 0.9em;
    font-weight: bold;
    color: #FFFFFF;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-provider {
    font-size: 0.75em;
    color: #BBBBBB;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.star-icon {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 1em;
    color: #FFD700;
}

.placeholder-card {
    background-color: #282C3D;
    flex-direction: column;
}

.placeholder-card .card-image-container {
    background-color: #34495E;
}

.placeholder-card .arrow-icon {
    font-size: 2.5em;
    color: #BBB;
}

/* Mid-Content Promotional Banner */
.mid-promo-banner {
    width: 100%;
    height: 140px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.mid-promo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

/* Terms and Conditions */
.terms-conditions {
    padding: 15px;
    margin-bottom: 20px;
}

.terms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    color: #FFFFFF;
    cursor: pointer;
    padding: 5px 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.terms-header i {
    transition: transform 0.3s ease;
}

.terms-content {
    padding-top: 10px;
    font-size: 0.9em;
    color: #CCC;
    line-height: 1.5;
    display: none;
}
.terms-content p {
    margin: 0 0 10px 0;
}
.terms-content p:last-child {
    margin-bottom: 0;
}

/* Support Section */
.support-section {
    margin-bottom: 30px;
    text-align: center;
    display: flex;
    justify-content: center;
    background-color: transparent;
    box-shadow: none;
}

.support-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #FF0000;
    color: #FFFFFF;
    border: none;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    box-shadow: 0 4px 10px rgba(255, 0, 0, 0.4);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.support-button i {
    margin-right: 8px;
    font-size: 1.0em;
}

.support-button:hover {
    background-color: #CC0000;
    transform: translateY(-2px);
}

/* Bottom Navigation Bar - FIXED position, RED on active */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    background-color: #222233;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
    align-items: flex-end;
    left: 50%;
    transform: translateX(-50%);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 0.75em;
    transition: color 0.3s ease;
    position: relative;
    flex: 1;
    padding: 0 2px;
    box-sizing: border-box;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.nav-item i {
    font-size: 1.4em;
    margin-bottom: 5px;
    transition: color 0.3s ease;
    color: #FFFFFF;
}

.nav-item.active {
    color: #FF0000;
    font-weight: bold;
}

.nav-item.active i {
    color: #FF0000;
}

/* Specific style for the central "Top Up" button */
.nav-item.top-up-button-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
    height: 60px;
    flex: 0 0 auto;
    width: 70px;
    margin-top: -20px;
    z-index: 1001;
    pointer-events: none;
}

.nav-item.top-up-button {
    background-color: #FF0000;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    color: #FFFFFF;
    font-size: 0.8em;
    box-shadow: 0 -5px 15px rgba(255, 0, 0, 0.5);
    transition: background-color 0.3s ease;
    text-decoration: none;
    line-height: 1;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
}
.nav-item.top-up-button i {
    margin-bottom: 0;
    font-size: 1.8em;
    color: #FFFFFF;
}

.nav-item.top-up-button:hover {
    background-color: #CC0000;
    box-shadow: 0 -8px 20px rgba(255, 0, 0, 0.7);
}

/* Scroll-to-Top and Live Chat Buttons */
.fixed-action-button {
    position: fixed;
    bottom: 90px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #FF0000;
    color: #FFFFFF;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 999;
    transition: background-color 0.3s ease, opacity 0.3s ease, transform 0.1s ease;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.fixed-action-button:hover {
    background-color: #CC0000;
}

#scroll-to-top {
    left: 15px;
    opacity: 0;
    pointer-events: none;
}

#scroll-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

#live-chat-button {
    right: 15px;
}

/* Responsive adjustments */
@media (max-width: 360px) {
    .game-card {
        flex: 0 0 150px;
        min-width: 150px;
        max-width: 150px;
    }
    .card-image-container {
        height: 80px;
    }
    .install-app-banner {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
        padding-bottom: 15px;
    }
    .install-content {
        flex-basis: 100%;
        justify-content: center;
        margin-bottom: 10px;
        padding-right: 0;
    }
    .install-button {
        width: 80%;
    }
    .install-app-banner .close-button {
        order: 1;
        position: static;
        transform: none;
        margin-right: 10px;
    }
    .install-button {
        order: 3;
        margin-left: auto;
    }
} 
    /* New styles for Login and Register pages to match the gaming theme */
.auth-page .app-container {
    background-color: transparent;
    box-shadow: none;
    background-image: none;
    animation: none;
}
.auth-page .main-content, .auth-page .bottom-nav, .auth-page .header-section {
    display: none;
}
.auth-page {
    justify-content: center;
} 
    /* Add these new styles to your existing styles.css file */

.game-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
    padding: 0 10px; /* Add some padding for mobile view */
}

.game-card-grid {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    background-color: #1a1a2e; /* A background color for the card */
}

.card-image-container-grid {
    width: 100%;
    /* Set a fixed aspect ratio for a consistent look */
    padding-bottom: 100%; /* Makes the container a square */
    position: relative;
    overflow: hidden;
}

.game-thumbnail-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card-grid:hover .game-thumbnail-grid {
    transform: scale(1.05); /* Zoom effect on hover */
}

.game-info-grid {
    padding: 10px;
    text-align: center;
    background-color: #222233;
}
.game-card-name {
    margin: 0;
    font-size: 0.9em;
    color: #ffffff;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}