/* Custom CSS for EVM HD Wallet Manager */

/* Accessibility styles */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.sr-only-focusable:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: 0.25rem 0.5rem !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    z-index: 100000 !important;
    top: 0 !important;
    left: 0 !important;
}

/* Focus styles for better accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
.btn:focus {
    outline: 2px solid #667eea !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25) !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-gradient {
        background: none !important;
        -webkit-text-fill-color: initial !important;
        color: #000 !important;
    }
    
    .card {
        border: 2px solid #000 !important;
    }
    
    .btn {
        border: 2px solid #000 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Gradient text */
.text-gradient {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* GitHub Header */
.github-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 0;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.github-icon {
    font-size: 2.5rem;
    color: #24292e;
}

.github-link {
    color: #0366d6;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.github-link:hover {
    color: #0366d6;
    text-decoration: underline;
}

.github-description {
    color: #586069;
    font-size: 0.9rem;
    line-height: 1.4;
}

.github-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.github-buttons .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.github-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.github-buttons .btn-outline-dark {
    border-color: #24292e;
    color: #24292e;
}

.github-buttons .btn-outline-dark:hover {
    background-color: #24292e;
    border-color: #24292e;
    color: white;
}

.github-buttons .btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.github-buttons .btn-warning:hover {
    background-color: #ffb300;
    border-color: #ffb300;
    color: #212529;
}

.github-buttons .btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.github-buttons .btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

#starCount {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}

/* Responsive adjustments for GitHub header */
@media (max-width: 768px) {
    .github-header {
        padding: 0.75rem 0;
    }
    
    .github-icon {
        font-size: 2rem;
    }
    
    .github-link {
        font-size: 1rem;
    }
    
    .github-description {
        font-size: 0.8rem;
    }
    
    .github-buttons {
        justify-content: flex-start;
        margin-top: 0.5rem;
    }
    
    .github-buttons .btn {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
}

@media (max-width: 576px) {
    .github-header .d-flex {
        flex-direction: column;
        text-align: center;
    }
    
    .github-icon {
        margin-bottom: 0.5rem;
        margin-right: 0 !important;
    }
    
    .github-buttons {
        justify-content: center;
        margin-top: 1rem;
    }
}

/* Header section */
.header-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    margin-bottom: 2rem;
    margin-top: 1rem;
    padding: 2rem 1.5rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.header-section h1 {
    color: white !important;
    -webkit-text-fill-color: white !important;
}

.header-section .lead {
    color: white !important;
}

/* Card styling */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    border-radius: 15px 15px 0 0 !important;
    font-weight: 600;
}

/* Button styling */
.btn {
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
}

.btn-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
}

/* Progress bar */
.progress {
    height: 10px;
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

/* Table styling */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-weight: 600;
    text-align: center;
    position: relative;
    user-select: none;
}

.table tbody tr {
    transition: background-color 0.3s ease;
}

.table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.table tbody tr.table-warning {
    background-color: rgba(255, 193, 7, 0.2) !important;
    animation: pulse 1.5s infinite;
}

.table tbody tr.table-success {
    background-color: rgba(40, 167, 69, 0.2) !important;
    animation: fadeInSuccess 0.5s ease-in;
}

.table tbody tr.table-danger {
    background-color: rgba(220, 53, 69, 0.2) !important;
    animation: fadeInError 0.5s ease-in;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

@keyframes fadeInSuccess {
    0% { background-color: rgba(40, 167, 69, 0.4); }
    100% { background-color: rgba(40, 167, 69, 0.2); }
}

@keyframes fadeInError {
    0% { background-color: rgba(220, 53, 69, 0.4); }
    100% { background-color: rgba(220, 53, 69, 0.2); }
}

.table td {
    vertical-align: middle;
    text-align: center;
}

/* Resizable table columns */
.resizable-table {
    table-layout: fixed;
    width: 100%;
}

.resizable-table th {
    position: relative;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.resizable-table th:last-child {
    border-right: none;
}

.column-resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    cursor: col-resize;
    background: transparent;
    z-index: 1;
}

.column-resizer:hover {
    background: rgba(255, 255, 255, 0.3);
}

.column-resizer.resizing {
    background: rgba(255, 255, 255, 0.5);
}

/* Default column widths */
.resizable-table .col-index { width: 60px; min-width: 50px; }
.resizable-table .col-address { width: 200px; min-width: 150px; }
.resizable-table .col-path { width: 180px; min-width: 120px; }
.resizable-table .col-pol { width: 120px; min-width: 100px; }
.resizable-table .col-usdt { width: 120px; min-width: 100px; }
.resizable-table .col-updated { width: 150px; min-width: 120px; }

/* Address column specific styling */
.address-cell {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    word-break: break-all;
    padding: 8px 4px;
}

.address-full {
    display: none;
}

.address-truncated {
    display: inline;
}

/* Show full address on hover */
.address-cell:hover .address-full {
    display: inline;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    position: absolute;
    z-index: 1000;
    max-width: 300px;
    word-break: break-all;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.address-cell:hover .address-truncated {
    display: none;
}

/* Form controls */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Password toggle styling */
.password-input-container {
    position: relative;
}

.password-input {
    padding-right: 45px !important;
}

.password-toggle-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #6c757d;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    z-index: 10;
}

.password-toggle-btn:hover {
    color: #495057;
    background-color: rgba(0, 0, 0, 0.05);
}

.password-toggle-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

.password-toggle-btn i {
    transition: all 0.3s ease;
}

/* Text security disc styling for obscured text */
.password-input.obscured {
    -webkit-text-security: disc;
    font-family: text-security-disc, monospace;
    letter-spacing: 2px;
}

.password-input.visible {
    -webkit-text-security: none;
    font-family: inherit;
    letter-spacing: normal;
}

/* Custom receivers styling */
.custom-receiver-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 8px;
    padding: 8px;
    transition: all 0.3s ease;
}

.custom-receiver-item:hover {
    border-color: #667eea;
    background-color: rgba(102, 126, 234, 0.05);
}

.custom-receiver-item .form-check-input:checked ~ .form-check-label {
    color: #667eea;
    font-weight: 500;
}

.custom-receiver-address {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    word-break: break-all;
}

/* Generated wallet cards styling (similar to custom receivers) */
.generated-wallet-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 8px;
    padding: 8px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.generated-wallet-item:hover {
    border-color: #667eea;
    background-color: rgba(102, 126, 234, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.generated-wallet-item .form-check-input:checked ~ .form-check-label {
    color: #667eea;
    font-weight: 500;
}

.generated-wallet-address {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    word-break: break-all;
}

.generated-wallet-balances {
    font-size: 0.8rem;
    margin-top: 4px;
}

.balance-item {
    display: inline-block;
    margin-right: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: rgba(108, 117, 125, 0.1);
}

.balance-item.pol-balance {
    background-color: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.balance-item.usdt-balance {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.add-custom-receiver-btn {
    transition: all 0.3s ease;
}

.add-custom-receiver-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.custom-receiver-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    padding: 12px;
}

.custom-receiver-section h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 12px;
}

.custom-receiver-section .border-top {
    border-color: #dee2e6 !important;
}

/* Generated wallets section styling */
.generated-wallets-section {
    padding: 8px 0;
}

.generated-wallets-section:empty::after {
    content: "No wallets generated yet";
    color: #6c757d;
    font-style: italic;
    font-size: 0.9rem;
}

/* Modal styling */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    border-bottom: none;
}

.modal-title {
    font-weight: 600;
}

.btn-close {
    filter: invert(1);
}

/* Checkbox styling */
.form-check {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.form-check:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.form-check-input {
    margin-top: 0.25rem;
}

.form-check-label {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Status indicators */
.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-info {
    color: #17a2b8 !important;
}

/* Totals section */
#totalsSection {
    margin-bottom: 2rem !important;
}

#totalsSection.row {
    display: flex !important;
    flex-wrap: nowrap !important;
    margin-left: -0.5rem !important;
    margin-right: -0.5rem !important;
    gap: 0 !important;
    justify-content: space-between !important;
}

#totalsSection .col-4 {
    flex: 0 0 33% !important;
    max-width: 33% !important;
    min-width: 33% !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    margin-bottom: 0 !important;
}

#totalsSection .card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e9ecef;
    height: 100% !important;
    min-height: 120px !important;
    display: flex !important;
    flex-direction: column !important;
    transition: all 0.3s ease;
    margin-bottom: 0 !important;
    width: 100% !important;
}

#totalsSection .card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

#totalsSection .card-body {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    flex-grow: 1 !important;
    padding: 1rem !important;
    text-align: center !important;
}

#totalsSection .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#totalsSection h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

#totalsSection .mb-2 {
    margin-bottom: 0.3rem !important;
}

#totalsSection .mb-2 i {
    font-size: 1.5rem !important;
}

/* Responsive totals section - Always keep in one row with 33% width each */
@media (max-width: 991px) {
    #totalsSection .col-4 {
        flex: 0 0 33% !important;
        max-width: 33% !important;
        min-width: 33% !important;
    }
    
    #totalsSection .card-body {
        padding: 0.8rem !important;
    }
    
    #totalsSection h3 {
        font-size: 1.3rem;
    }
    
    #totalsSection .mb-2 i {
        font-size: 1.3rem !important;
    }
}

@media (max-width: 768px) {
    #totalsSection .col-4 {
        flex: 0 0 30% !important;
        max-width: 30% !important;
        min-width: 30% !important;
        padding-left: 0.3rem !important;
        padding-right: 0.3rem !important;
    }
    
    #totalsSection .card {
        min-height: 100px !important;
    }
    
    #totalsSection .card-body {
        padding: 0.6rem !important;
    }
    
    #totalsSection .card-title {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }
    
    #totalsSection h3 {
        font-size: 1.1rem;
    }
    
    #totalsSection .mb-2 {
        margin-bottom: 0.2rem !important;
    }
    
    #totalsSection .mb-2 i {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 576px) {
    #totalsSection .col-4 {
        flex: 0 0 30% !important;
        max-width: 30% !important;
        min-width: 30% !important;
        padding-left: 0.2rem !important;
        padding-right: 0.2rem !important;
    }
    
    #totalsSection .card-body {
        padding: 0.5rem !important;
    }
    
    #totalsSection .card-title {
        font-size: 0.7rem;
    }
    
    #totalsSection h3 {
        font-size: 1rem;
    }
    
    #totalsSection .mb-2 i {
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    #totalsSection .col-4 {
        flex: 0 0 33% !important;
        max-width: 33% !important;
        min-width: 33% !important;
    }
    
    #totalsSection .card-title {
        font-size: 0.65rem;
    }
    
    #totalsSection h3 {
        font-size: 0.9rem;
    }
    
    #totalsSection .mb-2 i {
        font-size: 0.9rem !important;
    }
}

/* Transaction history */
#transactionHistoryCard .table-responsive {
    max-height: 400px;
    overflow-y: auto;
}

/* Responsive design */
@media (max-width: 768px) {
    .header-section h1 {
        font-size: 2rem;
    }
    
    .card:not(#totalsSection .card) {
        margin-bottom: 1rem;
    }
    
    .btn {
        margin-bottom: 0.5rem;
    }
    
    .table-responsive {
        font-size: 0.8rem;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Full Screen Loading Overlay */
.fullscreen-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.fullscreen-loading.show {
    opacity: 1;
    visibility: visible;
}

.fullscreen-loading .loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.fullscreen-loading .loading-text {
    color: white;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 10px;
}

.fullscreen-loading .loading-subtext {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    text-align: center;
}

.fullscreen-loading .loading-progress {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
}

.fullscreen-loading .loading-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Full-screen transaction progress dialog */
.transaction-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.transaction-progress-overlay.show {
    opacity: 1;
    visibility: visible;
}

.transaction-progress-dialog {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    color: white;
    position: relative;
    animation: slideInScale 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideInScale {
    0% {
        transform: scale(0.7) translateY(50px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.transaction-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.transaction-progress-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.transaction-progress-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.transaction-progress-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.transaction-progress-body {
    margin-bottom: 1.5rem;
}

.transaction-progress-status {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.transaction-progress-current {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.transaction-progress-current i {
    color: #ffd700;
    animation: pulse 1.5s infinite;
}

.transaction-progress-details {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.transaction-progress-bar-container {
    margin-bottom: 1rem;
}

.transaction-progress-bar {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.transaction-progress-bar-fill {
    background: linear-gradient(90deg, #ffd700, #ffed4e);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.transaction-progress-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.transaction-progress-stat {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    backdrop-filter: blur(5px);
}

.transaction-progress-stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.transaction-progress-stat-label {
    font-size: 0.8rem;
    opacity: 0.8;
}

.transaction-progress-log {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 1rem;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
}

.transaction-progress-log-entry {
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
    border-left: 3px solid transparent;
    padding-left: 0.5rem;
}

.transaction-progress-log-entry.success {
    border-left-color: #28a745;
    color: #90ee90;
}

.transaction-progress-log-entry.error {
    border-left-color: #dc3545;
    color: #ffb3b3;
}

.transaction-progress-log-entry.info {
    border-left-color: #17a2b8;
    color: #87ceeb;
}

.transaction-progress-log-entry.warning {
    border-left-color: #ffc107;
    color: #ffeb3b;
}

.transaction-progress-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.transaction-progress-actions {
    display: flex;
    gap: 0.5rem;
}

.transaction-progress-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.transaction-progress-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.transaction-progress-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.transaction-progress-minimized {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50px;
    padding: 1rem 1.5rem;
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 9998;
    animation: bounceIn 0.5s ease;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.transaction-progress-minimized:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Mobile responsiveness for transaction progress */
@media (max-width: 768px) {
    .transaction-progress-dialog {
        width: 95%;
        padding: 1.5rem;
        max-height: 90vh;
    }
    
    .transaction-progress-title {
        font-size: 1.3rem;
    }
    
    .transaction-progress-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .transaction-progress-log {
        max-height: 150px;
        font-size: 0.8rem;
    }
    
    .transaction-progress-minimized {
        bottom: 15px;
        right: 15px;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Utility classes */
.text-truncate-address {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.balance-positive {
    color: #28a745;
    font-weight: 600;
}

.balance-zero {
    color: #6c757d;
    font-style: italic;
}

.balance-error {
    color: #dc3545;
    font-weight: 500;
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Network Selector Styles */
.network-selector-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.network-selector-wrapper {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 800px;
}

.network-search-section {
    margin-bottom: 20px;
    position: relative;
}

.network-search-section .input-group {
    position: relative;
}

.network-search-section .input-group .form-control {
    border-right: none;
    border-radius: 0.375rem 0 0 0.375rem !important;
    height: 40px !important; /* Fixed height */
    min-height: 40px;
    max-height: 40px;
}

.network-search-section .form-check {
    margin-bottom: 0;
}

.network-search-section .form-check-label {
    font-size: 0.9rem;
    color: #495057;
    font-weight: 500;
}

.network-search-section .form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.testnet-toggle-container {
    margin: 0 auto; /* Center the container */
    padding: 8px 12px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.testnet-toggle-container .form-check {
    margin: 0;
    padding: 0;
    width: 100%;
    display: flex;
    align-items: center;
}

.testnet-toggle-container .form-check-label {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    margin-left: 8px;
    user-select: none;
}

.testnet-toggle-container .form-check-input {
    margin: 0;
    flex-shrink: 0;
}

/* Ensure the toggle container stays within bounds */
.network-search-section .testnet-toggle-container {
    width: 100%;
    max-width: 100%;
}

/* Refresh network button styling */
#refreshNetworksBtn {
    color: white !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    height: 40px !important; /* Fixed height to match input */
    min-height: 40px;
    max-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: none;
    border-radius: 0 0.375rem 0.375rem 0 !important;
}

#refreshNetworksBtn:hover {
    color: white !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    background: rgba(255, 255, 255, 0.2) !important;
}

#refreshNetworksBtn:focus {
    color: white !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    background: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

#refreshNetworksBtn i {
    color: white !important;
    font-size: 0.875rem;
}

/* Responsive adjustments for network search */
@media (max-width: 576px) {
    .network-search-section .form-check-label {
        font-size: 0.875rem;
    }
    
    .network-search-section .input-group {
        margin-bottom: 0.75rem !important;
    }
    
    .network-search-section .input-group .form-control,
    #refreshNetworksBtn {
        height: 38px !important; /* Slightly smaller on mobile */
        min-height: 38px;
        max-height: 38px;
    }
}

.network-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0 0 10px 10px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.network-search-result {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.network-search-result:hover {
    background-color: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

.network-search-result:last-child {
    border-bottom: none;
}

.network-result-info {
    display: flex;
    align-items: flex-start;
    flex: 1;
    gap: 12px;
}

.network-result-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    text-align: center;
    color: #667eea;
    margin-top: 2px;
}

.network-result-details {
    flex: 1;
    min-width: 0; /* Allows text to wrap properly */
}

.network-result-details h6 {
    margin: 0 0 2px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    text-align: left;
    line-height: 1.3;
}

.network-result-details small {
    color: #6c757d;
    font-size: 0.8rem;
    text-align: left;
    display: block;
    line-height: 1.2;
}

.network-result-chain {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 4px;
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 500;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
}

.network-result-testnet {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.network-result-mainnet {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.current-network-info {
    margin-top: 20px;
}

.current-network-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.current-network-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.current-network-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.current-network-card:hover::before {
    opacity: 1;
}

.network-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.network-info .badge, .current-network-info .badge {
    font-size: 1rem;
    padding: 12px 20px;
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    margin: 0 auto;
    white-space: nowrap;
}

.current-network-info .badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

/* Ensure network icons in badges are properly aligned */
.current-network-info .badge img,
.current-network-info .badge i {
    margin-right: 8px;
    vertical-align: middle;
    flex-shrink: 0;
}

.current-network-info .badge img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 50%;
}

/* Fix for the d-flex container in the network status */
.network-status .d-flex {
    width: 100%;
    justify-content: center;
}

.network-details {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.network-details * {
    margin: 0;
}

.network-detail-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.network-detail-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.network-detail-item i {
    margin-right: 8px;
    width: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.network-detail-item span {
    font-family: 'Courier New', monospace;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
}

.quick-networks h6 {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    margin-bottom: 12px;
}

.quick-network-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.quick-network-buttons .btn {
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.quick-network-buttons .btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-1px);
}

.quick-network-buttons .btn.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    color: white;
}

.quick-network-buttons .btn img {
    margin-right: 4px;
}

.quick-network-buttons .btn i {
    margin-right: 4px;
}

/* Loading state for network search */
.network-search-loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

.network-search-loading i {
    margin-right: 8px;
}

/* Empty state for network search */
.network-search-empty {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
}

/* Network status colors */
.bg-mainnet {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: white !important;
}

.bg-testnet {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%) !important;
    color: white !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .network-selector-wrapper {
        padding: 15px;
    }
    
    .quick-network-buttons {
        gap: 6px;
    }
    
    .quick-network-buttons .btn {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    .current-network-card {
        padding: 12px;
    }
    
    .network-search-results {
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .network-selector-wrapper {
        padding: 12px;
    }
    
    .network-search-results {
        max-height: 200px;
    }
    
    .network-search-result {
        padding: 10px 12px;
    }
    
    .current-network-card {
        padding: 10px;
    }
    
    .network-info .badge, .current-network-info .badge {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .quick-network-buttons .btn {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .network-details {
        gap: 15px;
    }
    
    .network-result-details h6 {
        font-size: 0.85rem;
    }
    
    .network-result-details small {
        font-size: 0.75rem;
    }
}

/* Additional network badge colors */
.bg-unknown {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%) !important;
    color: white !important;
}

.bg-custom {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    color: white !important;
}

/* Network icon styling */
.network-icon-small {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}

.network-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}

.network-icon-large {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}

.network-result-icon img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}

.network-result-icon {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    text-align: center;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.network-result-icon img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.network-search-result:hover .network-result-icon img {
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.network-result-icon i {
    font-size: 16px;
    color: #667eea;
    transition: color 0.2s ease;
}

.network-search-result:hover .network-result-icon i {
    color: #5a6fd8;
}

/* Fallback styling for missing icons */
.network-icon-small[src=""], 
.network-icon[src=""],
.network-result-icon img[src=""] {
    display: none;
}

/* Gas fee configuration styling */
.gas-fee-config {
    border-left: 4px solid #17a2b8;
}

.gas-mode-toggle .btn-check:checked + .btn {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.gas-speed-preset {
    transition: all 0.3s ease;
}

.gas-speed-preset:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gas-preview-section {
    background: rgba(23, 162, 184, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.gas-warning {
    border-left: 4px solid #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

.custom-gas-input {
    transition: border-color 0.3s ease;
}

.custom-gas-input:focus {
    border-color: #17a2b8;
    box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.25);
}

/* Gas configuration card styling */
.card.border-info {
    border-color: #17a2b8 !important;
}

.card.border-info .card-header {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    border-bottom: none;
}

.card.border-info .card-header h6 {
    margin: 0;
    font-weight: 600;
}

.card.border-info .card-header i {
    margin-right: 0.5rem;
}

/* Gas mode selection buttons */
.btn-group .btn-check:checked + .btn-outline-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.btn-group .btn-check:checked + .btn-outline-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

/* Gas input styling */
.input-group .input-group-text {
    background: rgba(23, 162, 184, 0.1);
    border-color: #17a2b8;
    color: #17a2b8;
    font-weight: 500;
}

/* Gas estimation display */
.form-control-plaintext {
    font-weight: 600;
    color: #17a2b8 !important;
}

/* Alert styling for gas warnings */
.alert-warning {
    border-left: 4px solid #ffc107;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 193, 7, 0.05));
}

.alert-warning .fas {
    color: #ffc107;
    margin-right: 0.5rem;
}

/* Gas cost preview */
.text-muted {
    font-size: 0.875rem;
}

/* Transaction summary gas info */
.card.bg-light .row.mt-2 {
    border-top: 1px solid rgba(0, 0, 0, 0.125);
    padding-top: 0.75rem;
}

.card.bg-light .row.mt-2 .text-muted {
    color: #6c757d !important;
    font-size: 0.8rem;
}

/* Responsive gas configuration */
@media (max-width: 768px) {
    .gas-fee-config .row .col-md-4 {
        margin-bottom: 1rem;
    }
    
    .btn-group.w-100 .btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .alert-warning {
        font-size: 0.875rem;
        padding: 0.75rem;
    }
}

@media (max-width: 576px) {
    .gas-fee-config .card-body {
        padding: 1rem 0.75rem;
    }
    
    .btn-group.w-100 .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.5rem;
    }
    
    .input-group .form-control {
        font-size: 0.875rem;
    }
    
    .form-text {
        font-size: 0.75rem;
    }
}