 /* Reset & Base */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }
        
        :root {
            --primary: #2E7D32;
            --primary-dark: #1B5E20;
            --secondary: #4CAF50;
            --accent: #FF9800;
            --danger: #FF4444;
            --white: #FFFFFF;
            --light-gray: #F5F5F5;
            --dark-gray: #666666;
            --text-dark: #1A1A1A;
            --card-bg: #FFFFFF;
            --shadow: 0 4px 12px rgba(0,0,0,0.08);
            --shadow-hover: 0 8px 20px rgba(0,0,0,0.12);
        }
        
        html {
            font-size: 14px;
        }
        
        body {
            font-family: 'Poppins', sans-serif;
            background: linear-gradient(135deg, #f8fff8 0%, #f0f9f0 100%);
            color: var(--text-dark);
            min-height: 100vh;
            padding-bottom: 70px;
            overflow-x: hidden;
            max-width: 500px;
            margin: 0 auto;
           
            box-shadow: 0 0 20px rgba(0,0,0,0.1);
            
        }
        
        /* Header - Fixed with Navigation Menu */
        .app-header {
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: var(--shadow);
        }
        
        .header-top {
            padding: 15px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        
        .logo-container {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .app-logo {
            width: 45px;
            height: 45px;
            background: var(--white);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 800;
            font-size: 1.3rem;
            color: var(--primary);
            box-shadow: var(--shadow);
        }
        
        .app-title h1 {
            font-size: 1.5rem;
            font-weight: 800;
            line-height: 1.2;
            color: var(--white);
        }
        
        .app-title .subtitle {
            font-size: 0.8rem;
            opacity: 0.9;
            font-weight: 500;
            color: var(--light-gray);
        }
        
        .wallet-balance {
            background: rgba(255, 255, 255, 0.2);
            padding: 8px 15px;
            border-radius: 25px;
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--white);
            font-weight: 600;
        }
        
        .wallet-balance i {
            color: var(--accent);
        }
        
        /* Navigation Menu */
        .nav-menu {
            display: flex;
            background: var(--white);
            border-bottom: 2px solid var(--light-gray);
            overflow-x: auto;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }
        
        .nav-menu::-webkit-scrollbar {
            display: none;
        }
        
        .nav-item {
            flex: 1;
            min-width: 80px;
            text-align: center;
            padding: 15px 10px;
            text-decoration: none;
            color: var(--dark-gray);
            font-weight: 500;
            font-size: 0.9rem;
            border-bottom: 3px solid transparent;
            transition: all 0.3s ease;
            white-space: nowrap;
        }
        
        .nav-item i {
            display: block;
            font-size: 1.2rem;
            margin-bottom: 5px;
            color: var(--dark-gray);
        }
        
        .nav-item.active {
            color: var(--primary);
            border-bottom-color: var(--primary);
            background: linear-gradient(to bottom, rgba(46, 125, 50, 0.1), transparent);
        }
        
        .nav-item.active i {
            color: var(--primary);
        }
        
        .nav-item:hover {
            background: var(--light-gray);
        }
        
        /* Main Container */
        .main-container {
            padding: 15px;
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        
        /* Referral Banner */
        .referral-banner {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            border-radius: 15px;
            padding: 18px;
            box-shadow: var(--shadow);
            position: relative;
            overflow: hidden;
        }
        
        .referral-banner::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -20%;
            width: 150px;
            height: 150px;
            background: rgba(255, 255, 255, 0.15);
            border-radius: 50%;
        }
        
        .referral-content {
            position: relative;
            z-index: 1;
        }
        
        .referral-title {
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 10px;
            color: var(--white);
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .referral-code {
            background: rgba(255, 255, 255, 0.2);
            padding: 10px 20px;
            border-radius: 25px;
            font-weight: 700;
            font-size: 1.2rem;
            letter-spacing: 1px;
            margin: 12px 0;
            display: inline-block;
            border: 2px dashed var(--white);
            color: var(--white);
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .referral-code:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: scale(1.05);
        }
        
        .user-referral {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-top: 12px;
        }
        
        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--white);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--primary);
            font-size: 1.3rem;
        }
        
        .user-info {
            flex: 1;
        }
        
        .user-name {
            font-weight: 600;
            color: var(--white);
            font-size: 0.95rem;
        }
        
        .user-details {
            font-size: 0.8rem;
            opacity: 0.9;
            color: var(--light-gray);
        }
        
        .share-btn {
            background: var(--white);
            color: var(--primary);
            border: none;
            padding: 8px 16px;
            border-radius: 20px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.9rem;
        }
        
        .share-btn:hover {
            background: var(--light-gray);
            transform: translateY(-2px);
        }
        
        /* Section Headers */
        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }
        
        .section-title {
            font-size: 1.2rem;
            font-weight: 700;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .section-title i {
            font-size: 1.1rem;
        }
        
        .view-all {
            color: var(--primary);
            text-decoration: none;
            font-size: 0.85rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 4px;
        }
        
        /* Top Winners Horizontal Scroll */
        .winners-scroll-container {
            position: relative;
            margin-bottom: 5px;
        }
        
        .winners-scroll {
            display: flex;
            overflow-x: auto;
            gap: 12px;
            padding: 12px 0;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }
        
        .winners-scroll::-webkit-scrollbar {
            display: none;
        }
        
        .winner-card-horizontal {
            flex: 0 0 auto;
            width: 160px;
            background: var(--white);
            border-radius: 12px;
            padding: 15px;
            box-shadow: var(--shadow);
            border: 2px solid rgba(46, 125, 50, 0.1);
            transition: all 0.3s ease;
        }
        
        .winner-card-horizontal:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-hover);
            border-color: rgba(46, 125, 50, 0.2);
        }
        
        .winner-rank {
            display: inline-block;
            background: var(--primary);
            color: var(--white);
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 0.9rem;
            margin-bottom: 10px;
        }
        
        .winner-name {
            font-size: 1rem;
            font-weight: 700;
            color: var(--text-dark);
            margin-bottom: 5px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .winner-game {
            color: var(--danger);
            font-weight: 600;
            font-size: 0.9rem;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .winner-game i {
            font-size: 0.8rem;
        }
        
        .winner-amount {
            font-size: 1.3rem;
            font-weight: 800;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .winner-amount i {
            font-size: 1rem;
            color: var(--accent);
        }
        
        /* Today's Result Cards */
        .results-container {
            background: var(--white);
            border-radius: 15px;
            padding: 18px;
            box-shadow: var(--shadow);
        }
        
        .results-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-top: 15px;
        }
        
        .result-card {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            border-radius: 12px;
            padding: 18px;
            text-align: center;
            color: var(--white);
            position: relative;
            overflow: hidden;
            transition: all 0.3s ease;
        }
        
        .result-card:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-hover);
        }
        
        .result-card:nth-child(2) {
            background: linear-gradient(135deg, #FF9800, #F57C00);
        }
        
        .result-card:nth-child(3) {
            background: linear-gradient(135deg, #2196F3, #1976D2);
        }
        
        .result-card:nth-child(4) {
            background: linear-gradient(135deg, #9C27B0, #7B1FA2);
        }
        
        .result-market {
            font-size: 0.85rem;
            opacity: 0.9;
            margin-bottom: 8px;
            font-weight: 500;
        }
        
        .result-number {
            font-size: 2.2rem;
            font-weight: 800;
            color: var(--white);
            text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
        }
        
        .result-time {
            font-size: 0.8rem;
            opacity: 0.8;
            margin-top: 5px;
        }
        
        /* Games Grid Section */
        .games-container {
            background: var(--white);
            border-radius: 15px;
            padding: 18px;
            box-shadow: var(--shadow);
        }
        
        .games-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-top: 15px;
        }
        
        .game-card {
            background: var(--white);
            border-radius: 12px;
            padding: 0px;
            border: 2px solid rgba(0,0,0,0.05);
            box-shadow: var(--shadow);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }
        
        .game-card:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-hover);
            border-color: rgba(46, 125, 50, 0.2);
        }
        
        .game-card.running {
            border-left: 4px solid var(--secondary);
        }
        
        .game-card.closed {
            border-left: 4px solid var(--dark-gray);
            opacity: 0.8;
        }
        
        .game-card.coming {
            border-left: 4px solid var(--accent);
        }
        
        .game-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 12px;
        }
        
        .game-name {
            font-size: 1rem;
            font-weight: 700;
            color: var(--text-dark);
        }
        
        .game-status {
            font-size: 0.75rem;
            font-weight: 600;
            padding: 4px 10px;
            border-radius: 20px;
            display: inline-block;
        }
        
        .status-running {
            background: rgba(76, 175, 80, 0.1);
            color: #4CAF50;
        }
        
        .status-closed {
            background: rgba(158, 158, 158, 0.1);
            color: #9E9E9E;
        }
        
        .status-coming {
            background: rgba(255, 152, 0, 0.1);
            color: #FF9800;
        }
        
        .game-times {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
            font-size: 0.85rem;
        }
        
        .time-item {
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        
        .time-label {
            color: var(--dark-gray);
            font-size: 0.75rem;
            margin-bottom: 4px;
        }
        
        .time-value {
            font-weight: 600;
            color: var(--text-dark);
        }
        
        .last-result {
            background: rgba(0,0,0,0.03);
            border-radius: 8px;
            padding: 10px;
            text-align: center;
            margin-bottom: 12px;
        }
        
        .result-label {
            font-size: 0.8rem;
            color: var(--dark-gray);
            margin-bottom: 5px;
        }
        
        .result-value {
            font-size: 1.4rem;
            font-weight: 800;
            color: var(--danger);
        }
        
        .game-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .game-timer {
            font-family: 'Courier New', monospace;
            font-weight: 700;
            font-size: 0.9rem;
            color: var(--danger);
            background: rgba(255, 68, 68, 0.1);
            padding: 5px 10px;
            border-radius: 8px;
        }
        
        .play-btn {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: var(--white);
            border: none;
            padding: 8px 20px;
            border-radius: 20px;
            font-weight: 700;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 6px;
            box-shadow: 0 4px 10px rgba(46, 125, 50, 0.2);
        }
        
        .play-btn:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(46, 125, 50, 0.3);
        }
        
        .play-btn:disabled {
            background: linear-gradient(135deg, #9E9E9E, #757575);
            cursor: not-allowed;
            opacity: 0.7;
            box-shadow: none;
        }
        
        /* Live Games Section */
        .live-games-container {
            background: var(--white);
            border-radius: 15px;
            padding: 18px;
            box-shadow: var(--shadow);
            border: 2px solid rgba(255, 68, 68, 0.1);
        }
        
        .live-games-container .section-title {
            color: var(--danger);
        }
        
        .live-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: rgba(255, 68, 68, 0.1);
            color: var(--danger);
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 600;
            margin-bottom: 15px;
        }
        
        .live-badge i {
            font-size: 0.6rem;
            animation: pulse 1.5s infinite;
        }
        
        @keyframes pulse {
            0% { opacity: 1; }
            50% { opacity: 0.5; }
            100% { opacity: 1; }
        }
        
        /* Bottom Navigation */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: var(--white);
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            padding: 12px 5px;
            border-top: 2px solid var(--primary);
            z-index: 100;
            max-width: 500px;
            margin: 0 auto;
            box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
        }
        
        .bottom-nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 8px 5px;
            text-decoration: none;
            color: var(--dark-gray);
            transition: all 0.3s ease;
            position: relative;
        }
        
        .bottom-nav-item.active {
            color: var(--primary);
        }
        
        .bottom-nav-item.active::before {
            content: '';
            position: absolute;
            top: -12px;
            width: 40px;
            height: 3px;
            background: var(--primary);
            border-radius: 0 0 5px 5px;
        }
        
        .bottom-nav-item i {
            font-size: 1.4rem;
            margin-bottom: 5px;
        }
        
        .bottom-nav-item span {
            font-size: 0.85rem;
            font-weight: 500;
        }
        
        .bottom-nav-item .badge {
            position: absolute;
            top: 5px;
            right: 20px;
            background: var(--danger);
            color: white;
            font-size: 0.7rem;
            padding: 2px 6px;
            border-radius: 10px;
            min-width: 18px;
            text-align: center;
        }
        
        /* Stats Cards */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
            margin-top: 15px;
        }
        
        .stat-card {
            background: var(--white);
            border-radius: 10px;
            padding: 12px;
            text-align: center;
            box-shadow: var(--shadow);
            border: 1px solid rgba(0,0,0,0.05);
        }
        
        .stat-icon {
            width: 35px;
            height: 35px;
            background: rgba(46, 125, 50, 0.1);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 8px;
            color: var(--primary);
            font-size: 1rem;
        }
        
        .stat-value {
            font-size: 1rem;
            font-weight: 700;
            color: var(--text-dark);
            margin-bottom: 4px;
        }
        
        .stat-label {
            font-size: 0.75rem;
            color: var(--dark-gray);
        }
        
        /* Responsive */
        @media (min-width: 768px) {
            body {
                margin: 20px auto;
                border-radius: 20px;
                /*overflow: hidden;*/
                height: 90vh;
                min-height: 800px;
            }
            
            .app-header {
                border-radius: 20px 20px 0 0;
            }
            
            .bottom-nav {
                border-radius: 0 0 20px 20px;
            }
        }
        
        @media (max-width: 380px) {
            .games-grid {
                grid-template-columns: 1fr;
            }
            
            .results-grid {
                grid-template-columns: 1fr;
            }
            
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }
        
        /* Scroll Indicators */
        .scroll-indicator {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(46, 125, 50, 0.9);
            color: white;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            cursor: pointer;
            z-index: 2;
        }
        
        /* Today's Results Horizontal Scroll */
.results-scroll-container {
    position: relative;
    margin-top: 10px;
}

.results-scroll {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 12px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.results-scroll::-webkit-scrollbar {
    display: none;
}

.result-card-horizontal {
    flex: 0 0 auto;
    width: 140px;
    background: var(--white);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.result-card-horizontal:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.result-card-horizontal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
}

/* Color variations for result cards */
.result-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.result-orange {
    background: linear-gradient(135deg, #FF9800, #F57C00);
}

.result-blue {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.result-purple {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
}

.result-red {
    background: linear-gradient(135deg, #FF4444, #CC0000);
}

.result-teal {
    background: linear-gradient(135deg, #009688, #00796B);
}

.result-pink {
    background: linear-gradient(135deg, #E91E63, #C2185B);
}

.result-brown {
    background: linear-gradient(135deg, #795548, #5D4037);
}

.result-card-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
}

.result-market {
    font-size: 1rem;
    font-weight: 700;
    opacity: 0.95;
}

.result-time {
    font-size: 0.8rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.result-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    margin: 10px 0;
    line-height: 1;
}

.result-status {
    font-size: 0.75rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 10px;
    border-radius: 15px;
    margin-top: 10px;
}

/* Scroll indicators for results */
.results-scroll-container::after {
    content: '→';
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(46, 125, 50, 0.9);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    pointer-events: none;
    opacity: 0.7;
    z-index: 2;
}

/* Animation for new results */
@keyframes newResult {
    0% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.new-result {
    animation: newResult 0.5s ease-out;
}

/* Result Card Badges */
.result-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #FF9800;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 10px;
    transform: rotate(15deg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.result-badge.new {
    background: #FF4444;
}

.result-badge.recent {
    background: #4CAF50;
}

/* Touch scroll improvements */
.results-scroll {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.result-card-horizontal {
    scroll-snap-align: start;
}

/* Small screen adjustments */
@media (max-width: 380px) {
    .result-card-horizontal {
        width: 130px;
        padding: 15px;
    }
    
    .result-number {
        font-size: 2.2rem;
    }
}

/* Loading animation for results */
.results-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.results-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--light-gray);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}