* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #F3F4F6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card.hidden {
    display: none;
}

.form-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #E5E7EB;
}

.header-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F3F4F6;
    border-radius: 12px;
    flex-shrink: 0;
}

.form-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.form-subtitle {
    font-size: 15px;
    color: #6B7280;
    line-height: 1.5;
}

.form-section {
    margin-bottom: 24px;
}

.section-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.card-title {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.card-subtitle {
    font-size: 14px;
    color: #6B7280;
}

.step-badge {
    background-color: #DBEAFE;
    color: #3B82F6;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.wallet-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wallet-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wallet-option:hover {
    border-color: #3B82F6;
    background-color: #F9FAFB;
}

.wallet-option.selected {
    background-color: #EFF6FF;
    border-color: #3B82F6;
}

.chain-info,
.wallet-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chain-logo,
.wallet-logo {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chain-name,
.wallet-name {
    font-size: 16px;
    font-weight: 500;
    color: #111827;
}

.checkmark {
    flex-shrink: 0;
}

.selected-asset {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-radius: 8px;
    background-color: #F3F4F6;
    margin-bottom: 24px;
}

.asset-name {
    font-size: 16px;
    font-weight: 500;
    color: #111827;
    margin-bottom: 4px;
}

.asset-subtitle {
    font-size: 12px;
    color: #6B7280;
}

.continue-btn {
    width: 100%;
    padding: 12px 24px;
    background-color: #3B82F6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.continue-btn:hover {
    background-color: #2563EB;
}

.continue-btn:active {
    background-color: #1D4ED8;
}

.continue-btn:disabled {
    background-color: #9CA3AF;
    cursor: not-allowed;
}

.connection-status {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.connection-status.success {
    background-color: #D1FAE5;
    color: #065F46;
}

.connection-status.error {
    background-color: #FEE2E2;
    color: #991B1B;
}

.connection-status.info {
    background-color: #DBEAFE;
    color: #1E40AF;
}

#status-message {
    font-size: 14px;
    font-weight: 500;
}

.connected-address {
    margin-top: 24px;
    padding: 16px;
    background-color: #F0F9FF;
    border: 1px solid #BAE6FD;
    border-radius: 8px;
}

.connected-address.hidden {
    display: none;
}

.address-label {
    font-size: 12px;
    color: #0369A1;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.address-value {
    font-size: 14px;
    color: #0C4A6E;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    line-height: 1.5;
}

.contract-info {
    background-color: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-label {
    font-size: 14px;
    color: #6B7280;
    font-weight: 500;
}

.info-value {
    font-size: 14px;
    color: #111827;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    text-align: right;
    max-width: 60%;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.address-input,
.amount-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    transition: border-color 0.2s;
}

.address-input:focus,
.amount-input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-hint {
    display: block;
    font-size: 12px;
    color: #6B7280;
    margin-top: 4px;
}

.transaction-info {
    margin-top: 16px;
    padding: 12px;
    background-color: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 8px;
}

.transaction-info.hidden {
    display: none;
}

.tx-label {
    font-size: 12px;
    color: #166534;
    font-weight: 500;
    margin-bottom: 8px;
}

.tx-link {
    font-size: 14px;
    color: #16A34A;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    text-decoration: none;
    display: block;
}

.tx-link:hover {
    text-decoration: underline;
}

/* Transaction Confirmation Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #E5E7EB;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6B7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-close:hover {
    background-color: #F3F4F6;
    color: #111827;
}

.modal-body {
    padding: 24px;
}

.confirmation-summary {
    background-color: #F9FAFB;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.summary-item:last-child {
    margin-bottom: 0;
}

.summary-label {
    font-size: 14px;
    color: #6B7280;
    font-weight: 500;
}

.summary-value {
    font-size: 16px;
    color: #111827;
    font-weight: 600;
    text-align: right;
    font-family: 'Courier New', monospace;
}

.address-value-small {
    font-size: 12px;
    word-break: break-all;
}

.refund-amount {
    color: #16A34A;
}

.modal-warning {
    background-color: #FEF3C7;
    border: 1px solid #FCD34D;
    border-radius: 8px;
    padding: 16px;
}

.modal-warning p {
    margin: 0;
    font-size: 14px;
    color: #92400E;
    line-height: 1.5;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid #E5E7EB;
}

.modal-btn-cancel,
.modal-btn-confirm {
    flex: 1;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.modal-btn-cancel {
    background-color: #F3F4F6;
    color: #374151;
}

.modal-btn-cancel:hover {
    background-color: #E5E7EB;
}

.modal-btn-confirm {
    background-color: #3B82F6;
    color: white;
}

.modal-btn-confirm:hover {
    background-color: #2563EB;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 40px 20px;
}

.loading-state.hidden {
    display: none;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #F3F4F6;
    border-top-color: #3B82F6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-text {
    font-size: 16px;
    color: #6B7280;
    font-weight: 500;
}

/* Success State */
.success-state {
    text-align: center;
    padding: 20px 0;
}

.success-state.hidden {
    display: none;
}

.success-icon {
    margin: 0 auto 24px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}

.success-message {
    font-size: 16px;
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 24px;
}

.success-details {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #E5E7EB;
}

.success-details.hidden {
    display: none;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: #F9FAFB;
    border-radius: 8px;
    margin-bottom: 8px;
}

.detail-label {
    font-size: 14px;
    color: #6B7280;
    font-weight: 500;
}

.detail-link {
    font-size: 14px;
    color: #3B82F6;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.detail-link:hover {
    color: #2563EB;
    text-decoration: underline;
}

/* Confirmation Section */
.confirmation-section {
    margin-bottom: 24px;
}

.confirmation-section:last-child {
    margin-bottom: 0;
}

/* Mobile Wallet Instructions */
.mobile-wallet-name {
    font-weight: 600;
    color: #3B82F6;
}

/* EULA Modal Styles - Matching Landing Page Design */
.eula-modal {
    max-width: 600px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.eula-header {
    background-color: white;
    border-bottom: 1px solid #E5E7EB;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.eula-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.page-indicator {
    font-size: 14px;
    color: #6B7280;
    font-weight: 500;
    background-color: #F3F4F6;
    padding: 6px 12px;
    border-radius: 8px;
}

.eula-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
    background-color: #FFFFFF;
}

.eula-page {
    min-height: 400px;
    display: block;
    animation: fadeIn 0.3s ease-in;
}

.eula-page.hidden {
    display: none !important;
}

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

.eula-content {
    line-height: 1.6;
}

.eula-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #E5E7EB;
}

.eula-text {
    font-size: 15px;
    color: #374151;
    margin-bottom: 20px;
    line-height: 1.6;
}

.eula-text p {
    margin-bottom: 16px;
}

.eula-text p:last-child {
    margin-bottom: 0;
}

.eula-key-point {
    background-color: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 16px;
    margin: 24px 0;
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
}

.eula-key-point strong {
    display: block;
    margin-bottom: 8px;
    color: #111827;
    font-weight: 600;
    font-size: 15px;
}

.eula-confirmation-question {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #E5E7EB;
    font-size: 15px;
    color: #374151;
    line-height: 1.6;
}

.eula-confirmation-question p {
    margin-bottom: 12px;
}

.eula-confirmation-question p:last-child {
    margin-bottom: 0;
}

.eula-confirmation-question strong {
    color: #111827;
    font-weight: 600;
}

.eula-wallet-info {
    background-color: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 16px;
    margin: 24px 0;
    font-size: 14px;
    color: #374151;
}

.eula-wallet-info p {
    margin-bottom: 8px;
}

.eula-wallet-info p:last-child {
    margin-bottom: 0;
}

.eula-wallet-info strong {
    color: #111827;
    font-weight: 600;
}

.wallet-address-display {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #6B7280;
    word-break: break-all;
    margin-top: 8px;
    padding: 8px;
    background-color: white;
    border-radius: 4px;
}

.eula-footer {
    background-color: white;
    border-top: 1px solid #E5E7EB;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-radius: 0 0 12px 12px;
}

.eula-confirm-btn {
    font-size: 15px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        margin: 10px;
    }
    
    .eula-modal {
        max-width: 95%;
    }
    
    .eula-header,
    .eula-body,
    .eula-footer {
        padding: 16px;
    }
    
    .eula-header h2 {
        font-size: 16px;
    }
    
    .eula-title {
        font-size: 14px;
    }
    
    .eula-text,
    .eula-key-point,
    .eula-confirmation-question {
        font-size: 12px;
    }
    
    .eula-page {
        min-height: 300px;
    }
    
    .modal-btn-cancel,
    .modal-btn-confirm {
        font-size: 12px;
        padding: 10px 16px;
    }
}

