* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    background: #0f0f0f;
    color: white;
    overflow-x: hidden;
    min-height: 100vh;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Prevent text selection on interactive elements */
button,
.bet-btn,
.quick-amt,
.amount-btn,
.payment-option {
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

/* Login Screen */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #0a1628 0%, #1a237e 50%, #0d1b3e 100%);
    position: relative;
    overflow: hidden;
}

/* Decorative Elements */
.decor-chip,
.decor-coin {
    position: absolute;
    font-size: 60px;
    opacity: 0.6;
    animation: float 4s ease-in-out infinite;
}

.decor-chip-1 {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.decor-chip-2 {
    top: 20%;
    right: 8%;
    animation-delay: 1s;
}

.decor-coin-1 {
    bottom: 15%;
    right: 5%;
    animation-delay: 2s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

/* Auth Container */
.auth-container {
    background: rgba(10, 22, 40, 0.95);
    border-radius: 20px;
    padding: 0;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    background: #0d1b3e;
}

.auth-tab {
    flex: 1;
    padding: 18px;
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.auth-tab.active {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    border-bottom: 3px solid #f59e0b;
}

.auth-tab:hover:not(.active) {
    color: #9ca3af;
}

/* Auth Form */
.auth-form {
    padding: 30px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-field {
    flex: 1;
}

.form-field {
    position: relative;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

.field-icon {
    padding: 0 15px;
    font-size: 18px;
    color: #64748b;
}

.form-field input,
.form-field select {
    flex: 1;
    padding: 15px 10px;
    background: transparent;
    border: none;
    color: white;
    font-size: 15px;
    outline: none;
}

.form-field select {
    cursor: pointer;
}

.form-field select option {
    background: #1e293b;
    color: white;
}

.form-field input::placeholder {
    color: #64748b;
}

.field-toggle {
    padding: 0 15px;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.field-toggle:hover {
    opacity: 1;
}

.form-field:focus-within {
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

/* Terms Checkbox */
.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #9ca3af;
}

.terms-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #f59e0b;
}

.terms-check a {
    color: #f59e0b;
    text-decoration: none;
}

.terms-check a:hover {
    text-decoration: underline;
}

/* Submit Button */
.auth-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    border-radius: 30px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

.auth-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(245, 158, 11, 0.4);
}

/* Bonus Text */
.auth-bonus {
    text-align: center;
    color: #10b981;
    margin-top: 20px;
    font-weight: bold;
    font-size: 14px;
}

/* =============== NEW AVIATOR DESIGN =============== */

/* Header */
.header {
    background: #1a1a1a;
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-text-aviator {
    font-size: 22px;
    font-weight: bold;
    color: #e74c3c;
    font-style: italic;
    text-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    overflow: hidden;
}

.multiplier-history {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 5px 0;
    scrollbar-width: none;
}

.multiplier-history::-webkit-scrollbar {
    display: none;
}

.mult-badge {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
}

.mult-badge.low {
    background: #2d2d44;
    color: #7b7bff;
}

.mult-badge.medium {
    background: #1a3a2e;
    color: #28a745;
}

.mult-badge.high {
    background: #3a2a1a;
    color: #ffc107;
}

.mult-badge.mega {
    background: #3a1a2a;
    color: #dc3545;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.action-buttons {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: auto;
}

.menu-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b00, #ff9500);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.menu-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.5);
}

.action-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background: #1a1a2e;
    border: 2px solid #ff6b00;
    border-radius: 8px;
    padding: 8px;
    min-width: 180px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.action-buttons .balance-box {
    width: 100%;
    justify-content: center;
    padding: 5px 15px;
    font-size: 12px;
    border-radius: 4px;
}

.action-buttons .deposit-btn {
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 4px;
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.action-buttons .deposit-btn:hover {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    transform: translateX(4px);
}

.action-buttons .withdraw-btn {
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 4px;
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.action-buttons .withdraw-btn:hover {
    background: linear-gradient(135deg, #7f8c8d, #74b9ff);
    transform: translateX(4px);
}

.action-buttons .support-btn {
    width: 100%;
    text-align: left;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 13px;
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.action-buttons .support-btn:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    transform: translateX(4px);
}

.online-count {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #888;
    font-size: 12px;
}

.online-dot {
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
}

.online-number {
    color: #28a745;
    font-weight: bold;
}

.balance-box {
    background: #2d2d2d;
    padding: 8px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: bold;
}

.currency {
    color: #ffc107;
}

.chat-toggle {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
}

/* Main Layout */
.main-layout {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 50px);
    gap: 0;
    background: #0f0f0f;
}

/* Left Sidebar - Bets Table */
.left-sidebar {
    background: #101010;
    border-bottom: 1px solid #222;
    display: flex;
    flex-direction: column;
    /* Allow the left sidebar to grow on larger screens and be scroll-friendly on mobile */
    max-height: 50vh;
    min-height: 120px;
    order: 3;
}

.bets-tabs {
    display: flex;
    border-bottom: 1px solid #222;
}

.bets-tab {
    flex: 1;
    padding: 10px 5px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.bets-tab.active {
    color: white;
    background: #1a1a1a;
    border-bottom: 2px solid #e74c3c;
}

.total-bets {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: #151515;
    font-size: 11px;
    color: #888;
}

.total-bets strong {
    color: #28a745;
}

.previous-hand-btn {
    background: #222;
    border: none;
    color: #888;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 10px;
    cursor: pointer;
}

.bets-table-header {
    display: grid;
    grid-template-columns: 1.5fr 1fr 0.8fr 1fr;
    padding: 8px 10px;
    background: #1a1a1a;
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
}

.bets-table {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 6px;
}

/* Responsive adjustments for small screens to show more rows and improve touch scrolling */
@media (max-width: 600px) {
    .left-sidebar {
        max-height: 60vh;
        /* let bets area take more vertical space on mobile */
        order: 1;
        /* show above center area on narrow screens if layout reflows */
    }

    .bets-tab {
        padding: 12px 6px;
        font-size: 13px;
    }

    .bets-table-header {
        font-size: 11px;
    }

    .bet-row {
        grid-template-columns: 1fr 0.8fr 0.6fr 0.8fr;
        padding: 10px 12px;
        font-size: 13px;
    }

    .user-name {
        font-size: 12px;
    }

    .bet-row .user-cell {
        gap: 8px;
    }
}

.bet-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 0.8fr 1fr;
    padding: 6px 10px;
    font-size: 11px;
    border-bottom: 1px solid #1a1a1a;
    align-items: center;
}

.bet-row:hover {
    background: #1a1a1a;
}

.bet-row.my-bet-row {
    background: rgba(103, 126, 234, 0.1);
    border-left: 3px solid #667eea;
}

.bet-row.my-bet-row:hover {
    background: rgba(103, 126, 234, 0.15);
}

.bet-row.top-bet-row {
    background: rgba(255, 193, 7, 0.08);
}

.bet-row.top-bet-row:hover {
    background: rgba(255, 193, 7, 0.12);
}

.bet-row .user-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rank-badge {
    display: inline-block;
    min-width: 28px;
    padding: 2px 6px;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: black;
    border-radius: 50%;
    text-align: center;
    font-weight: bold;
    font-size: 10px;
    margin-right: 4px;
}

.user-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.user-name {
    color: #888;
    font-size: 11px;
}

.bet-amount {
    color: white;
}

.coeff-cell {
    color: #9b59b6;
    font-weight: bold;
}

.coeff-cell.green {
    color: #28a745;
}

.coeff-cell.active {
    color: #1e90ff;
}

.win-cell {
    color: #28a745;
    font-weight: bold;
}

.win-cell.pending {
    color: #666;
}

.win-cell.active {
    color: #1e90ff;
}

.provably-fair {
    padding: 10px;
    background: #0a0a0a;
    font-size: 10px;
    color: #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fair-badge {
    color: #28a745;
}

.powered-by strong {
    color: #888;
}

/* Center Game Area */
.center-area {
    background: #0e0e0e;
    display: flex;
    flex-direction: column;
    flex: 1;
    order: 1;
}

.game-container {
    flex: 1;
    position: relative;
    background: linear-gradient(180deg, #0a0a0a 0%, #141414 100%);
    overflow: hidden;
    min-height: 300px;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    min-height: 350px;
    display: block;
}

.multiplier-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
}

.multiplier-value {
    font-size: 120px;
    font-weight: 900;
    color: white;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.5);
    letter-spacing: -3px;
}

.multiplier-value.waiting {
    color: #ffc107;
}

.multiplier-value.crashed {
    color: #e74c3c;
}

.flew-away {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
    background: rgba(231, 76, 60, 0.95);
    padding: 20px 40px;
    border-radius: 10px;
}

.flew-away-text {
    font-size: 32px;
    font-weight: bold;
    color: white;
}

.win-display {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
    background: rgba(40, 167, 69, 0.95);
    padding: 15px 30px;
    border-radius: 10px;
}

.win-text {
    font-size: 28px;
    font-weight: bold;
    color: white;
}

/* Betting Panels */
.betting-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px;
    background: #0f0f0f;
    order: 2;
    border-top: 1px solid #222;
}

.bet-panel {
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
}

.bet-panel-tabs {
    display: flex;
    background: #252525;
}

.panel-tab {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.panel-tab.active {
    background: #1a1a1a;
    color: white;
}

.bet-panel-content {
    padding: 15px;
}

.bet-amount-row {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.amount-btn {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.amount-btn.minus {
    background: #333;
    color: white;
}

.amount-btn.plus {
    background: #333;
    color: white;
}

.amount-btn:hover {
    background: #444;
}

.amount-input-wrap {
    flex: 1;
}

.amount-input {
    width: 100%;
    padding: 10px;
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 5px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
}

.amount-input:focus {
    outline: none;
    border-color: #28a745;
}

.quick-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.quick-amt {
    padding: 6px 4px;
    background: #333;
    border: none;
    border-radius: 4px;
    color: #aaa;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-amt:hover {
    background: #444;
    color: white;
}

.bet-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(180deg, #00ff00 0%, #00cc00 100%);
    border: none;
    border-radius: 8px;
    color: black;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.bet-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 25px rgba(0, 255, 0, 0.6);
    background: linear-gradient(180deg, #00ff00 0%, #00dd00 100%);
}

.bet-btn.placed {
    background: linear-gradient(180deg, #ffc107 0%, #e0a800 100%);
}

.bet-btn.bet-placed {
    background: linear-gradient(180deg, #dc3545 0%, #c82333 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 15px;
}

.bet-btn.bet-placed .cancel-text {
    font-size: 12px;
    opacity: 0.9;
}

.bet-btn.bet-placed .bet-amount-text {
    font-size: 14px;
    font-weight: bold;
}

.bet-btn.cashout-btn {
    background: linear-gradient(180deg, #ff6b35 0%, #e55a2b 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 15px;
    animation: pulse-cashout 0.5s infinite;
}

.bet-btn.cashout-btn .cashout-text {
    font-size: 12px;
    opacity: 0.9;
}

.bet-btn.cashout-btn .cashout-amount {
    font-size: 16px;
    font-weight: bold;
}

@keyframes pulse-cashout {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.7);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 0 20px 5px rgba(255, 107, 53, 0.5);
    }
}

.bet-btn.cashed {
    background: linear-gradient(180deg, #28a745 0%, #1e7e34 100%);
    opacity: 0.8;
}

.bet-btn.cashout {
    background: linear-gradient(180deg, #ff6b35 0%, #e55a2b 100%);
    animation: pulse-btn 1s infinite;
}

@keyframes pulse-btn {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

.bet-btn.cashed {
    background: linear-gradient(180deg, #28a745 0%, #1e7e34 100%);
}

/* Right Sidebar - Chat */
.right-sidebar {
    background: #101010;
    border-left: 1px solid #222;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 10px;
    border-bottom: 1px solid #222;
}

.rain-banner {
    background: linear-gradient(90deg, #1a3a2e, #2d4a3e);
    padding: 8px 12px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.rain-icon {
    font-size: 16px;
}

.rain-text {
    color: #28a745;
    font-size: 11px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.chat-message {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.chat-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    flex-shrink: 0;
}

.chat-content {
    flex: 1;
}

.chat-username {
    font-size: 12px;
    color: #888;
    margin-bottom: 3px;
}

.chat-text {
    font-size: 13px;
    color: #ccc;
    line-height: 1.4;
}

.chat-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #1a1a1a;
    border-top: 1px solid #222;
}

.emoji-btn,
.gif-btn {
    background: transparent;
    border: none;
    color: #666;
    font-size: 16px;
    cursor: pointer;
}

.chat-input {
    flex: 1;
    padding: 10px;
    background: #2d2d2d;
    border: 1px solid #333;
    border-radius: 20px;
    color: white;
    font-size: 13px;
}

.chat-input:focus {
    outline: none;
    border-color: #444;
}

.chat-input::placeholder {
    color: #666;
}

.send-btn {
    background: #28a745;
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
}

/* Admin Panel */
.admin-panel {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.95);
    border: 2px solid #e74c3c;
    border-radius: 15px;
    padding: 20px;
    z-index: 1000;
    width: 90%;
    max-width: 800px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.admin-title {
    font-size: 18px;
    color: #e74c3c;
}

.admin-badge {
    background: #e74c3c;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: bold;
}

.admin-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.bet-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bet-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
}

.admin-input {
    padding: 10px;
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 5px;
    color: white;
    font-size: 14px;
}

.admin-btn {
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-btn-toggle {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.admin-btn-toggle.active {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.admin-btn-set {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
}

.admin-btn-crash {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    width: 100%;
}

.admin-btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.admin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.admin-stat-box {
    background: #1a1a1a;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.admin-stat-label {
    font-size: 10px;
    color: #666;
    margin-bottom: 5px;
}

.admin-stat-value {
    font-size: 18px;
    font-weight: bold;
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 1200px) {
    .main-layout {
        grid-template-columns: 180px 1fr 240px;
    }
}

@media (max-width: 900px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .left-sidebar,
    .right-sidebar {
        display: none;
    }

    .header-center {
        display: none;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Deposit/Withdraw Buttons */
.deposit-btn {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.deposit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.withdraw-btn {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.withdraw-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    border: 1px solid #333;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #333;
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 20px;
    color: white;
}

.modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: white;
}

.modal-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.current-balance {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 14px;
}

.current-balance span:first-child {
    color: #888;
}

.balance-amount {
    font-size: 20px;
    font-weight: bold;
    color: #28a745;
}

.payment-methods h3 {
    font-size: 14px;
    color: #888;
    margin-bottom: 12px;
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.payment-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    background: #252535;
    border: 2px solid transparent;
    border-radius: 10px;
    color: #aaa;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-option:hover {
    border-color: #444;
}

.payment-option.active {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    color: white;
}

.payment-icon {
    font-size: 20px;
}

.amount-section {
    margin-bottom: 15px;
}

.amount-section label {
    display: block;
    color: #888;
    font-size: 13px;
    margin-bottom: 8px;
}

.amount-section input {
    width: 100%;
    padding: 15px;
    background: #252535;
    border: 1px solid #444;
    border-radius: 10px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
}

.amount-section input:focus {
    outline: none;
    border-color: #28a745;
}

.quick-amounts-modal {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.quick-amounts-modal button {
    padding: 10px;
    background: #333;
    border: none;
    border-radius: 8px;
    color: #aaa;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-amounts-modal button:hover {
    background: #444;
    color: white;
}

/* Transaction ID Section */
.transaction-id-section {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid #28a745;
    border-radius: 10px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.transaction-id-section label {
    display: block;
    color: #28a745;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.transaction-id-section input {
    width: 100%;
    padding: 12px;
    background: #1a1a2e;
    border: 1px solid #28a745;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    margin-bottom: 8px;
}

.transaction-id-section input:focus {
    outline: none;
    border-color: #20c997;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.3);
}

.transaction-id-section small {
    display: block;
    color: #888;
    font-size: 12px;
    margin-top: 6px;
    line-height: 1.4;
}

.wallet-input {
    margin-bottom: 20px;
}

.wallet-input label {
    display: block;
    color: #888;
    font-size: 13px;
    margin-bottom: 8px;
}

.wallet-input input {
    width: 100%;
    padding: 15px;
    background: #252535;
    border: 1px solid #444;
    border-radius: 10px;
    color: white;
    font-size: 14px;
}

.wallet-input input:focus {
    outline: none;
    border-color: #28a745;
}

.withdraw-info {
    background: rgba(255, 193, 7, 0.1);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.withdraw-info p {
    color: #ffc107;
    font-size: 12px;
    margin: 5px 0;
}

.modal-submit-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.modal-submit-btn.deposit {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
}

.modal-submit-btn.withdraw {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.modal-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Wallet Modal */
.wallet-balance {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.2), rgba(30, 126, 52, 0.1));
    border-radius: 15px;
    margin-bottom: 20px;
}

.wallet-balance-label {
    display: block;
    color: #888;
    font-size: 14px;
    margin-bottom: 10px;
}

.wallet-balance-amount {
    font-size: 36px;
    font-weight: bold;
    color: #28a745;
}

.wallet-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.wallet-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.wallet-action-btn.deposit {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
}

.wallet-action-btn.withdraw {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

.wallet-action-btn span {
    font-size: 20px;
}

.wallet-action-btn:hover {
    transform: translateY(-2px);
}

.transaction-history h3 {
    color: #888;
    font-size: 14px;
    margin-bottom: 15px;
}

.transactions-list {
    max-height: 200px;
    overflow-y: auto;
}

.no-transactions {
    text-align: center;
    color: #666;
    padding: 20px;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #252535;
    border-radius: 10px;
    margin-bottom: 10px;
}

.transaction-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.transaction-type {
    font-weight: bold;
    font-size: 13px;
}

.transaction-type.deposit {
    color: #28a745;
}

.transaction-type.withdraw {
    color: #f59e0b;
}

.transaction-date {
    color: #666;
    font-size: 11px;
}

.transaction-amount {
    font-weight: bold;
    font-size: 14px;
}

.transaction-amount.positive {
    color: #28a745;
}

.transaction-amount.negative {
    color: #dc3545;
}

.transaction-status {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
}

.transaction-status.completed {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.transaction-status.pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

/* Payment Details Box in Deposit Modal */
.payment-details-box {
    background: linear-gradient(135deg, #1e1e30 0%, #252540 100%);
    border: 1px solid #333;
    border-radius: 15px;
    padding: 15px;
    margin: 15px 0;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.qr-code-display {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.qr-code-display img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-code-display .no-qr {
    color: #888;
    font-size: 12px;
    text-align: center;
    padding: 10px;
}

.payment-info {
    flex: 1;
}

.payment-info p {
    margin: 8px 0;
    font-size: 14px;
    color: #ccc;
}

.payment-info strong {
    color: #28a745;
}

.payment-info span {
    color: white;
    font-weight: bold;
}

.payment-instructions-display {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #333;
    font-size: 12px;
    color: #f59e0b;
    line-height: 1.5;
}

.bank-details-display {
    margin-top: 10px;
}

.bank-details-display p {
    margin: 5px 0;
    font-size: 13px;
}

@media (max-width: 500px) {
    .payment-details-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Support Button */
.support-btn {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.support-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(23, 162, 184, 0.5);
}

/* Support Modal */
.support-modal {
    max-width: 500px;
}

.support-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 10px;
    margin-bottom: 15px;
    color: #28a745;
    font-size: 14px;
}

.support-online {
    width: 10px;
    height: 10px;
    background: #28a745;
    border-radius: 50%;
    animation: pulse-online 2s infinite;
}

@keyframes pulse-online {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.chat-container {
    background: #1a1a2e;
    border-radius: 10px;
    margin-bottom: 15px;
}

.chat-messages {
    height: 300px;
    overflow-y: auto;
    padding: 15px;
}

.chat-message {
    margin-bottom: 15px;
    max-width: 85%;
}

.chat-message.system {
    background: rgba(23, 162, 184, 0.2);
    padding: 12px;
    border-radius: 10px;
    color: #17a2b8;
    font-size: 13px;
    margin: 0 auto 15px auto;
    text-align: center;
    max-width: 100%;
}

.chat-message.user {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    padding: 12px;
    border-radius: 15px 15px 5px 15px;
    margin-left: auto;
    color: white;
}

.chat-message.admin {
    background: #252535;
    padding: 12px;
    border-radius: 15px 15px 15px 5px;
    color: white;
}

.chat-message p {
    margin: 0;
    font-size: 14px;
}

.chat-message .msg-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
    display: block;
}

.chat-message .msg-category {
    font-size: 10px;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 5px;
    display: inline-block;
}

.chat-input-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-input-area select {
    padding: 10px;
    background: #252535;
    border: 1px solid #333;
    border-radius: 8px;
    color: white;
    font-size: 13px;
}

.chat-input-row {
    display: flex;
    gap: 10px;
}

.chat-input-row input {
    flex: 1;
    padding: 12px 15px;
    background: #252535;
    border: 1px solid #333;
    border-radius: 25px;
    color: white;
    font-size: 14px;
}

.chat-input-row input:focus {
    outline: none;
    border-color: #17a2b8;
}

.send-btn {
    background: linear-gradient(135deg, #17a2b8, #138496);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s;
}

.send-btn:hover {
    transform: scale(1.1);
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Large Tablets & Small Desktops */
@media (max-width: 1200px) {
    .main-layout {
        grid-template-columns: 180px 1fr;
    }

    .header-right {
        gap: 10px;
    }

    .deposit-btn,
    .withdraw-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Tablets (iPad, etc.) */
@media (max-width: 1024px) {
    .main-layout {
        display: flex;
        flex-direction: column;
    }

    .center-area {
        flex: 1;
        order: 1;
    }

    .betting-panels {
        order: 2;
    }

    .left-sidebar {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        border-right: none;
        border-bottom: 1px solid #222;
        min-height: auto;
        max-height: 120px;
        order: 3;
    }

    .bets-table-header {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr;
        gap: 5px;
        padding: 8px 5px;
        font-size: 9px;
    }

    .bets-table {
        max-height: 150px;
        overflow-y: auto;
    }

    .bets-table-row {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr;
        gap: 5px;
        padding: 6px 5px;
        font-size: 10px;
        border-bottom: 1px solid #1a1a1a;
    }

    .header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px;
    }

    .header-center {
        order: 3;
        width: 100%;
        padding: 5px 0 0 0;
    }

    .betting-panels {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}

/* Small Tablets & Large Phones */
@media (max-width: 768px) {
    .header {
        padding: 8px 10px;
    }

    .logo-text-aviator {
        font-size: 18px;
    }

    .header-right {
        gap: 8px;
    }

    .online-count {
        display: flex;
        align-items: center;
        gap: 4px;
        color: #888;
        font-size: 11px;
        white-space: nowrap;
    }

    .balance-box {
        padding: 6px 10px;
        font-size: 13px;
    }

    .deposit-btn,
    .withdraw-btn {
        padding: 6px 10px;
        font-size: 11px;
    }

    .support-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .multiplier-history {
        gap: 4px;
    }

    .mult-badge {
        padding: 3px 8px;
        font-size: 10px;
    }

    .center-area {
        padding: 10px;
    }

    .game-container {
        height: 250px;
        min-height: 200px;
    }

    .multiplier-display {
        transform: scale(0.8);
    }

    .betting-panels {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .bet-panel-content {
        padding: 12px;
    }

    .quick-amounts {
        gap: 5px;
    }

    .quick-amt {
        padding: 6px 10px;
        font-size: 11px;
    }

    .bet-btn {
        padding: 12px;
        font-size: 14px;
    }

    .action-buttons {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 4px;
        width: 100%;
    }

    .action-buttons .deposit-btn,
    .action-buttons .withdraw-btn,
    .action-buttons .support-btn {
        padding: 8px 6px;
        font-size: 11px;
        min-width: auto;
    }

    /* Modal Responsive */
    .modal-content {
        width: 95%;
        max-width: 400px;
        margin: 10px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-header h2 {
        font-size: 18px;
    }

    .modal-body {
        padding: 15px;
    }

    .payment-options {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .payment-option {
        padding: 10px 5px;
        font-size: 11px;
    }

    .quick-amounts-modal {
        gap: 8px;
    }

    .quick-amounts-modal button {
        padding: 8px 12px;
        font-size: 12px;
    }

    /* Support Modal */
    .support-modal {
        width: 95%;
        max-height: 80vh;
    }

    .chat-container {
        height: 250px;
    }
}

/* Mobile Phones (iPhone, etc.) */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .header {
        padding: 6px 8px;
    }

    .logo-text-aviator {
        font-size: 16px;
    }

    .header-right {
        gap: 5px;
    }

    .online-count {
        display: flex;
        align-items: center;
        gap: 3px;
        color: #888;
        font-size: 10px;
        white-space: nowrap;
    }

    .online-count span:nth-child(2) {
        display: none;
    }

    .online-number {
        display: inline;
        color: #28a745;
        font-weight: bold;
        font-size: 10px;
    }

    .balance-box {
        padding: 5px 8px;
        font-size: 12px;
        border-radius: 15px;
    }

    .action-buttons {
        gap: 4px;
        flex-direction: column;
    }

    .menu-toggle {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .action-menu {
        top: 45px;
        right: 0;
        min-width: 160px;
    }

    .action-buttons .deposit-btn,
    .action-buttons .withdraw-btn,
    .action-buttons .support-btn {
        padding: 8px 10px;
        font-size: 12px;
        width: 100%;
    }

    .left-sidebar {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        border-right: none;
        border-bottom: 1px solid #222;
        max-height: 200px;
    }

    .bets-table-header {
        display: grid;
        grid-template-columns: 1.5fr 0.8fr 0.6fr 0.8fr;
        gap: 4px;
        padding: 6px 5px;
        font-size: 8px;
    }

    .bets-table {
        max-height: 150px;
        overflow-y: auto;
    }

    .bet-row {
        display: grid;
        grid-template-columns: 1.5fr 0.8fr 0.6fr 0.8fr;
        gap: 4px;
        padding: 4px 5px;
        font-size: 9px;
        border-bottom: 1px solid #1a1a1a;
    }

    .bet-row .user-cell {
        display: flex;
        align-items: center;
        gap: 3px;
    }

    .user-avatar {
        width: 16px;
        height: 16px;
    }

    .user-name {
        font-size: 8px;
    }

    .betting-panels {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 8px;
    }

    .bet-panel {
        padding: 0;
    }

    .bet-panel-content {
        padding: 8px;
    }

    .betting-panels {
        grid-template-columns: 1fr 1fr;
    }

    .action-buttons .support-btn {
        height: 20px;
        font-size: 10px;
    }

    .header-center {
        padding: 3px 0 0 0;
    }

    .mult-badge {
        padding: 2px 6px;
        font-size: 9px;
    }

    .center-area {
        padding: 8px;
    }

    .game-container {
        height: 200px;
        min-height: 180px;
        border-radius: 10px;
    }

    .multiplier-value {
        font-size: 40px !important;
    }

    .flew-away-text {
        font-size: 24px;
    }

    .betting-panels {
        gap: 8px;
    }

    .bet-panel {
        border-radius: 10px;
    }

    .bet-panel-tabs {
        padding: 0;
    }

    .panel-tab {
        padding: 8px;
        font-size: 11px;
    }

    .bet-panel-content {
        padding: 10px;
    }

    .bet-amount-row {
        gap: 5px;
    }

    .amount-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .amount-input {
        font-size: 14px;
        padding: 8px;
    }

    .quick-amounts {
        gap: 4px;
    }

    .quick-amt {
        padding: 5px 8px;
        font-size: 10px;
    }

    .bet-btn {
        padding: 10px;
        font-size: 13px;
        border-radius: 8px;
    }

    /* Login Screen Mobile */
    .login-screen {
        padding: 15px;
    }

    .auth-container {
        border-radius: 15px;
    }

    .auth-form {
        padding: 20px 15px;
    }

    .auth-tab {
        padding: 12px 8px;
        font-size: 13px;
    }

    .form-field input,
    .form-field select {
        padding: 12px 12px 12px 40px;
        font-size: 14px;
    }

    .field-icon {
        left: 12px;
        font-size: 14px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .auth-submit-btn {
        padding: 14px;
        font-size: 14px;
    }

    .decor-chip,
    .decor-coin {
        font-size: 40px;
    }

    /* Modal Mobile */
    .modal-content {
        width: 100%;
        max-width: none;
        margin: 0;
        border-radius: 20px 20px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 85vh;
    }

    .modal-header {
        padding: 15px;
    }

    .modal-header h2 {
        font-size: 16px;
    }

    .modal-body {
        padding: 15px;
    }

    .payment-options {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .payment-option {
        padding: 8px 4px;
        font-size: 10px;
        border-radius: 8px;
    }

    .payment-icon {
        font-size: 18px;
    }

    .qr-code-display {
        max-width: 150px;
        margin: 0 auto;
    }

    .qr-code-display img {
        max-width: 100%;
    }

    .amount-section label {
        font-size: 13px;
    }

    .amount-section input {
        padding: 12px;
        font-size: 14px;
    }

    .quick-amounts-modal {
        gap: 5px;
    }

    .quick-amounts-modal button {
        padding: 8px 10px;
        font-size: 11px;
    }

    .modal-submit-btn {
        padding: 14px;
        font-size: 14px;
    }

    /* Support Chat Mobile */
    .support-modal {
        border-radius: 20px 20px 0 0;
    }

    .chat-container {
        height: 200px;
    }

    .chat-input-row input {
        padding: 10px 12px;
        font-size: 13px;
    }

    .send-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .chat-input-area select {
        padding: 8px;
        font-size: 12px;
    }
}

/* Extra Small Phones */
@media (max-width: 360px) {
    .logo-text-aviator {
        font-size: 14px;
    }

    .balance-box {
        padding: 4px 6px;
        font-size: 11px;
    }

    .deposit-btn {
        padding: 4px 6px;
        font-size: 9px;
    }

    .game-container {
        height: 180px;
    }

    .multiplier-value {
        font-size: 32px !important;
    }

    .bet-panel-content {
        padding: 8px;
    }

    .amount-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .quick-amt {
        padding: 4px 6px;
        font-size: 9px;
    }

    .bet-btn {
        padding: 8px;
        font-size: 12px;
    }
}

/* Landscape Mode for Phones */
@media (max-height: 500px) and (orientation: landscape) {
    .header {
        padding: 5px 10px;
    }

    .header-center {
        display: none;
    }

    .game-container {
        height: 150px;
    }

    .betting-panels {
        flex-direction: row;
    }

    .bet-panel {
        flex: 1;
    }

    .modal-content {
        max-height: 95vh;
    }
}

/* iPad Pro & Large Tablets */
@media (min-width: 1024px) and (max-width: 1366px) {
    .main-layout {
        grid-template-columns: 200px 1fr;
    }

    .betting-panels {
        max-width: 700px;
        margin: 0 auto;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .logo-text-aviator {
        -webkit-font-smoothing: antialiased;
    }

    .bet-btn {
        -webkit-font-smoothing: antialiased;
    }
}

/* ==================== SETTINGS SIDEBAR ==================== */

.settings-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 350px;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    border-left: 1px solid #333;
    overflow-y: auto;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.settings-sidebar.hidden {
    display: none;
}

.settings-header {
    display: flex;
    justify-content: flex-end;
    padding: 16px;
    border-bottom: 1px solid #333;
}

.close-settings {
    background: transparent;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.2s;
}

.close-settings:hover {
    color: white;
}

.user-info-section {
    padding: 20px 16px;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid #333;
}

.user-email {
    color: #888;
    font-size: 13px;
    margin-bottom: 10px;
    word-break: break-all;
}

.user-balance-display {
    font-size: 24px;
    font-weight: bold;
    color: #28a745;
}

.user-balance-display .currency {
    font-size: 18px;
    margin-left: 4px;
}

.settings-section {
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 12px;
    border-bottom: 1px solid #2a2a2a;
    gap: 12px;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-icon {
    font-size: 18px;
    min-width: 24px;
}

.setting-label {
    flex: 1;
    color: #aaa;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    transition: 0.3s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #28a745;
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.settings-divider {
    height: 1px;
    background: #333;
    margin: 12px 0;
}

.settings-game-title {
    text-align: center;
    padding: 16px;
    color: #e74c3c;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
}

.menu-items {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border: none;
    background: transparent;
    color: #aaa;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-left-color: #e74c3c;
}

.menu-item.danger {
    color: #e74c3c;
    margin-top: auto;
    border-top: 1px solid #333;
    padding-top: 16px;
}

.menu-item.danger:hover {
    background: rgba(231, 76, 60, 0.1);
    border-left-color: #c0392b;
}

.menu-icon {
    font-size: 18px;
    min-width: 24px;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .settings-sidebar {
        max-width: 100%;
        animation: slideInBottom 0.3s ease-out;
    }

    @keyframes slideInBottom {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }

    .setting-item {
        padding: 12px;
    }

    .menu-item {
        padding: 12px;
        gap: 12px;
    }
}

/* Transfer Modal Styles */
.transfer-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.transfer-form .form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.transfer-form label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.transfer-form input {
    padding: 12px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 14px;
}

.transfer-form input:focus {
    outline: none;
    border-color: #f59e0b;
    background: rgba(30, 41, 59, 1);
}

.form-info {
    background: rgba(79, 70, 229, 0.1);
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
}

.form-info p {
    margin: 5px 0;
    color: #b0b0b0;
}

/* Details Grid */
.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item {
    background: rgba(30, 41, 59, 0.5);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(100, 116, 139, 0.2);
}

.detail-item label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    display: block;
    margin-bottom: 5px;
}

.detail-item p {
    font-size: 15px;
    color: white;
    font-weight: 500;
}

/* Transaction History Styles */
.filter-options {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    justify-content: center;
}

.filter-btn {
    padding: 8px 16px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 20px;
    color: #888;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background: #f59e0b;
    border-color: #f59e0b;
    color: white;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid #f59e0b;
}

.transaction-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.transaction-type {
    font-size: 13px;
    color: white;
    font-weight: 500;
}

.transaction-date {
    font-size: 11px;
    color: #888;
}

.transaction-amount {
    font-size: 14px;
    font-weight: bold;
}

.transaction-amount.positive {
    color: #28a745;
}

.transaction-amount.negative {
    color: #ff1744;
}

/* Level Management Styles */
.level-info {
    background: linear-gradient(135deg, #f59e0b20, #4f46e520);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.current-level {
    text-align: center;
    margin-bottom: 15px;
}

.current-level h3 {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

.level-display {
    font-size: 24px;
    font-weight: bold;
    color: #f59e0b;
    margin-bottom: 5px;
}

.current-level p {
    font-size: 12px;
    color: #888;
}

.level-progress {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 8px;
    margin-bottom: 8px;
}

.progress-bar {
    height: 8px;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: 4px;
    width: 0;
    transition: width 0.3s;
}

.level-progress p {
    font-size: 11px;
    color: #888;
    margin-top: 6px;
}

.levels-list {
    margin-top: 15px;
}

.levels-list h3 {
    font-size: 13px;
    color: white;
    margin-bottom: 12px;
}

.tier-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 12px;
}

.tier-name {
    color: #f59e0b;
    font-weight: 600;
}

.tier-range {
    color: #888;
    flex: 1;
    margin: 0 12px;
    text-align: center;
}

.tier-bonus {
    color: #28a745;
    font-weight: 500;
}

/* Referral Styles */
.referral-code-section {
    background: rgba(79, 70, 229, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.referral-code-section h3 {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}

.referral-code {
    display: flex;
    gap: 8px;
}

.referral-code input {
    flex: 1;
    padding: 10px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 6px;
    color: #f59e0b;
    font-weight: bold;
    text-align: center;
}

.copy-btn {
    padding: 10px 15px;
    background: #f59e0b;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: #fbbf24;
}

.referral-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 15px;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(100, 116, 139, 0.2);
}

.stat-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #f59e0b;
}

.referral-info {
    background: rgba(40, 167, 69, 0.1);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.referral-info h3 {
    font-size: 13px;
    color: #28a745;
    margin-bottom: 8px;
}

.referral-info ul {
    list-style: none;
    font-size: 12px;
    color: #888;
}

.referral-info li {
    margin: 6px 0;
}

.referrals-list h3 {
    font-size: 13px;
    color: white;
    margin-bottom: 10px;
}

.referrals-table {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 8px;
    overflow: hidden;
}

.referral-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(100, 116, 139, 0.2);
    font-size: 12px;
    align-items: center;
}

.referral-row:last-child {
    border-bottom: none;
}

.referral-row span:first-child {
    color: white;
    font-weight: 500;
}

.referral-row span:nth-child(2) {
    color: #888;
    text-align: center;
}

.referral-row span:last-child {
    color: #28a745;
    font-weight: 600;
    text-align: right;
}

.no-transactions,
.no-referrals {
    text-align: center;
    color: #888;
    padding: 20px;
    font-size: 13px;
}

/* Edit Details Modal */
.edit-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.edit-form input,
.edit-form select {
    padding: 12px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 14px;
}

.edit-form input:focus,
.edit-form select:focus {
    outline: none;
    border-color: #f59e0b;
    background: rgba(30, 41, 59, 1);
}