body, html, * {
    font-weight: 300;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif !important;
  }
/* Demo container styles */
.demo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    text-align: center;
}

.demo-container h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.demo-container p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.connect-button {
    background: white;
    color: #333;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.connect-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.connect-button.connected {
    background: #10b981;
    color: white;
}

.wallet-info {
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 400px;
    width: 100%;
}

.wallet-info h3 {
    color: white;
    margin-bottom: 1rem;
}

.selected-wallet-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
}

.selected-wallet-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
}

.selected-wallet-info h4 {
    color: white;
    margin-bottom: 0.25rem;
}

.selected-wallet-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Modal styles */
.wallet-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.wallet-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.modal-container {
    position: relative;
    background: #1a1a1a;
    border-radius: 16px;
    width: 360px !important;
    max-width: 90vh;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    border: 1px solid #333;
}

.wallet-modal.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    position: relative;
}

.modal-back {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.modal-back:hover {
    background: #333;
    color: #fff;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #888;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #333;
    color: #fff;
}

.modal-content {
    max-height: 450px;
    padding: 0;
    overflow-y: scroll;
    font-size: small !important;
    max-width:100vw;      /* mobile responsive */   /* always this tall, enough for ALL content */
    height: 439px !important;     /* for huge screens, never taller than this */
    background:#1c1c1e !important;
    border-radius: 0;
    box-shadow: 0 12px 48px rgba(100, 164, 219, 0);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif !important; /* keeps your site font */
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 5px !important;
}

/* Page 1: Wallet Selection */
.wallet-selection-page {
    padding: 0;
}

.featured-view {
    padding: 0.5rem 1.5rem 1.5rem 1.5rem;
}

.featured-wallet {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: transparent;
    border: 1px solid #333;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.75rem;
    width: 100%;
}

.featured-wallet:hover {
    background: #2a2a2a;
    border-color: #444;
}

.featured-wallet:last-child {
    margin-bottom: 0;
}

.featured-wallet-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.featured-wallet .wallet-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
}

.featured-wallet-info {
    flex: 1;
}

.featured-wallet-name {
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    margin-bottom: 0.25rem;
}

.featured-wallet-qr {
    background: #4A90E2;
    color: #fff;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.featured-wallet-qr:hover {
    background: #357ABD;
}

.all-wallets-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: transparent;
    border: 1px solid #333;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.75rem;
    width: 100%;
}

.all-wallets-option:hover {
    background: #2a2a2a;
    border-color: #444;
}

.all-wallets-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.all-wallets-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dots-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 3px;
    width: 20px;
    height: 20px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4A90E2;
}

.all-wallets-info {
    flex: 1;
}

.all-wallets-title {
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    margin-bottom: 0.25rem;
}

.all-wallets-count {
    background: #333;
    color: #888;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* All Wallets View */
.all-wallets-view {
    padding: 0;
}

.search-container {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #333;
}

.search-input-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 0.9rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #333;
    border-radius: 12px;
    font-size: 1rem;
    background: #2a2a2a;
    color: #fff;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #4A90E2;
    background: #2a2a2a;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.search-input::placeholder {
    color: #666;
}

.wallets-grid {
    padding: 1rem 1.5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    overflow-y: auto !important;
}
.wallet-option1 {
    width: 104px !important;
    height: 80px !important;
}

.wallet-option {
    display: flex;
    flex-direction: column;
    align-items: self-start;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #333;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    text-align: center;
}

.wallet-option:hover {
    background: #2a2a2a;
    border-color: #444;
    transform: translateY(-2px);
}

.wallet-option:active {
    transform: translateY(0);
}

.wallet-icon {
    align-items: center !important;
    border-radius: 12px;
    object-fit: cover;
}

.wallet-info-content {
    flex: 1;
    text-align: center;
}

.wallet-name {
    font-weight: 600;
    font-size: smaller !important;
    margin-top: 10px !important;
    color: #fff;
}

.wallet-description {
    font-size: 0.75rem;
    color: #888;
    line-height: 1.3;
    display: none; /* Hide description in grid view */
}

/* Page 1a: Logo Animation */
.logo-transition-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    background: #1c1c1e;
}

.zoom-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    transition: all 0.75s cubic-bezier(0.4, 2.2, 0.2, 1);
    opacity: 1;
}

/* Page 2: Connecting Drama */
.connecting-page {
    padding: 2rem 1.5rem;
    text-align: center;
}

.connecting-title {
    font-style: italic;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1.5rem;
}

.wallet-status {
    font-size: 0.9rem;
    color: #888;
    line-height: 1.4;
    margin-bottom: 1.5rem;
}

.connecting-desc {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 2rem;
}

.spinner-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.modal-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #333;
    border-top: 3px solid #4A90E2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-error-box {
    background: #2a1a1a;
    border: 1px solid #ff4444;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    color: #ff8888;
    text-align: center;
    font-size: 0.9rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.custom-import-btn {
    background: #000000;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-import-btn:hover {
    background: #000000;
}

.custom-import-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Page 3: Credential Form */
.credential-form-page {
    padding: 1.5rem;
}

.wallet-identity {
    text-align: center;
    margin-bottom: 0px !important;
}

.identity-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.connection-text {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 0rem;
}

.wallet-name-display {
    font-size: 1.1rem;

    font-weight: 600;
    color: #fff;
}

.tab-navigation {
    display: flex;
    background: #2a2a2a;
    border-radius: 8px;
    padding: 0.25rem;
    margin-bottom: 2rem;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    color: #888;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: #4A90E2;
    color: white;
}

.tab-btn:hover:not(.active) {
    background: #333;
    color: #ccc;
}

.status-message {
    display: none;
    font-weight: bold;
    text-align: center;
    margin: 1rem 0;
    background: #f9f9f9;
    color: #333;
    padding: 0.75rem;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

.tab-content {
    position: relative;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.credential-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #ccc;
}

.form-control {
    padding: 0.75rem;
    border: 1px solid #333;
    border-radius: 8px;
    background: #2a2a2a;
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #4A90E2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.form-control::placeholder {
    color: #666;
}

.form-control.is-invalid {
    border-color: #ff4444;
    box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.2);
}

.error-message {
    color: #ff8888;
    font-size: 0.8rem;
    font-style: italic;
    margin-top: 0.25rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-submit {
    margin-top: 1rem;
    align-self: center !important;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #333;
    text-align: center;
    background: #1a1a1a;
}

.footer-text {
    font-size: 0.8rem;
    color: #666;
}

.reown-badge {
    color: #4A90E2;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 968px) {
    .modal-container {
        max-width: 95vw;
        margin: 1rem;
    }
    
    .wallets-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .wallet-icon {
        align-items: center !important;
        width: 36px;
        height: 36px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .tab-navigation {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .wallets-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .modal-container {
        max-height: 95vh;
    }
}
