/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #000000;
    /* Pure Black */
    color: #fff;
    padding-bottom: 60px;
    /* Space for bottom nav */
}

/* Header */
.top-header {
    background-color: #940c08;
    /* User Requested Red (#940c08) */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    height: 65px;
    /* User Requested Height */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 750px;
    /* Constrain to mobile width */
    margin: 0 auto;
    /* Center it */
}

.logo img {
    height: 45px;
    /* Adjusted logo size */
    object-fit: contain;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-login,
.btn-signup {
    border: none;
    padding: 6px 12px;
    /* Adjusted padding */
    border-radius: 15px;
    font-weight: bold;
    font-size: 13px;
    /* Adjusted font size */
    cursor: pointer;
}

.btn-login {
    background: linear-gradient(180deg, #ffcc00 0%, #ff9900 100%);
    color: #3d0000;
}

.btn-signup {
    background: linear-gradient(180deg, #ffcc00 0%, #ff9900 100%);
    color: #3d0000;
}

.lang-selector {
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 2px;
    cursor: pointer;
}

.arrow {
    font-size: 8px;
}

/* Main Content */
.main-content {
    width: 100%;
    max-width: 750px;
    /* Limit width for desktop viewing to simulate mobile */
    margin: 0 auto;
    position: relative;
    background: linear-gradient(180deg, #940c08 0%, #5a0503 100%);
    /* User Requested Red (#940c08) gradient */
    min-height: 100vh;
}

/* Carousel */
.hero-carousel {
    position: relative;
    width: 100%;
    margin-top: 0;
}

.carousel-container {
    width: 100%;
    overflow: hidden;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
}

/* Marquee */
.marquee-container {
    background: linear-gradient(180deg, #fff7cc 0%, #ffccaa 100%);
    color: #660000;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
    border-top: 2px solid #cc9900;
    border-bottom: 2px solid #cc9900;
    border-radius: 15px;
    margin: -15px 10px 10px 10px;
    /* Overlap nicely */
    position: relative;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.marquee-icon {
    margin-right: 10px;
}

/* Game Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 items per row */
    gap: 5px;
    padding: 10px;
}

.grid-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1;
    /* Square */
    transition: transform 0.2s;
}

.grid-item:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}

.grid-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    /* Center horizontally */
    width: 100%;
    max-width: 750px;
    /* Constrain to mobile width */
    background: #b91d83;
    /* Magenta */
    display: flex;
    justify-content: space-around;
    align-items: center;
    /* Center items vertically */
    padding-bottom: 5px;
    height: 70px;
    border-top: none;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    font-size: 10px;
    flex: 1;
    height: 100%;
    opacity: 1;
    transition: transform 0.2s;
}

.nav-item:hover {
    transform: translateY(-2px);
    opacity: 1;
}

.nav-item.active {
    opacity: 1;
}

.nav-item img {
    height: 50px;
    /* Larger icons */
    width: 50px;
    margin-bottom: 0;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
    object-fit: contain;
}

.nav-item span {
    display: none;
}

/* Animations */
.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {
        opacity: .4
    }

    to {
        opacity: 1
    }
}

/* Buttons next/prev */
.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover,
.next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Progressive Jackpot */
.progressive-jackpot {
    width: 95%;
    /* Adjust width as needed */
    max-width: 700px;
    margin: 20px auto;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background-color: #940c08;
    /* Fallback */
    /* Use padding to maintain aspect ratio or just set a min-height */
    padding-bottom: 35px;
}

.jackpot-container {
    background-image: url('image/jp-bg.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    padding: 20px 10px 40px 10px;
    /* Padding for content */
    text-align: center;
    position: relative;
    min-height: 200px;
    /* Ensure enough height for bg */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.jackpot-title {
    font-family: 'Aclonica', sans-serif;
    /* Serif font for "Progressive Jackpot" */
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 15px;
}

.jackpot-counter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    /* Reduced gap for flattened structure */
    margin-bottom: 10px;
}

.digit-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

@font-face {
    font-family: 'Aclonica';
    src: url('font/Aclonica-Regular.ttf');
}

@font-face {
    font-family: 'Roboto';
    src: url('font/roboto/Roboto-Regular.ttf');
}

.digit {
    background-image: url('image/jp-digit-bg.svg');
    /* Updated background to jp-digit-bg.svg */
    background-size: cover;
    background-position: center;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #3d0000;
    /* Dark text on gold */
    font-weight: bold;
    font-size: 20px;
    font-family: 'Aclonica', sans-serif;
    /* Updated font */
    border-radius: 50%;
    /* Make it round if image isn't */
    transform-style: preserve-3d;
    overflow: hidden;
    /* Mask the sliding content */
}

/* Inner span for animation */
.digit span {
    display: block;
    animation: slideUp 0.3s ease-out forwards;
}

@keyframes slideUp {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }

    100% {
        transform: translateY(0%);
        opacity: 1;
    }
}

.comma,
.dot {
    color: #fc0;
    /* Gold color for separators */
    font-size: 24px;
    font-weight: bold;
    margin: 0 2px;
}

.toggle-btn-container {
    background: linear-gradient(to bottom, #fff8dc, #e6d8ad);
    /* Beige gradient */
    border-radius: 20px;
    padding: 5px 20px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    position: absolute;
    bottom: -22px;
    /* Position at bottom of red/gold bg area */
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 5;
}

.winner-toggle-btn {
    color: #000;
    font-weight: bold italic;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
}

.toggle-icon {
    font-weight: bold;
    color: #fff;
    background-color: #b91d83;
    /* Similar to bottom nav color or red */
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 5px;
    position: absolute;
    bottom: -10px;
    /* Hang off the button */
    border: 2px solid #fff;
}

/* Close icon when list is open - handled by JS to toggle specific icon or rotate */
.winner-list {
    background-color: #fff8dc;
    /* Beige background */
    margin: 0 10px;
    border-radius: 0 0 15px 15px;
    padding: 10px;
    margin-top: -20px;
    /* Overlap with container */
    padding-top: 30px;
    /* Space for the button */
    position: relative;
    z-index: 1;
    font-family: 'Roboto', sans-serif;
}

.winner-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #d1c499;
}

.winner-item:last-child {
    border-bottom: none;
}

.winner-info-left {
    display: flex;
    align-items: center;
    gap: 5px;
}

.winner-coin {
    width: 16px;
    height: 16px;
}

.winner-id {
    color: #5a0503;
    font-weight: bold;
    font-size: 12px;
}

.winner-info-right {
    text-align: right;
    display: flex;
    flex-direction: column;
}

.winner-date {
    color: #8b5a2b;
    /* Brownish */
    font-size: 10px;
}

.amount {
    color: #b91d83;
    /* Pink/Red prize color */
    font-weight: bold;
    font-size: 14px;
}

.close-icon-container {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #940c08;
    border-radius: 5px;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: 2px solid #fc0;
}

.close-icon {
    color: #fff;
    font-weight: bold;
}

.jackpot-desc {
    color: #fff;
    font-size: 14px;
    text-align: center;
    padding: 15px;
    line-height: 1.4;
    margin-top: 35px;
    /* Clear the button */
    font-family: 'Roboto', sans-serif;
}

/* Step to Win Component */
.step-to-win {
    width: 95%;
    max-width: 600px;
    margin: 20px auto;
    text-align: center;

    /* Background Frame Style */
    background-color: #FBEBBF;
    /* Beige background */
    border: 5px solid #FEC243;
    /* Gold border */
    border-radius: 20px;
    /* Rounded corners */
    box-shadow: inset 0 0 10px 6px rgba(103, 10, 8, 0.5);
    /* Inner shadow for depth */
    padding: 20px;
    /* Space inside the frame */
}

.step-to-win img {
    width: 100%;
    height: auto;
    display: block;
}

/* Hot Games Section */
.hot-games {
    width: 95%;
    max-width: 700px;
    margin: 20px auto;
}

.hot-games-title {
    color: #ffcc00;
    /* Gold */
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-family: 'Aclonica', sans-serif;
    padding-left: 10px;
}

.hot-games-frame {
    background-color: #FFF8DC;
    /* Cornsilk/Beige */
    border: 3px solid #FEC243;
    /* Gold border */
    border-radius: 20px;
    padding: 20px;
    box-shadow: inset 0 0 10px 5px rgba(103, 10, 8, 0.2);
}

.hot-games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    justify-items: center;
    align-items: center;
}

.game-logo-item {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.game-logo-item img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.2s;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
}

.game-logo-item img:hover {
    transform: scale(1.05);
}

/* Center the last item if it's alone (for 7 items) - logic if needed, but we have 8 items so grid is full */
.center-last {
    grid-column: span 1;
    /* Default */
}

/* Adjust for smaller screens if needed */
@media (max-width: 400px) {
    .hot-games-grid {
        gap: 10px;
    }
}

/* Latest Transaction Section */
.latest-transaction {
    width: 95%;
    max-width: 700px;
    margin: 20px auto;
}

.transaction-title {
    color: #ffcc00;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-family: 'Aclonica', sans-serif;
    padding-left: 10px;
    text-transform: uppercase;
}

.transaction-container {
    background-color: #FFF8DC;
    border: 3px solid #FEC243;
    border-radius: 20px;
    padding: 10px;
    box-shadow: inset 0 0 10px 5px rgba(103, 10, 8, 0.2);
}

.transaction-tabs {
    display: flex;
    justify-content: space-between;
    background-color: #FFF8DC;
    border-radius: 15px 15px 0 0;
    margin-bottom: 5px;
    overflow: hidden;
    border: 1px solid #940c08;
}

.tab-btn {
    flex: 1;
    border: none;
    padding: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    background-color: transparent;
    color: #000;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background-color: #940c08;
    color: #fff;
    border-radius: 15px;
    /* Rounded pill shape for active tab */
}

.transaction-list-container {
    height: 300px;
    /* Fixed height for scrolling */
    overflow-y: hidden;
    /* Hide scrollbar by default, JS/Auto-scroll */
    position: relative;
    padding: 5px;
}

.transaction-list {
    display: flex;
    flex-direction: column;
    /* transition: transform 0.5s linear; remove this as we might append/remove */
}

/* Individual Item Styling */
.t-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5px;
    border-bottom: 1px dashed #d1c499;
    animation: fadeIn 0.5s ease-in;
}

.t-item:last-child {
    border-bottom: none;
}

.t-left {
    width: 25%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.t-left img {
    max-width: 60px;
    max-height: 40px;
    object-fit: contain;
}

.t-mid {
    width: 45%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-family: 'Roboto', sans-serif;
}

.t-phone {
    font-weight: bold;
    color: #000;
    font-size: 14px;
}

.t-date {
    font-size: 11px;
    color: #555;
    font-style: italic;
}

.t-right {
    width: 30%;
    text-align: right;
    font-family: 'Roboto', sans-serif;
}

.t-amount {
    color: #4CAF50;
    /* Green for money */
    font-weight: bold;
    font-size: 16px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Telegram Section */
.telegram-section {
    width: 95%;
    max-width: 700px;
    margin: 20px auto;
}

.telegram-container {
    background: linear-gradient(to bottom, #fff8dc, #e6d8ad);
    border: 3px solid #FEC243;
    border-radius: 20px;
    padding: 15px;
    display: flex;
    align-items: center;
    box-shadow: inset 0 0 10px 5px rgba(103, 10, 8, 0.2);
    gap: 15px;
}

.tg-left {
    flex-shrink: 0;
}

.tg-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
}

.tg-right {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Sidebar Menu */
.hamburger {
    font-size: 24px;
    color: #f1c40f;
    cursor: pointer;
    margin-right: 10px;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2001;
    display: none;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100vh;
    background: #5a0503;
    z-index: 2002;
    transition: left 0.3s ease;
    padding-top: 60px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.8);
}

.sidebar.open {
    left: 0;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    color: #f1c40f;
    cursor: pointer;
}

.sidebar-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-links li {
    padding: 15px 20px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
}

.sidebar-links li a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    display: block;
}

.sidebar-links li a:hover {
    color: #f1c40f;
}

.tg-title {
    color: #940c08;
    /* Red/Brown */
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    font-family: 'Roboto', sans-serif;
}

.tg-buttons {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tg-btn {
    background-color: #3d0000;
    /* Dark Brown/Black */
    color: #fff;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-family: 'Roboto', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tg-btn.wide {
    font-size: 12px;
    /* Smaller font for long text */
}