/* --- Global Resets & Variables --- */
:root {
    --app-max-width: 480px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f4f6f9 0%, #e0e6ed 100%);
    color: #333;
    padding-bottom: 90px;  /* Increased space to ensure content scrolls past footer */
    padding-top: 60px;     /* Space for Fixed Header */
    max-width: var(--app-max-width);     /* Mobile default */
    margin: 0 auto;
    position: relative;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    min-height: 100vh;
    overflow-x: hidden;    /* Prevent horizontal shifting while scrolling */
}

.pull-to-refresh {
    position: fixed;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #0052cc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 3000;
    pointer-events: none; /* Ensure interaction passes through when not active */
    transition: top 0.2s ease;
}

.pull-to-refresh i.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

body.no-scroll {
    overflow: hidden;
}

/* --- Header Section --- */
.header {
    background-color: #0052cc;
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%;
    max-width: var(--app-max-width);
    z-index: 2500; /* Stays above content */
    height: 60px;
}

.header-nav {
    display: none;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.header-logo {
    height: 30px;
    width: auto;
    display: block;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.balance {
    font-weight: bold;
    font-size: 15px;
}

.btn-deposit-header {
    background-color: #ffcc00;
    color: #111;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

/* --- Promo Banner Section --- */
.promo-banner {
    background-color: #002266;
    color: white;
    padding: 0;
    position: relative;
    overflow: hidden;
    height: 180px;
}

.carousel-inner {
    height: 100%;
    position: relative;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    display: flex;
    align-items: center;
    padding: 24px 16px;
}

.carousel-item.active {
    opacity: 1;
    z-index: 1;
}

.carousel-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: brightness(0.7);
}

.banner-content {
    max-width: 60%;
    position: relative;
    z-index: 3;
}

/* Navigation Controls */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 4;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-control.prev { left: 10px; }
.carousel-control.next { right: 10px; }

.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 4;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
}

.dot.active { background: #ffcc00; }

.promo-banner h2 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 6px;
}

.promo-banner p {
    font-size: 11px;
    opacity: 0.8;
    margin-bottom: 12px;
    line-height: 1.4;
}

.btn-find-more {
    background-color: #ffcc00;
    color: #111;
    border: none;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
}

/* --- Quick Navigation Items --- */
.quick-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background-color: white;
    padding: 16px 0;
    border-bottom: 1px solid #eaeaea;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.nav-item span {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    position: relative;
}

.bg-blue { background-color: #e6f0ff; color: #0052cc; }
.bg-pink { background-color: #ffe6eb; color: #ff3366; }
.bg-gold { background-color: #fff9e6; color: #cc9900; }

/* --- Matches Container --- */
.matches-container {
    padding: 12px;
    background-color: #f4f6f9;
}

.date-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: none;
}

.tab-item {
    background: white;
    border: 1px solid #e0e6ed;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.tab-item.active {
    background: #0052cc;
    color: white;
    border-color: #0052cc;
    box-shadow: 0 4px 10px rgba(0, 82, 204, 0.2);
}

/* Load More Styles */
.load-more-container {
    margin-top: 20px;
    text-align: center;
    padding-bottom: 20px;
}

.btn-load-more {
    background: white;
    border: 1px solid #0052cc;
    color: #0052cc;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 800;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-load-more:hover {
    background: #0052cc;
    color: white;
}

.match-section {
    margin-bottom: 20px;
}

.section-header {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-header h3 {
    font-size: 11px;
    font-weight: bold;
    color: #707787;
    letter-spacing: 0.5px;
}

.featured-fire h3 i {
    color: #ff3366;
    animation: fire-glow 1.5s infinite alternate;
}

@keyframes fire-glow {
    from { text-shadow: 0 0 2px #ff3366; transform: scale(1); }
    to { text-shadow: 0 0 10px #ffcc00; transform: scale(1.1); }
}

/* Featured Matches Horizontal Scroll */
.featured-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    -ms-overflow-style: none; /* Hide scrollbar for IE/Edge */
    scroll-snap-type: x mandatory;
    padding-right: 20px; /* Allows the last card to be fully seen */
}

.featured-scroll::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
}

.featured-scroll .match-card {
    min-width: 280px;
    flex-shrink: 0;
    margin-bottom: 0;
    scroll-snap-align: start;
}

/* Live Matches Horizontal Scroll */
.live-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
    padding-right: 20px;
}

.live-scroll::-webkit-scrollbar {
    display: none;
}

.live-scroll .match-card {
    min-width: 280px;
    flex-shrink: 0;
    margin-bottom: 0;
    scroll-snap-align: start;
}

.live-scroll .match-card.live {
    border-left: 3px solid #ff3366; /* High-visibility live indicator */
}

.match-card {
    background-color: white;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 10px;
    border: 1px solid #eef0f5;
}

.match-header {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 700;
    color: #999;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.live-clock { color: #ff3366; }

/* --- Toast Notifications --- */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    width: calc(100% - 40px);
    max-width: 350px;
}

.toast-notification {
    background: white;
    padding: 14px 18px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-left: 5px solid #0052cc;
    pointer-events: auto;
    transform: translateX(120%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-notification.show { transform: translateX(0); }
.toast-icon {
    width: 32px; height: 32px; background: #eaf1ff; color: #0052cc;
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0; margin-top: 2px;
}
.toast-body { flex: 1; }
.toast-title { font-size: 13px; font-weight: 800; color: #111; margin-bottom: 3px; }
.toast-message { font-size: 12px; color: #666; line-height: 1.4; word-break: break-word; }

@media (max-width: 480px) {
    #toast-container {
        top: 15px;
        right: 15px;
        left: 15px;
        width: auto;
    }
}
.match-body {
    display: grid;
    grid-template-columns: 1fr 40px 1fr;
    align-items: center;
    text-align: center;
    margin-bottom: 16px;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.team img { width: 32px; height: 32px; object-fit: contain; }
.team span { font-size: 13px; font-weight: 700; color: #111; }

.vs { font-size: 11px; font-weight: bold; color: #ccc; }
.score { font-size: 15px; font-weight: 800; color: #0052cc; }

.odds-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.odds-locked-notice {
    background: #fff1f0;
    color: #ff3366;
    border: 1px solid #ffa39e;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.odd-btn {
    background: #f8f9fa;
    border: 1px solid #eef0f5;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.odd-btn:hover {
    background: #eaf1ff;
    border-color: #0052cc;
    transform: translateY(-2px);
}

.odd-btn span {
    font-size: 10px;
    color: #666;
    margin-bottom: 2px;
}

.odd-btn strong {
    font-size: 14px;
    color: #111;
    font-weight: 800;
}

.text-red { color: #ff3366; }

/* --- Recent Winners Section --- */
.recent-winners {
    background-color: white;
    padding: 16px;
    margin-bottom: 8px;
}

.winners-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.winners-header h3 {
    font-size: 15px;
    font-weight: bold;
}

.text-blue { color: #0052cc; }

.live-badge {
    background-color: #e6f7ed;
    color: #2e7d32;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
}

.live-badge .dot {
    width: 6px;
    height: 6px;
    background-color: #2e7d32;
    border-radius: 50%;
}

/* Side scrolling layout for cards */
.winners-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.winner-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    min-width: 170px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border: 1px solid #eee;
    position: relative;
}

.winner-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.username {
    font-size: 12px;
    font-weight: bold;
}

.action-text {
    font-weight: normal;
    color: #666;
}

.prize {
    font-size: 14px;
    font-weight: 800;
    color: #2e7d32;
}

.currency {
    font-size: 11px;
    color: #666;
}

.card-footer {
    display: flex;
    gap: 8px;
    font-size: 10px;
    margin-top: 4px;
    color: #888;
}

.tag {
    background-color: #e6f0ff;
    color: #0052cc;
    padding: 1px 6px;
    border-radius: 4px;
}

.trophy-bg {
    font-size: 28px;
    color: #d4edda;
    position: absolute;
    right: 8px;
    bottom: 8px;
    opacity: 0.7;
}

/* --- Bottom Official Partner Banner --- */
.partner-banner {
    background-color: #0044cc;
    color: white;
    text-align: center;
    padding: 24px 16px 40px 16px;
}

.partner-banner h4 {
    font-size: 15px;
    margin-bottom: 4px;
}

.partner-banner p {
    font-size: 11px;
    opacity: 0.8;
}

/* --- Floating Chat Indicator --- */
.floating-chat {
    position: fixed;
    bottom: 85px;
    right: 16px;
    background-color: #000;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 99;
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff3366;
    color: white;
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid white;
}

/* --- Bottom Sticky Navigation Menu --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%;
    max-width: var(--app-max-width);
    background-color: rgba(0, 82, 204, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 2500; /* Stays above content */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
}

.nav-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 11px;
}

.nav-link.active {
    color: white;
}

.nav-link i {
    font-size: 16px;
}

/* Center Bet Slip pop-out style */
.bet-slip-center {
    position: relative;
    top: -14px;
    color: white !important;
}

.bet-slip-icon {
    position: relative;
    background-color: #ffcc00;
    color: #002266;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    border: 3px solid #0052cc;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.bet-badge-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: #ff3366;
    color: white;
    font-size: 9px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #0033aa;
}

.bet-slip-center span {
    margin-top: -2px;
}

.desktop-sidebar {
    display: none;
}

/* Desktop Responsiveness */
@media (min-width: 768px) {
    :root {
        --app-max-width: 1200px;
    }
    body {
        max-width: var(--app-max-width); /* Constrains the layout to a centered container */
        margin: 0 auto;    /* Centers the body container */
        padding-bottom: 0; /* Remove space for footer on desktop */
        box-shadow: 0 0 30px rgba(0,0,0,0.1); /* Adds separation from the background */
    }
    
    .desktop-layout-wrapper {
        display: flex;
        gap: 24px;
        padding: 0 32px 32px 32px;
        align-items: flex-start;
        background-color: transparent;
    }

    .main-column {
        flex: 1;
        min-width: 0;
    }

    .desktop-sidebar {
        display: block;
        width: 320px;
        position: sticky;
        top: 80px; /* Header height + gap */
    }

    .header-nav {
        display: flex;
        gap: 25px;
    }

    .header-nav-link {
        color: #a3c2ff;
        text-decoration: none;
        font-weight: 600;
        font-size: 15px;
        position: relative;
        transition: color 0.3s ease;
        padding: 4px 0;
    }

    .header-nav-link::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        width: 0;
        height: 2px;
        background-color: #ffcc00;
        transition: width 0.3s ease;
    }

    .header-nav-link:hover, .header-nav-link.active {
        color: #ffcc00;
    }

    .header-nav-link:hover::after, .header-nav-link.active::after {
        width: 100%;
    }

    .bottom-nav {
        display: none;
    }

    .header {
        padding: 16px 32px; /* Adds more horizontal breathing room for desktop */
    }

    .promo-banner {
        height: 350px;
    }

    .banner-content {
        max-width: 40%;
        padding-left: 50px;
    }

    .promo-banner h2 {
        font-size: 36px;
    }

    .promo-banner p {
        font-size: 16px;
        margin-bottom: 24px;
    }
}

/* --- Bet Slip Sidebar Styles --- */
.betslip-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #eef0f5;
}

.betslip-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #eef0f5;
}

.betslip-tabs button {
    flex: 1;
    border: none;
    padding: 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    color: #8c93a3;
    background: none;
}

.betslip-tabs button.active {
    background: white;
    color: #0052cc;
    border-bottom: 2px solid #0052cc;
}

.betslip-main {
    padding: 24px 16px;
    min-height: 200px;
}

.betslip-empty-state {
    text-align: center;
    color: #b0b7c4;
}

.betslip-empty-state i {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.betslip-empty-state p {
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.betslip-empty-state span {
    font-size: 12px;
}

.betslip-footer-stats {
    padding: 16px;
    background: #f8f9fa;
    border-top: 1px solid #eef0f5;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 12px;
}

.stat-row strong {
    color: #111;
}

.stake-input-box {
    margin-bottom: 16px;
}

.stake-input-box span {
    display: block;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #666;
}

.stake-input-box input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    outline: none;
    font-size: 16px;
    font-weight: bold;
}

.payout strong {
    color: #2e7d32;
    font-size: 16px;
}

.btn-place-bet {
    width: 100%;
    background: #ffcc00;
    color: #111;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
}

/* --- Modal Styles --- */
.modal-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 4000; /* Even higher than the betslip drawer */
    justify-content: center;
    align-items: center;
    pointer-events: none; /* Added to prevent blocking inputs when hidden */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(2px);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#share-code-modal {
    z-index: 5000;
}


.modal-card {
    background: white;
    width: 90%;
    max-width: 400px;
    border-radius: 24px;
    overflow: hidden;
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-overlay.show .modal-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-header {
    padding: 20px 24px;
    background: white;
    color: #111;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f2f5;
}

.modal-header h3 { 
    font-size: 18px; 
    font-weight: 800; 
    color: #0052cc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3::before {
    content: '\f3ff';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    background: #eaf1ff;
    color: #0052cc;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
}

.close-modal {
    background: none;
    border: none;
    color: #8c93a3;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.close-modal:hover { color: #111; }

.modal-body { padding: 20px; }
.modal-body p { font-size: 14px; color: #666; margin-bottom: 12px; }

.code-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.code-input-group input {
    flex: 1;
    width: 100%;
    padding: 14px 40px 14px 16px;
    border: 2px solid #f0f2f5;
    border-radius: 12px;
    outline: none;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.2s;
    background: #f8f9fa;
    text-transform: uppercase;
}
.code-input-group input::placeholder { text-transform: none; font-weight: 500; color: #b0b7c4; }

.btn-clear-input {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #ccc;
    font-size: 20px;
    cursor: pointer;
    display: none;
}

.code-input-group input:focus { border-color: #0052cc; background: white; box-shadow: 0 0 0 4px rgba(0, 82, 204, 0.1); }

.btn-load { 
    background: #ffcc00; 
    color: #111; 
    border: none; 
    padding: 0 24px; 
    border-radius: 12px; 
    font-weight: 800; 
    cursor: pointer; 
    transition: transform 0.1s;
}
.btn-load:active { transform: scale(0.96); }

.popular-codes h4 { 
    font-size: 11px; 
    color: #8c93a3; 
    margin-bottom: 15px; 
    font-weight: 800; 
    text-transform: uppercase; 
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.popular-codes h4::after { content: ''; flex: 1; height: 1px; background: #f0f2f5; }

.code-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }

.code-item {
    background: white;
    padding: 14px;
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #f0f2f5;
    transition: all 0.2s;
}
.code-item:hover { border-color: #0052cc; background: #fcfdff; transform: translateY(-2px); }

.code-info { display: flex; flex-direction: column; gap: 2px; }
.code-info strong { font-size: 15px; color: #111; letter-spacing: 0.5px; }
.code-info span { font-size: 12px; color: #8c93a3; font-weight: 500; }

.btn-load-small { 
    background: #eaf1ff; 
    color: #0052cc; 
    border: none; 
    padding: 8px 16px; 
    border-radius: 8px; 
    font-size: 12px; 
    font-weight: 800; 
    cursor: pointer; 
    transition: all 0.2s;
}
.btn-load-small:hover { background: #0052cc; color: white; }

.btn-load-more {
    width: 100%;
    background: none;
    border: 1.5px dashed #0052cc;
    color: #0052cc;
    padding: 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.btn-load-more:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #b0b7c4;
    color: #b0b7c4;
}

/* --- Mobile Betslip Sheet --- */
.mobile-betslip-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 4500;
    display: flex;
    visibility: hidden;
    pointer-events: none;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-betslip-overlay.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.betslip-sheet {
    background: white;
    width: 100%;
    max-width: 480px;
    border-radius: 20px 20px 0 0;
    max-height: 85vh; /* Allow it to grow but not cover the whole screen */
    height: auto;
    min-height: 40vh;
    /* Removed erroneous display:70vh; */
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
    overflow: hidden; /* Ensure rounded corners at the top clip correctly */
    transform: translateY(100%); /* Start hidden at the bottom */
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* When the parent is active, slide the sheet up */
.mobile-betslip-overlay.active .betslip-sheet {
    transform: translateY(0);
}

.betslip-sheet-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.header-left { display: flex; align-items: center; gap: 8px; }
.header-left h3 { font-size: 18px; font-weight: 800; }
.sheet-count { background: #0052cc; color: white; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: bold; }

.header-actions {
    display: flex;
    align-items: center;
}

.btn-sheet-clear {
    background: none;
    border: none;
    color: #ff3366;
    font-size: 16px;
    cursor: pointer;
    margin-right: 12px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.btn-sheet-clear:hover {
    opacity: 1;
}

.btn-sheet-load {
    background: #eaf1ff;
    color: #0052cc;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    margin-right: 12px;
}

#close-betslip-sheet { background: none; border: none; font-size: 20px; color: #666; cursor: pointer; }

.betslip-sheet-body { 
    padding: 16px; 
    overflow-y: auto; 
    flex: 1; 
    min-height: 0; /* Allows the body to shrink and trigger scrolling */
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling for iOS */
}

.sheet-empty-state { text-align: center; padding: 40px 0; color: #ccc; }
.sheet-empty-state i { font-size: 40px; margin-bottom: 10px; }

.selection-item {
    background: #f9f9f9;
    padding: 12px 35px 12px 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    border: 1px solid #eee;
    position: relative;
}

.remove-selection {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #ff3366;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.remove-selection:hover {
    opacity: 0.7;
}

.selection-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.market-type { font-size: 11px; color: #888; font-weight: bold; text-transform: uppercase; }
.selection-odds { color: #0052cc; font-weight: 800; }
.selection-teams { font-size: 14px; font-weight: 700; margin-bottom: 4px; color: #111; }
.selection-picked { font-size: 12px; color: #444; }

.betslip-sheet-footer {
    padding: 16px 16px 100px 16px; /* Clear the bottom sticky navigation within the footer */
    background: #fff;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

.stake-section { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; }
.input-container { display: flex; flex-direction: column; gap: 4px; }
.input-container span { font-size: 11px; font-weight: bold; color: #666; }
.input-container input { padding: 10px; border: 1px solid #ddd; border-radius: 8px; width: 120px; font-weight: 800; font-size: 16px; }

.returns-info { text-align: right; }
.info-row { font-size: 12px; color: #666; margin-bottom: 2px; }
.bonus-green { color: #2e7d32; font-weight: bold; }
.total { margin-top: 4px; color: #111; }
.total strong { font-size: 18px; color: #2e7d32; }

.sheet-actions { display: grid; grid-template-columns: 100px 1fr; gap: 10px; }

.btn-share-code {
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
}

.btn-place-sheet {
    background: #ffcc00;
    color: #111;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
}

.stake-error-text {
    color: #ff3366;
    font-size: 11px;
    font-weight: 800;
    margin-top: 6px;
    display: none;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Highlight Animation for Loaded Selections */
@keyframes selectionHighlightFlash {
    0% { background-color: #fffde6; border-color: #ffcc00; transform: scale(1); }
    30% { background-color: #fff9b3; border-color: #ffcc00; transform: scale(1.01); }
    100% { background-color: #f9f9f9; border-color: #eee; transform: scale(1); }
}

.selection-highlight-flash {
    animation: selectionHighlightFlash 1.5s ease-out forwards;
    z-index: 1;
}

/* Result Modal Icons */
.result-icon-success { color: #2e7d32; }
.result-icon-error { color: #ff3366; }

@media (min-width: 768px) {
    .mobile-betslip-overlay.active { display: none; }
}

/* --- Auth Pages Specific Styles --- */
.auth-container { padding: 40px 20px; min-height: 100vh; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; background: linear-gradient(180deg, #0052cc 0%, #002266 100%); overflow-y: auto; }
.auth-card { background: white; padding: 30px; border-radius: 20px; box-shadow: 0 10px 25px rgba(0,0,0,0.05); width: 100%; max-width: 400px; }
.auth-header { text-align: center; margin-bottom: 30px; }
.auth-header h2 { font-size: 24px; font-weight: 800; color: #0052cc; margin-top: 5px; }
.auth-form .input-group { margin-bottom: 20px; position: relative; }
.auth-form label { display: block; font-size: 12px; font-weight: bold; margin-bottom: 8px; color: #666; }
.auth-form input, .auth-form select { width: 100%; padding: 14px 15px; border: 2px solid #eef0f5; border-radius: 10px; font-size: 15px; outline: none; transition: border-color 0.2s; }
.auth-form input:focus { border-color: #0052cc; }
.btn-auth-submit { width: 100%; background: #ffcc00; color: #111; border: none; padding: 16px; border-radius: 10px; font-weight: 800; font-size: 16px; cursor: pointer; margin-top: 10px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: #666; }
.auth-footer a { color: #0052cc; text-decoration: none; font-weight: bold; }

.password-toggle { position: absolute; right: 15px; top: 40px; color: #999; cursor: pointer; font-size: 18px; z-index: 5; transition: color 0.2s; }
.password-toggle:hover { color: #0052cc; }

.country-select-row { display: grid; grid-template-columns: 95px 1fr; gap: 10px; width: 100%; }

/* --- Custom Country Picker --- */
.country-picker-container { position: relative; }
.country-picker-trigger {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; 
    padding: 14px 12px; border: 2px solid #eef0f5; border-radius: 10px; 
    background: white; cursor: pointer; font-size: 14px; font-weight: bold;
}
.country-picker-trigger img { width: 20px; border-radius: 2px; }
.country-dropdown {
    position: absolute; top: 100%; left: 0; width: 220px; 
    background: white; border: 1px solid #ddd; border-radius: 10px; 
    margin-top: 5px; max-height: 250px; overflow-y: auto; z-index: 100; 
    display: none; box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.country-dropdown.show { display: block; }
.country-item {
    display: flex; align-items: center; gap: 10px; padding: 12px 15px; 
    cursor: pointer; font-size: 13px; transition: background 0.2s; border-bottom: 1px solid #f8f9fa;
}
.country-item:last-child { border-bottom: none; }
.country-item:hover { background: #f0f7ff; }
.country-item img { width: 20px; border-radius: 2px; }

/* --- Profile Page Styles --- */
.profile-header-section {
    background: linear-gradient(180deg, #0052cc 0%, #0033aa 100%);
    padding: 20px 16px 40px 16px;
    color: white;
    border-radius: 0 0 30px 30px;
}

.header-back { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; }
.btn-back {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.user-login-row { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; }
.avatar-circle {
    width: 65px;
    height: 65px;
    background: #eef0f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #ccc;
    border: 3px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

.camera-icon-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #ffcc00;
    color: #111;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    border: 2px solid #0052cc;
}

.user-login-text h2 { font-size: 18px; font-weight: 800; }
.user-login-text p { font-size: 13px; opacity: 0.8; }

.wallet-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    color: #333;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.balance-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 15px; }
.label-title { font-size: 11px; font-weight: 800; color: #8c93a3; display: block; margin-bottom: 5px; }
.balance-value { font-size: 24px; font-weight: 900; color: #111; }
.currency-badge { background: #eaf1ff; color: #0052cc; padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 800; }

.bonus-balance-box {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}
.bonus-title { font-size: 12px; font-weight: 700; color: #666; }
.bonus-value { font-size: 12px; font-weight: 800; color: #0052cc; }

.wallet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn-wallet-deposit { background: #ffcc00; color: #111; border: none; padding: 12px; border-radius: 10px; font-weight: 800; cursor: pointer; }
.btn-wallet-withdraw { background: #f0f0f0; color: #888; border: none; padding: 12px; border-radius: 10px; font-weight: 800; cursor: pointer; }

.profile-menu-content { padding: 20px 16px; }
.menu-group { margin-bottom: 30px; }
.section-title { font-size: 13px; font-weight: 800; color: #8c93a3; margin-bottom: 15px; }

.shortcuts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.shortcut-item { text-align: center; }
.shortcut-icon-bg {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 8px;
}

.icon-blue { background: #eaf1ff; color: #0052cc; }
.icon-blue-alt { background: #eef2ff; color: #4f46e5; }
.icon-blue-dark { background: #f0f0ff; color: #6366f1; }
.shortcut-item span { font-size: 11px; font-weight: 700; color: #444; }

.support-list { background: white; border-radius: 15px; overflow: hidden; border: 1px solid #eef0f5; }
.list-item { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid #f8f9fa; }
.list-item-left { display: flex; align-items: center; gap: 12px; }
.list-icon-bg {
    width: 32px;
    height: 32px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8c93a3;
    font-size: 14px;
}
.list-text { font-size: 14px; font-weight: 700; color: #333; }
.online-status-tag { background: #e6f7ed; color: #2e7d32; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 800; }
.arrow-icon { font-size: 12px; color: #ccc; }

.icon-deposit { background: #e6f7ed; color: #2e7d32; }
.icon-win { background: #fff9e6; color: #cc9900; }
.icon-loss { background: #ffe6eb; color: #ff3366; }
.icon-system { background: #eaf1ff; color: #0052cc; }

.btn-clear-notif { background: #fff; border: 1px solid #ddd; color: #666; padding: 8px 16px; border-radius: 10px; font-size: 12px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.btn-clear-notif:hover { border-color: #ff3366; color: #ff3366; }

.notif-badge { position: absolute; top: -5px; right: -5px; background: #ff3366; color: white; font-size: 9px; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid #0052cc; }

/* Swipe to Delete Styles for Notifications */
.notifications-container { padding: 16px; background: #f4f6f9; min-height: 85vh; }

.swipe-wrapper {
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
    border-radius: 12px;
}

.notif-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #eef0f5;
    position: relative; /* Essential for transform */
    display: flex;
    gap: 15px;
    transition: transform 0.3s ease-out;
    z-index: 1;
}

.notif-card.unread { border-left: 4px solid #0052cc; background: #f0f7ff; }
.notif-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.notif-content { flex: 1; }
.notif-content h4 { font-size: 14px; font-weight: 800; color: #111; margin-bottom: 4px; }
.notif-content p { font-size: 12px; color: #666; line-height: 1.4; }
.notif-time { font-size: 10px; color: #999; margin-top: 8px; font-weight: 600; display: block; }

.delete-button-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 100%;
    background: #ff3366;
    color: white;
    border: none;
    border-radius: 0 12px 12px 0;
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    z-index: 0; /* Behind the notif-card */
}

/* Futuristic Booking Code Modal Styles */
.futuristic-card-expand {
    max-width: 460px !important; /* Wider modal */
    background: #0f172a !important; /* Deep space blue */
    border: 1px solid rgba(0, 240, 255, 0.2) !important;
}

.futuristic-ticket-capture {
    background: linear-gradient(165deg, #1e293b 0%, #020617 100%);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 24px;
    padding: 45px 25px;
    margin-bottom: 24px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(0, 240, 255, 0.05);
    overflow: hidden;
}

/* Neon Energy Bars */
.energy-line-top, .energy-line-bottom {
    position: absolute;
    left: 10%;
    right: 10%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00f0ff, #7000ff, #00f0ff, transparent);
    background-size: 200% 100%;
    animation: shimmer 3s infinite linear;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.8);
}
.energy-line-top { top: 0; }
.energy-line-bottom { bottom: 0; }

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Digital Ticket Notches */
.ticket-notch {
    position: absolute;
    top: 50%;
    width: 24px;
    height: 24px;
    background: #0f172a; /* Matches modal background */
    border-radius: 50%;
    transform: translateY(-50%);
    border: 1px solid rgba(0, 240, 255, 0.3);
    z-index: 2;
}
.notch-left { left: -13px; box-shadow: inset -5px 0 10px rgba(0,0,0,0.5); }
.notch-right { right: -13px; box-shadow: inset 5px 0 10px rgba(0,0,0,0.5); }

.futuristic-ticket-capture::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 20px;
    right: 20px;
    height: 1px;
    border-top: 2px dashed rgba(0, 240, 255, 0.1);
    z-index: 1;
}

.futuristic-ticket-capture::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.05) 0%, transparent 70%),
                      linear-gradient(0deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 25px 25px, 25px 25px;
    z-index: 0;
}

.futuristic-ticket-capture > * {
    position: relative;
    z-index: 3;
}

.futuristic-ticket-logo {
    color: #ffffff !important;
    font-size: 16px !important;
    margin-bottom: 8px !important;
    letter-spacing: 10px !important;
    font-weight: 900 !important;
    opacity: 0.9;
}

.futuristic-separator {
    width: 80px !important;
    height: 2px !important;
    background: linear-gradient(90deg, transparent, #00f0ff, transparent) !important;
    margin: 0 auto 20px !important;
    box-shadow: 0 0 5px rgba(0, 240, 255, 0.5);
}

.futuristic-label {
    font-size: 10px !important;
    color: #00f0ff !important;
    margin-bottom: 12px !important;
    text-transform: uppercase !important;
    font-weight: 800 !important;
    letter-spacing: 2px !important;
    background: rgba(0, 240, 255, 0.1);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
}

.futuristic-code-display {
    font-size: 54px !important;
    font-weight: 900 !important;
    color: #ffcc00 !important; /* Gold/yellow for the code */
    letter-spacing: 5px !important;
    margin: 15px 0 !important;
    font-family: 'Share Tech Mono', monospace !important;
    text-shadow: 0 0 25px rgba(255, 204, 0, 0.5);
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 25px;
    border-radius: 12px;
    display: inline-block;
    border: 1px solid rgba(255, 204, 0, 0.2);
}

.futuristic-message {
    font-size: 13px !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
    margin-top: 20px !important;
}

.futuristic-btn-copy, .futuristic-btn-save {
    background: rgba(255, 255, 255, 0.05) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease !important;
}

.futuristic-btn-copy:hover, .futuristic-btn-save:hover {
    background: #00f0ff !important;
    color: #020617 !important;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.7) !important;
    transform: translateY(-2px);
}

/* --- Global Page Progress Bar --- */
#page-progress-bar-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 10000;
    pointer-events: none; display: none;
}

#page-progress-bar {
    width: 0%; height: 100%; background: #ffcc00;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.7);
    transition: width 0.4s ease;
}

.blur-background {
    filter: blur(4px) brightness(0.6); /* Blurs and darkens the background */
    pointer-events: none; /* Prevents users from clicking things while loading */
    transition: filter 0.4s ease-out;
    transform: translateZ(0); /* Hardware acceleration */
}