/* assets/css/game.css - Premium Aviators Styling & Aviation UI */
@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css');

:root {
    --bg-dark: #0a0d14;
    --bg-card: #121722;
    --bg-card-hover: #171d2b;
    --bg-surface: #1b2130;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(239, 68, 68, 0.4);
    
    --primary-red: #ff2b42;
    --primary-red-glow: rgba(255, 43, 66, 0.45);
    --accent-gold: #f59e0b;
    --accent-orange: #ff7a00;
    --accent-blue: #38bdf8;
    --accent-purple: #9333ea;
    --accent-green: #10b981;
    --accent-green-hover: #059669;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --font-heading: 'Chakra Petch', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    user-select: none;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: #272f45;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-red);
}

/* Header & Top Bar */
.app-header {
    background: #0f141f;
    border-bottom: 1px solid var(--border-color);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo-img {
    height: 42px;
    width: 42px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 0 12px var(--primary-red-glow);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    background: linear-gradient(135deg, #ffffff 40%, #ff4b5c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wallet-badge {
    background: linear-gradient(180deg, #182030, #131926);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 24px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wallet-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 600;
}

.wallet-amount {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    color: #34d399;
}

.btn-deposit-header {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 7px 16px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-deposit-header:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.55);
}

.icon-btn {
    background: #171d2b;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.icon-btn:hover {
    color: #fff;
    border-color: var(--primary-red);
}

/* Recent Multipliers Ribbon */
.multipliers-ribbon {
    background: #0d111a;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
}

.ribbon-label {
    font-size: 0.72rem;
    color: var(--text-dim);
    font-weight: 700;
    text-transform: uppercase;
    margin-right: 6px;
}

.mult-pill {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 14px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    animation: fadeIn 0.3s ease-out;
}

.pill-blue {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.pill-purple {
    background: rgba(168, 85, 247, 0.18);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.pill-gold {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.5);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* Main Layout Grid */
.main-wrapper {
    flex: 1;
    display: grid;
    grid-template-columns: 280px 1fr;
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
    padding: 12px;
    gap: 12px;
}

/* Sidebar: Live Bets */
.bets-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: calc(100vh - 120px);
}

.bets-nav {
    display: flex;
    background: #0f141f;
    border-bottom: 1px solid var(--border-color);
}

.bets-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 10px 0;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.bets-tab-btn.active {
    color: #fff;
    border-bottom-color: var(--primary-red);
    background: rgba(255, 43, 66, 0.05);
}

.bets-table-container {
    flex: 1;
    overflow-y: auto;
}

.bets-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.bets-table th {
    background: #0d111a;
    color: var(--text-dim);
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    position: sticky;
    top: 0;
}

.bets-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.player-name {
    color: var(--text-muted);
    font-weight: 500;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-bet {
    font-weight: 600;
}

.player-mult .badge-cashout {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 10px;
    padding: 2px 6px;
    font-family: var(--font-heading);
    font-size: 0.75rem;
}

.win-green {
    color: #34d399;
    font-weight: 700;
}

/* Center Game Arena */
.game-arena {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stage-container {
    background: radial-gradient(circle at 50% 60%, #151a26, #0c0f17);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    position: relative;
    height: 440px;
    overflow: hidden;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* HUD Multiplier Overlay */
.hud-multiplier-center {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    text-align: center;
}

.multiplier-value {
    font-family: var(--font-heading);
    font-size: 5.5rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 25px rgba(255, 255, 255, 0.6), 0 0 50px var(--primary-red-glow);
    letter-spacing: -1px;
    transition: transform 0.05s linear;
}

.multiplier-subtext {
    font-size: 0.9rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: -8px;
    font-weight: 600;
}

/* Waiting / Countdown Overlay */
.waiting-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(11, 14, 20, 0.6);
    backdrop-filter: blur(2px);
    pointer-events: none;
}

.waiting-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.countdown-timer {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    color: #ff3344;
    text-shadow: 0 0 20px var(--primary-red-glow);
}

.progress-track {
    width: 220px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff3344, #ff8c00);
    border-radius: 4px;
    width: 100%;
    transition: width 0.1s linear;
}

/* Crashed / Flew Away Overlay */
.crashed-overlay {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(225, 29, 72, 0.1);
    pointer-events: none;
    animation: flashCrash 0.4s ease-out;
}

.flew-away-tag {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: #ff2a2a;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(255, 42, 42, 0.8);
    animation: shake 0.3s ease-in-out;
}

.crashed-multiplier {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 42, 42, 0.6);
}

/* Dual Betting Console */
.betting-console {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.panel-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.auto-switch-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #272f45;
    transition: .3s;
    border-radius: 20px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
input:checked + .slider { background-color: var(--primary-red); }
input:checked + .slider:before { transform: translateX(16px); }

.auto-cash-mult-input {
    width: 64px;
    background: #0d111a;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #fff;
    padding: 3px 6px;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    text-align: center;
}
.auto-cash-mult-input:disabled {
    opacity: 0.35;
}

.panel-body {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 12px;
}

.inputs-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.amount-input-box {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 12px;
    color: var(--text-dim);
    font-weight: 600;
    font-size: 1rem;
}

.bet-amount-input {
    width: 100%;
    background: #0d111a;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    padding: 10px 10px 10px 28px;
    outline: none;
    transition: border-color 0.2s;
}
.bet-amount-input:focus {
    border-color: var(--primary-red);
}

.quick-chips-row {
    display: flex;
    gap: 6px;
}

.quick-chip {
    flex: 1;
    background: #171d2b;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    padding: 6px 0;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}
.quick-chip:hover {
    background: #202738;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Master Action Button */
.action-col {
    display: flex;
}

.btn-master-action {
    width: 100%;
    border-radius: 12px;
    border: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.1s, box-shadow 0.2s;
    padding: 10px;
}
.btn-master-action:active {
    transform: scale(0.97);
}

.btn-bet {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}
.btn-bet:hover {
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.6);
}

.btn-cancel {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.4);
}

.btn-cashout {
    background: linear-gradient(135deg, #ff8c00, #f59e0b);
    color: #111;
    box-shadow: 0 0 24px rgba(255, 140, 0, 0.6);
    animation: pulseCashout 0.8s infinite alternate;
}
.cashout-label {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 1.5px;
}
.cashout-val {
    font-size: 1.45rem;
    font-weight: 800;
}

.btn-disabled {
    background: #1e2433;
    color: var(--text-dim);
    cursor: not-allowed;
    box-shadow: none;
}

/* Cashout Celebration Banner */
.cashout-celebration-banner {
    position: fixed;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    background: linear-gradient(135deg, #0f141f, #1b2438);
    border: 2px solid #10b981;
    border-radius: 16px;
    padding: 24px 36px;
    text-align: center;
    z-index: 999;
    box-shadow: 0 0 50px rgba(16, 185, 129, 0.6);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.celeb-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: #10b981;
    font-weight: 700;
    letter-spacing: 2px;
}
.celeb-multiplier {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    color: #fff;
    font-weight: 800;
}
.celeb-amount {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: #34d399;
    font-weight: 700;
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 95%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    animation: popIn 0.25s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
}

.close-modal-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
}
.close-modal-btn:hover {
    color: #fff;
}

/* Deposit UI Specifics */
.qr-preview-box {
    background: #ffffff;
    padding: 14px;
    border-radius: 12px;
    display: inline-block;
    margin: 10px 0;
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}

.custom-qr-img {
    max-width: 200px;
    max-height: 200px;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

.upi-id-box {
    background: #0f141f;
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.upi-copy-btn {
    background: #202738;
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 600;
}
.upi-copy-btn:hover {
    background: rgba(56, 189, 248, 0.15);
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    background: #0d111a;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: #fff;
    padding: 10px 14px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}
.form-control:focus {
    border-color: var(--primary-red);
}

.quick-deposit-chips {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.quick-deposit-chip {
    flex: 1;
    background: #171d2b;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 0;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
}
.quick-deposit-chip.active, .quick-deposit-chip:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #34d399;
}

.btn-submit-main {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-red), #dc2626);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 0 16px var(--primary-red-glow);
    transition: transform 0.15s, box-shadow 0.2s;
}
.btn-submit-main:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 24px var(--primary-red-glow);
}

/* Badges */
.badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}
.badge-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge-approved {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-rejected {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Toast Container */
#toastContainer {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.custom-toast {
    background: #171d2b;
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    font-size: 0.88rem;
    animation: slideInRight 0.25s ease-out;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulseCashout {
    from { transform: scale(1); box-shadow: 0 0 16px rgba(255, 140, 0, 0.5); }
    to { transform: scale(1.02); box-shadow: 0 0 28px rgba(255, 140, 0, 0.85); }
}

@keyframes flashCrash {
    0% { background: rgba(225, 29, 72, 0.4); }
    100% { background: rgba(225, 29, 72, 0.1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* APK Download Button in Header */
.btn-apk-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn-apk-header:hover {
    background: rgba(16, 185, 129, 0.28);
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.45);
    color: #fff;
    transform: translateY(-1px);
}
.btn-apk-header i {
    font-size: 0.95rem;
}

/* Mobile Dedicated App Banner Strip */
.mobile-app-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: linear-gradient(90deg, #09261a, #0d1a29);
    border-bottom: 1px solid rgba(16, 185, 129, 0.3);
    padding: 7px 16px;
    font-size: 0.82rem;
}
.mas-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.mas-badge {
    background: #10b981;
    color: #042614;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}
.mas-text {
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.78rem;
}
.mas-download-link {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: 6px;
    text-decoration: none;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
    transition: transform 0.15s, box-shadow 0.2s;
    letter-spacing: 0.5px;
}
.mas-download-link:hover {
    transform: scale(1.03);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.55);
}

/* Mobile & Android Optimization */
@media (max-width: 900px) {
    .main-wrapper {
        grid-template-columns: 1fr;
        padding: 8px;
    }
    .bets-sidebar {
        height: 240px;
        order: 3;
    }
    .game-arena {
        order: 1;
    }
    .stage-container {
        height: 300px;
    }
    .multiplier-value {
        font-size: 3.8rem;
    }
    .crashed-multiplier {
        font-size: 2.8rem;
    }
    .betting-console {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .brand-title {
        font-size: 1.15rem;
    }
    .app-header {
        padding: 8px 12px;
    }
}

/* Smartphone Portrait View (<= 600px) */
@media (max-width: 600px) {
    .app-header {
        padding: 6px 10px;
        gap: 6px;
    }
    .brand-section {
        gap: 6px;
    }
    .brand-logo-img {
        width: 28px;
        height: 28px;
    }
    .brand-title {
        font-size: 1rem;
        letter-spacing: 1px;
    }
    .header-actions {
        gap: 5px;
    }
    .wallet-badge {
        padding: 3px 8px;
    }
    .wallet-label {
        font-size: 0.68rem;
    }
    .wallet-amount {
        font-size: 0.85rem;
    }
    .btn-deposit-header {
        padding: 5px 10px;
        font-size: 0.78rem;
    }
    .btn-apk-header {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    #fullscreenBtn {
        display: none !important;
    }
    .stage-container {
        height: 240px;
        border-radius: 12px;
    }
    .multiplier-value {
        font-size: 3rem;
    }
    .crashed-multiplier {
        font-size: 2.2rem;
    }
    .flew-away-tag {
        font-size: 1.7rem;
        letter-spacing: 2px;
    }
    .countdown-timer {
        font-size: 2.8rem;
    }
    .waiting-title {
        font-size: 1rem;
    }
    .panel-card {
        padding: 10px 12px;
        border-radius: 12px;
    }
    .panel-body {
        grid-template-columns: 1.15fr 1fr;
        gap: 8px;
    }
    .bet-amount-input {
        font-size: 1.15rem;
        padding: 8px 8px 8px 24px;
    }
    .currency-symbol {
        font-size: 0.85rem;
        left: 8px;
    }
    .quick-chips-row {
        gap: 4px;
    }
    .quick-chip {
        font-size: 0.72rem;
        padding: 5px 2px;
    }
    .btn-master-action {
        min-height: 56px;
        font-size: 1.15rem;
        padding: 6px;
    }
    .cashout-val {
        font-size: 1.25rem;
    }
    .cashout-label {
        font-size: 0.72rem;
    }
    .multipliers-ribbon {
        padding: 4px 8px;
        font-size: 0.75rem;
        gap: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .ribbon-label {
        font-size: 0.7rem;
    }
    .history-chip {
        font-size: 0.72rem;
        padding: 2px 7px;
    }
    .mobile-app-strip {
        padding: 6px 10px;
    }
}

/* Extra Small Mobile (<= 380px) */
@media (max-width: 380px) {
    .stage-container {
        height: 210px;
    }
    .multiplier-value {
        font-size: 2.5rem;
    }
    .panel-body {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .btn-master-action {
        min-height: 48px;
    }
    .apk-btn-text {
        display: none;
    }
    .mode-btn span {
        display: none;
    }
    .mode-btn {
        padding: 4px 6px;
    }
}

/* Mode Switcher: Demo Play vs Real Money */
.mode-toggle-group {
    display: inline-flex;
    background: #0d121c;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3px;
    gap: 3px;
}
.mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: none;
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s ease;
}
.mode-btn:hover {
    color: #fff;
}
.mode-btn.active#btnModeDemo {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}
.mode-btn.active#btnModeReal {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

/* Wallet Tags */
.wallet-badge-tag {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}
.tag-demo {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}
.tag-real {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Auth Header Button */
.btn-auth-header {
    background: #171d2b;
    border: 1px solid var(--border-color);
    color: #38bdf8;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-auth-header:hover {
    background: #1f273a;
    border-color: #38bdf8;
    color: #fff;
}

/* Demo Banner Strip */
.demo-banner-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.15), rgba(15, 23, 42, 0.8));
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 12px;
    padding: 8px 14px;
    margin-bottom: 2px;
}
.dbs-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.dbs-tag {
    background: #f59e0b;
    color: #0f172a;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}
.dbs-text {
    color: #fde68a;
    font-size: 0.8rem;
}
.dbs-cta-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 6px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
    transition: transform 0.15s, box-shadow 0.2s;
    letter-spacing: 0.5px;
}
.dbs-cta-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.6);
}
