* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-dark: #0d0d0d;
    --bg-card: #1a1a1a;
    --bg-input: #252525;
    --red-primary: #e63946;
    --red-dark: #9d0208;
    --gold: #ffd60a;
    --gold-dark: #b8860b;
    --text-white: #ffffff;
    --text-gray: #888888;
    --green: #2ecc71;
    --blue: #3498db;
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg-dark); color: var(--text-white); min-height: 100vh; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* HEADER */
.header { background: linear-gradient(180deg, var(--red-dark) 0%, var(--bg-card) 100%); padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--red-dark); }
.logo { font-size: 18px; font-weight: 700; color: var(--gold); }
.header-right { display: flex; align-items: center; gap: 12px; }
.wallet-bal { background: rgba(255,255,255,0.1); padding: 8px 15px; border-radius: 25px; font-size: 14px; font-weight: 600; color: var(--gold); border: 1px solid var(--gold-dark); }
.user-avatar { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; }

/* BUTTONS */
.btn { display: inline-block; padding: 12px 24px; background: linear-gradient(180deg, var(--red-primary) 0%, var(--red-dark) 100%); border: none; border-radius: 8px; color: white; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.3s; text-align: center; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 20px rgba(230,57,70,0.4); }
.btn-gold { background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%); color: #000; }
.btn-green { background: linear-gradient(180deg, #2ecc71 0%, #27ae60 100%); }
.btn-blue { background: linear-gradient(180deg, #3498db 0%, #2980b9 100%); }
.btn-sm { padding: 8px 16px; font-size: 12px; }
.btn-block { width: 100%; }

/* FORMS */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-gray); font-size: 13px; }
.form-control { width: 100%; padding: 14px 16px; background: var(--bg-input); border: 2px solid #333; border-radius: 10px; color: var(--text-white); font-size: 15px; }
.form-control:focus { outline: none; border-color: var(--gold); }
select.form-control option { background: var(--bg-dark); }

/* ALERTS */
.alert { padding: 15px 20px; border-radius: 10px; margin-bottom: 20px; font-size: 14px; }
.alert-error { background: rgba(230,57,70,0.15); border: 1px solid var(--red-primary); color: #ff6b6b; }
.alert-success { background: rgba(46,204,113,0.15); border: 1px solid var(--green); color: var(--green); }
.alert-warning { background: rgba(255,214,10,0.15); border: 1px solid var(--gold); color: var(--gold); }

/* AUTH */
.auth-container { min-height: 100vh; display: flex; justify-content: center; align-items: center; padding: 20px; background: radial-gradient(ellipse at top, var(--red-dark) 0%, var(--bg-dark) 70%); }
.auth-box { background: var(--bg-card); padding: 40px 30px; border-radius: 20px; width: 100%; max-width: 400px; border: 1px solid #333; }
.auth-box h1 { text-align: center; color: var(--gold); margin-bottom: 30px; font-size: 28px; }
.auth-link { text-align: center; margin-top: 25px; color: var(--text-gray); font-size: 14px; }
.auth-link a { color: var(--gold); font-weight: 600; }

/* MAIN */
.main-content { padding: 20px; padding-bottom: 100px; max-width: 600px; margin: 0 auto; }
.section-title { font-size: 16px; color: var(--gold); margin: 25px 0 15px; padding-bottom: 10px; border-bottom: 2px solid #333; }

/* GAMES */
.games-list { display: flex; flex-direction: column; gap: 15px; }
.game-card { background: var(--bg-card); border-radius: 15px; padding: 20px; border: 1px solid #333; }
.game-card.overnight { border-left: 4px solid var(--gold); }
.game-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.game-name { font-size: 18px; font-weight: 700; color: var(--gold); }
.game-badge { background: rgba(255,214,10,0.2); color: var(--gold); padding: 4px 10px; border-radius: 20px; font-size: 11px; }
.game-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 15px; }
.game-stat { text-align: center; padding: 10px; background: var(--bg-input); border-radius: 10px; }
.game-stat-label { font-size: 11px; color: var(--text-gray); }
.game-stat-value { font-size: 14px; font-weight: 600; }
.game-result { display: flex; justify-content: space-between; align-items: center; padding-top: 15px; border-top: 1px solid #333; }
.result-value { font-size: 28px; font-weight: 700; color: var(--green); }
.result-waiting { font-size: 28px; font-weight: 700; color: var(--text-gray); }
.btn-play { background: linear-gradient(180deg, var(--green) 0%, #27ae60 100%); }
.btn-closed { background: #333; color: #666; cursor: not-allowed; }

/* PLAY PAGE */
.play-page { max-width: 500px; margin: 0 auto; padding: 20px; padding-bottom: 100px; }
.play-header { background: var(--bg-card); border-radius: 15px; padding: 20px; margin-bottom: 20px; border: 1px solid #333; }
.play-header h2 { color: var(--gold); font-size: 20px; margin-bottom: 15px; }
.play-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.play-info-item { background: var(--bg-input); padding: 12px; border-radius: 10px; text-align: center; }
.play-info-label { font-size: 11px; color: var(--text-gray); }
.play-info-value { font-size: 14px; font-weight: 600; }

/* BID TABS */
.bid-tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.bid-tab { flex: 1; padding: 15px 10px; background: var(--bg-card); border: 2px solid #333; border-radius: 12px; text-align: center; cursor: pointer; }
.bid-tab.active { border-color: var(--gold); background: rgba(255,214,10,0.1); }
.bid-tab-icon { font-size: 24px; margin-bottom: 5px; }
.bid-tab-name { font-size: 13px; font-weight: 600; }
.bid-tab-rate { font-size: 11px; color: var(--gold); }

/* BID SECTION */
.bid-section { background: var(--bg-card); border-radius: 15px; padding: 20px; margin-bottom: 20px; border: 1px solid #333; }
.bid-section h3 { color: var(--gold); font-size: 16px; margin-bottom: 15px; }
.jodi-input-row { display: flex; gap: 10px; margin-bottom: 15px; }
.jodi-number-input { width: 100px; text-align: center; font-size: 24px; font-weight: 700; letter-spacing: 5px; }
.amount-input { flex: 1; }

/* DIGIT GRID */
.digit-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 15px; }
.digit-btn { aspect-ratio: 1; background: var(--bg-input); border: 2px solid #333; border-radius: 12px; color: var(--text-white); font-size: 22px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.digit-btn:hover { border-color: var(--gold); }
.digit-btn.selected { background: var(--gold); color: #000; border-color: var(--gold); }
.bid-hint { background: rgba(255,214,10,0.1); padding: 12px; border-radius: 10px; font-size: 12px; color: var(--gold); margin-top: 15px; }

/* BIDS LIST */
.bids-container { background: var(--bg-card); border-radius: 15px; padding: 20px; margin-bottom: 20px; border: 1px solid #333; }
.bids-container h3 { color: var(--gold); font-size: 16px; margin-bottom: 15px; }
.bids-list { max-height: 250px; overflow-y: auto; }
.bid-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; background: var(--bg-input); border-radius: 10px; margin-bottom: 10px; }
.bid-item-left { display: flex; align-items: center; gap: 12px; }
.bid-type-tag { padding: 5px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.bid-type-tag.jodi { background: var(--blue); }
.bid-type-tag.andar { background: var(--green); }
.bid-type-tag.bahar { background: var(--red-primary); }
.bid-number { font-size: 18px; font-weight: 700; color: var(--gold); }
.bid-item-right { text-align: right; }
.bid-amount { font-size: 14px; font-weight: 600; }
.bid-win { font-size: 12px; color: var(--green); }
.bid-remove { background: rgba(230,57,70,0.2); border: none; color: var(--red-primary); width: 30px; height: 30px; border-radius: 50%; cursor: pointer; margin-left: 10px; }
.bids-total { display: flex; justify-content: space-between; padding: 15px; background: var(--bg-input); border-radius: 10px; margin-top: 15px; font-weight: 600; }
.bids-total-amount { color: var(--gold); font-size: 18px; }

/* CAPTCHA */
.captcha-box { background: var(--bg-card); border-radius: 15px; padding: 20px; margin-bottom: 20px; border: 1px solid #333; text-align: center; }
.captcha-question { font-size: 18px; color: var(--gold); margin-bottom: 15px; }
.captcha-input { width: 120px; text-align: center; font-size: 20px; font-weight: 700; margin: 0 auto; display: block; }

/* WALLET */
.wallet-balance-card { background: linear-gradient(135deg, var(--red-dark) 0%, #1a0a0a 100%); border-radius: 20px; padding: 30px; text-align: center; margin-bottom: 25px; border: 1px solid var(--red-primary); }
.wallet-balance-label { font-size: 14px; color: var(--text-gray); }
.wallet-balance-amount { font-size: 40px; font-weight: 700; color: var(--gold); }
.wallet-tabs { display: flex; background: var(--bg-card); border-radius: 12px; padding: 5px; margin-bottom: 20px; }
.wallet-tab { flex: 1; padding: 12px; text-align: center; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-gray); }
.wallet-tab.active { background: var(--red-dark); color: var(--text-white); }
.wallet-section { background: var(--bg-card); border-radius: 15px; padding: 25px; border: 1px solid #333; }
.wallet-section h3 { color: var(--gold); margin-bottom: 20px; }

/* TRANSACTIONS */
.txn-card { background: var(--bg-card); border-radius: 12px; margin-bottom: 12px; overflow: hidden; border: 1px solid #333; }
.txn-header { display: flex; justify-content: space-between; align-items: center; padding: 15px; }
.txn-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.txn-icon.credit { background: rgba(46,204,113,0.2); }
.txn-icon.debit { background: rgba(230,57,70,0.2); }
.txn-info h4 { font-size: 14px; }
.txn-info p { font-size: 12px; color: var(--text-gray); }
.txn-amount { font-size: 16px; font-weight: 700; }
.txn-amount.credit { color: var(--green); }
.txn-amount.debit { color: var(--red-primary); }
.txn-details { padding: 15px; background: var(--bg-input); display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; font-size: 12px; }
.txn-details span { color: var(--text-gray); }

/* BOTTOM NAV */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg-card); display: flex; justify-content: space-around; padding: 10px 0; border-top: 1px solid #333; z-index: 100; }
.nav-item { text-align: center; color: var(--text-gray); font-size: 10px; padding: 5px 15px; }
.nav-item.active { color: var(--gold); }
.nav-icon { font-size: 22px; display: block; margin-bottom: 4px; }

/* BADGES */
.badge { padding: 5px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-success { background: rgba(46,204,113,0.2); color: var(--green); }
.badge-warning { background: rgba(255,214,10,0.2); color: var(--gold); }
.badge-danger { background: rgba(230,57,70,0.2); color: var(--red-primary); }

/* ADMIN */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 240px; background: var(--bg-card); padding: 25px 20px; position: fixed; height: 100vh; overflow-y: auto; border-right: 1px solid #333; }
.admin-logo { color: var(--gold); font-size: 20px; font-weight: 700; margin-bottom: 30px; text-align: center; padding-bottom: 20px; border-bottom: 1px solid #333; }
.admin-nav { list-style: none; }
.admin-nav-link { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--text-gray); border-radius: 10px; margin-bottom: 5px; font-size: 14px; }
.admin-nav-link:hover { background: var(--bg-input); color: var(--text-white); }
.admin-nav-link.active { background: var(--red-dark); color: var(--text-white); }
.admin-main { flex: 1; margin-left: 240px; padding: 25px; padding-bottom: 100px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 15px; }
.admin-title { font-size: 24px; color: var(--gold); }
.admin-notification { background: var(--red-primary); color: white; padding: 8px 16px; border-radius: 20px; font-size: 13px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; margin-bottom: 30px; }
.admin-stat-card { background: var(--bg-card); border-radius: 15px; padding: 25px 20px; text-align: center; border: 1px solid #333; }
.admin-stat-value { font-size: 28px; font-weight: 700; color: var(--gold); }
.admin-stat-label { font-size: 13px; color: var(--text-gray); margin-top: 5px; }
.admin-card { background: var(--bg-card); border-radius: 15px; padding: 25px; margin-bottom: 20px; border: 1px solid #333; }
.admin-card h3 { color: var(--gold); font-size: 18px; margin-bottom: 20px; }
.admin-search { display: flex; gap: 15px; margin-bottom: 25px; flex-wrap: wrap; }
.admin-search .form-control { flex: 1; min-width: 200px; }

/* TABLE */
.table-container { overflow-x: auto; background: var(--bg-card); border-radius: 15px; border: 1px solid #333; }
table { width: 100%; border-collapse: collapse; }
th { background: var(--red-dark); padding: 15px; text-align: left; font-size: 13px; color: var(--gold); }
td { padding: 15px; border-bottom: 1px solid #333; font-size: 14px; }
tr:hover { background: var(--bg-input); }

/* REQUEST CARDS */
.request-card { background: var(--bg-card); border-radius: 15px; padding: 20px; margin-bottom: 15px; border: 1px solid #333; }
.request-card.deposit { border-left: 4px solid var(--green); }
.request-card.withdraw { border-left: 4px solid var(--red-primary); }
.request-header { display: flex; justify-content: space-between; margin-bottom: 15px; }
.request-amount { font-size: 24px; font-weight: 700; color: var(--gold); }
.request-actions { display: flex; gap: 10px; margin-top: 15px; }

/* MODAL */
.modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.9); justify-content: center; align-items: center; z-index: 1000; padding: 20px; }
.modal.active { display: flex; }
.modal-content { background: var(--bg-card); border-radius: 20px; padding: 30px; max-width: 450px; width: 100%; max-height: 90vh; overflow-y: auto; border: 1px solid #333; }
.modal-content h2 { color: var(--gold); margin-bottom: 20px; }
.modal-actions { display: flex; gap: 15px; margin-top: 25px; }
.modal-actions .btn { flex: 1; }

/* PROFILE */
.profile-header { text-align: center; margin-bottom: 30px; }
.profile-avatar-large { width: 120px; height: 120px; border-radius: 50%; border: 4px solid var(--gold); margin-bottom: 15px; }
.profile-section { background: var(--bg-card); border-radius: 15px; padding: 25px; margin-bottom: 20px; border: 1px solid #333; }
.profile-section h3 { color: var(--gold); margin-bottom: 20px; }

/* MOBILE NAV */
.admin-mobile-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg-card); padding: 10px; border-top: 1px solid #333; z-index: 100; justify-content: space-around; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .admin-sidebar { display: none; }
    .admin-main { margin-left: 0; padding: 15px; }
    .admin-mobile-nav { display: flex; }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    th, td { padding: 10px; font-size: 12px; }
    .game-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 400px) {
    .header { padding: 12px 15px; }
    .logo { font-size: 16px; }
    .wallet-balance-amount { font-size: 32px; }
}
