:root {
    --bg-dark: #1e1e1e; /* Flat Dark Grey */
    --bg-darker: #121212; /* Very Dark Background */
    --neon-green: #ffc107; /* Lotus Gold */
    --neon-green-glow: transparent;
    --neon-pink: #e53935; /* Standard Red */
    --neon-pink-glow: transparent;
    --accent-gold: #ffc107; /* Lotus Gold */
    --glass-bg: #2c2c2c; /* Solid Card Grey */
    --glass-border: transparent;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --danger: #e53935;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-darker);
    background-image: none; /* Flat background */
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Typography elements */
.section-title, .screen-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem;
    color: var(--text-primary);
}

/* App Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 2px solid var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
}

.logo-img {
    width: 140%;
    height: 140%;
    object-fit: cover;
    position: absolute;
    top: -20%;
    left: -20%;
}

.greeting {
    display: flex;
    flex-direction: column;
}

.greeting .hello {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.greeting .username {
    font-weight: 600;
    font-size: 0.95rem;
}

.header-wallet {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.4rem 0.6rem 0.4rem 0.8rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    cursor: pointer;
}

.header-wallet i.fa-wallet {
    color: var(--accent-gold);
}

.header-wallet .balance {
    font-weight: 700;
    font-family: 'Orbitron', monospace;
}

.header-wallet .add-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--neon-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--bg-darker);
}

/* Solid Panels */
.glass-panel {
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: none;
    border: none;
}

/* Main Container */
#app-container {
    flex: 1;
    padding: 0 1.25rem 5rem;
    overflow-y: auto;
}

.screen {
    display: none;
    animation: fadeIn 0.3s ease;
}

.active-screen {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cricket Live Widget */
.cricket-widget {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(145deg, rgba(30,41,59,0.9) 0%, rgba(15,23,42,0.9) 100%);
    border-top: 2px solid var(--neon-green);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.live-badge {
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.teams-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.team {
    text-align: center;
}

.team-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin: 0 auto 0.5rem;
    font-size: 0.9rem;
    color: white;
}

.team-logo.csk { background: #facc15; color: #1e1b4b; margin-left: 0; box-shadow: 0 0 10px rgba(250, 204, 21, 0.3);}
.team-logo.mi { background: #1d4ed8; margin-right: 0; box-shadow: 0 0 10px rgba(29, 78, 216, 0.3);}

.score {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
}
.score .overs {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
}

.vs {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 700;
}

.match-status {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--glass-border);
    padding-top: 0.5rem;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.game-card {
    height: 140px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    background: var(--glass-bg);
}

/* Softer Card Accents */
.game-card.cyber-chase { border-left: 6px solid var(--neon-green); }
.game-card.color-prediction { border-left: 6px solid #e53935; }

.game-content {
    position: absolute;
    bottom: 0; left: 0; right: 0; top: 0;
    padding: 1.5rem;
    z-index: 2;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.game-content h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.game-content p {
    font-size: 0.7rem;
    color: #cbd5e1;
    margin-bottom: 0.8rem;
}

.play-btn {
    background: var(--neon-green);
    color: #000; /* Black text on Gold */
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-transform: uppercase;
    box-shadow: none;
    transition: all 0.2s ease;
}

.play-btn:hover {
    background: #e4a800;
    transform: none;
}

/* Wallet Screen */
.wallet-card {
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(145deg, rgba(30,41,59,0.8), rgba(2,6,23,0.9));
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.wallet-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.wallet-amount {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-green);
    margin: 0.5rem 0;
    text-shadow: 0 0 20px var(--neon-green-glow);
}

.wallet-amount .pts {
    font-size: 1rem;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
}

.wallet-note {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.wallet-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-btn {
    flex: 1;
    padding: 1rem;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
}

.action-btn i {
    font-size: 1.25rem;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem;
    border-radius: 50%;
}

.action-btn:active {
    transform: scale(0.95);
}

.deposit-btn {
    background: linear-gradient(135deg, var(--neon-green), #059669);
    color: #fff;
    box-shadow: 0 4px 15px var(--neon-green-glow);
}

.withdraw-btn {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid var(--glass-border);
    padding-bottom: env(safe-area-inset-bottom); /* iOS support */
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 0.7rem;
    cursor: pointer;
    transition: color 0.3s;
    width: 60px;
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.nav-item.active {
    color: var(--neon-green);
}

.center-nav {
    position: relative;
    top: -20px;
}

.center-circle {
    width: 60px;
    height: 60px;
    background: var(--neon-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 5px solid var(--bg-darker);
    box-shadow: none;
    color: #000;
}

.center-circle i {
    font-size: 1.5rem;
    margin-bottom: 0;
    color: #000;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    background: var(--bg-dark);
    border-radius: 24px 24px 0 0;
    padding: 1.5rem;
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.hidden .modal-content {
    transform: translateY(100%);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-size: 1.3rem;
}

.close-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.quick-amounts {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.amt-chip {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.6rem 0;
    border-radius: 8px;
    font-weight: 600;
}

.amt-chip.active-chip {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--neon-green);
    color: var(--neon-green);
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.currency-prefix {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-secondary);
}

input[type="number"], input[type="text"] {
    width: 100%;
    padding: 1rem;
    padding-left: 2.5rem;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    outline: none;
}
input[type="text"] {
    padding-left: 1rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
}

input:focus {
    border-color: var(--neon-green);
}

.whatsapp-btn {
    width: 100%;
    padding: 1.2rem;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.crypto-note {
    font-size: 0.75rem !important;
    text-align: center;
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* =========================================
   COLOR PREDICTION GAME STYLES 
   ========================================= */

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.back-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    padding: 0.5rem;
}

.game-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.game-balance {
    font-family: 'Orbitron', monospace;
    color: var(--neon-green);
    font-weight: bold;
}

/* Timer Panel */
.timer-panel {
    display: flex;
    justify-content: space-between;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(145deg, rgba(30,41,59,0.9), rgba(15,23,42,0.9));
}

.period-info, .countdown {
    display: flex;
    flex-direction: column;
}

.countdown {
    align-items: flex-end;
}

.timer-panel .label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}

.period-number {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
}

.time-display {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green-glow);
}

/* Prediction Actions */
.prediction-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.predict-btn {
    padding: 0.8rem 0;
    border-radius: 8px;
    border: none;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.green-btn { background: #10b981; }
.violet-btn { background: #8b5cf6; }
.red-btn { background: #ef4444; }

/* Number Grid */
.number-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.num-btn {
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 700;
}

.green-text { color: #10b981; }
.violet-text { color: #8b5cf6; }
.red-text { color: #ef4444; }

/* History Section */
.history-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--text-secondary);
}

.history-list {
    background: var(--glass-bg);
    border-radius: 12px;
    overflow: hidden;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.85rem;
    font-family: 'Orbitron', monospace;
}

.history-item:last-child {
    border-bottom: none;
}

.result-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.green-dot { background: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.5); }
.violet-dot { background: #8b5cf6; box-shadow: 0 0 8px rgba(139, 92, 246, 0.5); }
.red-dot { background: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.5); }

/* =========================================
   CYBER CHASE (MIND POWER) STYLES 
   ========================================= */

.cyber-game-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .cyber-game-layout {
        flex-direction: row;
        align-items: flex-start;
    }
    .cyber-board-area {
        flex: 2;
    }
    .cyber-leaderboard {
        flex: 1;
        position: sticky;
        top: 80px;
    }
}

.cyber-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.input-group-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-group-inline label {
    color: var(--neon-pink);
    font-weight: 700;
}

.input-group-inline input {
    width: 80px;
    padding: 0.5rem;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--neon-pink);
    color: var(--text-primary);
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    outline: none;
}

.hack-btn {
    background: var(--neon-pink);
    color: white;
    border: none;
    box-shadow: 0 0 15px var(--neon-pink-glow);
}

.cashout-btn {
    background: var(--neon-green);
    color: #000;
    border: none;
    box-shadow: 0 0 15px var(--neon-green-glow);
}

.hidden {
    display: none !important;
}

.cyber-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-bottom: 1px dashed var(--glass-border);
}

.cyber-multiplier-display {
    font-weight: 700;
    font-size: 1.1rem;
}

.neon-text {
    color: var(--neon-green);
    text-shadow: 0 0 8px var(--neon-green-glow);
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
}

.cyber-message {
    color: var(--accent-gold);
    font-size: 0.9rem;
    font-weight: 600;
}

.cyber-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin: 0 auto 1.5rem auto;
    max-width: 400px;
    perspective: 1000px;
}

.cyber-tile {
    aspect-ratio: 1;
    background: #2c2c2c;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.3s;
    transform-style: preserve-3d;
}

.cyber-tile:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.cyber-tile.revealed {
    background: rgba(0,0,0,0.8);
    border-color: var(--neon-pink);
    transform: rotateY(180deg);
    cursor: default;
}

.cyber-tile.revealed.match {
    border-color: var(--neon-green);
    box-shadow: 0 0 15px var(--neon-green-glow);
}

.cyber-tile.revealed.mismatch {
    border-color: var(--danger);
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.4);
}

.cyber-tile .front {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30,41,59,0.4);
    border-radius: 8px;
}
.cyber-tile .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotateY(180deg);
    font-size: 2rem;
}

.cyber-item-tray {
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.tray-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-align: center;
}

.tray-items {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.tray-item {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.tray-item.active {
    border-color: var(--neon-cyan);
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
    transform: scale(1.1);
}

.cyber-leaderboard {
    padding: 1.5rem;
}

.cyber-leaderboard h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.leaderboard-list {
    list-style: none;
}

.leaderboard-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
}

.leaderboard-list li:last-child {
    border-bottom: none;
}

.leaderboard-list li .pts {
    color: var(--neon-green);
    font-family: 'Orbitron', monospace;
    font-weight: bold;
}

.leaderboard-list li.highlight {
    color: var(--accent-gold);
    background: rgba(253, 224, 71, 0.1);
    padding: 0.75rem 0.5rem;
    border-radius: 4px;
}
