/* =================================================================== */
/*                     MASTER STYLESHEET (style.css)                   */
/* =================================================================== */

/* ------------------------------------------------------------------- */
/* 1. GLOBAL RESET & BASE STYLES & NATIVE OPTIMIZATIONS                */
/* ------------------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent !important; /* Forces native tap feel */
    -webkit-touch-callout: none; /* Prevents long-press popup on iOS/Android */
    -webkit-user-select: none; /* Prevents text selection for a native app feel */
    user-select: none;
}

/* Allow selection only inside input fields */
input, textarea, select {
    -webkit-user-select: auto;
    user-select: auto;
}

html { 
    scroll-behavior: smooth; 
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f6f9; /* Slightly off-white to make cards pop */
    color: #333;
    line-height: 1.4;
    font-size: 15px; /* Slightly smaller for mobile app fit */
    overflow-x: hidden;
    overscroll-behavior-y: none; /* Prevents native pull-to-refresh bounce */
    -webkit-overflow-scrolling: touch; /* Hardware acceleration for smooth scrolling */
}

/* --- NATIVE PAGE TRANSITIONS & LOADERS --- */
.app-content { 
    padding: 110px 12px 75px 12px; 
    width: 100%; 
    animation: fadeIn 0.25s ease-out forwards;
    transform: translateZ(0); /* Force GPU Hardware Acceleration */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Page Leave Animation triggered by JS */
.page-leaving {
    opacity: 0.4;
    transition: opacity 0.2s ease-in;
    pointer-events: none;
}

/* Global App Loading Spinner */
#app-global-loader {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: rgba(0,0,0,0.7);
    padding: 15px 25px;
    border-radius: 30px;
    color: white;
    font-weight: bold;
    font-size: 0.9em;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    backdrop-filter: blur(5px);
}

/* ------------------------------------------------------------------- */
/* 2. AUTHENTICATION PAGES (Login/Register - index.php)                */
/* ------------------------------------------------------------------- */
body.auth-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    /* Fancy Dark/Neon Background matching the SUPER 90 logo */
    background-color: #0b132b; /* Deep dark blue */
    background-image: radial-gradient(rgba(50, 255, 126, 0.15) 2px, transparent 2px); /* Subtle neon green dots */
    background-size: 30px 30px;
    padding: 20px 0;
}

.auth-container { 
    width: 100%; 
    padding: 15px; 
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Increased Logo Styles */
.auth-logo {
    margin-bottom: 25px;
    text-align: center;
}
.auth-logo img {
    width: 180px; /* INCREASED SIZE */
    height: 180px;
    object-fit: contain;
    border-radius: 36px; /* Smooth rounded corners matching your app icon */
    /* Deep shadow + subtle neon green glow behind the logo */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(50, 255, 126, 0.15); 
}

.auth-container .form-wrapper {
    background: #ffffff;
    padding: 30px 25px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); /* Stronger shadow on dark background */
    width: 100%;
    max-width: 420px; /* Keeps form looking nice on tablets/desktop */
}

.auth-title {
    text-align: center;
    color: #162241; /* Darker blue matching the logo */
    margin-bottom: 20px;
    font-size: 1.6em;
    font-weight: 800;
}

.form-toggle-link { text-align: center; margin-top: 15px; font-size: 0.95em; color: #555;}
.form-toggle-link a { color: #8a2be2; text-decoration: none; font-weight: 700; transition: color 0.2s; } /* Purple link to match logo */
.form-toggle-link a:hover { color: #6a1b9a; }

/* ------------------------------------------------------------------- */
/* 3. APP HEADER & NAVIGATION                                          */
/* ------------------------------------------------------------------- */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #2979FF; 
    color: #fff;
    padding: 8px 12px;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center; 
    min-height: 65px; /* Optimized height for mobile */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transform: translateZ(0); /* Hardware accelerate fixed header */
}
.header-user-info { display: flex; flex-direction: column; }
.header-user-info .user-fullname { font-size: 1.05em; font-weight: bold; }
.header-user-info .user-username, .header-user-info .user-phone { font-size: 0.8em; opacity: 0.9; }

.header-right-section { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.header-wallet { display: flex; align-items: center; gap: 6px; }
.header-wallet .wallet-icon {
    width: 20px; height: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="%23FFD700" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512z"/><path fill="%23FFC107" d="M256 64a192 192 0 1 0 0 384 192 192 0 1 0 0-384z"/></svg>');
    background-size: contain; background-repeat: no-repeat;
}
.header-wallet .wallet-balance { font-size: 1.25em; font-weight: bold; }

.help-link {
    color: #D32F2F; background: #ffffff; text-decoration: none; font-weight: bold;
    font-size: 0.75em; padding: 4px 10px; border-radius: 4px; text-transform: uppercase;
    border: 1px solid #D32F2F; transition: 0.2s;
}
.help-link:active { transform: scale(0.95); }

.announcement-bar {
    padding: 8px 12px; background-color: #1565C0; color: white; text-align: center;
    font-size: 0.85em; position: fixed; top: 65px; width: 100%; z-index: 99; min-height: 35px;
    transform: translateZ(0);
}

.app-footer {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 60px; /* Slimmer footer */
    display: flex; justify-content: space-around; align-items: stretch;
    background-color: #263238; box-shadow: 0 -2px 10px rgba(0,0,0,0.2); z-index: 100;
    transform: translateZ(0); /* Hardware accelerate fixed footer */
}
.footer-link {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    flex-basis: 20%; text-decoration: none; color: #90A4AE; transition: all 0.2s; padding: 5px 0;
}
.footer-link .footer-icon { font-size: 1.2em; margin-bottom: 2px; }
.footer-link .footer-text { font-size: 0.6em; font-weight: bold; text-transform: uppercase; white-space: nowrap; }
.footer-link.active { color: #fff; background-color: #2979FF; }

/* ------------------------------------------------------------------- */
/* 4. COMMON COMPONENTS (Cards, Buttons, Tables, Alerts, Modals)       */
/* ------------------------------------------------------------------- */
.page-title { font-size: 1.4em; font-weight: 700; color: #333; margin-bottom: 12px; }
.card { background: #fff; border: 1px solid #e0e0e0; border-radius: 10px; padding: 12px; margin-bottom: 12px; box-shadow: 0 2px 4px rgba(0,0,0,0.03); }

.btn { display: inline-block; width: 100%; padding: 12px; background: #1a73e8; color: #fff; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; transition: 0.2s; text-align: center; text-decoration: none; font-size: 1em; }
.btn:active { background-color: #155ab6; transform: scale(0.96); } /* Enhanced native press effect */
.btn-primary { background-color: #007bff; color: white; }
.btn-disabled { background-color: #6c757d; color: #fff; cursor: not-allowed; pointer-events: none; }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.95em; color: #444; }
.form-control { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 8px; font-size: 15px; transition: border-color 0.2s; }
.form-control:focus { border-color: #8a2be2; outline: none; box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.1); } /* Focus color matches purple from logo */

.table-container { overflow-x: auto; border-radius: 8px; background: #fff;}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px; border-bottom: 1px solid #eee; text-align: left; font-size: 0.85em; }
th { background-color: #f8f9fa; font-weight: 600; }

.alert { padding: 12px; margin-bottom: 15px; border-radius: 8px; font-size: 0.9em; font-weight: 500;}
.alert.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }

.status-badge { padding: 3px 6px; border-radius: 10px; font-size: 0.7em; color: #fff; font-weight: bold; text-transform: uppercase; }
.status-completed, .status-won, .status-active { background-color: #28a745; }
.status-pending { background-color: #ffc107; color: #333; }
.status-failed, .status-lost, .status-blocked { background-color: #dc3545; }
.status-open { color: #28a745; font-weight: bold; }
.status-closed { color: #dc3545; font-weight: bold; }

/* Modals */
.modal { display: none; position: fixed; z-index: 1001; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); }
.modal-content { background-color: #fff; margin: 20% auto; width: 92%; max-width: 400px; border-radius: 12px; overflow: hidden; position: relative; animation: slideDown 0.3s ease; }
@keyframes slideDown { from {transform: translateY(-20px); opacity: 0;} to {transform: translateY(0); opacity: 1;} }
.modal-header { padding: 12px 15px; background: #007bff; color: #fff; display: flex; justify-content: space-between; align-items: center; }
.modal-header h2 { font-size: 1.1em; margin: 0; }
.close-button { font-size: 22px; cursor: pointer; color: #fff; line-height: 1; }
.modal-form { padding: 15px; }

/* ------------------------------------------------------------------- */
/* 5. HOME PAGE SPECIFIC                                               */
/* ------------------------------------------------------------------- */
.home-page-container { padding: 0 !important; }
.featured-result-box {
    width: 100%; margin: 0 0 15px 0; background: #ffffff;
    border-radius: 12px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); border: 1px solid #e0e0e0;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 20px 15px; text-align: center;
}
.featured-result-box .result-time { font-size: 1.1em; color: #555; }
.featured-result-box .market-name { font-size: 1.6em; font-weight: 700; color: #2979FF; line-height: 1.2; margin: 5px 0; }
.featured-result-box .winning-number { font-size: 4em; font-weight: 800; color: #2979FF; line-height: 1; }

.helpline-text { text-align: center; color: #D32F2F; font-weight: bold; margin: 0 0 15px 0; font-size: 1em; }

/* VERTICAL CURVED RESULTS LIST */
.vertical-results-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 5px 0 25px 0;
    
    /* Hidden Slider logic */
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}
.vertical-results-wrapper::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

/* Curved Rectangles */
.market-list-card {
    background: #ffffff;
    border-radius: 16px; 
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

/* Subtle colored accent lines on the edges */
.market-list-card::before { content: ''; position: absolute; left: 0; top: 0; width: 4px; height: 100%; background: #D32F2F; border-radius: 16px 0 0 16px; }
.market-list-card::after { content: ''; position: absolute; right: 0; top: 0; width: 4px; height: 100%; background: #28a745; border-radius: 0 16px 16px 0; }

.result-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}
.result-box .res-num {
    font-size: 1.8em;
    font-weight: 800;
    line-height: 1;
    color: #333;
}
.result-box.curr-result .res-num { color: #28a745; } /* Green for Right Side (Current Date) */
.result-box.prev-result .res-num { color: #D32F2F; } /* Red for Left Side (Previous Date) */

/* Date Labels Styling */
.result-box .res-label {
    font-size: 0.75em;
    font-weight: 700;
    color: #666;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}

.market-center-info {
    flex-grow: 1;
    text-align: center;
    padding: 0 10px;
}
.market-center-info .market-name {
    font-size: 1.15em;
    font-weight: 800;
    color: #1a73e8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
    line-height: 1.1;
}
.market-center-info .market-time {
    font-size: 0.85em;
    color: #666;
    font-weight: 600;
}

/* FLOATING REFRESH ICON */
.floating-refresh {
    position: fixed;
    bottom: 85px; /* Sits right above the bottom navigation bar */
    right: 20px;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #2979FF, #1565C0);
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4em;
    box-shadow: 0 5px 15px rgba(41, 121, 255, 0.4);
    z-index: 1000;
    text-decoration: none;
    transition: transform 0.2s;
}
.floating-refresh:active {
    transform: scale(0.9);
}

/* ------------------------------------------------------------------- */
/* 6. ACCOUNT PAGE SPECIFIC                                            */
/* ------------------------------------------------------------------- */
.balance-display {
    background: #fff; padding: 20px; border-radius: 12px; text-align: center;
    margin-bottom: 15px; border: 1px solid #e0e0e0; box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.balance-display h3 { margin-bottom: 5px; color: #666; font-size: 0.9em; text-transform: uppercase; }
.main-balance-amount { font-size: 2.2em; font-weight: 800; color: #2979FF; margin: 0; line-height: 1.1; }
.wallet-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 15px; }
.wallet-actions .btn { padding: 12px; font-size: 1em; text-transform: uppercase; letter-spacing: 0.5px; }
.type-debit { color: #dc3545; font-weight: bold; }
.type-credit { color: #28a745; font-weight: bold; }

/* ------------------------------------------------------------------- */
/* 7. PLAY & BETTING PAGE SPECIFIC                                     */
/* ------------------------------------------------------------------- */
.market-list { display: flex; flex-direction: column; gap: 10px; }
.market-list .card { display: flex; flex-direction: column; align-items: flex-start; padding: 15px; }
.market-time { color: #666; font-size: 0.85em; margin-bottom: 5px; }
.play-now-btn { display: inline-block; background-color: #1a73e8; color: #fff; text-decoration: none; padding: 8px 16px; border-radius: 6px; font-weight: bold; margin-top: 8px; align-self: flex-end; font-size: 0.9em; }
.play-now-btn.disabled { background-color: #e0e0e0; color: #999; cursor: not-allowed; }

.betting-tabs { list-style: none; display: flex; background: #fff; border-bottom: 1px solid #ddd; margin-bottom: 15px; padding: 0; border-radius: 8px 8px 0 0; }
.betting-tabs li { padding: 10px 5px; cursor: pointer; flex-grow: 1; text-align: center; border-bottom: 3px solid transparent; font-weight: 500; font-size: 0.85em; }
.betting-tabs li.active { color: #2979FF; border-bottom-color: #2979FF; font-weight: bold; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Extremely optimized grid to fit 10 items horizontally on small devices */
.jantri-grid-row { display: grid; grid-template-columns: repeat(10, 1fr); gap: 1px; background: #ddd; border: 1px solid #ccc; padding: 1px; border-radius: 6px; margin-bottom: 12px;}
.jantri-item-app { background: #fff; padding: 3px 1px; text-align: center; border-radius: 2px;}
.jantri-item-app label { display: block; font-size: 10px; font-weight: 800; color: #222; margin-bottom: 2px; }
.jantri-item-app input { width: 100%; border: none; background: #f0f4ff; text-align: center; font-size: 11px; font-weight: bold; color: #2979FF; outline: none; padding: 4px 0; border-radius: 2px; }
.jantri-item-app input:focus { background: #e3ebff; }
.section-header { font-weight: bold; color: #2979FF; margin: 12px 0 6px 0; border-left: 4px solid #2979FF; padding-left: 8px; font-size: 0.9em; }
.remove-btn { color: #dc3545; cursor: pointer; font-weight: bold; font-size: 18px; padding: 5px; }

/* Total Bet floats directly above the app footer smoothly */
.total-bet-container { margin-top: 15px; padding: 12px 15px; background: #263238; color: white; border-radius: 10px; display: flex; justify-content: space-between; align-items: center; font-size: 1em; font-weight: bold; position: sticky; bottom: 70px; z-index: 90; box-shadow: 0 -2px 10px rgba(0,0,0,0.15); transform: translateZ(0); }
.total-bet-container .btn { width: auto; background: #FFC107; color: #000; padding: 8px 16px; margin: 0; font-size: 0.9em; border-radius: 6px; }

/* ------------------------------------------------------------------- */
/* 8. MORE MENU SPECIFIC                                               */
/* ------------------------------------------------------------------- */
.more-container { padding: 0; }
.more-menu-list { list-style: none; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid #eee; }
.more-item { border-bottom: 1px solid #f0f0f0; }
.more-item:last-child { border-bottom: none; }
.more-link { display: flex; align-items: center; padding: 14px 15px; text-decoration: none; color: #333; transition: background 0.2s; }
.more-link:active { background-color: #f9f9f9; }
.menu-icon-box { width: 32px; height: 32px; background-color: #f0f4ff; color: #2979FF; border-radius: 8px; display: flex; justify-content: center; align-items: center; margin-right: 12px; font-size: 1em; }
.menu-text { flex-grow: 1; font-weight: 500; font-size: 0.95em; }
.menu-arrow { color: #ccc; font-size: 0.9em; }
.logout-item .menu-icon-box { background-color: #FFF0F0; color: #D32F2F; }
.logout-item .menu-text { color: #D32F2F; }

/* /* ------------------------------------------------------------------- */
/* 9. HARF GAME SPECIFIC (FIXED NO-SCROLL LAYOUT)                      */
/* ------------------------------------------------------------------- */
.harf-container {
    background-color: #0d1117; 
    color: white; 
    text-align: center; 
    
    /* --- NATIVE APP FIX: Locks exactly to available screen space --- */
    position: relative; 
    width: 100%;
    /* 100vh minus Header(110px) minus Footer(75px) minus margins = perfect fit */
    height: calc(100vh - 195px); 
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Spreads internal items evenly */
    overflow: hidden; /* STRICTLY NO SCROLLING */
    
    border-radius: 12px; 
    padding: 10px 5px; /* Tighter padding */
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5), 0 4px 15px rgba(0,0,0,0.1);
}

.harf-close-btn { 
    display: none; /* Hidden - bottom nav is used to exit */
}

/* --- PREMIUM FANCY WHEEL CSS (DYNAMICALLY SCALED) --- */
.wheel-wrapper { 
    position: relative; 
    /* Uses Viewport Height (vh) to automatically shrink on small phones */
    height: 30vh; 
    width: 30vh; 
    max-width: 240px; /* Prevents it from getting too big on large phones */
    max-height: 240px;
    min-width: 160px; /* Prevents it from getting too small */
    min-height: 160px;
    margin: 5px auto; 
    flex-shrink: 0; /* Prevents the wheel from squishing into an oval */
}

/* 3D Bouncing Pointer (Scaled down) */
.wheel-pointer {
    position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
    z-index: 10; color: #ffd700; font-size: 38px;
    text-shadow: 0 5px 8px rgba(0,0,0,0.9), 0 -2px 2px rgba(255,255,255,0.4);
    animation: pointer-bounce 0.6s ease-in-out infinite alternate;
}
@keyframes pointer-bounce {
    0% { transform: translateX(-50%) translateY(0); }
    100% { transform: translateX(-50%) translateY(5px); }
}

/* Main Wheel */
.wheel {
    width: 100%; height: 100%; border-radius: 50%; 
    border: 10px solid #d4af37;
    border-top-color: #ffe55c; border-right-color: #aa8115;
    border-bottom-color: #694f08; border-left-color: #e0c266;
    box-shadow: 0 10px 25px rgba(0,0,0,0.8), inset 0 0 35px rgba(0,0,0,0.9);
    position: relative; overflow: hidden;
    background: 
        repeating-conic-gradient(from 17deg, #d4af37 0deg 2deg, transparent 2deg 36deg),
        conic-gradient(from -18deg,
            #900000 0deg 36deg, #151515 36deg 72deg,
            #900000 72deg 108deg, #151515 108deg 144deg,
            #900000 144deg 180deg, #151515 180deg 216deg,
            #900000 216deg 252deg, #151515 252deg 288deg,
            #900000 288deg 324deg, #151515 324deg 360deg
        );
    transition: transform 3s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.wheel-segment {
    position: absolute; width: 100%; height: 100%;
    text-align: center; transform-origin: 50% 50%;
}

/* Embossed 3D Numbers (Scaled down) */
.wheel-segment span {
    display: inline-block; padding-top: 10px; 
    font-family: 'Arial Black', Impact, sans-serif;
    font-size: 20px; font-weight: 900; color: #ffffff;
    text-shadow: 2px 2px 0px #000, -1px -1px 0px rgba(255,255,255,0.3), 0 5px 6px rgba(0,0,0,0.8);
}

/* 3D Center Hub (Scaled down) */
.wheel-center-circle {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 45px; height: 45px;
    background: radial-gradient(circle at 30% 30%, #ffd700, #b8860b, #5a4005);
    border-radius: 50%; border: 2px solid #111; z-index: 5;
    box-shadow: 0 5px 15px rgba(0,0,0,0.9), inset 0 0 10px rgba(255,255,255,0.5);
}
.wheel-center-circle::after {
    content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 16px; height: 16px; border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ff4d4d, #8b0000);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.6), 0 3px 6px rgba(0,0,0,0.8);
    border: 2px solid #5a4005;
}

.wheel.spinning { animation: spin-continuous 1.2s linear infinite; }
@keyframes spin-continuous { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
/* --- END PREMIUM WHEEL CSS --- */

/* Rest of Game Layout styles (Tighter spacing to fit everything) */
.info-bar { display: flex; justify-content: space-between; padding: 2px 10px; gap: 8px; }
.gold-box-container { flex: 1; }
.gold-label { color: white; font-size: 10px; margin-bottom: 2px; display: block; text-transform: uppercase; letter-spacing: 0.5px; }
.gold-box {
    background: linear-gradient(to bottom, #ffd700, #b8860b);
    color: black; font-weight: bold; padding: 4px;
    border-radius: 4px; border: 1px solid #fff; font-size: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.timer-result-row { display: flex; justify-content: space-between; padding: 2px 10px; font-size: 0.85em; }

.bet-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 5px 10px; }
.bet-item { text-align: center; }
.bet-number-label { font-size: 16px; font-weight: bold; margin-bottom: 2px; display: block; color: #ffd700; text-shadow: 0 1px 3px #000; }
.bet-input { 
    width: 100%; padding: 6px 2px; border-radius: 4px; border: 1px solid #333; 
    background: #1c2128; color: white; text-align: center; font-size: 13px; box-shadow: inset 0 2px 4px rgba(0,0,0,0.6);
}
.bet-input:focus { border-color: #ffd700; outline: none; }

.action-bar { display: flex; justify-content: space-between; padding: 5px 10px; align-items: center; margin-bottom: 0; }
.total-bet-box {
    background: linear-gradient(to right, #d32f2f, #b71c1c);
    color: white; padding: 8px 12px; border-radius: 20px; border: 1px solid #ffd700; font-weight: bold; font-size: 0.9em;
    box-shadow: 0 3px 8px rgba(0,0,0,0.6);
}
.bet-ok-btn {
    background: linear-gradient(to right, #c62828, #ff0000);
    color: white; padding: 8px 20px; border-radius: 20px; border: 1px solid #ffd700; font-weight: bold; font-size: 14px; 
    cursor: pointer; transition: transform 0.1s, box-shadow 0.1s; box-shadow: 0 3px 8px rgba(0,0,0,0.6);
}
.bet-ok-btn:active { transform: scale(0.95); box-shadow: 0 1px 3px rgba(0,0,0,0.6); }

.loading-overlay { display:none; position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); background:rgba(0,0,0,0.85); color:white; padding:15px; border-radius:12px; border:1px solid gold; z-index:9999; text-align: center; box-shadow: 0 10px 25px rgba(0,0,0,0.8);}
/* =================================================================== */
/*                     MINI GAMES GRID STYLES                          */
/* =================================================================== */

.mg-container {
    padding: 10px 5px;
}

/* Grid: 2 columns in a row */
.mg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

/* Individual Card */
.mg-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

/* 1. Name Above the Box */
.mg-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: #333;
    margin-bottom: 8px;
    text-transform: uppercase;
    text-align: center;
}

/* 2. Curved Square Box */
.mg-image-box {
    width: 100%;
    aspect-ratio: 1 / 1; /* Makes it a perfect square */
    background-color: #ffffff;
    border-radius: 20px; /* Curved corners */
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    transition: transform 0.1s ease;
}

.mg-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Prevents stretching */
}

/* Native Tap Feel for Box */
.mg-image-box:active {
    transform: scale(0.96);
}

/* 3. Button Downside the Box */
.mg-play-btn {
    width: 90%;
    padding: 8px 0;
    background: linear-gradient(135deg, #2979FF, #1565C0);
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 3px 6px rgba(41, 121, 255, 0.3);
}

.mg-play-btn:active {
    transform: scale(0.94);
    background: #0d47a1;
}

/* Locked Game State */
.mg-locked {
    opacity: 0.7;
}
.mg-locked .mg-play-btn {
    background: #9ea7ad;
    box-shadow: none;
}