body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: #f5f5f5;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    margin: 0;
    overflow: auto;
    transition: background 0.3s, color 0.3s;
}

h1 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 20px 0;
}

.container {
    margin-top: 20px;
    width: 350px;
    max-width: 90%;
    padding-bottom: 80px;
}

.selection-section {
    margin-bottom: 30px;
}

.label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    margin: 0 0 10px;
}

.wallet-button, .token-button {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    background: #fff;
    transition: border 0.2s, background 0.2s, box-shadow 0.2s;
}

.wallet-button:hover, .token-button:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.wallet-button.selected, .token-button.selected {
    border: 2px solid #007bff;
    background: #e7f0ff;
}

.wallet-button img, .token-button img {
    width: 28px;
    height: 28px;
    margin-right: 12px;
}

.wallet-button span, .token-button span {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.input-box {
    width: 100%;
    height: 50px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    box-sizing: border-box;
    margin-bottom: 20px;
    transition: border 0.2s, box-shadow 0.2s;
    position: relative;
}

.input-box:focus-within {
    border: 1px solid #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.input-box input {
    border: none;
    outline: none;
    font-size: 16px;
    flex: 1;
    color: #333;
    background: transparent;
}

.input-box span.address-text {
    color: #333;
    flex: 1;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
}

.input-box-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.paste-text {
    font-size: 14px;
    color: #007bff;
    cursor: pointer;
    font-weight: 500;
}

.paste-text:hover {
    text-decoration: underline;
}

.right-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.token-text {
    color: #888;
    font-weight: 500;
}

.max-text {
    color: #007bff;
    cursor: pointer;
    font-weight: 500;
}

.max-text:hover {
    text-decoration: underline;
}

.next-btn {
    width: 100%;
    height: 48px;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    line-height: 48px;
    margin: 20px auto;
    box-sizing: border-box;
    background: #ccc;
    color: #fff;
    user-select: none;
    pointer-events: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 350px;
    transition: background 0.3s, color 0.3s;
}

.next-btn.active {
    background: #007bff;
    pointer-events: auto;
    cursor: pointer;
}

.next-btn:hover.active {
    background: #0056b3;
}

.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.popup-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 90%;
    width: 300px;
}

.popup-content p {
    margin: 10px 0;
    font-size: 16px;
}

.popup-content a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.popup-content a:hover {
    text-decoration: underline;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
    color: #333;
}

@media (prefers-color-scheme: dark) {
    body {
        background: #121212;
        color: #e0e0e0;
    }

    h1 {
        color: #e0e0e0;
    }

    .label {
        color: #b0b0b0;
    }

    .input-box {
        background: #1e1e1e;
        border: 1px solid #444;
    }

    .input-box:focus-within {
        border: 1px solid #00d97e;
        box-shadow: 0 0 5px rgba(0, 217, 126, 0.3);
    }

    .input-box input {
        color: #e0e0e0;
        background: transparent;
    }

    .input-box span.address-text {
        color: #e0e0e0;
    }

    .paste-text, .max-text {
        color: #00d97e;
    }

    .token-text {
        color: #b0b0b0;
    }

    .wallet-button, .token-button {
        background: #1e1e1e;
        border: 1px solid #444;
    }

    .wallet-button:hover, .token-button:hover {
        background: #2a2a2a;
    }

    .wallet-button.selected, .token-button.selected {
        border: 2px solid #00d97e;
        background: #1a3c34;
    }

    .wallet-button span, .token-button span {
        color: #e0e0e0;
    }

    .next-btn {
        background: #444;
    }

    .next-btn.active {
        background: #00d97e;
        color: #000;
    }

    .next-btn:hover.active {
        background: #00b76a;
    }

    .popup-content {
        background: #1e1e1e;
        color: #e0e0e0;
    }

    .popup-content a {
        color: #00d97e;
    }

    .close {
        color: #e0e0e0;
    }
}