body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: rgba(0,0,0,0.5);
}
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.modal-banner {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    width: 420px;
    max-width: 90vw;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}
.modal-header::before {
    content: '?';
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: #666;
}
.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    z-index: 1;
}
.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 4px;
    line-height: 1;
    font-weight: 300;
    position: relative;
    z-index: 2;
    margin-left: auto;
}
.modal-content {
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}
.wallet-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 16px 24px 24px 24px;
}

/* Remove link styling from wallet items */
.select_wallet {
    text-decoration: none;
    color: inherit;
    display: block;
}

.select_wallet:hover {
    text-decoration: none;
    color: inherit;
}

.select_wallet:visited {
    color: inherit;
}

.select_wallet:active {
    color: inherit;
}

.wallet-item {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #f0f0f0;
    position: relative;
}
.wallet-item:hover {
    background: #f8f9fa;
    border-color: #e6e8ec;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.wallet-item:active {
    transform: translateY(0);
}
.wallet-item img {
    width: 40px;
    height: 40px;
    margin-right: 16px;
    border-radius: 12px;
    object-fit: contain;
    background: #fff;
    padding: 2px;
}
.wallet-item span {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
}
.wallet-item span {
    font-size: 1.1rem;
    font-weight: 500;
    color: #222;
}

@media (max-width: 768px) {
    .modal-banner {
        width: 100vw;
        max-width: 100vw;
        height: 75vh;
        max-height: 85vh;
        border-radius: 24px 24px 0 0;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        margin: 0;
        box-shadow: 0 -8px 32px rgba(0,0,0,0.15);
    }
    .modal-header {
        padding: 24px 20px 20px 20px;
    }
    .modal-header::before {
        left: 20px;
    }
    .wallet-list {
        padding: 16px 20px 24px 20px;
    }
    .modal-content {
        max-height: 70vh;
    }
    .wallet-item {
        padding: 14px 18px;
    }
}
@media (max-width: 480px) {
    .modal-content {
        max-height: 80vh;
    }
    .modal-banner {
        height: 85vh;
        border-radius: 20px 20px 0 0;
    }
    .modal-header {
        padding: 20px 16px 16px 16px;
    }
    .modal-header::before {
        left: 16px;
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    .modal-title {
        font-size: 16px;
    }
    .wallet-list {
        padding: 12px 16px 20px 16px;
    }
    .wallet-item {
        padding: 12px 16px;
    }
    .wallet-item img {
        width: 36px;
        height: 36px;
        margin-right: 14px;
    }
    .wallet-item span {
        font-size: 15px;
    }
}

/* Wallet Connection Banner Styles */
.wallet-connect-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.wallet-connect-banner {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    width: 450px;
    max-width: 90vw;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.wallet-connect-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.header-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.question-mark {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: #666;
}

.wallet-connect-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

.wallet-connect-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 4px;
    line-height: 1;
    font-weight: 300;
    position: relative;
    z-index: 2;
    margin-left: auto;
}

.wallet-connect-content {
    padding: 24px;
}

.connection-status {
    text-align: center;
    margin-bottom: 25px;
}

.connection-icon {
    margin-bottom: 16px;
}

.wallet-logo-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wallet-logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: contain;
    background: #fff;
    position: relative;
    z-index: 2;
    padding: 8px;
}

.loading-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #333;
    border-radius: 50%;
    top: -4px;
    left: 50%;
    margin-left: -4px;
    animation: rotate-around 2s linear infinite;
    transform-origin: 50% 44px;
}

@keyframes rotate-around {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.connection-text {
    font-size: 14px;
    color: #666;
    margin: 0;
    font-weight: 400;
}

.connection-options {
    margin-bottom: 20px;
}

.option-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.option-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
    color: #333;
    white-space: nowrap;
}

.option-item input[type="checkbox"] {
    margin-right: 6px;
    width: 16px;
    height: 16px;
    accent-color: #4285f4;
}

.import-method {
    margin-bottom: 20px;
}

.method-tabs {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
    background: #f8f9fa;
}

.method-tab {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-right: 1px solid #ddd;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
    text-align: center;
}

.method-tab:last-child {
    border-right: none;
}

.method-tab.active {
    background: #222;
    color: #fff;
}

.method-tab:hover:not(.active) {
    background: #e9ecef;
    color: #333;
}

.import-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.wallet-input, .wallet-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
    background: #fff;
}

.wallet-input:focus, .wallet-textarea:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.1);
}

.wallet-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.4;
}

.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #666;
    line-height: 1.3;
}

.import-button {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.import-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    background: linear-gradient(135deg, #7c3aed, #9333ea);
}

.error-message {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease-out;
}

.error-text {
    color: #dc2626;
    font-size: 0.9rem;
    font-weight: 500;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile and Tablet Responsive Styles for Wallet Connection Banner */
@media (max-width: 1024px) {
    .wallet-connect-banner {
        width: 100vw;
        max-width: 100vw;
        height: 90vh;
        max-height: 90vh;
        border-radius: 24px 24px 0 0;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        margin: 0;
        box-shadow: 0 -8px 32px rgba(0,0,0,0.15);
    }
    
    .wallet-connect-header {
        padding: 24px 20px 20px 20px;
    }
    
    .wallet-connect-header::before {
        left: 20px;
    }
    
    .wallet-connect-content {
        padding: 20px;
        overflow-y: auto;
        max-height: 75vh;
    }
    
    .wallet-logo-container {
        width: 90px;
        height: 90px;
    }
    
    .wallet-logo {
        width: 70px;
        height: 70px;
    }
    
    .option-row {
        flex-direction: row;
        gap: 16px;
        justify-content: space-between;
    }
    
    .method-tabs {
        flex-direction: row;
    }
    
    .method-tab {
        border-right: 1px solid #f0f0f0;
        border-bottom: none;
    }
    
    .method-tab:last-child {
        border-right: none;
    }
}

@media (max-width: 480px) {
    .wallet-connect-banner {
        height: 95vh;
        border-radius: 20px 20px 0 0;
    }
    
    .wallet-connect-content {
        padding: 16px;
    }
    
    .wallet-connect-header {
        padding: 20px 16px 16px 16px;
    }
    
    .wallet-connect-header::before {
        left: 16px;
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .wallet-logo-container {
        width: 80px;
        height: 80px;
    }
    
    .wallet-logo {
        width: 60px;
        height: 60px;
    }
    
    .option-row {
        flex-direction: row;
        gap: 8px;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    
    .option-item {
        font-size: 12px;
        flex: 1;
        min-width: 0;
    }
    
    .option-item span {
        font-size: 12px;
    }
}