/* ─────────────────────────────────────────────────────
   DEPOSIT MODAL STYLES
   ───────────────────────────────────────────────────── */

.deposit-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.deposit-overlay.active {
    display: block;
    opacity: 1;
}

.deposit-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: linear-gradient(135deg, #1a1b2e 0%, #2d2e44 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    z-index: 201;
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.deposit-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.deposit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.deposit-header h3 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.deposit-header h3 i {
    color: #4a90d9;
}

.deposit-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.deposit-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* ─────────────────────────────────────────────────────
   REFERRAL MODAL STYLES
   ───────────────────────────────────────────────────── */

.referral-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.referral-overlay.active {
    display: block;
    opacity: 1;
}

.referral-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: linear-gradient(135deg, #1a1b2e 0%, #2d2e44 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    z-index: 201;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.referral-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.referral-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.referral-header h3 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.referral-header h3 i {
    color: #4a90d9;
}

.referral-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.referral-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.referral-body {
    padding: 24px;
}

.referral-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #4a90d9 0%, #357abd 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
}

.stat-info {
    flex: 1;
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
}

.stat-value {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    display: block;
}

.referral-code-section,
.referral-link-section {
    margin-bottom: 20px;
}

.referral-code-label,
.referral-link-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.referral-code-wrapper,
.referral-link-wrapper {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.referral-code,
.referral-link {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    display: flex;
    align-items: center;
    word-break: break-all;
}

.copy-code-btn,
.copy-link-btn {
    background: linear-gradient(135deg, #4a90d9 0%, #357abd 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-code-btn:hover,
.copy-link-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 217, 0.3);
}

.referral-info {
    background: rgba(74, 144, 217, 0.1);
    border: 1px solid rgba(74, 144, 217, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    margin-bottom: 8px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item i {
    color: #4a90d9;
    font-size: 14px;
    width: 16px;
}

.info-item strong {
    color: #4a90d9;
    font-weight: 600;
}

.referral-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.referral-footer p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.referral-footer i {
    color: #4a90d9;
}

/* Responsive Design */
@media (max-width: 480px) {
    .referral-stats {
        grid-template-columns: 1fr;
    }
    
    .referral-code-wrapper,
    .referral-link-wrapper {
        flex-direction: column;
        gap: 8px;
    }
    
    .copy-code-btn,
    .copy-link-btn {
        width: 100%;
        justify-content: center;
    }
    
    .referral-modal {
        width: 95%;
        max-width: none;
    }
}

/* ─────────────────────────────────────────────────────
   DEPOSIT MODAL STYLES (continued)
   ───────────────────────────────────────────────────── */

.deposit-body {
    padding: 24px;
}

.deposit-info {
    margin-bottom: 20px;
}

.deposit-balance {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.deposit-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
}

.deposit-amount {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    display: block;
}

.deposit-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    z-index: 1;
}

.form-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 16px 12px 40px;
    color: #ffffff;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #4a90d9;
    background: rgba(255, 255, 255, 0.08);
}

.input-hint {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.deposit-quick-amounts {
    margin-bottom: 20px;
}

.quick-amount-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 8px;
}

.quick-amount-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-amount-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 500;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-amount-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

.deposit-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #4a90d9 0%, #357abd 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.deposit-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 217, 0.3);
}

.deposit-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.deposit-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.deposit-footer p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.deposit-footer i {
    color: #4a90d9;
}

/* ─────────────────────────────────────────────────────
   HISTORY MODAL STYLES
   ───────────────────────────────────────────────────── */

.history-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.history-overlay.active {
    display: block;
    opacity: 1;
}

.history-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: linear-gradient(135deg, #1a1b2e 0%, #2d2e44 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    z-index: 201;
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.history-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-header h3 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-header h3 i {
    color: #4a90d9;
}

.history-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.history-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.history-body {
    padding: 24px;
}

.history-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
}

.history-filter {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-filter:focus {
    outline: none;
    border-color: #4a90d9;
}

.refresh-btn {
    background: linear-gradient(135deg, #4a90d9 0%, #357abd 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.refresh-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 217, 0.3);
}

.history-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.summary-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.summary-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
}

.summary-value {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    display: block;
}

.summary-value.profit {
    color: #28a745;
}

.summary-value.loss {
    color: #dc3545;
}

.history-table-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-table td {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.history-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.round-id {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.bet-amount {
    font-weight: 600;
}

.multiplier {
    font-weight: 600;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.won {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.status-badge.lost {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.status-badge.crashed {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.status-badge.pending {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
}

.profit-loss.profit {
    color: #28a745;
    font-weight: 600;
}

.profit-loss.loss {
    color: #dc3545;
    font-weight: 600;
}

.time {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.loading-row,
.no-data,
.error-row {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.history-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pagination-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 500;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 500;
}

.history-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.history-footer p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.history-footer i {
    color: #4a90d9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .history-modal {
        width: 98%;
        max-height: 95vh;
    }
    
    .history-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .history-summary {
        grid-template-columns: 1fr;
    }
    
    .history-table-container {
        overflow-x: auto;
    }
    
    .history-table {
        min-width: 600px;
    }
    
    .history-pagination {
        flex-direction: column;
        gap: 12px;
    }
    
    .pagination-btn {
        justify-content: center;
    }
}

.deposit-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.deposit-close-btn:hover {
    background: rgba(255, 67, 54, 0.2);
    color: #ff4336;
}

.deposit-body {
    padding: 24px;
}

.deposit-info {
    margin-bottom: 24px;
}

.deposit-balance {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deposit-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.deposit-amount {
    color: #4ade80;
    font-size: 18px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.deposit-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.deposit-form input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    transition: all 0.2s ease;
}

.deposit-form input:focus {
    outline: none;
    border-color: #4ade80;
    background: rgba(255, 255, 255, 0.12);
}

.deposit-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-hint {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.deposit-quick-amounts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-amount-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.quick-amount-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-amount-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.quick-amount-btn:hover {
    background: rgba(74, 222, 128, 0.2);
    border-color: rgba(74, 222, 128, 0.4);
    color: #4ade80;
}

.deposit-submit-btn {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border: none;
    color: #fff;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.deposit-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    transform: translateY(-1px);
}

.deposit-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.deposit-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.deposit-footer p {
    margin: 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.deposit-row {
    cursor: pointer;
    transition: background 0.2s ease;
}

.deposit-row:hover {
    background: rgba(74, 222, 128, 0.1);
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 680px) {
    .deposit-modal {
        width: 95%;
        max-width: none;
        margin: 20px;
    }
    
    .deposit-header {
        padding: 16px 20px;
    }
    
    .deposit-body {
        padding: 20px;
    }
    
    .quick-amount-buttons {
        gap: 6px;
    }
    
    .quick-amount-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}
