* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Prevent scrolling when modal is open */
body.modal-open {
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 2px solid #28a745;
    margin-bottom: 30px;
}

.logo h1 {
    color: #28a745;
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

.auth-buttons {
    display: flex;
    gap: 15px;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #218838, #1ea584);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #ffc107;
    border: 2px solid #ffc107;
    padding: 10px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    background: #ffc107;
    color: #1a1a1a;
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    margin-top: 10px;
}

/* Game Section */
.game-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.game-container {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

/* Aviator Display */
.aviator-display {
    position: relative;
    background: radial-gradient(circle at center, #2a1f4a 0%, #1e1635 30%, #141025 70%, #0a0815 100%);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 2px solid rgba(40, 167, 69, 0.3);
    min-height: 400px;
}

#aviatorCanvas {
    width: 100%;
    height: 400px;
    display: block;
    border-radius: 8px;
}

.multiplier-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    font-weight: bold;
    color: white;
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 0.8),
        0 0 40px rgba(255, 255, 255, 0.6),
        0 0 60px rgba(255, 255, 255, 0.4);
    animation: multiplierGlow 2s infinite alternate;
    z-index: 10;
    pointer-events: none;
}

@keyframes multiplierGlow {
    from {
        text-shadow: 
            0 0 20px rgba(255, 255, 255, 0.8),
            0 0 40px rgba(255, 255, 255, 0.6),
            0 0 60px rgba(255, 255, 255, 0.4);
    }
    to {
        text-shadow: 
            0 0 30px rgba(255, 255, 255, 1),
            0 0 50px rgba(255, 255, 255, 0.8),
            0 0 70px rgba(255, 255, 255, 0.6);
    }
}

.game-status {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 16px;
    border: 2px solid #28a745;
    backdrop-filter: blur(10px);
    z-index: 10;
}

/* Betting Area */
.betting-area {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.bet-input {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.bet-input label {
    color: #ffc107;
    font-weight: bold;
    white-space: nowrap;
}

.bet-input input {
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #555;
    background: rgba(255,255,255,0.1);
    color: white;
    width: 120px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
}

.bet-input input:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

.currency {
    color: #28a745;
    font-weight: bold;
}

.bet-button, .cashout-button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    white-space: nowrap;
}

.bet-button {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.bet-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
}

.bet-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cashout-button {
    background: linear-gradient(45deg, #ffc107, #ffca28);
    color: #1a1a1a;
}

.cashout-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
}

.cashout-button:disabled {
    background: #6c757d;
    color: #aaa;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.balance-display {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #28a745;
    padding: 15px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

/* Winners Section */
.winners-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.winners-section h3 {
    color: #ffc107;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.3rem;
}

.winners-list {
    max-height: 400px;
    overflow-y: auto;
}

.winner-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin: 8px 0;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    border-left: 4px solid #28a745;
    transition: all 0.3s ease;
}

.winner-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(5px);
}

.winner-item.highlight {
    background: rgba(40, 167, 69, 0.2);
    border-left-color: #ffc107;
    animation: winnerPulse 2s infinite;
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.3);
}

@keyframes winnerPulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.9; 
        transform: scale(1.02);
    }
}

.winner-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.winner-name {
    font-weight: bold;
    color: #ffc107;
    font-size: 14px;
}

.winner-amount {
    color: #28a745;
    font-size: 13px;
    font-weight: 600;
}

.winner-multiplier {
    background: linear-gradient(45deg, #dc3545, #ff6b6b);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 13px;
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.3);
}

/* Scrollbar styling for winners list */
.winners-list::-webkit-scrollbar {
    width: 6px;
}

.winners-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.winners-list::-webkit-scrollbar-thumb {
    background: #28a745;
    border-radius: 3px;
}

.winners-list::-webkit-scrollbar-thumb:hover {
    background: #218838;
}

/* Statistics Section */
.stats-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(40, 167, 69, 0.2);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h4 {
    color: #ffc107;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.stat-card span {
    font-size: 2.2rem;
    font-weight: bold;
    color: #28a745;
    text-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

/* Bot Section */
.bot-section {
    text-align: center;
    margin: 50px 0;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.bot-section h2 {
    color: #ffc107;
    margin-bottom: 30px;
    font-size: 2.2rem;
}

.video-container {
    margin: 30px 0;
}

.video-container iframe {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.buy-bot-btn {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 18px 35px;
    font-size: 1.3rem;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.buy-bot-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(40, 167, 69, 0.5);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-y: auto;
    padding: 20px 0;
}

.modal[style*="block"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #2d2d2d, #1a1a1a);
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s ease;
    border: 2px solid #28a745;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
    transition: all 0.3s ease;
}

.close:hover {
    color: white;
    transform: scale(1.1);
}

.modal h2 {
    color: #28a745;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ffc107;
    font-weight: bold;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #555;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 16px;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-group.half {
    flex: 1;
}

/* Register Modal Specific */
.register-modal {
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Payment Modal - New Design */
.payment-modal-new {
    background: #1a1a1a !important;
    border: 2px solid #28a745 !important;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    margin: 5vh auto;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9);
    display: flex !important;
    flex-direction: column;
    position: relative;
    z-index: 10000;
    opacity: 1 !important;
    visibility: visible !important;
    transform: scale(1) !important;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.payment-modal-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    padding: 25px 20px;
    text-align: center;
    position: relative;
    flex-shrink: 0;
    z-index: 10001;
}

.payment-modal-header h2 {
    color: white !important;
    margin: 0 0 15px 0;
    font-size: 1.6rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.amount-display {
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px;
    padding: 15px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.amount-label {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 12px;
    display: block;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.amount-value {
    color: white !important;
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.payment-modal-body {
    background: #1a1a1a !important;
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    max-height: calc(85vh - 280px);
    z-index: 10001;
}

.payment-modal-body::-webkit-scrollbar {
    width: 6px;
}

.payment-modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.payment-modal-body::-webkit-scrollbar-thumb {
    background: #28a745;
    border-radius: 3px;
}

.payment-option {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 2px solid rgba(40, 167, 69, 0.3) !important;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.payment-option:hover {
    border-color: #28a745 !important;
    background: rgba(40, 167, 69, 0.15) !important;
    transform: translateY(-1px);
    box-shadow: 0 5px 20px rgba(40, 167, 69, 0.2);
}

.payment-option-header {
    display: flex;
    align-items: center;
    padding: 15px;
    gap: 12px;
}

.payment-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: white !important;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.crypto-icon {
    background: linear-gradient(135deg, #f7931a, #ffb74d) !important;
}

.mpesa-icon {
    background: linear-gradient(135deg, #00a651, #4caf50) !important;
}

.payment-title h3 {
    color: #ffc107 !important;
    margin: 0 0 3px 0;
    font-size: 1rem;
    font-weight: 600;
}

.payment-title p {
    color: rgba(255, 255, 255, 0.8) !important;
    margin: 0;
    font-size: 0.85rem;
}

.payment-option-content {
    padding: 0 15px 15px 15px;
}

.address-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.address-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    padding: 10px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    word-break: break-all;
}

.address-input:focus {
    outline: none;
    border-color: #28a745 !important;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.3);
    background: rgba(255, 255, 255, 0.15) !important;
}

.copy-button {
    background: #28a745 !important;
    color: white !important;
    border: none;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.copy-button:hover {
    background: #218838 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.help-section {
    margin-top: 20px;
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.help-section h4 {
    color: #ffc107 !important;
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 600;
}

.help-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.help-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.whatsapp-btn {
    background: rgba(37, 211, 102, 0.2) !important;
    color: #25d366 !important;
    border-color: rgba(37, 211, 102, 0.4) !important;
}

.telegram-btn {
    background: rgba(0, 136, 204, 0.2) !important;
    color: #0088cc !important;
    border-color: rgba(0, 136, 204, 0.4) !important;
}

.email-btn {
    background: rgba(220, 53, 69, 0.2) !important;
    color: #dc3545 !important;
    border-color: rgba(220, 53, 69, 0.4) !important;
}

.help-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    border-color: currentColor !important;
}

.payment-modal-footer {
    background: rgba(255, 255, 255, 0.08) !important;
    padding: 20px;
    text-align: center;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 10001;
}

.payment-confirm-btn {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: white !important;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
    min-width: 180px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.payment-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.5);
}

.payment-modal-new .close {
    color: white !important;
    font-size: 22px;
    position: absolute;
    right: 15px;
    top: 12px;
    cursor: pointer;
    z-index: 10002;
    background: rgba(255, 255, 255, 0.25) !important;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: bold;
}

.payment-modal-new .close:hover {
    background: rgba(255, 255, 255, 0.4) !important;
    transform: scale(1.1);
}

/* Congratulations Modal - REVISED for full-page view */
#congratsModal {
    display: none; /* Keep it hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    z-index: 9998; /* Just below modals, but above main content */
    color: white;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.congrats-content {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: 2px solid #ffc107;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(40, 167, 69, 0.4);
}

.congrats-content h2 {
    color: white;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.celebration-animation {
    margin: 20px 0;
    height: 100px;
    position: relative;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ffc107;
    animation: confetti-fall 3s infinite;
}

@keyframes confetti-fall {
    to {
        transform: translateY(120px) rotate(360deg);
    }
}

/* Download Modal */
.download-options {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.download-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 30px;
    background: rgba(255,255,255,0.1);
    border: 2px solid #28a745;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.download-btn:hover {
    background: #28a745;
    transform: translateY(-3px);
}

.download-btn i {
    font-size: 2rem;
}

/* Force visibility for all modal elements */
.modal *, .payment-modal-new *, .payment-modal-header *, .payment-modal-body *, .payment-modal-footer * {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Remove old payment modal styles to avoid conflicts */
.payment-modal {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .game-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .betting-area {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .bet-input input {
        width: 100px;
    }
    
    .multiplier-display {
        font-size: 2.5rem;
    }
    
    .stats-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-card span {
        font-size: 1.8rem;
    }
    
    .bot-section {
        padding: 25px 20px;
    }
    
    .bot-section h2 {
        font-size: 1.8rem;
    }
    
    .buy-bot-btn {
        padding: 15px 25px;
        font-size: 1.1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 25px;
    }
    
    .register-modal {
        width: 95%;
        margin: 5% auto;
        max-height: 95vh;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group.half {
        flex: none;
    }
    
    .payment-modal-new {
        width: 95% !important;
        margin: 2vh auto !important;
        max-height: 95vh !important;
    }
    
    .payment-modal-body {
        max-height: calc(95vh - 260px) !important;
        padding: 15px !important;
    }
    
    .address-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .copy-button {
        width: 100%;
        justify-content: center;
    }
    
    .help-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .payment-confirm-btn {
        width: 100% !important;
    }
    
    .download-options {
        flex-direction: column;
        gap: 15px;
    }
    
    .download-btn {
        flex-direction: row;
        justify-content: center;
    }
 }
 
 /* Very small screens (480px and below) */
 @media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 15px 0;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .auth-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
    
    .game-container {
        padding: 15px;
    }
    
    .aviator-display {
        min-height: 300px;
    }
    
    #aviatorCanvas {
        height: 300px;
    }
    
    .multiplier-display {
        font-size: 2rem;
    }
    
    .game-status {
        font-size: 14px;
        padding: 10px 20px;
        bottom: 15px;
    }
    
    .betting-area {
        padding: 15px;
    }
    
    .bet-input label {
        font-size: 14px;
    }
    
    .bet-input input {
        padding: 10px;
        font-size: 14px;
        width: 90px;
    }
    
    .bet-button, .cashout-button {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .balance-display {
        font-size: 1rem;
        padding: 12px;
    }
    
    .winners-section {
        padding: 15px;
    }
    
    .winners-section h3 {
        font-size: 1.1rem;
    }
    
    .winner-item {
        padding: 10px 12px;
    }
    
    .winner-name {
        font-size: 13px;
    }
    
    .winner-amount {
        font-size: 12px;
    }
    
    .winner-multiplier {
        padding: 3px 10px;
        font-size: 12px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-card h4 {
        font-size: 1rem;
    }
    
    .stat-card span {
        font-size: 1.5rem;
    }
    
    .bot-section {
        padding: 20px 15px;
    }
    
    .bot-section h2 {
        font-size: 1.5rem;
    }
    
    .video-container iframe {
        height: 200px;
    }
    
    .buy-bot-btn {
        padding: 12px 20px;
        font-size: 1rem;
        width: 100%;
    }
    
    .modal {
        padding: 10px 0;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .modal h2 {
        font-size: 1.5rem;
    }
    
    .form-group input, .form-group select {
        padding: 10px;
        font-size: 14px;
    }
    
    .payment-modal-new {
        width: 98% !important;
        margin: 0.5% auto !important;
        max-height: 98vh !important;
    }
    
    .payment-modal-header {
        padding: 20px 15px;
    }
    
    .payment-modal-header h2 {
        font-size: 1.2rem;
    }
    
    .amount-value {
        font-size: 1.5rem;
    }
    
    .payment-modal-body {
        max-height: calc(98vh - 260px) !important;
        padding: 12px !important;
    }
    
    .payment-option-header {
        padding: 12px;
    }
    
    .payment-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .payment-title h3 {
        font-size: 0.9rem;
    }
    
    .payment-title p {
        font-size: 0.8rem;
    }
    
    .payment-option-content {
        padding: 0 12px 12px 12px;
    }
    
    .address-input {
        font-size: 11px;
        padding: 8px 10px;
    }
    
    .copy-button {
        padding: 8px 10px;
        font-size: 11px;
    }
    
    .help-section h4 {
        font-size: 0.9rem;
    }
    
    .help-btn {
        padding: 8px 10px;
        font-size: 11px;
    }
    
    .payment-modal-footer {
        padding: 15px;
    }
    
    .payment-confirm-btn {
        padding: 10px;
        font-size: 13px;
    }
    
    .close {
        font-size: 24px;
        right: 15px;
        top: 10px;
    }
    
    .payment-modal-new .close {
        width: 28px;
        height: 28px;
        font-size: 18px;
        right: 12px;
        top: 8px;
    }
 }
 
 /* Extra small screens (360px and below) */
 @media (max-width: 360px) {
    .container {
        padding: 8px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .game-container {
        padding: 10px;
    }
    
    .aviator-display {
        min-height: 250px;
    }
    
    #aviatorCanvas {
        height: 250px;
    }
    
    .multiplier-display {
        font-size: 1.8rem;
    }
    
    .betting-area {
        padding: 12px;
    }
    
    .bet-input input {
        width: 80px;
        padding: 8px;
        font-size: 13px;
    }
    
    .bet-button, .cashout-button {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .balance-display {
        font-size: 0.9rem;
        padding: 10px;
    }
    
    .winners-section {
        padding: 12px;
    }
    
    .winner-item {
        padding: 8px 10px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-card span {
        font-size: 1.3rem;
    }
    
    .bot-section {
        padding: 15px 10px;
    }
    
    .bot-section h2 {
        font-size: 1.3rem;
    }
    
    .video-container iframe {
        height: 180px;
    }
    
    .modal-content {
        padding: 15px;
    }
    
    .payment-modal-new {
        border-radius: 12px;
    }
    
    .payment-modal-header {
        padding: 15px 12px;
    }
    
    .amount-display {
        padding: 12px;
    }
    
    .payment-modal-body {
        padding: 10px !important;
    }
    
    .payment-option {
        margin-bottom: 12px;
    }
    
    .payment-option-header {
        padding: 10px;
    }
    
    .payment-icon {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .address-input {
        font-size: 10px;
        padding: 6px 8px;
    }
    
    .copy-button {
        padding: 6px 8px;
        font-size: 10px;
    }
    
    .payment-modal-footer {
        padding: 12px;
    }
 }
 
 /* High DPI / Retina displays */
 @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .multiplier-display {
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    .logo h1 {
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    .payment-modal-new {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
 }
 
 /* Dark mode support for browsers that support it */
 @media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    }
    
    .game-container, .winners-section, .stat-card, .bot-section {
        background: rgba(255, 255, 255, 0.03);
        border-color: rgba(40, 167, 69, 0.15);
    }
    
    .betting-area {
        background: rgba(255, 255, 255, 0.03);
        border-color: rgba(40, 167, 69, 0.15);
    }
    
    .payment-modal-new {
        background: #0a0a0a !important;
    }
    
    .payment-modal-body {
        background: #0a0a0a !important;
    }
 }
 
 /* Print styles */
 @media print {
    body {
        background: white;
        color: black;
    }
    
    .modal, .auth-buttons, .betting-area {
        display: none !important;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .game-section {
        grid-template-columns: 1fr;
    }
    
    .winners-section, .stats-section, .bot-section {
        break-inside: avoid;
    }
 }
 
 /* Accessibility improvements */
 @media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .multiplier-display {
        animation: none;
    }
    
    .winner-item.highlight {
        animation: none;
    }
    
    .confetti {
        animation: none;
    }
 }
 
 /* Focus styles for better accessibility */
 button:focus, input:focus, select:focus, a:focus {
    outline: 2px solid #ffc107;
    outline-offset: 2px;
 }
 
 /* High contrast mode support */
 @media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid white;
    }
    
    .btn-secondary {
        border: 2px solid #ffc107;
        background: black;
    }
    
    .modal-content {
        border: 3px solid #28a745;
    }
    
    .payment-modal-new {
        border: 3px solid #28a745 !important;
    }
    
    .form-group input, .form-group select {
        border: 2px solid white;
    }
 }

 /* User Interface Styles */
.user-section {
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-welcome {
    text-align: right;
}

.user-name {
    color: #ffc107;
    font-weight: bold;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 5px;
}

.user-balance {
    color: #28a745;
    font-weight: bold;
    font-size: 1rem;
}

.user-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.9rem;
    min-width: auto;
}

.btn-link {
    background: none;
    border: none;
    color: #ffc107;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px 0;
    margin-top: 10px;
}

.btn-link:hover {
    color: #ffca28;
}

/* Live Activity Styles */
.live-activity {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.live-activity h4 {
    color: #ffc107;
    margin-bottom: 15px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.activity-feed {
    max-height: 200px;
    overflow-y: auto;
}

.activity-item {
    padding: 8px 12px;
    margin: 5px 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border-left: 3px solid #28a745;
}

.activity-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-message {
    color: white;
    font-size: 0.85rem;
    flex: 1;
}

.activity-time {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    margin-left: 10px;
}

/* Online Counter */
.online-counter {
    margin-top: 15px;
    text-align: center;
    color: #28a745;
    font-weight: bold;
    padding: 10px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.online-counter i {
    margin-right: 5px;
    color: #ffc107;
}

/* Enhanced Statistics */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2rem;
    color: rgba(40, 167, 69, 0.3);
}

.stat-card h4 {
    position: relative;
    z-index: 2;
}

.stat-card span {
    position: relative;
    z-index: 2;
}

/* Bot Features Grid */
.bot-features {
    margin: 30px 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.feature-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(40, 167, 69, 0.2);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    border-color: #28a745;
}

.feature-item i {
    font-size: 2.5rem;
    color: #28a745;
    margin-bottom: 15px;
    display: block;
}

.feature-item h4 {
    color: #ffc107;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.feature-item p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Contact Options */
.contact-options {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.contact-btn.whatsapp {
    background: rgba(37, 211, 102, 0.2);
    color: #25d366;
    border-color: rgba(37, 211, 102, 0.4);
}

.contact-btn.telegram {
    background: rgba(0, 136, 204, 0.2);
    color: #0088cc;
    border-color: rgba(0, 136, 204, 0.4);
}

.contact-btn:hover {
    transform: translateY(-2px);
    border-color: currentColor;
}

/* Success Message */
.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 350px;
}

.success-message.show {
    transform: translateX(0);
    opacity: 1;
}

.success-message i {
    font-size: 1.2rem;
    color: #ffc107;
}

/* Form Actions */
.form-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

/* Withdrawal Form */
.withdraw-info textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 2px solid #555;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-family: inherit;
    resize: vertical;
}

.withdraw-info textarea:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .user-info {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .user-welcome {
        text-align: center;
    }
    
    .user-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .contact-options {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-btn {
        width: 200px;
        justify-content: center;
    }
    
    .success-message {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .success-message.show {
        transform: translateY(0);
    }
    
    .live-activity {
        margin-top: 15px;
    }
    
    .activity-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .activity-time {
        margin-left: 0;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .user-actions {
        gap: 5px;
    }
    
    .btn-small {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .feature-item {
        padding: 15px;
    }
    
    .feature-item i {
        font-size: 2rem;
        margin-bottom: 10px;
    }
    
    .contact-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .activity-item {
        padding: 6px 10px;
    }
    
    .activity-message {
        font-size: 0.8rem;
    }
}

/* Animation for new elements */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.activity-item {
    animation: slideInFromTop 0.3s ease;
}

/* Enhanced scrollbar for activity feed */
.activity-feed::-webkit-scrollbar {
    width: 4px;
}

.activity-feed::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.activity-feed::-webkit-scrollbar-thumb {
    background: #28a745;
    border-radius: 2px;
}

.activity-feed::-webkit-scrollbar-thumb:hover {
    background: #218838;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #28a745;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Updated header styles for bot button */
.user-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

#buyBotBtn {
    font-size: 0.9rem;
    padding: 10px 15px;
    white-space: nowrap;
}

#buyBotBtn:disabled {
    background: #28a745 !important;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .user-info {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .user-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    #buyBotBtn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    #buyBotBtn {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    
    .user-name {
        font-size: 1rem;
    }
}

/* EMERGENCY MODAL FIX */
.modal {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.modal.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.modal[style*="flex"] {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Fix payment modal z-index conflicts */
.payment-modal-new,
.payment-modal-header,
.payment-modal-body, 
.payment-modal-footer {
    z-index: 9999 !important;
}

.payment-modal-new .close {
    z-index: 10000 !important;
}

/* Ensure body can scroll when no modals */
body:not(.modal-open) {
    overflow: auto !important;
}

/* Debug panel should be highest */
#debugPanel {
    z-index: 999999 !important;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin-top: 15px;
}

.btn-link {
    background: none !important;
    border: none !important;
    color: #ffc107 !important;
    text-decoration: underline !important;
    cursor: pointer !important;
    font-size: 0.9rem !important;
    padding: 5px 0 !important;
    margin-top: 10px !important;
}

.btn-link:hover {
    color: #ffca28 !important;
    text-decoration: none !important;
}

/* Screenshot Upload Styles */
.screenshot-section {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(40, 167, 69, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.screenshot-section h4 {
    color: #ffc107;
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.screenshot-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.file-upload-container {
    margin: 15px 0;
}

.upload-btn {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
    min-width: 180px;
}

.upload-btn:hover {
    background: linear-gradient(45deg, #218838, #1ea584);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.upload-btn.uploaded {
    background: linear-gradient(45deg, #ffc107, #ffca28);
    color: #1a1a1a;
}

.screenshot-preview {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.screenshot-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

.preview-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.remove-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.payment-confirm-btn:disabled {
    background: #6c757d !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .screenshot-section {
        padding: 15px;
    }
    
    .upload-btn {
        width: 100%;
        min-width: auto;
    }
    
    .screenshot-preview img {
        max-height: 150px;
    }
}