        :root {
            --primary: #1e2f46;
            --accent: #dc3545; /* Red */
            --secondary: #f8f9fa;
            --text-dark: #333;
            --green: #28a745;
            --blue: #007bff;
            --warning-bg: #fff3cd;
            --warning-text: #856404;
            --light-gray: #e9ecef;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Poppins', sans-serif;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            background-color: #f5f6f8;
            padding-bottom: 80px; /* Space for floating button */
        }

        .top-offer-bar {
            background-color: #ff0000;
            color: #fff;
            text-align: center;
            padding: 5px 0;
            font-size: 12px;
            font-weight: 800;
            letter-spacing: 1px;
            border-bottom: 2px solid #fff;
        }

        /* --- HEADER --- */
        header {
            position: sticky;
            top: 0;
            background: white;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 15px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.05);
            z-index: 100;
        }

        .header-left { display: flex; align-items: center; gap: 15px; }
        .menu-btn { font-size: 24px; cursor: pointer; border: none; background: none; }

        .logo {
            font-weight: 800;
            font-size: 20px;
            color: var(--primary);
            display: flex;
            flex-direction: column;
            line-height: 1;
        }

        .header-right { display: flex; align-items: center; gap: 10px; }
        .wallet-pill {
            border: 1px solid #ddd;
            padding: 5px 12px;
            border-radius: 5px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 14px;
            cursor: pointer;
        }
        .wallet-icon { color: green; }

        /* --- SIDEBAR --- */
        .sidebar-overlay {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 998;
            display: none;
        }
        .sidebar {
            position: fixed;
            top: 0; left: 0;
            height: 100%;
            width: 280px;
            background: white;
            z-index: 999;
            transform: translateX(-100%);
            transition: 0.3s ease;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
        }
        .sidebar.active { transform: translateX(0); }
        
        .sidebar-header {
            padding: 20px;
            background: #fff;
            border-bottom: 1px solid #eee;
            display: flex;
            align-items: center;
            gap: 15px;
        }
        .user-avatar-lg {
            width: 50px; height: 50px;
            background: #ddd;
            border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            font-size: 24px;
        }
        
        .menu-items { list-style: none; padding: 10px 0; }
        .menu-items li {
            padding: 15px 25px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            font-size: 16px;
            color: var(--text-dark);
        }
        .menu-items li:hover { background: #f8f9fa; }

        /* --- COMMON COMPONENTS --- */
        .container { padding: 15px; }
        
        .card {
            background: white;
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 15px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.03);
        }

        .kyc-banner {
            background: #f8d7da;
            color: #721c24;
            padding: 10px 15px;
            border-radius: 8px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            border: 1px solid #f5c6cb;
        }
        .btn-red {
            background: var(--accent);
            color: white;
            border: none;
            padding: 5px 15px;
            border-radius: 4px;
            font-size: 12px;
            cursor: pointer;
        }

        .notice-banner {
            background: var(--warning-bg);
            color: var(--warning-text);
            padding: 10px;
            border-radius: 8px;
            font-size: 12px;
            display: flex;
            gap: 10px;
            line-height: 1.4;
            margin-bottom: 15px;
            border: 1px solid #ffeeba;
        }

        /* --- HOME PAGE --- */
        .section-title {
            font-size: 22px;
            font-weight: 600;
            margin-bottom: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .btn-outline {
            border: 1px solid var(--primary);
            background: none;
            padding: 5px 15px;
            border-radius: 5px;
            font-size: 14px;
        }

        .game-card {
            background: var(--primary);
            border-radius: 10px;
            overflow: hidden;
            position: relative;
            text-align: center;
            cursor: pointer;
        }
        .game-footer {
            background: #0a1520;
            color: white;
            padding: 8px;
            font-size: 12px;
        }

        /* NEW FEATURE: CSS for Game Images */
        .game-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .game-footer {
            background: #0a1520;
            color: white;
            padding: 8px;
            font-size: 12px;
        }

        /* --- BATTLES LIST --- */
        .battle-input-group {
            display: flex;
            gap: 0;
            width: 100%;
            margin-bottom: 20px;
            border-radius: 5px;
            overflow: hidden;
            border: 1px solid #ddd;
        }
        .battle-input-group input {
            flex: 1;
            padding: 12px;
            border: none;
            outline: none;
        }
        .battle-input-group button {
            background: #181825;
            color: white;
            border: none;
            padding: 0 30px;
            font-weight: 600;
        }

        .section-header {
            text-align: center;
            margin-bottom: 15px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        .battle-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 0;
            border-bottom: 1px solid #eee;
        }
        .battle-row:last-child { border-bottom: none; }
        
        .player-info {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 14px;
            font-weight: 500;
        }
        .avatar-sm { width: 30px; height: 30px; border-radius: 50%; }
        .btn-play {
            background: var(--blue);
            color: white;
            border: none;
            padding: 6px 20px;
            border-radius: 4px;
            font-size: 13px;
            cursor: pointer;
        }

        /* Modal Styles */
        .modal-overlay {
            position: fixed; 
            top: 0; 
            left: 0; 
            width: 100%; 
            height: 100%;
            background: rgba(0,0,0,0.8); 
            z-index: 2000;
            display: none; 
            align-items: center; 
            justify-content: center;
        }
        .modal-content {
            width: 90%; 
            max-width: 400px; 
            background: white; 
            padding: 20px;
            border-radius: 10px; 
            position: relative;
        }
        .close-modal {
            position: absolute;
            top: 10px;
            right: 15px;
            font-size: 20px;
            cursor: pointer;
        }

        /* --- WALLET & DEPOSIT PAGE --- */
        .wallet-header { display: flex; justify-content: space-between; margin-bottom: 15px; }
        .btn-back {
            background: var(--primary);
            color: white;
            padding: 8px 15px;
            border-radius: 5px;
            border: none;
            font-size: 14px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        .btn-history {
            border: 1px solid var(--primary);
            background: white;
            padding: 8px 15px;
            border-radius: 5px;
            font-size: 14px;
            cursor: pointer;
        }

        .balance-card { text-align: center; padding: 20px; }
        .balance-title { font-size: 14px; color: #666; margin-bottom: 5px; }
        .balance-amount { font-size: 28px; font-weight: 700; margin-bottom: 15px; }
        .btn-full {
            width: 100%;
            padding: 12px;
            border-radius: 5px;
            border: none;
            color: white;
            font-weight: 600;
            font-size: 16px;
            cursor: pointer;
        }
        .bg-dark { background: #181825; }
        .bg-blue { background: var(--primary); }
        .bg-green { background: var(--green); }

        /* --- ADDED STYLES FOR PROFILE, FORMS & STATS --- */
        .profile-header { text-align: center; margin-bottom: 20px; }
        .profile-pic-container { position: relative; width: 80px; height: 80px; margin: 0 auto 10px; }
        .profile-pic { width: 100%; height: 100%; border-radius: 50%; border: 3px solid white; box-shadow: 0 2px 5px rgba(0,0,0,0.2); object-fit: cover; }
        .edit-icon { position: absolute; bottom: 0; right: 0; background: #333; color: white; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; display: flex; align-items: center; justify-content: center; }
        
        .stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
        .stat-box { background: white; padding: 15px; border-radius: 8px; border: 1px solid #eee; }
        .stat-label { font-size: 13px; color: #666; background: #aaaaaa13; margin-bottom: 5px; display: flex; gap: 5px; align-items: center;}
        .stat-value { font-size: 18px; font-weight: 700; }

        .form-group { margin-bottom: 15px; }
        .form-label { display: block; margin-bottom: 5px; font-size: 14px; font-weight: 500; }
        .form-control { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 5px; font-size: 14px; }
        
        .refer-img { width: 100%; max-width: 250px; display: block; margin: 0 auto 20px; }
        .copy-box { background: #e9ecef; padding: 10px; border-radius: 5px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
        .social-btns { display: flex; flex-direction: column; gap: 10px; }
        .btn-social { border: none; padding: 10px; color: white; border-radius: 5px; cursor: pointer; font-weight: 500; }

        /* --- FLOATING BUTTON --- */
        .fab {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: #2ca5e0;
            width: 50px; height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 24px;
            box-shadow: 0 4px 10px rgba(0,0,0,0.2);
            cursor: pointer;
            z-index: 90;
        }

        /* Helpers to toggle views */
        .view-section { display: none; }
        .view-section.active { display: block; animation: fadeIn 0.3s; }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* NEW FEATURE: QR Code Section Styles */
        .qr-container {
            text-align: center;
            padding: 20px;
            border: 2px dashed #ccc;
            margin: 15px 0;
            display: none; /* Hidden initially */
        }
        .qr-image {
            width: 200px;
            height: 200px;
            margin-bottom: 10px;
        }

        /* NEW FEATURE: Game Room Styles */
        .room-code-display {
            background: #e8f5e9;
            border: 1px dashed green;
            color: green;
            padding: 15px;
            font-size: 20px;
            font-weight: 800;
            text-align: center;
            margin: 15px 0;
            letter-spacing: 2px;
        }

        /* NEW FEATURE: Text Content Pages */
        .text-content-box p { font-size: 13px; color: #333; line-height: 1.6; margin-bottom: 10px; }
        .text-content-box ul { padding-left: 20px; font-size: 13px; line-height: 1.6; }
        .text-content-box li { margin-bottom: 8px; }
        
        /* Floating Button */
        .fab { position: fixed; bottom: 20px; right: 20px; background: #2ca5e0; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 24px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); cursor: pointer; z-index: 90; }

        /* DARK MODE */
        .dark-mode {
            background-color: #0d1117 !important;
            color: #ffffff !important;
        }

        /* Make all cards dark */
        .dark-mode .card {
            background: #161b22 !important;
            color: #fff !important;
        }

        /* Header dark */
        .dark-mode header {
            background: #161b22 !important;
        }

        /* Sidebar dark */
        .dark-mode .sidebar {
            background: #161b22 !important;
        }

        .dark-mode .menu-items li {
            color: #fff !important;
        }

        .dark-mode .wallet-pill {
            background:#222 !important;
            color:#fff !important;
        }

        /* Sun/Moon icon auto change */
        .dark-mode #themeToggle {
            color: #fff !important;
        }

        .theme-toggle {
            width: 45px;
            height: 22px;
            background: #a7a3a3;
            border-radius: 25px;
            display: flex;
            align-items: center;
            padding: 3px;
            cursor: pointer;
            transition: 0.3s ease-in-out;
        }

        .theme-toggle i {
            width: 18px;
            height: 18px;
            background: #f7c948; /* Sun yellow */
            color: white;
            border-radius: 50%;
            font-size: 11px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: 0.3s;
        }
           
        /* MOVE icon right in DARK MODE */
        .dark-mode .theme-toggle i {
            transform: translateX(22px);
            background: #444;      /* moon background */
            color: #fff;
        }

        :root { --primary: #1e2f46; --green: #28a745; }
        body { font-family: 'Poppins', sans-serif; background-color: #f5f6f8; margin: 0; padding-bottom: 80px; }
        .view-section { display: none; padding: 15px; }
        .view-section.active { display: block; }
        .loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: white; z-index: 9999; display: flex; justify-content: center; align-items: center; }

        /* Admin Table */
/* Enhanced Admin Table Styles */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.admin-table th, .admin-table td {
    border: 1px solid #eee;
    padding: 10px;
    text-align: center;
    vertical-align: middle;
}

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.action-btn-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.btn-mini {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
}

/* Screenshot Preview Styles */
.screenshot-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid #ddd;
    transition: transform 0.2s;
}

.screenshot-thumbnail:hover {
    transform: scale(1.1);
}

/* Loading Spinner */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
        /* Battle Cards */
        .battle-card { 
            background: white; 
            border-radius: 8px; 
            padding: 15px; 
            margin-bottom: 15px; 
            box-shadow: 0 2px 8px rgba(0,0,0,0.03); 
            display: flex; 
            justify-content: space-between; 
            align-items: center;
        }
